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>
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/
When i first started (like, two days ago) I was actually using dredmod as a guideline 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.
Your line "<playerhiteffectbuff percentage="100"> in the SpellDB entry above needs to be a <buff usetimer="X" etc. etc.> line instead.
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
Heh. Khyber bad, I misread that. The real peoblem is thelack of a <type="self"> in RM's <spell> line.