Mods & Savefile dependancy

Post Reply
baobobafet
Posts: 155
Joined: Thu Jul 04, 2013 10:01 pm

Mods & Savefile dependancy

Post by baobobafet »

After playing around with some ship mods, I discovered something that may need some attention.

If I add a ship to the mod folder, once entered onto the shipyard roster, that ship mod MUST ALWAYS remain in
the mod folder - or any saves that have even a passing reference in the save file of that particular ship mod
(such as a shipyard record of available ships in the save file?) will crash any associated saved game if it is ever removed.

This could put into peril the majority of saves in a player's save folder so that they won't load and will likely crash the
game, simply due to the absence of a single ship mod.

Sure you could put the old ship mod back into the mod folder - but that's not the point.
You may want to upgrade to a different ship mod - or just turf the existing one cause your tired of it.

Seems perhaps there needs to be some fallback code for such events so that if a save file loads and can't
find a particular modded ship, it will load a placeholder ship until/if the mod is returned to the mod folder.

This sort of tactic may need to be considered for other potential mod details that may also be recorded in
Pioneer's save files.
?
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: Mods & Savefile dependancy

Post by robn »

Yeah, we identified this problem a couple of years ago when the mod system was first introduced. From memory the plan is to record the current mod list in the savefile, and refuse to load it if the matching set of mods aren't available. However work does need to be done to ensure that this doesn't break things on newer versions of mods. But since we have no concept of mod versioning, we need a mechanism for that first. A manifest file is the plan there (ther'es a bunch of useful meta-information that we'd like to know about a mod). That's not a particularly high priority at this point though, so it hasn't moved yet.
baobobafet
Posts: 155
Joined: Thu Jul 04, 2013 10:01 pm

Re: Mods & Savefile dependancy

Post by baobobafet »

In particular for any 'new' ships, instead of not loading a save file because it has reference to a ship no longer available on the roster...

Have the save file load - but have a check to replace any absent/unknown modded ship names with one of a known similar class, (if info is available). Perhaps designate a single ship to universaly replace any ship that might be missing if no info on missing ship is available.
This might be better than entirely losing the option of loading a perfectly good but only marginaly incompatible savefile.
?

I suppose until then..

Introducing any modded new ships to the roster should probably come with a warning like:

IMPORTANT - Adding Ship Mods:
Once any 'new' ships are added into the game's mod folder, all subsequent saves (even if piloting unmodded ships) may become unloadable if it is ever removed.
Affected game saves may be made valid again and reloaded once any such removed ship mod has been restored to the mods folder.


Maybe such a notice should be included in the wiki mod section as well as with any ship mod install or doc files?
robn
Posts: 302
Joined: Mon Jul 01, 2013 1:11 am
Location: Melbourne, Australia

Re: Mods & Savefile dependancy

Post by robn »

New ships are not the only form of mod, and they're probably the least complex. What if you remove a mod that added missions, and now you have broken missions in your list? What if the mod contained a script that was controlling the NPC armada, and its now dead in space? What if the script added the system that you were in when you saved the game?

If we take this to its logical end then we end up having to have checks for missing data all through the code, and even then we can't guarantee that we got it all. Success on a mission may be contingent of a timed function running, and if the code is missing then we had no idea that ever was controlling code. So really we don't have a reliable way of making sure your game isn't broken.

The player however can unbreak their game. If at load time we say "sorry, you need these mods to load this game", then they can put them back.
baobobafet
Posts: 155
Joined: Thu Jul 04, 2013 10:01 pm

Re: Mods & Savefile dependancy

Post by baobobafet »

Good point :)
Post Reply