I have probably mentioned this recent hiccup to you by now; I’ve been trying to work on the defence segment of Y4 and have been beset by some most curious unit AI behaviour.
Naturally, trying to deal with the problem has got me in a bit of a whirl.
Walk This Way
Attack-move has been the staple of AoS and hero defence and pretty much all spawn-driven map types since the dawn of time. It allows you to give units the broad desire to reach a location, while stopping along the way to engage hostile units like your player hero or allied defensive structures. Perfect. Wonderful, even.
There is one common AI failure related to spawned units, in that after a set amount of time they suddenly desire to break off all activity and walk back to the point at which they entered the world. There are known solutions to this — either keep issuing the order again, or increase the return time gameplay constant to Stupidly Long.
As you can tell by the fact that I cite known solutions, that wasn’t my problem.
Ignorance is Bliss
My problem was that, for some bizarre and still unexplained reason, my spawned drones didn’t stop to engage buildings. Since the whole point of the segment is to defend a building, I’m sure you can understand this being a bit of a concern.
I canvassed a good number of people and went through all the usual procedures — was the order being issued wrong, was the building not a valid target for the unit, was the unit dodgy, was the building dodgy, was there an alliance problem… Everything checked out.
During my testing I discovered this array of bizarre things:
- Even footmen wouldn’t attack any buildings.
- Even making the building a turret that attacked didn’t provoke a response.
- If the building was placed far enough from the map centre, passing enemies would engage it.
- If I spawned the units on top of the building and never issued an attack-move, they would engage it.
That’s a really strange collection of circumstances.
Find Another Landing Zone
As with the solution to a recent (and equally bizarre and impossible) problem in my real job, the solution is just to side-step the problem entirely and make sure the dud code is not being executed. If I spawn the units under any player rather than Neutral Hostile, their behaviour once again returns to normal.
I know that NH has always been associated with some bizarre AI anomalies at the best of times, but I’ve never come across anything like this. I can only surmise that I have somehow, via some initialisation trigger or gameplay constant modification or combination thereof, managed to break the unit Neutral Hostile AI target detection for a portion of the map. Sounds impossible, but that’s the only explanation.
I like to use Neutral Hostile because of the pre-selection functionality. When you mouse-over a player unit, you see its health and the name of the owning player. When you mouse-over a Neutral Hostile unit, you see its name and its level. Since all enemies are “Rogue Drones” of various kinds, I naturally prefer them to have their unit name than some nebulous title like “Rogue Drones”.
But, since Neutral Hostile keeps giving me lemon-lime, I must use another player.
5 thoughts on “Blog 435: Frustraaaagetion Y4”
You enlarged the map to be larger than the largest initial setting right? Perhaps that screws with some x and y checks in NH behaviour. ie: they enabled larger maps at some point and forgot to adjust that part.
That’s an interesting idea, but it was the centre of the map they were funny about rather than the outer areas. The map started out at 128×128 or something, though, and I did do tests within that boundary that were successful. It was almost like the 64×64 block in the middle makes enemy buildings invisible…
If you change your buildings to non-building units with no move speed, that should also fix your problem. I had a similar issue with the last AoS I made and it seems to me that’s how I solved it.
The problem is that making it a non-building knocked it off the pathing grid. As you can’t really see in that screenshot, the building makes use of a hole in the ground so it can rise out of it. This means that it must be absolutely precisely positioned or else… Well, aesthetic displeasure occurs. Swapping to a different player seems to me the best option, though I can understand that being undesirable in 12-player AoS.
As long as the mighty Panty also had this issue, though, I’m not imagining it. Vindication!
Aesthetic displeasure! Vindication! Fencing, fighting, torture, revenge, giants, monsters, chases, escapes, true love, miracles…