Migrating Entity Types

Place to get help with not working mods / modding interface.
Post Reply
chriscisco
Inserter
Inserter
Posts: 26
Joined: Sat Nov 29, 2014 8:53 pm
Contact:

Migrating Entity Types

Post by chriscisco »

Hey,

I changed one of the types of my entity from decorative to simple-entity to solve a crash that occurs when placing the entity on top of the player, however this breaks old saves. Is there a way to migrate types like names can be migrated?

Thanks

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Migrating Entity Types

Post by L0771 »

https://forums.factorio.com/forum/vie ... 749#p21749

No one said the last-entity must be the same type of the first.

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

Re: Migrating Entity Types

Post by drs9999 »

L0771 wrote:No one said the last-entity must be the same type of the first.
Yes afaik you can use migration script to change types, however if I'm not misleading the new entity has to be renamed.
E.g. convert entity "foo"; type "furnace" to entity "bar"; type "chest" is fine, but converting entity "foo"; type "furnace" to entity "foo"; type "chest" is not.

And if i'm also not misleading kovarex said that they use this (to fix this) as a test for the people how applied for a job. So this might be fixed sooner than later...

chriscisco
Inserter
Inserter
Posts: 26
Joined: Sat Nov 29, 2014 8:53 pm
Contact:

Re: Migrating Entity Types

Post by chriscisco »

Alright, since I am not renaming the entity I will just leave it as is and break old save games, luckily my mod is in very early development so this is a risk people will take, in the future I will not change the type of entity unless I am either renaming the entity or there is a way to do it.

I do not suppose I could do it with data.raw in the migration lua?

Post Reply

Return to “Modding help”