Hpw do I know if my mod affects save games?

If you alter something that already exists / being built or researched within the saved game, then it will affect it. Such as changing prereq tech for a unit or ability (embarkation), using the term update or changing that stats of buildings and yields or costs. The problem is you don't know what the AI has so its quite broad.

If your adding a unit, civ, building or improvement ect or making a UI mod then you should be fine
 
If your adding a unit, civ, building or improvement etc

Wrong - all of those can affect saved games, so should have the box ticked.

Adding a unit without affects save games checked - any player builds the new unit, save game, exit, restart without mod, reload game. The already built units will at best adopt the stats of the "next" unit in the database, at worst will crash the game. I had one memorable CivV game where all my replacement swordsmen turned into super-carriers as the game does not store unit type but unit id references.

Same is true for buildings. Improvements will usually just crash the game, especially if a worker was in the process of making one when the save happened.

Adding a civ without affects save games checked - playing a game where either the human or the AI is that civ, save and exit, restarting without the mod will almost always crash the game as so much data is missing from the database that the .civbesave file refers to.

However, not all database updates need the box checking. Consider a mod that only changes the max XP for aliens from 30 (2 promotions) to 100 (4 promotions). This does not affect saved games. If I start with this mod enabled, and go on an alien extinction spree, lots of my units will get XP over the default 30. I then save, exit, restart without the mod. All my units still have the XP previously gained, they don't magically lose it as the game has no memory of where the XP came from, just how much XP each unit already has. If I continue the alien extinction spree all that happens is my units will not get any XP for aliens above the original 30.

The same is true if I change a prereq tech - if that's all the mod does I do not need to check the box. With the mod loaded I need tech Z to build the units, but once built the unit no longer cares (ie doesn't store any data about) what the prereq tech was. If I save, exit and restart without the mod, I'll still have all those units, but if I want to build another I'll need to have researched tech X not tech Z. The only issue will be if a city was in the process of building a unit when the save occurred. There are two possibilities, a) the game doesn't recheck the prereq tech on load, so the unit will finish being built, or b) the game does check and the unit will be removed from the build queue losing any prod so far - annoying but not game breaking.

Stats are difficult to predict. For example, cost doesn't affect saved games - things built will remain built, future builds will take the new cost, things at the top of the build queue will either complete at the old price (unlikely) or complete at the new price (how CivV works). However, some building stats are added to the city (eg those that add HP) so you will get weird results when the building is destroyed and the different stat is used to remove the value from the city as they will be different - eg new command centre adds 75HP (vs 50 for old), city has old built, save, reload with mod adding new values, CC is destroyed, city will have 100 + 50 - 75 = 75 HP; do it the other way around and the city will have 100 + 75 - 50 = 125 HP. Neither is game breaking (unless the final result is negative HP for a city), but both will confuse players.

Short answer - if your mod adds to existing primary database tables, check the box; if your mod updates the database you'll need to think it through; if your mod is only a UI mod, uncheck the box; if in doubt, check the box.
 
I was assuming that he was talking about loading a pre-saved game with a new mod ...

The issue about pre-tech though has to be very carefully considered as I pointed out if the unit has embarkation and is over water when you save what would happen if you then load the game without the mod, cant say I've tried. I would argue that the alteration of production lines should be considered as a save game change as I would be sooo pissed if I was 1 turn away from a wonder ...

I have created an improvement and altered the values of a saved game to adjust them, i.e. forgot to change the amount of work that it takes to complete the improvement, or even loaded a save game without the mod accidentally, as it will uncheck the mod automatically if it changes and the game has always loaded fine ... just without the improvement or completes the improvement in the end of turn, it dosent seem to affect any yeild values added / subtracted as they return to the default. This could just be me as there are no other new improvement mods to test for comparison (still haven't uploaded mine onto steam, still fine tuning the alien spawn lua and checking its not a fluke when it works).

A lot of mods will affect saved games, as once again you have to assume the AI will use whatever is created.
 
Embarkation is a promotion. Once a unit has that promotion it will keep it, even if the tech that grants embarking is changed. Basically when a player researches the embark tech, every existing unit is given the promotion, when the player subsequently builds a unit, the unit is automatically given the promotion. If you reload a saved game with a mod that changes the embark tech, and you don't have that tech, the promotions will not be taken away. If you change the embark promotion such that units can no longer embark with it, all that will happen is at the end of the turn all embarked units will jump to the nearest available land tile.

While changing production costs may be "immersion breaking" it is not "game breaking" (ie a CTD or a corrupt game) - the "Affects Saved Games" flag is only concerned with the latter. If you're worried about "immersion breaking" don't change mods during the game.

When a game is saved, every enabled mod with ASG=true is noted in the save file. When you attempt to reload the save, the game will not permit it if any of those mods are not enabled, and also, it will silently disable any enabled mod marked as ASG=true that is not required by the save. The purpose of ASG is to ensure that the database references in the save game file actually reference the correct items in the database (as the database is rebuilt every time the game starts and is not saved as part of the .civbesave file)
 
Top Bottom