Unintended pack/unpack loop for catapults
So far two ways have been found to make a siege trapped in a pack/unpack loop.
CASE NO1 - AURA MODIFICATION
This issue was reported by dinuruian
in the forum for A26
GIF/ scene of the replay provided by dinuruian
, that shows the issue:
- see image below, the siege is able to reach the target, it gets a
10% range boost
from the hero Demetrius I the Besieger
- as it unpacks, everything looks good
- there is very brief period where the
maxRange
gets reset to 100, it packs up again
- while still packing the correct
maxRange
is shown
to reproduce
- build a catapult with
mace
and get Demetrius I the Besieger
- attack a building with that catapult, while the hero provides the range boost to the catapult
reproducible
- the aura that increases the siege range came with [14251]
- here is a GIF of
Alpha XV Osiris
[14386], it seems to been broken from the get go, but the catapult is smart enough to move forward
- between the development of
Alpha XXI Ulysses
[18915] and Alpha XXII Venustas
[19922] the behavior of the catapult was changed to no longer be smart enough to move forward. GIF of Venustas
below (that is the current behavior up to now)
expected behavior
- aura gets applied correctly to the siege, see also #6713
CASE NO2 - PUSHING
to reproduce
- try to create a scene with lots of soldiers around catapults
- minimal replay attached (~4min)
Adding a debug message
- calculate the distance to the target, get the
maxRange
and watch for state changes, when the unit Catapult
packs/unpacks
- by the time the unit is
unpacked
, it has been moved slightly behind its maxRange
- it will
pack
up and attempts to find a new position, this can take a couple of times
0 A.D. (0.0.27) Main log (warnings and errors only)
WARNING: "DistanceToTarget: 100.7005; MaxRange: 100; State: search new position"
WARNING: "DistanceToTarget: 99.6598; MaxRange: 100; State: position found"
WARNING: "DistanceToTarget: 99.6598; MaxRange: 100; State: unpacking"
WARNING: "DistanceToTarget: 100.2639; MaxRange: 100; State: unpacking"
WARNING: "DistanceToTarget: 100.2639; MaxRange: 100; State: out of range"
WARNING: "DistanceToTarget: 100.2639; MaxRange: 100; State: packing"
WARNING: "DistanceToTarget: 100.2639; MaxRange: 100; State: packing"
WARNING: "DistanceToTarget: 100.2639; MaxRange: 100; State: search new position"
WARNING: "DistanceToTarget: 99.9555; MaxRange: 100; State: position found"
WARNING: "DistanceToTarget: 99.9555; MaxRange: 100; State: unpacking"
WARNING: "DistanceToTarget: 100.0359; MaxRange: 100; State: unpacking"
WARNING: "DistanceToTarget: 100.0359; MaxRange: 100; State: out of range"
reproducible
- issue can be noticed from A25 onwards
possible cause
- the issue might have been caused by the unit pushing changes
expected behavior
- Once the siege units unpacks on a target, it should not pack up again
possible solutions
- (A) lowering the
StaticExtension
in simulation/data/pathfinder.xml even more
-
a
|
b
|
|
14 | 14 | <!-- Actual pushing radius for non-moving units is: --> |
15 | 15 | <!-- Clearance * PushingRadius + StaticPushExtension --> |
16 | 16 | <!-- This mostly controls the maximum unit density--> |
17 | | <StaticExtension>0.5</StaticExtension> |
| 17 | <StaticExtension>0</StaticExtension> |
18 | 18 | |
19 | 19 | <!-- Actual pushing radius for moving units is: --> |
20 | 20 | <!-- Clearance * PushingRadius + MovingPushExtension --> |
- (B) when the catapult searches for a position on its target, the push changes are taken into account with a fixed value, e.g. (+/-2)
- issue about gatherers being pushed back on a berry bush