Migration script order

Place to get help with not working mods / modding interface.
Neemys
Filter Inserter
Filter Inserter
Posts: 461
Joined: Sat Apr 09, 2016 6:16 pm
Contact:

Migration script order

Post by Neemys »

Hello

I've done extensive search and found nothing, so I post this to get help.

I ran into a problem with a mod that seem not logical, I wonder if I do thing wrong or if there is no solution.

My problem is : I need, to migrate entities, run a lua script BEFORE running JSON migrating script. (need to save some state before changing it)

To make sure the LUA script was run before I have done the following :

version 1.0.0, old version, downloadable on mod portal.
version 1.0.1 : migration script in LUA (mymod_1.0.1.lua in migration folder), not released.
version 1.0.2 : migration script in JSON (mymod_1.0.2.json in migration folder), released on mod portal.

So when player update my mod from 1.0.0 to 1.0.2 I expected that the game run 1.0.1 lua migration then 1.0.2 json migration. But it does not. Seem like the game run ALL json migration script before running lua migration script.

So is it normal that migration script are all run by type instead of version number ? The game expect we update old lua migration script to reflect newest json modification
Want more space restriction ? Or maybe you want to be forced to use train for other thing than ore and oil ? Try Building Platform Mod !
Post Reply

Return to “Modding help”