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
It is possible for invalid templates (such as ones containing unavailable components) to end up in production queues and in the production menu.
When a component is made unavailable, any queued units with that component will remain in the production menu and will only be cleared upon re-opening the menu if there is only 1 queued, otherwise the "ghost" template will remain until unqueued. An error is given when the game attempts to produce the unit: Machinegun Viper Half-tracks : not researched weapon 0, Wrong template for player 0 factory, type 1.
Download the attached zip file, change the extension to .wz.
Run the downloaded portable artifact to generate the mod folder then exit the game.
Install the downloaded mod into the portable artifacts mod autoload folder.
Run the portable artifact. Make sure that stats.wz shows in the top left, if not, verify the mod is installed.
Steps to reproduce the behavior:
Start setting up a Skirmish match.
Start with advanced bases and technology level 3, start the match.
Research Neural Synapse Research Brain Mk3.
Design (a) template(s) that contains any of the following: Scourge Missile, Needle Gun, Flashlight.
Queue 9 of any of these templates for production (9 in a single slot).
Research Make Weapons Unavailable.
Open the production menu to see the issues, wait for an invalid template to be produced to see more issues.
Expected behavior
For there to be no invalid templates in production, or to be available for production.
Additional context
This issue stems from #3785.
This issue should be fixed in general instead of handled case-by-case, and should not prevent the above PR from being merged.
Proposed solution
The solution should be able to detect invalid templates in production, and then remove them from production.
This solution should deprecate the deleteTemplateFromProduction() function.
Additionally, this solution would also enhance anti-cheat, circumventing any potential exploits that would allow production of invalid templates.
Describe the bug
It is possible for invalid templates (such as ones containing unavailable components) to end up in production queues and in the production menu.
When a component is made unavailable, any queued units with that component will remain in the production menu and will only be cleared upon re-opening the menu if there is only 1 queued, otherwise the "ghost" template will remain until unqueued. An error is given when the game attempts to produce the unit:
Machinegun Viper Half-tracks : not researched weapon 0
,Wrong template for player 0 factory, type 1
.To Reproduce
Steps to setup:
.wz
.stats.wz
shows in the top left, if not, verify the mod is installed.Steps to reproduce the behavior:
Neural Synapse Research Brain Mk3
.Make Weapons Unavailable
.Expected behavior
For there to be no invalid templates in production, or to be available for production.
Additional context
This issue stems from #3785.
This issue should be fixed in general instead of handled case-by-case, and should not prevent the above PR from being merged.
Proposed solution
The solution should be able to detect invalid templates in production, and then remove them from production.
This solution should deprecate the
deleteTemplateFromProduction()
function.Additionally, this solution would also enhance anti-cheat, circumventing any potential exploits that would allow production of invalid templates.
Mod to reproduce this issue
stats.zip
The text was updated successfully, but these errors were encountered: