FORUM ARCHIVED

How would I do this?

Discussion in 'Modding' started by agrajag, Feb 17, 2012.

  1. agrajag

    agrajag Member

    I'm trying to create an ability that has a chance to resurrect monsters as allies when the player kills them. So far I have

    Code:
    <ability name="Rousing Diction" icon="skills/spells/zombyfycation64.png" skill="50" level="0"> <!-- Placeholder level -->
            <description text="Your speeches have become so amazing that some monsters rise from the dead just to hear the end of your speech."/>
            <targetKillBuff percentage="100" name="Rousing Diction"/>
            <resistbuff asphyxiative="1"/>
            <primarybuff id="3" amount="5"/>
        </ability>
    as the ability trigger and
    Code:
    <!-- Rousing Diction effect sequence -->
            <!-- Passive effect that resurrects some monsters killed -->
            <spell name="Rousing Diction" type="targetcorpse" icon="skills/placeholder32.png">
                <description text="This monster REALLY wants to hear you talk."/>
                <effect type="resurrection"/>
            <!--    <effect type="trigger" spell="Rousing Diction 2" affectscaster="1"/> -->
                <anim sprite="sprites/sfx/corpse_hit_mini/corpse_hit_mini" frames="4" framerate="100" sfx="fleshbore" centerEffect="0"/>
            </spell>
     
            <!-- Effect that actually charms resurrected monsters -->
            <spell name="Rousing Diction 2" type="targetmonster" icon="skills/placeholder32.png">
                <description text="This monster REALLY wants to hear you talk."/>
                <effect type="charm" turns="20" affectscaster="1"/>
                <effect type="trigger" spell="Rousing Diction 3" amount="20" affectscaster="1"/>
                <anim sprite="sprites/sfx/hearts_loop/hearts_loop" frames="4" framerate="70" sfx="choir"/>
            </spell>
     
            <!-- And then kill them off afterward -->
            <spell name="Rousing Diction 3" type="targetmonster" icon="skills/placeholder32.png">
                <description text="This monster REALLY wants to hear you talk."/>
                <effect type="damage" righteous="999" affectscaster="1"/>
                <anim sprite="sprites/sfx/bloodsplatA/bloodsplatA" frames="4" framerate="100" sfx="fleshbore" centereffect="0"/>
            </spell>
    
    as the spell effect. I have no idea if the latter parts of the spell effect work, i.e. the charm and then subsequent murder, because the resurrection portion doesn't work. The resurrection effect is used in one spell in the spellDB, so I assumed I could use it in my own spells. Where am I going wrong in this? Is this sort of thing even possible given what we have?
     
  2. badboy80

    badboy80 Member

    Code:
        <!--    <effect type="trigger" spell="Rousing Diction 2" affectscaster="1"/> -->

    You've got comment tags around the stuff you need. Remove that and it might work.
     
  3. J-Factor

    J-Factor Member

    Change it to this:
    Code:
    <spell name="Rousing Diction" type="target">
    <effect type="trigger" spell="Rousing Diction 2" amount="1" />
     
    <anim sprite="sprites/sfx/corpse_hit_mini/corpse_hit_mini" frames="4" framerate="100" sfx="fleshbore" centerEffect="0"/>
    </spell>
     
    <spell name="Rousing Diction 2" type="target">
    <effect type="resurrection" />
    <effect type="charm" turns="20" />
    <effect type="trigger" spell="Rousing Diction 3" amount="20" affectscaster="1"/>
     
    <anim sprite="sprites/sfx/hearts_loop/hearts_loop" frames="4" framerate="70" sfx="choir"/>
    </spell>
    Basically, at the point that targetKillBuff is triggered it seems the monster is not yet a corpse. You have to trigger another spell before you are able to resurrect it.
     
  4. Null

    Null Will Mod for Digglebucks

    Also there's the fact that targetKillBuff doesn't work inside a buff at the moment.
     
  5. agrajag

    agrajag Member

    So does this mean it's not possible?
     
  6. J-Factor

    J-Factor Member

    Your posted code isn't using a buff.
     
  7. Null

    Null Will Mod for Digglebucks

    Oh. 100% chance on a skill is overpowered beyond belief.
     
  8. Essence

    Essence Will Mod for Digglebucks

    In other words, Null was pointing out something that doesn't appear relevant based on the code you posted, so it appears that you can safely ignore his post. :)

    Also, I was assuming the 100% was for playtesting purposes. If that's really supposed to be what it is in the final edit, yeah, it's massively OP.
     
  9. agrajag

    agrajag Member

    This worked. Thanks for the help, I got everything working the way I want it.

    And yeah, the 100% was so I could test whether it was working correctly without having to wait for it to actually proc.