Disabling then re-enabling a mod

Place to get help with not working mods / modding interface.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 736
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Disabling then re-enabling a mod

Post by DRY411S »

If a start a world with a mod that includes a migration script, save the world, quit the world, disable the mod, load the world, save the world, quit the world, re-enable the mod, load the world...

Does this force the migrations script for the mod to be run a second time?

Sometimes when I ask these types of questions, I think there must be a way of finding out without debug statements in code, by inspecting log files, switching on logging or something
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Disabling then re-enabling a mod

Post by bobingabout »

I can't say for certain, but I'm fairly sure the migration scripts run are saved in the save file, to prevent them from being run a second time... and are NOT cleared when the mod is removed, therefore not run again when the mod is re-added.

I can't be certain, but I THINK that's how it works.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 736
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: Disabling then re-enabling a mod

Post by DRY411S »

bobingabout wrote:I can't say for certain, but I'm fairly sure the migration scripts run are saved in the save file, to prevent them from being run a second time... and are NOT cleared when the mod is removed, therefore not run again when the mod is re-added.

I can't be certain, but I THINK that's how it works.
Thanks. On unzipping a couple of saves of 'before' and 'after' enabling then disabling mods, there do appear to be references to the migration scripts in the 'after' file even though the mods are now disabled.
Post Reply

Return to “Modding help”