Mods can contain lua migrations.

Place to get help with not working mods / modding interface.
ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Mods can contain lua migrations.

Post 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?

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Mods can contain lua migrations.

Post 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.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Mods can contain lua migrations.

Post by ficolas »

but how do I need to call the file or where do I need to put it.

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Mods can contain lua migrations.

Post 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.

ficolas
Smart Inserter
Smart Inserter
Posts: 1068
Joined: Sun Feb 24, 2013 10:24 am
Contact:

Re: Mods can contain lua migrations.

Post by ficolas »

cant acces the global table from the migration.
:(

Post Reply

Return to “Modding help”