Help making my mod: How to make things persist across configuration changes?
Posted: Sun Jul 13, 2025 1:36 am
My mod https://mods.factorio.com/mod/SARS/downloads unlocks alternate recipes. It currently does save what recipes you unlock. However, every time the configuration changes such as when I update the mod, it erases all the unlocked recipes and I don't know why or how to make it stop. Can anyone help me?
It tries to reunlock the recipes, I think, because the console prints out
[SARS] Unknown key: "sars-alt-unlocked-manual" <name of recipe>
for each recipe that I previously had unlocked. But it doesn't actually unlock them. Anyone have an idea? It will print out the localisation key correctly if I access it in-game with the lua console so I don't think it's a localisation file issue, despite what the error suggests.
Attached is the latest version that I'm working with.
It tries to reunlock the recipes, I think, because the console prints out
[SARS] Unknown key: "sars-alt-unlocked-manual" <name of recipe>
for each recipe that I previously had unlocked. But it doesn't actually unlock them. Anyone have an idea? It will print out the localisation key correctly if I access it in-game with the lua console so I don't think it's a localisation file issue, despite what the error suggests.
Attached is the latest version that I'm working with.