FORUM ARCHIVED

Running in to some issues writing a new mod

Discussion in 'Modding' started by seriouslysean, May 20, 2013.

  1. seriouslysean

    seriouslysean Member

    Hey guys,

    I'm new to modding Dungeons of Dredmor (but not new to modding in general). I'm creating a new skill tree and am adding around 5-6 abilities/spells and a couple of items. I have been using the references on the dredmod wiki to get through most of it and going through the actual game XML files for a better reference when one is needed.

    My skill tree works, the skills work and the items are showing up but whenever I save and quit, the save file just isn't there. If I disable my mod, saving works fine again.

    Has anyone run in to anything similar to this and know how I could potentially go about fixing it? The XML looks well formed to me. If it's easier that I just post the code so someone can help me check it, just let me know and I'll get it up here.

    Thanks!
     
  2. Alistaire

    Alistaire Member

    Post it.
     
    seriouslysean and Kazeto like this.
  3. Kazeto

    Kazeto Member

    I know I sound like an ass here, but "you don't say?". Whatever code you write almost always looks good to you because you know what it was supposed to be doing, but others can't help you any without seeing it unless its malfunction is caused by a really noticeable and well-known bug (in which case you would've been able to find the solution easily and thus you wouldn't, or at least shouldn't, create a new thread with that). Which means that, whenever you want anyone to help you with your code, you should let them see the code in question and not just ask if they want to.

    Well, that was blunt, but if you plan on creating more than just one mod then this is an advice remembering which might be a good choice for you (and for everyone else who happens to see this thread and wants to get into modding this particular game). Especially since there are a few minor shenanigans in the code structure for DoD's data which more experienced modders might be able to notice if they saw it, but which a new modder isn't likely to recognise.
     
  4. seriouslysean

    seriouslysean Member

    Don't worry about it Kazeto, one dev to another I get it, haha. I thought there might have been a few "Oh hey, this usually causes that issue" types of gotchas that I wasn't aware of.

    That said, the complete source can be seen on GitHub:
    https://github.com/seriouslysean/DoD_90sKid/tree/develop

    When you play the game with my mod enabled, saving just doesn't seem to work. You can "Save and Quit" and no save is created.

    Thanks for any help!
     
    Kazeto likes this.
  5. Kazeto

    Kazeto Member

    Not in this particular case, sadly. I do know it happens when the mod causes game crashes mid-saving, but it's not something we had to face often and thus there aren't any magical solutions to this problem yet.
    But I'll look at the code after I'm done with my writing (me and my promises...), so unless anyone else replies in the meantime I'll comment on what I saw in the code in about 2 hours.
     
    seriouslysean likes this.
  6. Daynab

    Daynab Community Moderator Staff Member

    Are you using the beta? We have a very rare issue in the current stable version where some mods cause that problem to happen. I can't tell you why they do, but it sometimes does. If you're on Steam, try subscribing to the game's beta from its properties and see if it still happens.
     
    seriouslysean and Kazeto like this.
  7. Kazeto

    Kazeto Member

    And that is why it's useful to have someone who actually cares about the fact that there is a stable version of this game.

    Though, admittedly, if it helps you I'll feel useless for a few minutes (in my/our defence, I and many others didn't touch the "stable" version for quite some time now, but it's still just an excuse). But it's still worth trying unless you are already using the newest version of DoD and not a "stable" one.
     
  8. seriouslysean

    seriouslysean Member

    I didn't realize there was a beta up for it. I've since downloaded it (updated to it? Semantics.) but still no luck. To help debug the issue (or for anyone reading along), I'm running Dungeons of Dredmor with the following:

    Machine:
    • MacBook Pro
    • Retina, Mid 2012
    • Processor 2.7 GHz Intel Core i7
    • Memory 16 GB 1600 MHz DDR3
    • Graphics NVIDIA GeForce GT 650M 1024 MB
    • Serial Number C02JG07MF51R
    • Software OS X 10.8.3 (12D78)

    Dungeons of Dredmor:
    • Dungeons of Dredmor (via Steam, using the current Beta as of 5/20/13)
    • Dungeons of Dredmor: Conquest of the Wizardlands
    • Dungeons of Dredmor: You Have to Name This Expansion
    • Realm of the Diggle Gods

    I'm currently doing some testing with all mods off and removing elements from my mod one by one to see if I can locate the culprit. I really appreciate the help so far.

    Results:
    • I stripped it down to just the mod.xml and it's still not saving any games. Is there a restriction on the line endings or something of that nature? (I'm using Sublime Text 2 and using Windows line endings)
     
    Kazeto likes this.
  9. seriouslysean

    seriouslysean Member

    Aha, I figured it out!

    So, for whatever reason when I'm running my module with the folder structure exposed (not as a .zip), the saves won't work. If I zip it up and use that as the mod instead, I'm able to save just fine. Super weird!
     
    Kazeto likes this.
  10. Kazeto

    Kazeto Member

    Indeed, it does explain some things. And in the end, it happened to be one of those "OS-X DoD-related shenanigans", seeing as I didn't have this problem regardless of whether I tested it with the mod packed or unpacked (and I'm using a windowsy OS; Windows 7 to be more precise).
    Honestly, for some reason the OS-X version of DoD has a few shenanigans of this sort remaining, and the only people who can give you an answer as to why would be the devs.

    Oh, and your code is clean - you very likely know that so it's probably redundant to say it, but whatever.
     
    seriouslysean likes this.
  11. seriouslysean

    seriouslysean Member

    Hey thanks man! It's always nice to hear. I'm really looking forward to finishing up this mod so I can pack it up and release it on Steam. It'll be my first Workshop module :)
     
    Daynab and Kazeto like this.