It’s not only breaking the XS, it’s also breaking the graphical reskin done by triggers. I think the issue is more complexe than it seems, with some kind of reloading of the .dat file on some of the attributes, including the tasks and the graphicals attributes.
This issue has been around since October 2021, ever since the co-op campaign was introduced.
The fix is simple: just remove the “Save Chapter” button.
It’s also occuring when you load a save infact.
To avoid that, the only way I found is to add a manual reload functionnality that re-apply XS scripts and graphics.
My understanding of the issue that everytime the game does some kind of “load” (after a save, after a load) it re-apply the base .dat informations for some of the attributes. Mainly the visuals and the complexe behavior seems to be affected. This leads me to think it’s a functionnaly related to the replaying with CaptureAge tool for the graphical part. For the task part, I have no idea why it’s occuring because, I mean, there is no logic a replay change the ai behavior based on your current version of the game… And I think I just figured it out infact. It’s probably because the game saves its stats “as it is”, current version of the game I mean, and probably just isn’t re-calling the triggers etc.
But from what I know, it’s not breaking official mission, like Battle for Greece campaign where you got some unit reskin and lots of aura task, so the issue is probably on the scenario file type.
Is it possible to reload during the game?
@Felizon89 @StepS7578 @Cysion this hasn’t been fixed yet.
I’ve into this as well, specifically xs misbehaving on save chapter or when loading a saved game.
In case it helps, I did some testing and uploaded 3 scenarios as a mod so it can be reproduced.
In short, I wrote a script with all kinds of variables, included it either as a trigger script call, a separate xs file, or inside Effects.xs and tested whether they reset on save chapter/reload. All the variables (and also rule activity status) reset or not the same way, depending on where the xs code is placed:
- Trigger: things reset.
- Separate xs file: no reset. The only issue I see is that
maingets called. - Effects.xs: both at the same time! One xs instance keeps running with the existing variable values, and another one starts fresh. Variables have two values at the same time, rules are doubled, etc.