Add fallback migrations, a type of migration stored in saves used when a prototype is found invalid without a migration.
Posted: Sun Jun 14, 2026 2:47 am
Right now, migrations are designed to make it easy to update mods, but systems designed to assist in the safe removal of mods from saves don't exist. If one removes a mod that adds some new prototype from a save, those prototypes are replaced with nothing. If there was a way to designate a "fallback migration" for modded entities that say "If this prototype is found invalid and no conventional migration exists, migrate to this prototype," it would become much easier to safely remove mods that add variants of entities.
How it could work in more detail:
A mod adds a new assembling-machine, item, and technology named "assembling-machine-4". The assembling-machine and item are given the fallback migrations "assembling-machine-3". This migration is stored in the save, so that when the mod is uninstalled and these prototypes are made invalid without a migration, the fallback migration replaces assembling-machine-4 entities and items with assembling-machine-3, leaving the save in a fully-functional state, even if every single assembling machine in the save was an assembling-machine-4.
A system like this would greatly increase the resiliency of saves and make it easier for mods that add variants of entities to be cleanly uninstalled. Since the release of Space Age, there are two obvious dimensions that one might want to change the behavior of entities through just from base game mechanics(planet and quality), so adding more tools to make it easier to use these mods would make entity-replacement systems more approachable.
This change would benefit an entity-replacement system I'm developing as part of PlanetsLib. https://github.com/danielmartin0/PlanetsLib/pull/98
How it could work in more detail:
A mod adds a new assembling-machine, item, and technology named "assembling-machine-4". The assembling-machine and item are given the fallback migrations "assembling-machine-3". This migration is stored in the save, so that when the mod is uninstalled and these prototypes are made invalid without a migration, the fallback migration replaces assembling-machine-4 entities and items with assembling-machine-3, leaving the save in a fully-functional state, even if every single assembling machine in the save was an assembling-machine-4.
A system like this would greatly increase the resiliency of saves and make it easier for mods that add variants of entities to be cleanly uninstalled. Since the release of Space Age, there are two obvious dimensions that one might want to change the behavior of entities through just from base game mechanics(planet and quality), so adding more tools to make it easier to use these mods would make entity-replacement systems more approachable.
This change would benefit an entity-replacement system I'm developing as part of PlanetsLib. https://github.com/danielmartin0/PlanetsLib/pull/98