Creating Skills/Items that only affect certain enemies

● ARCHIVED · READ-ONLY
Started by Tsukihime 4 posts View original ↗
  1. This is a simple tutorial to demonstrate how to use the Tag Manager to have skills or items that only affect certain enemies.


    Required


    Tag Manager: http://himeworks.com/2013/03/07/tag-manager/


    How it works


    What we want


    Suppose we want to make a skill called "Destroy Undead" which will instantly destroy any undead monsters.


    Naturally, it will have the effect "add state: death"


    Specifying conditions


    The problem right now is if we just leave it at that, the skill would instantly kill anything it hits. So we must specify a tag condition. We do this by tagging the skill with

    <tag_cond: undead>Which means the "undead" tag must exist in the target for the skill to do anything to it.
    Applying tags


    Now suppose we are in a battle with two slimes and a zombie.


    If we would only want the skill to instantly kill undead monsters, and we want the zombie to be an "undead" monster, then we would tag the zombie with 

    <tag: undead>Test this in a project and verify that using "Destroy Undead" does nothing to the slimes, and will instantly skill the zombie.
    Using tags with states


    Now suppose we have another skill that allows you to turn monsters into undead, called "Turn Undead"


    First, you would create a state called "Undead" (or anything really).


    Then you would tag the state with

    Code:
    <tag: undead>
    Because states are tag objects, they will be inherited by the battler that has this state. As a result, if you used the "turn undead" skill on the slime and turned it into undead, and then used the "destroy undead" skill on the slime now, it should be instantly destroyed because it is now an undead.
  2. Ooh, with this, is it possible to have say a fireball skill that heals fire elementals, and damages everything else like the players and the not so fortunate goblin friend of the fire elemental?
  3. No, it only indicates whether a skill will do something to the target or not, and not what it will do.
  4. Ok ty.