Support | News | Classic | F.A.Q. | Discord | Discussions | Wiki | Roadmap

Critical high priority bug.
Here we are again about loading a savegame and getting the "already exist" component bug crash.
As I've suspected since a very long time ago it's a combination of multiple choice UIButton and ToggledComponent.
Unlike the recent combination case this is a different combination case. It's reproduceable, yet, also fickle and probably the reason it has elluded me thus far.
Using latest Abh mod 0.7.29 NP1 version: https://forum.cosmoteer.net/d/13186-abh-mod-v0-7-2-9-for-cosmoteer-0-15-16
https://www.mediafire.com/file/xasw813kcgvh3a6/01516-ships2true.savedgame/file
https://www.mediafire.com/file/rbp19qwio5o0rr0/01516-ships3false.savedgame/file

Until recently, the particular section wasn't causing this problem. So it might be something with Cosmoteer 0.15.16b.
To verify and see the difference between different code many savegame loading sessions must be done.
The solutions also needs to take care of different loading cases.

The problem at the mod coding level is the parameter RememberValue. UIButton default setting is 0.
The UIButton has been set to a different value by the player and the ships saved. Example part deflector shield and ShieldSizeOptionToggle.

When set to RememberValue = true the problem appears with loading savegames.
Creating a new creative game and putting down ships and saving the game works fine but loading will cause the crash. Even after changing the parameter loading the savegame again will still cause the crash.

When set to RememberValue = false or left out then there's no problem. This is is very undesired specially when loading an already on-going battle (you can't set things all over again now in the heat of battle).
Everything works fine but can't load a savegame saved with the previous (true) code configuration.

Back to RememberValue = true now loading a savegame saved with the (false) code configuration works with the player choice setting.

So I'm concluding that loading the savegame for some reason cause a conflict between the default setting and the player setting leading to the crash with ToggledComponents.
Currently, loading saved ships works fine. So the fix has to work for both saved ships and savegames where the player settings override the default. However, it's desired that loading a blueprint ship will come with default settings to bug fix settings.

    Write a Reply...