Migration script order
Posted: Tue Jul 19, 2016 5:16 pm
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
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