Return of Rome: Mod Features - "unit cost addition" - does not work in a sensible way

:arrow_forward: GAME INFORMATION

  • GAME BUILD #: 11179620
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Windows 10

:arrow_forward: ISSUE EXPERIENCED

https://support.ageofempires.com/hc/en-us/articles/15607286588948
Return of Rome: Mod Updates

  • The unit cost addition (multiplying the cost attributes by -1) or removal (multiplying the cost attributes by -2) can now be used by technology effects in data.

The cost addition sort of works; but the behavior does not make much sense.

  • If the cost addition happens, the starting cost is not 0 (-1). (should be 0)
  • If the cost addition is triggered twice, the cost addition seems to be trigger again. (should be a NOP)

:arrow_forward: FREQUENCY OF ISSUE

ALWAYS

:arrow_forward: REPRODUCTION STEPS

(Use unit-621 Town Center as an example)

  1. Setup one Tech Effect, and the activate it.
    (Attribute Multiply) (Unit-621) (106/ATTR_STONE_COST) by (-1)
    (Attribute Change) (Unit-621) (106/ATTR_STONE_COST) by (100)
  2. Change the Tech Effect, and the activate it.
    (Attribute Multiply) (Unit-621) (106/ATTR_STONE_COST) by (-1)
    (Attribute Set) (Unit-621) (106/ATTR_STONE_COST) by (100)
    (Attribute Multiply) (Unit-621) (106/ATTR_STONE_COST) by (-1)
  3. Change the Tech Effect, and the activate it.
    (Attribute Multiply) (Unit-621) (106/ATTR_STONE_COST) by (-1)
    (Attribute Set) (Unit-621) (106/ATTR_STONE_COST) by (100)
    (Attribute Multiply) (Unit-621) (106/ATTR_STONE_COST) by (-1)
    (Attribute Change) (Unit-621) (106/ATTR_STONE_COST) by (100)

:arrow_forward: EXPECTED RESULT

  1. Town Center costs 100 Stone.
  2. Town Center costs 100 Stone.
  3. Town Center costs 200 Stone. (100+100)

:arrow_forward: ACTUAL RESULT

  1. Town Center costs 99 Stone. (-1 + 100 ?)
    Apparently the cost addition set initial cost to -1. By common sense, it should be 0.
  2. Town Center costs 99 Stone. (100 + -1 ?)
    Apparently the cost addition triggers again and changed the cost by -1. By common sense, it should be a NOP.
  3. Town Center costs 299 Stone. (100 + -1 + 100*2 ?)
    Apparently the cost update triggers twice, indicating two stone “cost slot” are added.

Case 3 is useful (not nitpicking) because there can be multiple Techs mutating costs, and it is impossible to merge Techs or control the Tech order.