Page 1 of 1

Disabling then re-enabling a mod

Posted: Wed Jun 22, 2016 6:45 am
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

Re: Disabling then re-enabling a mod

Posted: Wed Jun 22, 2016 7:57 am
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.

Re: Disabling then re-enabling a mod

Posted: Wed Jun 22, 2016 10:25 am
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.