Skill Tutorial - dredmor-com/dungeons-of-dredmor GitHub Wiki

Skill mods are the most common kind of mod. Adding a skill mod to the game can vastly change the gameplay experience, so it's important to keep in mind that skills sit on a finer balance point than other moddable items.

  1. Basic Setup
  2. Blank Template
  3. See Also

Basic Setup

You'll need, as a minimum, a proper directory and three XML files: mod.xml, skillDB.xml and spellDB.xml. This tutorial will revolve around the 'skillDB.xml' file, so if you need prior setup, you can use the links provided.

'skillDB.xml' is where the game determines which abilities are from what skill trees, and the order in which they're acquired. Yours should look something like this:

<skillDB>
 <skill name="Clutch of Midas" id="200" type="warrior" description="Midas may or may not have been one of your ancestors. Who knows? Dude got around.">
   <art icon="sprites/skills/midas/regal64.png"/>
   <loadout type="reagent" subtype="Gold Ingot" always="1" amount="2"/>
   </skill>

 <ability startSkill="1" name="Clutch of Midas" icon="sprites/skills/midas/regal64.png" skill="200" >
    <description text="Some people say you have a heart of gold. You know that's true."/>
    </ability>
 <ability name="Blood of Kings" icon="sprites/skills/midas/selfrighteous_aura64.png" skill="200" level="0">
    <description text="In your veins flows the blood of kings!"/>
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="1"/> <!-- hp -->
    <resistbuff existential="3"/>
    </ability>
 <ability name="Body of Gold" icon="sprites/skills/midas/regal64.png" skill="200" level="1">
    <description text="Your body consists of mostly gold. While a pliable metal, it's certainly more durable than regular flesh. It is, however, somewhat more conductive and harder to move."/>
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="2"/> <!-- hp -->
    <damagebuff crushing="1"/>
    <resistbuff slashing="1" piercing="1" crushing="1" blasting="1" voltaic="-1"/>
    </ability>
 <ability name="The Bad Touch" icon="sprites/skills/midas/spell_earth4_64.png" skill="200" level="2">
    <description text="You and me baby ain't nothin' but metals, so let's turn you into something I can sell for a kettle."/>
    <targetHitEffectBuff percentage="20" name="Midas" />
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="3"/> <!-- hp -->
    <damagebuff transmutative="1"/>
    <resistbuff slashing="1" piercing="1" crushing="1" blasting="1" voltaic="-1"/>
    </ability>
 <ability name="Lead Into Gold" icon="sprites/skills/midas/skill_antiques_dealer2_64.png" skill="200" level="3">
    <description text="Contrary to popular belief, you can turn more than lead into gold."/>
    <spell name="Lead Into Gold"/>
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="4"/> <!-- hp -->
    <secondarybuff id="21" amount="1" /> <!-- alchemy -->
    <damagebuff transmutative="1"/>
    <resistbuff slashing="1" piercing="1" crushing="1" blasting="1" voltaic="-1"/>
    </ability>
 <ability name="The Worse Touch" icon="sprites/skills/midas/curse_of_midas64.png" skill="200" level="4">
    <description text="You and me baby ain't nothin' but gold, so let's oh screw it MONEYYYYY"/>
    <targetHitEffectBuff percentage="30" name="Midas" />
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="5"/> <!-- hp -->
    <damagebuff transmutative="1"/>
    <resistbuff slashing="1" piercing="1" crushing="1" blasting="1" voltaic="-1"/>
    </ability>
 <ability name="Body of Molten Gold" icon="sprites/skills/midas/infernal64.png" skill="200" level="5">
    <description text="Your body glows with terrible molten energies."/>
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="6"/> <!-- hp -->
    <damagebuff conflagratory="4" transmutative="3"/>
    <resistbuff conflagratory="4" voltaic="-1"/>
    </ability>
 <ability name="Cashblast" icon="sprites/skills/midas/digging_ray64.png" skill="200" level="6">
    <description text="You understand the truth of the universe: that all creatures can be bled for money!"/>
    <primarybuff id="2" amount="-2"/> <!-- Nimbleness -->
    <secondarybuff id="0" amount="7"/> <!-- hp -->
    <resistbuff slashing="1" piercing="1" crushing="1" blasting="1" voltaic="-1"/>
    <spell name="Cashblast"/>
    </ability>
 </skillDB>

