Help with buff coding?

Discussion in 'Modding' started by lccorp2, Jan 17, 2012.

  1. lccorp2

    lccorp2 Member

    Hey all. I'm currently working on a mod to make mages super glass cannons, and have gotten stuck when working on the third skill of the tree, which involves two buffs: Realignment, for personal defense but consumes enormous amounts of mana, and Breached, which punishes players for allowing themselves to be hurt in melee combat. However, I can't seem to get it to work--the first two skills work fine, but Realignment refuses to show up on the skillbar when the skill is learned, and Breached doesn't seem to be working, either.

    If someone has the time, could they take a quick look through the code and see what might be the problem, or give me some idea as to why the skill isn't showing up? Below are my skillDB and spellDB code; I'll fully admit to being a noob at this with only 5 hours' experience of DoD modding so far:

    skillDB:

    Code:
    <skillDB>
     
    <skill name="Radiant Wizard" id="751" type="wizard" description="You have immersed yourself in the energies of all things luminous to gain great power, at the cost of your physical body deteriorating.">
        <art icon="skills/spells/the_word64.png"/>
        <loadout type="armour" subtype="Cracked Orb" />
        </skill>
     
    <ability name="Radiant Wizard" icon="skills/spells/the_word64.png" skill="751" startSkill="1">
        <description text="You have immersed yourself in the energies of all things luminous to gain great power. As your physical body becomes more insubstantial, though, the laws of physics come bearing down upon you ever more harshly."/>
        </ability>
     
    <ability name="Light Dart" icon="skills/spells/curse_of_midas64.png" skill="751" level="0" >
        <spell name="Light Dart"/>
        <description text="Blast your ememies with a concentrated burst of luminence from your fingertip! Are you sure your hand's supposed to be see-through, though, or is that a trick of the light?" />
            <primarybuff id="1" amount="2"/> <!-- sagacity -->
            <secondarybuff id="10" amount="-1"/> <!-- armor_absorption -->
            <secondarybuff id="11" amount="5" /> <!-- magic resist -->
            <secondarybuff id="22" amount="5" /> <!-- magic reflect -->
        </ability>
     
    <ability name="Dazzling Blast" icon="skills/spells/blinding_light64.png" skill="751" level="1" >
        <spell name="Dazzling Blast"/>
        <description text="Your heart has started pumping out haywire energies, which augment your magical powers and can be released in stunning bursts. This, however, makes it less effective at pumping blood around your body, sapping your strength--physical contact should always be a last resort." />
            <primarybuff id="1" amount="2"/> <!-- sagacity -->
            <secondarybuff id="3" amount="3"/> <!-- magic power -->
            <secondarybuff id="5" amount="3"/> <!-- haywire -->
            <secondarybuff id="6" amount="-3"/> <!-- dodge -->
            <secondarybuff id="7" amount="-3"/> <!-- block -->
            <secondarybuff id="8" amount="-3"/> <!-- counter -->
            <secondarybuff id="10" amount="-1"/> <!-- armor_absorption -->
            <secondarybuff id="11" amount="7"/> <!-- magic resist -->
            <secondarybuff id="22" amount="7"/> <!-- magic reflect -->
        </ability>
     
    <ability name="Realignment" icon="skills/spells/zephyric_transport64.png" skill="751" level="2" >
        <spell name="Realignment"/>
        <description text="Wary of the fact that your body is falling apart atom by atom and becoming prone to breaching and highly dangerous meltdown, you learn to pull together the new form you are assuming into a shape more suited to repelling physical threats. This also drains your energies faster than college students can drink beer." />
            <primarybuff id="1" amount="2"/> <!-- sagacity -->
            <primarybuff id="5" amount="2"/> <!-- savvy -->
            <secondarybuff id="3" amount="5"/> <!-- magic power -->
            <secondarybuff id="5" amount="5"/> <!-- haywire -->
            <secondarybuff id="11" amount="7"/> <!-- magic resist -->
            <secondarybuff id="22" amount="7"/> <!-- magic reflect -->
            <playerHitEffectBuff percentage="100" name="Breached"/>
        </ability>
     
    </skillDB>
    spellDB:

    Code:
    <spellDB>
    
    <!-- The tree's only long-range spell, and its weakest. -->
    
    <spell name="Light Dart" type="missile" icon="skills/spells/curse_of_midas32.png" >
        <effect type="damage" righteous="7" righteousF="0.2" />
        <requirements mp="7" savvyBonus="0.15" mincost="2" />
        <anim sprite="sprites/sfx/glintA/glintA" frames="5" framerate="60" centerEffect="0" sfx="magic_damage" />
        <description text="Blast your ememies with a concentrated burst of light! This spell does righteous damage." />
        </spell>
    
    <!-- Intended to allow the player to buy some time to make an escape via teleportation or other means. Alternatively, just use this on a monster in a chokepoint and run. -->
    
    <spell name="Dazzling Blast" type="template" templateID="03" anchored="1" downtime="40" icon="skills/spells/blinding_light32.png" wand="1" >
        <description text="Stun an enemy with a touch from your short-range haywire energies and make your getaway while they're blinded--if they're not dead already!" />
        <effect type="damage" righteous="9" righteousF="0.45" />
        <effect type="paralyze" turns="5" self="0" resistable="0" />
        <anim sprite="sprites/sfx/impact_divine/impact_divine" frames="5" framerate="90" centerEffect="0" sfx="magic_damage" />
        </spell>
    
    <!-- A reasonable buff--quite strong and offsets some of the weaknesses of the tree, but sucks away mana like no tomorrow. Based on Syzygy. -->
    
    <spell name="Realignment" type="self" icon="skills/spells/zephyric_transport32.png" >
        <requirements mp="20" savvyBonus="0.25" mincost="10" />
        <anim sprite="sprites/sfx/divine_hit/divine_hit" frames="8" sfx="radiant" framerate="70" centerEffect="0"/>
        <buff useTimer="0" stacksize="1" removable="1" manaUpkeep="1" allowstacking="0" icon="skills/spells/zephyric_transport64.png" smallicon="skills/spells/zephyric_transport32.png">
            <secondarybuff id="0" amount="30"/> <!-- hp -->        
            <secondarybuff id="6" amount="15"/> <!-- dodge -->
            <secondarybuff id="7" amount="15"/> <!-- block -->
            <secondarybuff id="10" amount="7"/> <!-- armor_absorption -->
            <secondarybuff id="13" amount="6"/> <!-- health regen -->
        </buff>
        <description text="Your more unstable energies are contained within your personal magnetic field. How long can you keep this up before you turn into a rampaging Japanese monster?" />     
        </spell>
    
    <!-- Penalty for being hit in melee. Reduces stats, cannot be decursed. Based on Curse of Emo. -->
    
    <spell name="Breached" type="self" icon="skills/spells/fleshbore32.png" >
        <anim sprite="sprites/sfx/combust_hit/combust_hit" frames="5" framerate="80" centerEffect="0" sfx="blast" />
        <description text="That's what you get for unnecessarily exposing yourself: your defenses are reduced and you're in danger of meltdown! There's no speedy cure for this; you must hurry away and wait for your energies to realign themselves naturally!" />
        <buff useTimer="1" self="1"  stackable="1" stacksize="3" time="7" icon="skills/spells/fleshbore64.png" smallicon="skills/spells/fleshbore32.png" >
            <secondarybuff id="10" amount="-2"/> <!-- armor_absorption -->
            <secondarybuff id="11" amount="-5"/> <!-- magic resist -->
            <secondarybuff id="13" amount="-15"/> <!-- health regen -->
            <secondarybuff id="22" amount="-5"/> <!-- magic reflect -->
            <resistbuff righteous="-1" blasting="-1" conflagratory="-1"/>
        </buff>
        </spell>
     
    </spellDB>
     
  2. Null

    Null Will Mod for Digglebucks

    -- is illegal in comments (except when you're closing it).
    Should fix it.
     
  3. Essence

    Essence Will Mod for Digglebucks

    God, did I ever have that problem when I first started coding -- as a lifelong writer of Web content, I have a fully ingrained habit of using "--" all over the damn place. It killed me when I realized you couldn't do that in comments. :p
     
  4. lccorp2

    lccorp2 Member

    Thanks a lot, Null! I feel like an idiot now.