Page 1 of 1

Conditional item migration.

Posted: Mon Nov 03, 2014 11:10 am
by bobingabout
Item (and entity) Migration (EG, changing entity name "wall" to "stone-wall" in the latest version of the game) is done in a .json file, rather than a .lua file.

I've not tried, but is there a way to set a condition for the migration in the .json, so it can turn solar-panel-2 into bob-solar-panel-2 for example ONLY if solar-panel-2 isn't currently defined?

I'm basically trying to solve the issue that I'm using the same entity name in one of my mods that someone else is in another by renaming my own entities to something more unique. But I don't want to create issues. No migration would mean your entire power system disapers when moving from the current version of my mod, to the new version, but also if there is a migration script, it could cause issues if used with a mod using the same entity names as I'm using now, turning all the entities from that mod into my versions.