FORUM ARCHIVED

Getting procs to work on buffs.

Discussion in 'Modding' started by Aegho, Apr 16, 2012.

  1. Aegho

    Aegho Member

    Could someone help me with this?

    Code:
    <spell name="Trout Slap" type="target" wand="0" icon="skills/spells/magic_steel32.png" >
      <effect type="damage" affectsCaster="1" crushing="3" crushingF="0.3" />
      <effect type="knock"  amount="2" />
      <anim sprite="sprites/sfx/lightningstrike/lightningstrike" frames="6" framerate="100"
     
    sfx="elect" />
      <effect type="trigger" spell="Blast Effect A" />
      <description text="Whallop!"/>
      </spell>
     
    <spell name="Fish Slapping Dance" type="self" icon="skills/spells/magic_steel32.png"
     
    wand="0" >
      <requirements mp="10" savvyBonus="0.25" mincost="5" />
      <anim sprite="sprites/sfx/voltaic_hit/voltaic_hit" frames="8" framerate="80"
     
    sfx="magic_steel" centerEffect="1" />
      <buff useTimer="0" removable="1" manaUpkeep="7" allowstacking="0"
     
    icon="skills/spells/magic_steel64.png" smallicon="skills/spells/magic_steel32.png">
          <!-- <halo name="sprites/sfx/voltaic_loop/voltaic_loop" first="0" num="5"
     
    frameRate="90" />-->
          <secondarybuff id="6" amount="3" /> <!-- dodge -->
          <secondarybuff id="9" amount="4" /> <!-- enemy dodge rate -->
          <damagebuff hyperborean="1" />
          <resistbuff hyperborean="2" />
          <targetHitEffectBuff percentage="100" spell="Trout Slap" amount="1" />
      </buff>
      </spell>
    I've tried other ways of getting it to proc too(namely using <effect type="trigger" percent="100%"... etc), 100% for is for testing purposes.

    Also, if I do make it proc, how do I make a proc text appear? Or is that automaitcally the spell name for the proc?

    PS: Very rough at this point I know. Still using effects/icons from the skills I based them on, etc.
     
  2. Kazeto

    Kazeto Member

    The text should automatically appear if you make it proc. Though that's when it's an on-hit proc or something similar; abilities triggered from other abilities don't get that text. And the name that will appear is the name of the triggered ability.

    And it's not 'percent="100%"', but 'percentage="100"' - XML doesn't need the percent sign, and the word used in the code is "percentage". Though you'll find out that not every proc works from within buffs right now - I know "targetEffectHitBuff" does work, for example, but many others don't.
     
  3. Aegho

    Aegho Member

    None of that helped me solve my problem unfortunately. Incidentally I tried the <effect type="trigger" percent="100%" thing because it demonstrably works in the dire gourmand code.

    If I can't get procs within buffs to work I may just make it a permanent effect, with two procs, one for the buff, one for the proc I wanted, and simply make the buff one 100% and stackable="1".
     
  4. Kazeto

    Kazeto Member

    Try getting rid of 'amount="1"', then - this one is used to make a spell trigger after one turn, so it's possible that this is what is hindering your ability.
     
  5. Aegho

    Aegho Member

    I originally tried with amount="0", didn't work either, but I can try removing it altogether. EDIT: It's not the cause, since it doesn't work with any of those 3 states.
     
  6. Kazeto

    Kazeto Member

    Hmm...
    Oh, I'm an idiot for not noticing it earlier. It's 'name="something"' and not 'spell="something"'.
     
  7. Aegho

    Aegho Member

    Also tested varying the called upon effect by quoting out the damage and changing the target to self, in case it was a targeting problem, didn't work either. Simply seems like the targetHitEffectBuff isn't working.
     
  8. Aegho

    Aegho Member

    Code:
    <targetHitEffectBuff percentage="100" name="Trout Slap" amount="0" />
    Doesn't work any better. And neither does removing amount="0" make it work.
     
  9. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    As of right now, most procs do not work from inside buff tags.
     
  10. lccorp2

    lccorp2 Member

    I know for sure that targethiteffect buff should work from within buff tags. Blood Price works perfectly:

    Code:
    <spell name="Blood Drain" type="target" >
        <anim sprite="sprites/sfx/bloodsplatA/bloodsplatA" frames="4" framerate="60" centerEffect="0" sfx="fleshbore" />
        <effect type="drain" necromantic="1" necromanticF="0.02" taxa="Vegetable" secondaryScale="0" />
        <effect type="drain" necromantic="1" necromanticF="0.02" taxa="Construct" secondaryScale="0" />
        <effect type="drain" necromantic="1" necromanticF="0.02" taxa="Undead" secondaryScale="0" />
        <effect type="drain" necromantic="1" necromanticF="0.04" taxa="Demon" secondaryScale="0" />
        <effect type="drain" necromantic="1" necromanticF="0.04" taxa="Other" secondaryScale="0" />
        <effect type="drain" necromantic="1" necromanticF="0.04" taxa="Animal" secondaryScale="0" />
        <effect type="trigger" spell="Blood Healing" /> <!-- You do want some sort of return on your investment, yes? -->
        </spell>
     
    <!-- Basic Blood Knight skill, designed to allow one to drain HP to fuel spells. Heal component is so that some sort of guaranteed return is expected. -->
     
    <spell name="Blood Price" downtime="8" type="adjacent" icon="skills/blood_knight/blood_price32.png" attack="1" wand="0">
        <anim sfx="naughty"/>
        <effect type="trigger" spell="Blood Price Effect" />
        <description text="The runes on your weapon (or boot) have awakened. They tell you that life-force tastes distinctly like chocolate, or in the case of vegetables, just like cardboard."/>
        </spell>
     
    <spell name="Blood Price Effect" type="self" icon="skills/blood_knight/blood_price32.png" >
        <anim sprite="sprites/sfx/curse_hit/curse_hit" frames="6" framerate="100" sfx="naughty" centerEffect="1"/>
        <buff useTimer="0" removable="1" allowstacking="0" icon="skills/blood_knight/blood_price64.png" smallicon="skills/blood_knight/blood_price32.png" >
            <secondarybuff id="0" amount="-12" /> <!-- hp -->
            <targetHitEffectBuff percentage="100" name="Blood Drain" />
        </buff>
        <description text="The runes on your weapon (or boot) have awakened. They tell you that life-force tastes distinctly like chocolate, or in the case of vegetables, just like cardboard."/>
      </spell>
    Your problem is that you're using "spell" instead of "name" to define the on-hit spell.

    Floating text only appears when triggers from SKILLS go off.
     
  11. Aegho

    Aegho Member

    I made a stupid mistake. Sorry, the name instead of spell thing did fix it, I was just editing my backup copy instead of the main one, d'oh.

    So the proc works now, but it does not actually show any text when it does, nor does the game show the damage it does(I can tell it works because the knockback portion works). It's not 100% though, is it being resisted?

    Oh and thanks for all the help.
     
  12. lccorp2

    lccorp2 Member

    Knockback can be resisted, yes.

    As I said, text only comes from skills.

    The no damage thing may be because you're attacking a monster with armour. Check the armour rating of the monster on dredmorpedia. Also, the damage text should show up above the monster, but it is pretty fast and can easily get blurred out with other damages.
     
  13. Aegho

    Aegho Member

    .... and now I've decided I'm not going to use it as a buff after all, this is going from wizard skill to rogue skill. The only reason for the change is that I want floating text.
     
  14. Aegho

    Aegho Member

    ...whine... non-buff works without a hitch, but when I tested with playerHitEffectBuff I lost the floating text.