This might be a lot to digest, so we should split it up.

Tag Attribute Description
<skillDB> ... </skillDB> Every skillDB.xml should use those tags for opening and closing.
<skill ...> ... </skill> These tags mark the beginning and ending of a skill implementation.
name="Clutch of Midas" Every skill has a name, preferably a unique and descriptive one, to avoid confusion. This name, for example, demands to be taken seriously, since it's related to King Midas, and also helps intuit that it has to do something with turning stuff into gold, including Monsters, by force.
id="200" The ID number is a twofold mechanism: The first thing it does is tell the game which abilities go with this skill. The other function is to keep two mods from colliding. If two mods have the same ID, the game will get confused and probably crash. Thankfully, you can also use the skillName= attribute instead, which accepts text, so this skill's ID could just as easily be "midas"
type="warrior" This determines what class of skill this is:
  • Warriors gain HP, Melee Power, Block, Counter, Critical and Resist quickly.
  • Rogues get HP, Dodge, EDR, Counter, Sneak, Critical and Haywire quickly.
  • Wizards obtain Mana, Magic Power, Block, Sneak, Haywire and Resist quickly.
You can get a complete breakdown of stats per level type here.
description="..." This is a short description of your skill. It will appear on the skill select screen in the description window at the bottom.
art icon="..." This is the art file for your mod. It must be a 64x64 RGB PNG file (more information about RGB vs indexed PNGs here).
loadout This determines what your initial inventory will be when you take this skill. If you don't want your skill to give anything special at the start, you can easily omit this. Similarly, if you want to include multiple different items, you can include multiple lines - one per item.
type="reagent" The type field determines what kind of object you're starting with. The 'reagent' type means that the item is used in crafting. Other available values are:
  • weapon
  • armour (including things like rings, shields and necklaces)
  • wand
  • gem
  • mushroom
  • potion
  • food
  • booze
  • artifact
  • toolkit
  • misc (used for lockpicks and not much else
subtype="Gold Ingot" This determines the specific item you'll start with. It must be the full name of the item you're including. "Hatchet" won't work, but "Fancy Hatchet" will. If you don't want a specific item, you can omit this field and it will give a random item of the correct type.
always="1" A boolean (0 or 1) indicating if you always start with this item or not. If it's 0, you'll have a chance of it appearing on your inventory.
amount="2" This determines how many copies of the item appear in your initial inventory.
ability The rest of this skill's pieces start and end with this tag.
startSkill="1" This boolean value means that this ability will be a "non-ability": This appears on the leftmost column as the ability root.
name="..." The name of this ability/level. If 'startSkill' is set to 1, please use the skill's name. Otherwise, you can use a descriptive name for it.
icon="..." This is the ability's icon. If 'startSkill' is set to 1, you should probably use the same one you used for the skill.
skill="200" Similar to the ID field for the 'skill' tag, this works as an identifier for the game so it can match the skills with their correct abilities. If you used an 'id' value, set the same value here. Otherwise, if you used 'skillName', you should use it again here.
level="0" Once the 'startSkill' value is set, all other abilities inside the skill should use the 'level' attribute instead. Level is a value between 0 and 7 that determines its placement in the skill tree.
  • If it's '0', this is a skill that the player starts the game knowing.
  • Values from 1 to 7 indicate how much the player should level up this skill to obtain.
description text="..." The description of the skill, which appears on the mouseover text. It differs from what appears on the ability bar, which is taken from spellDB.xml.
primarybuff id="2" A constant passive buff to a primary stat that this ability gives. It can be positive or negative. In this case, we're reducing P. Stat ID 2 (Nimbleness) by 2 points.
amount="-2"
secondarybuff id="0" A constant passive buff to a secondary stat that this ability gives. It can be positive or negative. In this case, we're increasing S. Stat ID 0 (Max HP) by 1 point.
amount="1"
resistbuff existential="3" A constant passive buff to a resistance that this ability gives. It can be positive or negative. In this case, we're increasing Existential Resistance by 3 points.
damagebuff conflagratory="1" A constant passive buff to a damage type that this ability gives. It can be positive or negative. In this case, we're increasing Conflagratory Damage by 1 point.
targetHitEffectBuff percentage="20" This is a passive ability that will activate 20% of the time when you strike an opponent. The spell will determine targeting and resulting effect. 'name' must match the name of a spell in a spellDB, either the game's or a mod's, maybe yours.
name="Midas"
playerHitEffectBuff percentage="20" This is a passive ability that will activate 20% of the time when an enemy strikes you. The spell will determine targeting and resulting effect. 'name' must match the name of a spell in a spellDB, either the game's or a mod's, maybe yours.
name="Midas"
spell name="Lead into Gold" This is an activated ability. Despite being called 'spell', this is the syntax used for any activated ability, even one with a cooldown. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours.
targetKillBuff percentage="20" This is a passive ability which triggers 20% of the time after killing an enemy. the spell will determine targeting and resultant effect. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours.
name="Killing Blow"
after="1" Necessary when a spell (like Killing Blow) is limited by a number of attacks. Without it, it will count the attack that has just been done as one of the limited attacks.
taxa="..." An option to specify a monster type (Animal, Demon, Vegetable, ...) for this skill to trigger on.
crossbowShotBuff percentage="20" This is a passive ability that will trigger 20% of the time upon shooting an enemy with your crossbow. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature shot will be the target.
name="Midas"
thrownBuff percentage="20" This is a passive ability that will trigger 20% of the time upon hitting an enemy with a thrown weapon. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature hit will be the target.
name="Midas"
triggerOnCast percentage="20" This is a passive ability that will trigger 20% of the time upon casting a spell. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature targeted will be the target.
name="Midas"
dodgeBuff percentage="20" This is a passive ability that will trigger 20% of the time upon a successful dodge. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the attacker will be the target.
name="Midas"
boozeBuff percentage="20" This is a passive ability that will trigger 20% of the time upon drinking (booze or potion). 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature hit will be the player.
name="Midas"
foodBuff percentage="20" This is a passive ability that will trigger 20% of the time upon eating. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature hit will be the player.
name="Midas"
consumeBuff percentage="20" This is a passive ability that will trigger 20% of the time upon eating or drinking, effectively a combination of boozeBuff and foodBuff. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature hit will be the player.
name="Midas"
criticalBuff percentage="20" This is a passive ability that will trigger 20% of the time upon successfully landing a critical hit. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect.
name="Midas"
counterBuff percentage="20" This is a passive ability that will trigger 20% of the time upon a successful counter. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature hit will be the attacker.
name="Midas"
blockBuff percentage="20" This is a passive ability that will trigger 20% of the time upon blocking an attack. 'name' must match the name of a spell in spellDB, either the game's or a mod's, maybe yours. The spell will determine targeting and the resultant effect. If the activated spell's type is 'target', the creature hit will be the attacker.
name="Midas"
recoveryBuff amount="20" This is a passive ability that increases the ammo recovery chance of bolts and thrown weapons. This is an additive effect, not multiplicative, so the base 5% recovery would be increased by 20% for a 25% recovery rate.

Blank Template

For those who understand how to create a skill sheet and don't want to accidentally leave a but of a different skill in their new mod, here is a blank skill template for you. Simply add however many skills you need.

<skillDB>

 <skill name="" id="" type="" description="">
   <art icon=""/>
   </skill>

 <ability startSkill="1" name="" icon="" skill="" >
    <description text=""/>
    </ability>

<ability name="" icon="" skill="" level="0">
    <description text=""/>
    </ability>

 </skillDB>

See Also:

Skill System Reference

⚠️ **GitHub.com Fallback** ⚠️