Add fallback migrations, a type of migration stored in saves used when a prototype is found invalid without a migration.

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
MeteorSwarm
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Sep 25, 2025 10:49 pm
Contact:

Add fallback migrations, a type of migration stored in saves used when a prototype is found invalid without a migration.

Post by MeteorSwarm »

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
User avatar
Thremtopod
Inserter
Inserter
Posts: 40
Joined: Wed Nov 06, 2024 8:52 pm
Contact:

Re: Add fallback migrations, a type of migration stored in saves used when a prototype is found invalid without a migrat

Post by Thremtopod »

+1

I've encountered situations that would benefit from this as well, with entities and also recipes.

Uninstalling mods is probably the most common place where a feature like this would be useful. But it's also possible from changing mod startup settings, adding a mod, or anything that can change what prototypes are created.
Post Reply

Return to “Modding interface requests”