FORUM ARCHIVED

Why is this not working?

Discussion in 'Modding' started by Essence, Mar 3, 2012.

  1. Essence

    Essence Will Mod for Digglebucks

    Code:
    <spell name="Elemental Archmagic" icon="skills/placeholder32.png" type="targetfloor">
    <requirements mp="17" savvyBonus=".18" mincost="11"/>
    <effect type="trigger" spell="Water Archmagic"/> <!-- targetcorpse -->
    <effect type="trigger" affectsCorpses="0" spell="Fire Archmagic"/> <!-- knightlyleap -->
    <effect type="trigger" affectsCorpses="0" spell="Earth Archmagic"/> <!-- adjacent --> 
    <effect type="trigger" affectsCorpses="0" spell="Air Archmagic"/> <!-- targetmonster --> 
    <description text="You've mastered the simplest form of energy manipulation: elementalism. Depending on where you point 
    
    this spell, one of four various elemental effects will happen. The very clever might even find ways to invoke more than one with a 
    
    single casting."/>
    </spell>
    
    <spell name="Fire Archmagic" type="knightlyleap">
    <effect type="damage" conflagratory="6" conflagratoryF=".6" burn="1"/>
    <effect type="trigger" spell="Fire 1"/>
    <effect type="knock"/>
    <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="magic" centerEffect="0"/>
    </spell>
    
    <spell name="Air Archmagic" type="targetmonster">
    <effect type="suction"/>
    <effect type="damage" asphyxiative="4" asphyxiativeF=".4"/>
    <effect type="paralyze" turns="1"/>
    <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="magic" centerEffect="0"/>
    </spell>
    
    <spell name="Water Archmagic" type="targetcorpse">
    <effect type="spawnitematlocation" itemName="Sewer Brew"/>
    <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="magic" centerEffect="0"/>
    </spell>
    
    <spell name="Earth Archmagic" type="rook" >
    <buff usetimer="0" brittle="3" self="1" allowstacking="0" icon="skills/placeholder64.png" 
    
    smallicon="skills/placeholder32.png">
    <secondarybuff id="22" amount="33"/>
    <description text="You've crafted yourself a small sheet of enchanted obsidian that is very reflective to enemy 
    
    magic. Get hit too many times and it will fall apart on you."/>
    </buff>
    <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="magic" centerEffect="0"/>
     </spell>
    This casts as a single spell. If you target a monster, it sucks the monster up to you, which the Suction effect should do -- but it doesn't do any damage or paralysis. I can't tell if this is a problem with the Suction effect or not. It seems like if the Suction effect does it's random bleed proc (which seems built into the effect), then the damage and paralysis happen; otherwise, nothing.

    If you target a corpse, it turns it into a Sewer Brew. No problems there.

    If you target a knightlyleap square, it lights a fire and knocks back anything there. No problems.

    If you target a rook square, it's supposed to activate a 33% magic reflect buff on you, but it only does so if there's a monster in the rook square. That's wierd, because rook specifically supports targeting empty squares (see Invisible Geometries.)


    Anyone with more mastery than I able to determine why these oddities occur? Thanks!
     
  2. Glazed

    Glazed Member

    I'm just guessing, but maybe try putting the suction effect last in the list, since they are processed in order.
     
    Essence likes this.
  3. Essence

    Essence Will Mod for Digglebucks

    Worked like a charm, thanks!

    Now if I can figure out the Earth buff, I'll have one (1) level of Archmage ready for the road! :D
     
  4. lockeslylcrit

    lockeslylcrit Member

    An example from the game's files:
    Code:
    <spell name="Mustache Root" type="target" >
        <effect type="lockdown" amount="5" />
       <buff useTimer="1" time="5" allowstacking="1" icon="skills/spells/mustache64.png" smallicon="skills/spells/mustache32.png" bad="1" self="0">
          <secondarybuff id="6" amount="-8"/> <!-- dodge -->
          </buff>
       <description text="Rooted by facial hair! Dodging is more difficult, movement is impossible." monsterText="uses its terrifying facial hair attack!"/>
        <anim sprite="sprites/sfx/skathas_roots/skathas_roots" frames="6" centerEffect="0"/>
       </spell>
    Try placing the <description> stuff after the </buff>
     
  5. Essence

    Essence Will Mod for Digglebucks

    Nah, that's not it. I got TONS of description texts inside buffs. The difference is where the description shows up in the UI.
     
  6. Null

    Null Will Mod for Digglebucks

    That does make a difference? really I never though the position of the description changed anything.
    Just make earth magic trigger a self spell at turn 0 which has the buff.
     
  7. Essence

    Essence Will Mod for Digglebucks

    Ha! You ARE a badass, Null. :) Thanks! Worked like a charm.