Page 1 of 1

Mods can contain lua migrations.

Posted: Sun May 05, 2013 5:29 pm
by ficolas
Hehe, I was about to post this on modding interface request when I saw it xD.

I need to do this for serveral things, and im not sure if this will work for everything I want to do.

How do I use, and when is that script ran?

Re: Mods can contain lua migrations.

Posted: Sun May 05, 2013 8:00 pm
by kovarex
The script is run once per save that is loaded from version, that didn't contain the migration before as the first thing.
The script is not called on new games.

Re: Mods can contain lua migrations.

Posted: Sun May 05, 2013 8:12 pm
by ficolas
but how do I need to call the file or where do I need to put it.

Re: Mods can contain lua migrations.

Posted: Sun May 05, 2013 8:18 pm
by kovarex
It is done the same way as in base mod.
In the mod, you have directory migrations, in this directory there are lua files, and every file represents one migration.

Re: Mods can contain lua migrations.

Posted: Sun May 05, 2013 8:49 pm
by ficolas
cant acces the global table from the migration.
:(