You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The AI maintains a special platoon called the 'ArmyPool'. This is where all units go before they are pulled into platoons.
While doing some other work I realized that something was clearing the commands for all structures (extractors, factories etc) randomly. This happens during the PlatoonDisband function.
After troubleshooting I've found that something is disbanding the ArmyPool during games. I've done full logging and traced it to at least two places.
The ACU thread issue is relatively simple to fix. The ProcessBuildCommand one is a little harder as there are multiple things that call it including engineer callbacks. Which is where I think this problem may be coming from.
To Reproduce
Reproducing is easy as it will happen during AI games. It may not happen in EVERY game but I've noticed that its pretty consistent to happen at least once, and often multiple times over a game that spans 15+ minutes. But it required extensive logging to find the occurrences as the symptoms are not obvious.
Expected behavior
The ArmyPool should never be disbanded as this interrupts the AI's ability to create new platoons and clears the commands of any units in that ArmyPool.
Additional context
This issue has been relatively invisible as not many units have functionality that is interrupted. The most well known (by well know I mean noticed by 2 or 3 people) is that factories will randomly cancel building orders. Its not noticeable in the T1 stage because of the build speeds but when a T3 unit or support commander build is cancelled half way through it becomes more noticeable.
I'm currently looking at ways to resolve this issue. The most obvious solution is to make sure the platoon is checked within the PlatoonDisband function to make sure that it is not the army pool before it continues.
The text was updated successfully, but these errors were encountered:
Describe the bug
The AI maintains a special platoon called the 'ArmyPool'. This is where all units go before they are pulled into platoons.
While doing some other work I realized that something was clearing the commands for all structures (extractors, factories etc) randomly. This happens during the PlatoonDisband function.
After troubleshooting I've found that something is disbanding the ArmyPool during games. I've done full logging and traced it to at least two places.
The ACU thread,
fa/lua/AI/AIBehaviors.lua
Line 361 in 80e1544
The ProcessBuildCommand function.
fa/lua/platoon.lua
Line 3618 in 80e1544
The ACU thread issue is relatively simple to fix. The ProcessBuildCommand one is a little harder as there are multiple things that call it including engineer callbacks. Which is where I think this problem may be coming from.
To Reproduce
Reproducing is easy as it will happen during AI games. It may not happen in EVERY game but I've noticed that its pretty consistent to happen at least once, and often multiple times over a game that spans 15+ minutes. But it required extensive logging to find the occurrences as the symptoms are not obvious.
Expected behavior
The ArmyPool should never be disbanded as this interrupts the AI's ability to create new platoons and clears the commands of any units in that ArmyPool.
Additional context
This issue has been relatively invisible as not many units have functionality that is interrupted. The most well known (by well know I mean noticed by 2 or 3 people) is that factories will randomly cancel building orders. Its not noticeable in the T1 stage because of the build speeds but when a T3 unit or support commander build is cancelled half way through it becomes more noticeable.
I'm currently looking at ways to resolve this issue. The most obvious solution is to make sure the platoon is checked within the PlatoonDisband function to make sure that it is not the army pool before it continues.
The text was updated successfully, but these errors were encountered: