On the Fun Subject of Backwards Compatibility

Discussion in 'Modding' started by Nicholas, Jun 8, 2012.

  1. Nicholas

    Nicholas Technology Director Staff Member

    EDIT: No longer relevant. We fixed!

    So here's one of the fun things about being a Dredmor developer: when people's save games break, they tend to get upset. (This is odd, because... well, permadeath and all.) Still, it happens.

    We at Gaslamp Games have decided to pass on the thrill of breaking users' save games to you, the modders! There are a couple of things that seem to be affecting Steam workshop mod compatibility, and I think we're going to change the subscription model so that it caches mods in the current version you have and lets you update at your leisure; so this is not actually totally a problem with modders doing things that will break save game compatibility. However, *some* people have been updating mods in ways that are guaranteed to bust Dredmor's save game compatibility, and if so... blammo.

    Here's some quick guidelines on Dredmor's save format and how to preserve internal compatibility.

    1. Don't rename your mod. Essence did this. It exploded and he may not survive the Angry Gaze of the Internet and his two thousand subscribers.
    2. Most things in Dredmor are keyed by name. Don't rename things. (this is why we have things like Cruelly Barbed Plastic Bolts and stuff which David dearly wishes we could get rid of.)
    3. Don't delete spells. (This will be fixed in the next major revision.) It's probably okay to remove monsters and items, but spells tend to be an issue.
    4. Don't delete rooms, either. Or so it seems. Hat Tip to r_b_bergstrom for pointing this out, which gives me the opportunity to re-use this image:


    [​IMG]


    As a general strategy, I *really* suggest splitting stuff into smaller mods rather than making enormous bundles. Not only does this make our Steam Workshop look more impressive to the end user, but it minimizes the chance that a small mistake will take down everybody's games. (See: the Complete/Compleat Essential Skills thing.)

    We're still chasing a few bugs here ourselves, but those three things *will* break save game compatibility. As always, mod-playing players are reminded that you do run mods at your own risk, and that Gaslamp can only officially guarantee save game compatibility for the core game and the two expansion packs.[1] We'll do our best for mods, but you've been warned.

    [1] That said, I think I'm going to break the save game format deliberately with the next major release in order to clean up a lot of stuff.
     
    SkyMuffin, DaVici, Kaidelong and 5 others like this.
  2. r_b_bergstrom

    r_b_bergstrom Will Mod for Digglebucks

    I didn't actually delete a room - I deleted a lever in a room and the script that went with that lever. It still broke saves.
     
    Kaidelong likes this.
  3. Kaidelong

    Kaidelong Member

    Given that room scripts appear to be stateful, this is to be expected if the save games simply capture a state the room is in rather than all the possible states it can be in and the state it is in. It makes intuitive sense that such a thing would break saves given that removing rooms breaks saves.
     
  4. Nicholas

    Nicholas Technology Director Staff Member

    What Kaidelong said. The room state was saved, and then it loaded and tried to continue running the room script from a state that no longer existed.

    Backwards compatibility is *hard*, people!
     
  5. Kaidelong

    Kaidelong Member

    From what I remember, changing skill ordering can also break saves.
     
  6. Dray`Gon

    Dray`Gon Member

    Skill ordering so long as they move a spell around might. Not sure if it has any effect of it's non-spell skills that get swapped, however. Anyone confirmed this?
     
  7. DragonDai

    DragonDai Member

    Meh, I give the modders a pass when it comes to my saves getting broken. If they want/need to update their content to make it better (aka, they are taking time out of their day to improve something so that when I use it I have a better experience than I did before the improvement), then I can put up with having to start a new character. I am sure there are lots of angry peoples out there who don't feel this way, but I hope that we, as a community of people who use the mods that others took their own personal time to make for us, can be a little more understand when stuff goes wrong.

    Sure, if you, as a modder, want to help out the community even more by splitting your stuff up or regulating your update dates to a specific day of the week or give advanced notice of updates or provide a place for people to manually get older versions of your mod, that is super nice of you and the modding community should be extra grateful for you going out of your way to accommodate us. But you're already being super nice people by giving the community more fun toys to play with. So yeah, keep on being awesome.
     
    Dray`Gon, OmniNegro and Daynab like this.
  8. rotopenguin

    rotopenguin Member

    The right solution for all this breakage would be to only look in the general mods folder at character creation time, and copy those mods into a folder associated with the character's save file. Loading your save game later would also bring in that snapshot bundle of mod files, and keep the whole set of game rules consistent.
     
  9. OmniaNigrum

    OmniaNigrum Member

    That sounds better than binding the mods to the save file itself. Yo should not need a new copy each time you save, so long as you have them once it should not need to update them at all. But this still requires a rewrite of the mod and save loading method and possibly even sequence in the executable. Nicholas (And others), you have your work cut out for you. But we love you for it. As always, we are prepared to test it out whenever you have a RC for us. (No rush though.)
     
    Kazeto and DragonDai like this.
  10. SkyMuffin

    SkyMuffin Member

    I don't know if this would add a lot of confusion or extra work, but...what if mods had a beta version and release/stable version?
     
  11. mining

    mining Member

    If its on the workshop, its finished with the exception of minor changes / balancing etc. - which from what I've seen is generally what happens with the exception of the X-Packs, where X={Essence, Fax :rolleyes:}
     
  12. LionsDen

    LionsDen Member

    Actually my mod Needful Things isn't nearly finished because I keep adding things. I do go slowly, weeks go by and I add 1 or 2 items. But then I like to play the game more and only mod when I'm not playing it or something else. :)
     
  13. mining

    mining Member

    Doing it slowly makes it much less of an issue, though - its the consistent rebalancing/occasional updates that I mentioned. With Fax and Essence you can easily get like 3 in a day, lol
     
  14. OmniaNigrum

    OmniaNigrum Member

    Some days each of them has multiples per day. :p It is laughable. But they clearly love the mods. And we love them for the dedication. :)
     
    DragonDai likes this.
  15. Essence

    Essence Will Mod for Digglebucks

    I was pretty sure CES was finished -- but when you have six freaking thousand people playing with your shit, you find bugs a hell of a lot faster than when you have 200. :p

    subscribers.JPG

    Apparently, though, now that the Bushido madness is over and the renaming debacle has blown past, it's all just a question of whether or not Archmage is actually working correctly -- and only one guy has complained about that, so for now I'm assuming it's user error. :)

    Compleat Essential should be effectively done. Which is good, because I've got a couple of other projects that have been on the back burner for way too long.
     
    DragonDai, LionsDen and OmniNegro like this.
  16. LionsDen

    LionsDen Member

    Well, I wouldn't know about that. I only have around 200 people playing with mine. ;)
     
  17. Aegho

    Aegho Member

    I'm quite happy about zero bug complaints from 2.5k+ users of Galactic Hitchhiker. :)
     
  18. Nicholas

    Nicholas Technology Director Staff Member

    Okay, so we're changing this for 1.1.0. Now, when you save a game, we will save the copy of the mod that you were using to play the game with. It will then load the mod dynamically when you load your save game. The pros and cons of this are as follows: we'll have less jankety-ass backwards compatibility issues, but your save games will become larger. Nobody make 400 megabyte mod files, please, or everybody will blame me for it.

    I'll push out a test build with this in it in a few days.
     
  19. OmniaNigrum

    OmniaNigrum Member

    I just cannot click "Like" enough for that post Nicholas. :)
     
  20. Kazeto

    Kazeto Member

    Now you are just asking for it, Nick...

    But I promise not to make a mess.