How to Break Save Games

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Chair5768
Posts: 36
Joined: Sun, 15. Jan 06, 06:43
x3

How to Break Save Games

Post by Chair5768 »

In 'context.xml' there's an option to make your mod required for future save games. I'm curious as to what actions a mod can take that would require this to be set. Also, I was asked about Steam Achievements, does anyone know if mods effect them, and if it's all mods or if there's a way to make them compatible.
argon_emperor
Posts: 1225
Joined: Mon, 12. Dec 05, 07:41
x4

Re: How to Break Save Games

Post by argon_emperor »

Any mod can be set with the save invalidate flag on, just means that if you remove the mod, you can't load that save. In practice, I don't think there is any mod yet for the game that makes such massive changes that removing the mod would be catastrophic, but an overhaul mod would be the kind I would expect would require that (something like XTension, or Litcube's Universe, to name a couple for the older games off the top of my head). But many mods will be able to be freely added and removed with no major change to the game (though there could be some strange stuff happening depending on the mod)

In regards to mods and achievements, so far all the mods I've used haven't blocked achievements, so I don't know what kind would cause achievements to be blocked. So you should be good for now at least, I'm sure if someone finds that a certain mod causes achievements to not unlock it will be mentioned on the page.
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
Chair5768
Posts: 36
Joined: Sun, 15. Jan 06, 06:43
x3

Re: How to Break Save Games

Post by Chair5768 »

I asking more from the perspective of a modder than a moddie. For example, I recently made a mod that used the MD, and was wondering if it was going to be safe to load without the mod because I didn't know how the game would handle the cues the left behind in the save game. So I edited the save game of my modded game, saw how my cue was stored, loaded the game without the mod, saved, and checked the new save to see if it was leaving junk behind, which it wasn't. I don't know how well the game cleans such things though, so is it possible to make scripts that leave variables/cues/etc behind in memory that never get cleaned up?

I was thinking about adding an item to the game in my next mod, and was wondering how the game would handle that if the data files for the item were to disappear. I imagine (hope) it works like the mission cues and just deletes the offending item from the game. I'd rather keep my mods from requiring the save invalidate flag because it makes them more user friendly, and I'd like to be able to plan for that in advance of actually making the mod. Likewise, with steam achievements which in some ways is even worse because testing if my mod disables achievements myself would be a major pain; I'm glad to hear that mods don't appear to be interfering with achievements. IIRC, Rebirth disabled achievements with mods at release but was later changed to ignore them.
iforgotmysocks
Posts: 1244
Joined: Fri, 8. Nov 13, 22:35
x4

Re: How to Break Save Games

Post by iforgotmysocks »

In Rebirth i had trouble restoring the original weapon layout when adding more playership weapons. Also exchanging ship components could have caused trouble when the mod was just removed, the components would just be missing, that's why in such cases that flag might make sense.

Return to “X4: Foundations - Scripts and Modding”