FORUM ARCHIVED

Help with Modding primarybuff and secondarybuff

Discussion in 'Modding' started by Cody, Jun 18, 2013.

  1. Cody

    Cody Member

    This is the begining of the code i wrote i have a mod.xml file all ready and the game registers it(bottom) but im having trouble with the PRIMARYBUFF section i added extra buffs to see if it will add on but the game does not give you the extra buffs that i added.the same with the secondary buffs it does not add. i cannot see whats wrong im new to this but help would be great. Dont mind the giant numbers its only for tests.... for now

    Code:
    <skillDB>
    <skill name="ONE TIME" id="200" type="warrior" description="CAN YOU REACH LEVEL 1?">
      <art icon="sprites/skills/midas/regal64.png"/>
      <loadout type="reagent" subtype="Gold Ingot" always="1" amount="1000000"/>
    </skill>
    <ability startSkill="1" name="ONESHOT" 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="ONE SHOT" icon="sprites/skills/midas/selfrighteous_aura64.png" skill="200" level="1">
        <description text="In your veins flows the blood of kings!"/>
     
    <targetHitEffectBuff percentage="100" name="ONE SHOT" />   
    <primarybuff id="1" amount="10000"/> <!-- Sagacity -->
    <primarybuff id="2" amount="10000"/> <!-- Nimbleness -->
    <primarybuff id="3" amount="10000"/> <!-- Burliness -->
       
    <secondarybuff id="0" amount="100000"/> <!-- hp -->
    <secondarybuff id="1" amount="100000"/> <!-- mp -->

    PIC.png
     
  2. Monkooky

    Monkooky Member

    There's a few problems here.

    First, you need to set the level of the first skill to 0.
    Second, you need to put </ability> at the end of your ability and </skillDB> at the end of the skillDB file.
    Third, lower those values. I would be amazed if dredmor could handle stat buffs that large.

    Fourth, you are using targetHitEffectBuff wrong.
    What targetHitEffectBuff does is casts the specified spell (in your case ONE SHOT) when you hit a target.
    To make this work you will want a spellDB file containing something like
    Code:
    <spellDB>
    <spell name="ONE SHOT" type="self" icon="skills/diggle_plague32.png" >
        <buff useTimer="1" time="24" allowstacking="0" stacksize="1" self="0" icon="skills/diggle_plague64.png" smallicon="skills/diggle_plague32.png" bad="1" >
           
    <primarybuff id="1" amount="100"/> <!-- Sagacity -->
    
        </buff>
        <description text="Copypasta from dredmod is a wonderful thing." />
    </spell>
    </spellDB>
     
    Kazeto and Bohandas like this.
  3. Bohandas

    Bohandas Member

    What monkooky said seems about right. Some of that stuff definitely needs to be ported over to spelldb, and even then you mightt wind up with a y2k type thing going on if you leave those values that high (though you might not. I haven't actally tested extremely high values)
     
    Kazeto likes this.