Opened 16 months ago

Last modified 11 months ago

#6706 new defect

Unintended pack/unpack loop for catapults

Reported by: Langbart Owned by:
Priority: Should Have Milestone: Alpha 27
Component: Core engine Keywords:
Cc: Patch:

Description (last modified by Langbart)

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

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

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
    • binaries/data/mods/public/simulation/data/pathfinder.xml

      a b  
      1414    <!-- Actual pushing radius for non-moving units is: -->
      1515    <!-- Clearance * PushingRadius + StaticPushExtension -->
      1616    <!-- This mostly controls the maximum unit density-->
      17     <StaticExtension>0.5</StaticExtension>
       17    <StaticExtension>0</StaticExtension>
      1818
      1919    <!-- Actual pushing radius for moving units is: -->
      2020    <!-- 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

Attachments (9)

commands.txt (37.0 KB ) - added by Langbart 16 months ago.
siege_pack_unpack.gif (1.4 MB ) - added by Langbart 16 months ago.
scene.png (1.1 MB ) - added by Langbart 16 months ago.
rec_scene.png (1.5 MB ) - added by Langbart 16 months ago.
hero_aura.png (1.8 MB ) - added by Langbart 16 months ago.
commands_hero_aura.txt (8.6 KB ) - added by Langbart 16 months ago.
cat_hero_aura.png (52.3 KB ) - added by Langbart 16 months ago.
Osiris.gif (1.0 MB ) - added by Langbart 16 months ago.
Venustas.gif (683.1 KB ) - added by Langbart 16 months ago.

Change History (15)

by Langbart, 16 months ago

Attachment: commands.txt added

by Langbart, 16 months ago

Attachment: siege_pack_unpack.gif added

by Langbart, 16 months ago

Attachment: scene.png added

by Langbart, 16 months ago

Attachment: rec_scene.png added

comment:1 by Langbart, 16 months ago

Description: modified (diff)
Milestone: Alpha 27Alpha 28
  • moving up one alpha, wait for wraitii opinion
  • adding possible solution ideas to the ticket

comment:2 by Langbart, 16 months ago

Description: modified (diff)
  • there are two cases how this issue can be triggered (a glitch in range boost modification and pushing)

by Langbart, 16 months ago

Attachment: hero_aura.png added

comment:3 by Langbart, 16 months ago

Description: modified (diff)

finding reproducible steps for triggering CASE NO 1

by Langbart, 16 months ago

Attachment: commands_hero_aura.txt added

by Langbart, 16 months ago

Attachment: cat_hero_aura.png added

comment:4 by Freagarach, 16 months ago

I've made #6713 for case NO1.

comment:5 by Langbart, 16 months ago

Description: modified (diff)
  • adding reproducible section for CASE NO1 (very old bug)

by Langbart, 16 months ago

Attachment: Osiris.gif added

by Langbart, 16 months ago

Attachment: Venustas.gif added

comment:6 by Stan, 11 months ago

Milestone: Alpha 28Alpha 27

Push back

Note: See TracTickets for help on using tickets.