FORUM ARCHIVED

Why won't this item work right?

Discussion in 'Modding' started by Bohandas, Jul 23, 2013.

  1. Bohandas

    Bohandas Member

    OK, so I tried to create a custom booze item, the Cask of Amontillado, that casts a spell that creates a ring of Unliving Walls around you and deals the player minor asphyxiation damage while restoring massive amounts of mana.

    While the item spawns in game, drinking it fails to trigger its intended special effect and I'm not sure why. Perhaps one of you can figure it out:

    Here's the definition from itemDB.xml:


    <item name="Cask of Amontillado" iconFile="items/beercask_shrunk.png" level="10">
    <price amount="302"/>
    <food mp="50" effect="For The Love of God Montressor"/>
    <description text="Well it passes for Amontillado, but I have my doubts."/> <!-- I accidentally ended with "...but I have my donuts" in an early test version -->
    </item>


    Here's the relevant definitions from spellDB.xml:


    <spell name="For The Love of God Montressor" type="self" icon="skills/spell_earth6_32_Darkened_B.png" wand="0">
    <effect type="trigger" spell="Amontillado Entombment Ring" />
    <effect type="trigger" spell="Unknocking Wall" percent="20" />
    <effect type="trigger" spell="Amontillado Bad Air" />
    </spell>

    <spell name="Amontillado Entombment Ring" type="template" templateID="13" anchored="1" icon="skills/spell_earth6_32_Darkened_B.png.png" wand="0">
    <effect type="trigger" spell="Amontillado Bad Air Dot" />
    <effect type="trigger" spell="Unliving Wall" />
    </spell>

    <spell name="Unknocking Wall" type="targetfloor" icon="skills/spells/summon_wall32.png">
    <anim sprite="sprites/sfx/magic_wall/magic_wall" sync="1" frames="11" framerate="80" sfx="earth" centerEffect="0"/>
    <effect type="damage" crushing="6" crushingF="0.25" blasting="2" self="0"/>
    <effect type="create" turns="48" objectSprite="dungeon/summoned_wall.png" self="0"/>
    <description text="First concocted by the Mad Architect Montresor, this spell grows a wall from the floor, crushing and moving any who stand in the spot. Delightfully unnatural."/>
    </spell>

    <spell name="Amontillado Bad Air" type="targetfloor" icon="skills/spells/summon_wall32.png">
    <effect type="dot" spell="Amontillado Bad Air Dot" amount="48" affectsCaster="1"/>
    </spell>

    <spell name="Amontillado Bad Air Dot" type="target" >
    <effect type="damage" asphyxiative="1" affectsCaster="1" percent="85"/>
    <effect type="damage" toxic="1" affectsCaster="1" percent="12"/>
    </spell>


    Is there anything amiss?
     
  2. FaxCelestis

    FaxCelestis Will Mod for Digglebucks

    Try reversing the order of the spells in spellDB.xml. There are occasional weirdnessess with spells calling other spells requiring those spells to be before the other spells in spellDB.xml.

    That was confusing.

    If Spell A triggers Spell B, Spell B needs to be before Spell A in spellDB.xml. If Spell B triggers Spell C, then Spell C needs to be before Spell B. So with this being the case, spellDB.xml would need to go Spell C, then Spell B, then Spell A.
     
    Kazeto likes this.