• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Possible issue with "Affects Saved Games"

Hulfgar

Emperor
Joined
Mar 31, 2008
Messages
1,798
Location
France
Hi all, maybe this is known but if not it will perhaps help somebody :

Currently I have 1 main mod and 2 small mods as add on for the main.

I came with the (bad) idea to check the button "Affects Saved Games" in "Mod Info" for all of 3 and suddenly it was not possible to load a saved game.
A read error message would say : "not all required mods are installed".

Now that I have unchecked the button "Affects Saved Games" for the 2 "add ons" it is possible to load the saved games again.

So I am not sure if this option has any utility but as it seems checking it is not whithout consequences for the mod !
 
I came with the (bad) idea to check the button "Affects Saved Games" in "Mod Info" for all of 3 and suddenly it was not possible to load a saved game.

Yes, that's exactly what it's supposed to do. If a mod adds new content (new buildings, units, etc.), it'll affect a savegame's database. So, you check off that flag, so that someone can't load the game without the same version of that mod turned on. I use it for all of my own mods.

If you DON'T check that flag, and someone tries loading the savegame with a different set of mods enabled than when the game was begun, then all sorts of strange things can happen, even though it might appear fine at first. You might find that you can build a certain National Wonder again, despite its presence in one of your other cities. Mutually exclusive buildings might not lock each other out any more. You might find that some cities' build queues show units or buildings that haven't been unlocked yet or that aren't buildable at all (like the UBs for other civs). Some units will suddenly have promotions that they couldn't possibly have taken. One unit might find itself with millions of XP for no apparent reason, while another could spontaneously die at the end of the turn.

There are a LOT of things that'll break if you do something like this. So if your mod adds any new content (not just a simple UI tweak or XML update, but actual new rows in XML tables), then you need to turn this on for the players' protection.
 
Spatz as always your explanation came quick and clear, thanks for this :-)

I understand well what you mean with the need to check off this box but :
any idea why when the box is checked for all 3 mods the game won't load the saved games even it is just after saving ? In this case all required mods are loaded in their required version but the game doesn't take it.

In my configuration all units, buildings and resources are in the main mod. The secondary mods only have entries specific to DLC civs for units whose classes are defined in the main mod.
 
I understand well what you mean with the need to check off this box but :
any idea why when the box is checked for all 3 mods the game won't load the saved games even it is just after saving ? In this case all required mods are loaded in their required version but the game doesn't take it.

To be clear, by "required version" I also mean time/date stamps. As in, if you built the mod and started a game with it, then went into the mod and changed anything (like those flags) and built it again, then even though the new build will have the same version number as the old one, the game won't see it as being the same entity. Although, I've never heard of it giving that sort of explicit "no" in that situation; usually it just breaks miserably in practice.

In my configuration all units, buildings and resources are in the main mod. The secondary mods only have entries specific to DLC civs for units whose classes are defined in the main mod.

That's possibly related to a separate issue I've experienced. Civ has a serious problem with cross-compatibility; if you add a new XML table in one mod and add elements to that table in another mod, then it won't accept it. I really hope the devs get around to adding the mod dependency structure that ModBuddy already has interfaces for, because my own mods REALLY could use that. Similarly, if you've got something like you've described (where an Update command in mod A modifies a Row element in mod B), it might not work correctly if the mods are loading in the wrong order. (Although, it seems that SQL always parses after all XML, so if you move the Update into an SQL entry it might work better.)

So in relation to the previous issue, it's possible that the load order mattered, and that even though you're loading the same three mods again, you might not be loading them in the same order as before, which could cause problems where there are now some elements failing to add/modify. Now, we've had arguments on what exactly controls the load order; in my experience, the game handles it through the order you turned on those little green circles in the Browse Mods menu, and you can check load order through a Lua command in FireTuner (or through editing a version of the setup menu windows, like I've done for my own mod).
This sort of thing is especially problematic when you alter the "base" mod without rebuilding the ones that depend on it, but in my experience if you go into that menu and turn every mod off, then re-enable them in the right order, it seems to work okay. Obviously, if you don't remember the order from the first time it could be a problem. (Hmm, doesn't the Load menu allow you to click on that one spot on the left to see which mods were loaded? Try them in that order.)
 
Back
Top Bottom