FORUM ARCHIVED

Help with understanding XML

Discussion in 'Modding' started by clasgutr, Sep 9, 2013.

  1. clasgutr

    clasgutr Member

    Just starting to learn xml and thought i'd give modding a go. I'm having trouble getting my current mod from working - The icons/descriptions do not show up in game. Also some of the items do not appear in my inventory. Would anyone mind giving me some help?

    Code:
    <skillDB>
    <skill name="Lab Technician" skillName="LabTech" type="wizard" description="You are a master of organic chemistry, and the dungeon inhabitants' genetics."/>
    <art icon="skills/rogue/alchemy2_64.png"/>
    <loadout type="artifact" always="1" amount="1"/>
    <loadout type="potion" always="1" amount="5"/>
    <loadout type="weapon" subtype="poison flask" always="1" amount="8"/>
    <loadout type="wand" always="1" amount="4"/>
    </skill>
    <ability startSkill="1" name="Lab Technician" icon="skills/rogue/alchemy2_64.png" skillName="LabTech">
    <description text="Years of meticulous study of dungeon denizens has given you preternatural abilities."/>
    </ability>
    </ability name="Studious" icon="skills/rogue/alchemy2_64.png" skillName="LabTech" level="0">
    <description text="Blah blah blah blah"/>
    <primarybuff id="1" amount="2"/>
    <primarybuff id="4" amount="2"/>
    <primarybuff id="5" amount="2"/>
    <secondarybuff id="18" amount="3"/>
    <secondarybuff id="23" amount="1"/>
    <secondarybuff id="21" amount="1"/>
    <secondarybuff id="20" amount="1"/>
    <secondarybuff id="17" amount="2"/>
    </ability>
    </skillDB>
    
     
  2. Wolg

    Wolg Member

    You have the close-element / at the start of the element, I don't think that will parse...
     
    Kazeto and Vitellozzo like this.
  3. clasgutr

    clasgutr Member

    thanks for the help. changing that atleast displays the skill in the window now. I've done some more work on it but it is now causing crashes. When I reference an icon or sfx/animation, do those have to be included in the mod folder? Is there a way to reference pre-existing files included with the game?
     
  4. bluehinter

    bluehinter Member

    Aside from soundfx, which currently only function with the built in .wav files, I believe it always looks for a path relative to your mod folder (ie: C:\Users\YourName\Documents\Gaslamp Games\Dungeons of Dredmor\mods\YourMod\)

    If you want to use previously existing icons and animations, your best bet is to copy them out of the dungeons of dredmor folder directly into your sprites\spells or sprites\sfx folder. Just remember that all items and sfx need to be index color instead of RGB, and if you have tried to edit the files in any way, that you have them numbered in sequence starting with 0000. If you accidentally skipped a frame number or started off with 0001, the game will insta-crash as soon as it tries to access that missing frame of animation.

    Even more importantly, check your capitalization. If you're trying to reference a .png file called alchemy2_64.png, but the file is actually named Alchemy2_64.png, you're going to get crashes, even if XML validator says that everything is fine.

    If you're still getting hard to diagnose crashes, try running the game in debug mode, and if that doesn't tell you anything, then it's time for my favorite debugging hobby.... Make a copy of your existing mod, and then slowly go through removing pieces until it no longer crashes.
     
    Kazeto likes this.