mod updates not applied to save games

newtociv6

Chieftain
Joined
Jan 13, 2023
Messages
68
I'm trying to change some tables but noticed odd problems with existing save games:

1. If I make changes directly into Base, the changes are always applied when loading a save game
2. If I put changes in a mod, the changes are loaded for new games, but not existing save games. I can see from Modding.log it's enabled and reloaded but no related "UpdateDatabase" appearing in log.

Does anyone know what makes the mods different from base game files? "AffectsSavedGames=0|1" doesn't help.
 
I also confirmed that if I put the file into one of the expansions and add it to modinfo there, not only the changes with a new id would be applied, all subsequent changes in the file would also be applied whenever I load a save game, and I can see the UpdateDatabase... logs.

But what's the difference? The modinfo files have the same properties.
 
The quick answer is that you can't add new files to an existing game, which is what adding a new mod does. Everything that is loaded at game start is essentially "locked in". The exception generally being UI mods, which don't affect the database. You can sometimes, though, not always add code to an existing file and have those changes take effect. That's why you can make changes to the base game and see them reflected in a save. For example, if you changed the combat strength for a warrior after starting a game, the change won't be reflected in existing units, but will be in newly built ones.
 
I confirmed that changing combat strength from base game or expansions does work as I added anti-air to many units. It only fails to work when I change an existing mod.

But what make expansions different from community mods? The formats are all the same. Or maybe I could pack my changes as some fake DLC...?
 
Top Bottom