FORUM ARCHIVED

Spell crashes the game if the buff that is used is not up

Discussion in 'Modding' started by Neo_Combine, Jun 27, 2012.

  1. Neo_Combine

    Neo_Combine Member

    I am getting sick of having to ask for help because i feel like i should know what is causing the problem. But alas i do not, i am still going to work on fixing but i thought i would ask here first to see if there were any silly mistakes that i have made and missed several times during my rework. If you can't help that is fine but if you have any ideas please feel free to mention them.

    The spell i am having trouble with is here. The problem is that i have made the skill require a buff to work. I have done this previously and it has worked however this one is just crashing the game if it is used without the buff active


    <spell name="Coin Shot" type="target" icon="skills/warrior/mystic_missile32.png" wand="0" >
    <effect type="trigger" requirebuffonnottrigger="1" requirebuffonnottriggername="Burning Steel" spell="Coin Shot" />
    <anim sprite="sprites/sfx/null" frames="2" framerate="100" />
    <effect type="damage" blasting="5" blastingF="0.15" piercing="5" piercingF="0.15" midas="1" />
    </spell>

    <spell name="Burning Steel" type="self">
    <buff useTimer="1" time="20" allowstacking="1" icon="skills/warrior/wands2_64.png" smallicon="skills/warrior/wands2_32.png">
    <effect type="trigger" requirebuffonnottrigger="1" requirebuffonnottriggername="Steel Store" spell="Remove Steel Store" />
    </buff>
    <description text="The power! It is intoxicating! How easy it is to lift things or butcher diggles, I better find more of this stuff if I want to stay enhanced like this."/>
    </spell >

    <spell name="Remove Steel Store" type="self" >
    <effect type="removebuffbyname" name="Steel Store" amount="1"/>
    <anim sprite="sprites/sfx/null" frames="2" framerate="100" />
    </spell >

    <spell name="Burn Steel" type="self" icon="skills/warrior/body_paint32.png" >
    <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="Steel Store" spell="Burning Steel" />
    <effect type="removebuffbyname" name="Steel Store" amount="1"/>
    <anim sprite="sprites/sfx/null" frames="2" framerate="100" />
    </spell>

    <spell name="Steel Store" type="self" icon="skills/warrior/monster_toss32.png" >
    <description text="You have Steel present inside your stomach and can feel the reserve ready to use. Burn it at will"/>
    <buff useTimer="0" allowstacking="1" stacksize="6" removable="1" icon="skills/warrior/monster_toss64.png" smallicon="skills/warrior/monster_toss32.png">
    </buff>

    I will probably just rework this spell if i can't find a solution soon, i just wish i knew more on how to prevent the crashes. No error pops up the spell just goes to work and then the game freezes and crashes.:confused:
     

    Attached Files:

  2. Lunix Vandal

    Lunix Vandal Member

    Coin Shot is recursive. This is a Very Bad Thing (TM). Move anything you want to only trigger when Burning Steel is / is not active to another spell called Coin Shot 2 and have that be what the Coin Shot requirebuffon(not)trigger triggers.

    Housekeeping-wise, Burning Steel doesn't need the Remove Steel Store trigger (and the Remove Steel Store spell itself is functionally nonfunctional) -- it's currently set up as "If I don't have X, take X away."
     
    Aegho, Kazeto and OmniNegro like this.
  3. Neo_Combine

    Neo_Combine Member

    Fixed. Thankyou.