FORUM ARCHIVED

Need help with abilites like Berserker Vengence

Discussion in 'Modding' started by Newominus, Sep 25, 2012.

  1. Newominus

    Newominus Member

    So I recently wanted to make a mod of my own, and im kind of stuck on trying to make an ability work. Yusee, it won't give me a buff when i get hit. Could you guys help me with the code, figure out whats wrong? If you want to test it out then you can try, i guess. Just put it in the gaslampgames/mod folder.

    SkillDB
    Code:
    <ability name="Reflective Magesteel" icon="icons/animated5_64.png" skill="357" level="3">
            <description text="The blood of diggles and amateur magic has strengthened your armour to combat more ameteur magic, this includes your own ameteur magic. Your inability to smell still remains."/>
            <playerHitEffectBuff percentage="100" name="Reflective Magesteel" />
                <secondarybuff id="10" amount="1"/> <!-- armour absorbtion -->
                <secondarybuff id="11" amount="5"/> <!-- magic resistance -->
                <secondarybuff id="22" amount="20"/> <!-- magic reflect -->
            <resistbuff asphyxiative="1" piercing="1" />
            </ability>
    SpellDB
    Code:
    <spell name="Reflective Magesteel" icon="icons/animated2_32.png" >
        <buff useTimer="1" time="30" allowstacking="1" stacksize="5" self="1" icon="icons/animated2_64.png" smallicon="skills/animated2_32" bad="0" downtime="0" >
            <playerHitEffectBuff percentage="100" name="Reflective Magesteel" />
            <primarybuff id="1" amount="-1"/> <!-- sagacity -->
            <primarybuff id="5" amount="-1"/> <!-- savvy -->
            <secondarybuff id="10" amount="1"/> <!-- armour absorbtion -->
            <secondarybuff id="11" amount="1"/> <!-- magic resistance -->
            <secondarybuff id="22" amount="1"/> <!-- magic reflect -->
        </buff>
    <description text="Your Reflective Magesteel enhancement is blocking magic! How wonderous! Sense of smell is blocked too(not like you had it to begin with anyway)." />
    </spell>
     
  2. Kazeto

    Kazeto Member

    First of all, you have this:
    Code:
    <playerHitEffectBuff percentage="66" effect type="trigger" name="Reflective Magesteel" />
    Change it to this:
    Code:
    <playerHitEffectBuff percentage="66" name="Reflective Magesteel" />
    Whatever the "effect type" thing was supposed to be doing, it isn't working the way you thought it would. In fact, it is likely to be what breaks your code.

    Secondly, you have this:
    Code:
    <blockBuff percentage="100" effect type="trigger" name="Reflective Magesteel" />
    Either get rid of it (you already have a playerHitEffectBuff that is supposed to trigger the same thing) or change it to this:
    Code:
    <blockBuff percentage="100" name="Reflective Magesteel" />
    And I am not going to repeat why.

    And in the buff itself, you might want to move the "playerHitEffectBuff" inside of the <buff> tag, otherwise it will not work.

    Also, you might want to take a look at this site:
    http://dredmod.com/
     
  3. Vitellozzo

    Vitellozzo Member

    This was one of my ideas about a mod for both human and werediggle form.
    So: good idea.
     
  4. Newominus

    Newominus Member

    When i first started (like, two days ago) I was actually using dredmod as a guideline :p

    Alright, so ive worked on that for a little while now, ive updated my original post to have the updated code. Thing is though, theres a little problem remaining. When the buff procs(I can actually see the words pop up now), it still doesn't actually GIVE me the buff.

    Oh and before, i accidently uploaded an older version of my mod. Now its okay.
     
  5. Essence

    Essence Will Mod for Digglebucks

    Your line "<playerhiteffectbuff percentage="100"> in the SpellDB entry above needs to be a <buff usetimer="X" etc. etc.> line instead.
     
  6. Newominus

    Newominus Member

    Could you elaborate a little more? I don't quite understand, wouldnt i then have two of <buff usetimer="X">?
    What would the point of having two be, or am i meant to change the line above it as well?
    Thanks :eek::dmg_aphyxiative:
     
  7. Essence

    Essence Will Mod for Digglebucks

    Heh. Khyber bad, I misread that. The real peoblem is thelack of a <type="self"> in RM's <spell> line.
     
  8. Essence

    Essence Will Mod for Digglebucks

    Wow...that was some of the worst tablet-text ever.
     
    Daynab and Kazeto like this.
  9. Newominus

    Newominus Member

    Wudubar! Now when i get hit, it crashes the game :eek::dmg_aphyxiative:
    Ah, ive solved it, finally :p