Loading...
  OR  Zero-K Name:    Password:   

Proposed Improvements to Arty AI

8 posts, 218 views
Post comment
Filter:    Player:  
sort
Watching units respond to the [Spoiler] got me to thinking a lot about unit AI. While the [Spoiler] I've browsed through unitdefs quite a bit and even tinkered with some of them, and from what I've seen ZK does not make very good use of targetting categories. While spring doesn't allow you to specify what a unit should prefer to target (and it should!) it at least allows you to specify what a unit should not target, which could definitely be used to improve how arty behaves on fight move.

My proposed changes:
-This will only affect Hammers, Sharpshooters, Aspis, Spectre, Penetrators, Impalers, Racketeers, Crusaders and Tremors. Other arty (firewalker, pillagers, wolvs) have enough generalist capabilities that they don't need to be too picky about their targets, although they could be included if a strong case is made.

-I intend to add two target categories, "SMALLFAST" and "MEDFAST" to describe raiders/fleas and the quicker assaults, respectively. Slow moving/large assaults like grizzly and striders are easy for even hammers to hit, so I intend to allow them to continue targetting them, and hopefully with more specificity than currently.

-Hammers, Crusaders, Impalers and Tremors will not shoot at MEDFAST. None will shoot at SMALLFAST.

A possible addition is a CHEAP category for porc for the high-burst-damage arties, depending on what testing reveals.
+0 / -0
quote:
While spring doesn't allow you to specify what a unit should prefer to target (and it should!) it at least allows you to specify what a unit should not target, which could definitely be used to improve how arty behaves on fight move.

There is AllowWeaponTarget which is used for many wonderful uses in ZK - including target selection.

Additionally, it's possible to prevent units from shooting with gadget-unitscript interactions (see OKP and the Don't Fire At Radar functionality).

Point being: Yes it would make a ton of sense for artillery to be smarter, but targeting categories are a bad technical solution, IMO.

Completely forbidding units to attack other units is super-duper bad and should be avoided at all costs.
+0 / -0


8 years ago
badTargetCategory is obsolete. As far as I can tell, the target priorities gadget overrides its behaviour and does a lot more than they were capable of. GUNSHIP and FIXEDWING are read from the batTargetCategory by the gadget for backwardard compatibility. This gadget shows that Spring allows you to set target preference.

onlyTargetCategory should not be used for unit AI because it completely prevents the units from firing at units which are not in the category. People should be able to tell units to shoot at generally inappropriate targets in dire circumstances. The eventual aim is to replace the middle firestate with a smartness in targetting firestate. This would do things such as tell cloaked units to not fire, inaccurate units to not fire at fast things and most units to not fire at Razor. The firestate would be overridden by direct commands (the same way that Hold Fire is now).

noChaseCategory is not obsolete and may be useful for what you want.
+0 / -0


8 years ago
Terraform generally breaks the game imo
+0 / -0

8 years ago
quote:
badTargetCategory is obsolete. As far as I can tell, the target priorities gadget overrides its behaviour and does a lot more than they were capable of. GUNSHIP and FIXEDWING are read from the batTargetCategory by the gadget for backwardard compatibility. This gadget shows that Spring allows you to set target preference.


Well that would explain why it never seemed to do anything when I changed it. Nochase was what I intended to use anyway, and works well. I didn't know there was such a gadget, so I think I'll look into that now.
+0 / -0
Skasi
8 years ago
I haven't really read the whole thread (afraid of spoilers), but from what I've gathered here a wish:

Please don't make Hammers and similar units never shoot super cheap/fast units. Their reload time of 6s and damage of 150 is not really a big deal. Yes they should prefer to target static/slow things that can be hit reliably, but not shooting at all is a bit of a waste of potential DPS from a safe distance. One reason they need to target anything is for Fight commands (-> auto-skirm) to allow them to advance and not be stopped by a single Glaive that is never killed.
+0 / -0

8 years ago
Skasi how many hammers does it take to kill one glaive? That sounds more like a player issue than an AI issue. Even if the hammers die if they kill a couple llt/defenders before then that's still better than if they'd wasted all their time trying in vain to hit the glaive instead. Also, nochase isn't absolute, as most units will still attack solar panels if they're the only thing in range.
+0 / -0
Skasi
8 years ago
When standing still then a single Hammer is enough. Otherwise it depends on the Glaives' dodge skills, terrain (kite-ability) and Glaive density.
+0 / -0