Stacking Order Bug

Oni Ryuu

King
Joined
Sep 8, 2016
Messages
893
Location
Manchester UK
Hello
I’d like to know if anyone has any experience with the Stacking Order Bug.
It’s a bug where a noncombat unit is sat on top of a combatant. Attacking the stack just wastes an attack without showing any message. It can make it impossible to capture a city. The bug also applies to my own units. It seems to be triggered by the order of used moves. The last unit to use/skip its moves will stand as the first unit even if it’s a non-combatant. Bombardment doesn’t have any effect beyond collateral damage.

E.g. A city containing several spearmen and a worker could have the worker unit showing as the first unit to engage. The spearmen won’t surface to receive the attacker and one of the attacking unit’s moves is wasted.

Sometimes my workers will waste their turns if set to automate instead of working or returning to a city. It might be unrelated.
 
I haven't seen this type of error before, though I'm not sure if I have setup a reproduction exactly like yours.

I have mixed non-combatants and combatants in the same square, like moving Infantry forward first and then moving workers into the square it occupies (to build a road next turn), and the Infantry are always shown as the defender if they happen to be attacked next turn. Even the turn after that, where I fortify the Infantry first, then order the workers to build a road, the same thing happens.

The only time where this graphically doesn't appear is when the AI parks invisible defenders on top of visible non-combatants, or when combatant King units are involved, but the invisible defender will always be able to defend or the King unit will start defending, once someone actually goes to attack it.
 
I don't think so, because combatant king units still attack/defend even if non-combatant units share the same tile.

I haven't tested the case where the king unit and it's pre-upgrade non-king form are on the same tile, but I doubt that would make a difference. Do you have anything for city improvements that might affect this, or units don't have "Capture" checked? I don't think these will affect it, but it's worth a test.
 
Only independent foot units and IFV’s can capture the flag units.

Does this mean, all your other landunits don´t have an AI offense or defense strategy ??

capture-jpg.492307
 

Attachments

  • Capture.jpg
    Capture.jpg
    32.9 KB · Views: 234
I use Quintillus’ editor which allows me to select only the attributes I want so I don’t need to meet the criteria to activate the necessary AI strategy. There are a large number of offensive and defensive units that can’t capture but still have their strategies.

My Hoplites are defensive units that can capture (the same as spearmen in the original game except marked as foot unit + tactical missile) but have also produced the bug when a worker enters the city.

The computer might be mistaking my infantry class of units for missiles confusing the stacking order. That could explain why I seem to be the only one who’s had this bug. It doesn’t make sense that a foot unit + tactical missile worker would be prioritised over a foot unit + tactical missile combat unit because it was the last to move.

The last unit to use its moves is the first unit to defend the stack. The other units without moves will be attacked next. If all units in a stack have moves they will behave normally receiving attackers in the preferred order.

If workers didn’t flee to the nearest city and skip turn every go; it could be ignored as a quirk.

What would you think is the most likly cause?
 
What would you think is the most likly cause?

With all those uncommon settings of flags (like not using the capture flag for attack or defense landunits), it seems the best chance to see what causes your problem, is to create a Debug version of your mod with the Quintillus editor and to cheque every single constellation of your units and their stats in combat. Unfortunately this can be very time consuming.
 
Negative defense? Was it greater than -100%, thus 0 defense units are ranked as higher defense than positive defense units?
 
Back
Top Bottom