The game checks all conditions in a trigger, even if the 1st one is already false

:arrow_forward: GAME INFORMATION

  • GAME BUILD: 45185
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Windows 10

:arrow_forward: ISSUE EXPERIENCED

I have detected a serious optimization issue when playing a custom scenario.
The system checks all conditions in a trigger, even if the first one is already false.
It makes an extreme lag in scenarios which have a high number of triggers (especially with a lot of Objects in Area conditions).

:arrow_forward: FREQUENCY OF ISSUE

  • 100% of the time / matches I play (ALWAYS)

:arrow_forward: REPRODUCTION STEPS

Here is an easy way to detect whether the game checks all conditions or it stops when meets the first false one.

  1. Create a trigger with Starts: On
  2. Add a condition which is always FALSE
  3. Add a 2nd, invalid condition (higher type than 30)

If the game crashes, the 2nd condition was checked, if not, the 2nd condition was not checked.
The original AoC does not check the 2nd condition, because the 1st one is already false, so the game does not crash. Definitive Edition checks all conditions even if the 1st one is false, so the game crashes.

Of course, if the 1st condition is true, the game will crash in both versions, and if the trigger is Off at start, the game won’t crash in any game versions.

Here is the example map:
Condition crash.scx

:arrow_forward: EXPECTED RESULT

The game should check the conditions while there is no false condition. If there is one, it should stop to save CPU power. Scenarios with a high number of triggers would run with a much better performance.

2 Likes