Gw Temp

Menu

Tutorial - 'Zombie Status Tutorial' by AzureFenrir

An item about RPGMaker 2000 posted on

Blurb

A tutorial that shous you how to make a Final Fantasy-styled "zombie" status, which makes curative items damage you and life spells cause instant death.

Body

Zombie Status Tutorial


For those of you lucky enough to obtain (or pirate) a working copy of RMXP, many of those things that are impossible in RM2K3 are now at your mercy. The once impossible auto-life reviver is now possible without an CBS, thanks to the awesome Judge method that RMXP conveinently provides you.

However, for those who do not like RMXP's features or could not get a copy of RMXP, ways to work around RM2K3's limitations are still required. This includes RM2K3's lack of an option for "convert all healing points into damage" option, which is required for a Final Fantasy-styled Zombie status.

For those of you who do not know what "zombie" is, it is a negative status in many Final Fantasy games that caused your character to turn into an undead. You can still control him/her, but all positive effects (such as healing) became negative effects, and if you tried to use a phoenix down on an undead character, he/she dies instantly. Like oother statuses, Zombie can be cured by ESUNA, Remedy, or a special treatment item (Holy Water).

Enough rambling. Let us begin:

THINGS THAT YOU NEED TO KNOW:

Great experience With and Knowledge of RM2K Commands
Basics of Switches
Basics of Variables
Fork/Conditional Statements


Before we begin, make a new status called "Zombie." Give it a relatively high priority (57 is good), and leave everything else at their default values.

The first thing that the Zombie should do is to change all healing into damage. To do this, we'll add a new attribute called Healing, and set its [E] Damage Multiplier to -100% (and +100% for everything else). Then, set it's attribute type to magic, and leave it be.

Next, set the attribute of your curative spells (like Cure and Restore MP, but not Life or Esuna) to "Healing." This will allow us to make a character take damage from curative spells as soon as we set Healing to E.

Now, we can't just set Healing to E with a monster's zombify spell (since target enemy spells can only decrease resistance, which will make your healing status B, which cannot be set to negative). So, we will need to use classes to do this. If your game did not use classes, create two classes for each hero, one identical to the hero's stats, and the other identical to the hero's stats but with the "Healing" attribute resistance set to [E].

So, we have our class, and we have our condition. What should we do next?

Well, we need to detect whether the hero/heroes are inflicted with zombie, and if they are, then change their class to the new, healing-intolerant class, right? Well, we can only check status conditions in a Common Event, so let's create a new event called "ZombieTest" (or whatever you'd like) and add the following code:

CODE: COMMON EVENT ZombieTest

<>Branch if [Hero1] Zombie Condition
    <>Branch if Switch [0001:PrevZombie] is OFF
        <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
        <>Variable Operation: [0002:Armor] Set, Zack Armor No.
        <>Variable Operation: [0003:Shield] Set, Zack Shield No.
        <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
        <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
        <>Change Class: [Hero1] Hero1_Zombie, No Level Change, No Skill Change, No Stat Change
        <>Branch if Var [0001:Weapon] is 0 Greater
            <>Change Equipment: Zack V[0001] Equip
        : End
        <>Branch if Var [0002:Armor] is 0 Greater
            <>Change Equipment: Zack V[0002] Equip
        : End
        <>Branch if Var [0003:Shield] is 0 Greater
            <>Change Equipment: Zack V[0003] Equip
        : End
        <>Branch if Var [0004:Helm] is 0 Greater
            <>Change Equipment: Zack V[0004] Equip
        : End
        <>Branch if Var [0005:Accessory] is 0 Greater
            <>Change Equipment: Zack V[0005] Equip
        : End
        <>Switch Operation: [0001:PrevZombie] ON
    : End
: Else
    <>
: End
<>Comment: REPEAT FOR EVERY HERO


Let's analyze this code a bit. We first check whether the hero has the Zombie status, and if he/she does, then we check whether PrevZombie is false...wait, what is this PrevZombie switch?

Well...we need to change classes whenever Hero1 is zombied, right? This switch prevents us from having to change classes for EVERY TURN that Hero1 is zombified. So...this switch ensures that we change classes only once instead of every turn. It's not really required, but is just somewhat resource efficient. This switch has a much more important use later on, so don't remove it.

After checking the PrevZombie switch, we store the hero's equipment in five variables. This is done because every time a class change occurs in battle, a character is immediately stripped of all of his/her equipment. To fix this, we have to store what the hero is equipped with before the class change, and then reequip these items after the class change has occured...which is exactly what we do in the next few lines.

Then, we set PrevZombie to true, and end the conditional branches (don't worry about the "Else" - we'll use it later). We also need to add a new battle page to every battle, and have it call this common event every turn (Trigger: Turn Elapsed [1x]). No problem, right?

Of course, we also need another conditional statement to test for the removal of the Zombie status. However, before we write the code for that, let us think about the second part of the Zombie status: death when Life is cast. Now, how would that work?

Well, we could have the Life spell remove the Zombie status, and in our common event (which is run every turn), detect whether the Zombie status is removed, and if it is, inflict the Death status. But what about commands like Esuna, Remedy, or Holy Water (which should remove the Zombie status)?

Well, let's have those skills inflict a new condition instead of removing the "Zombie" condition so we can tell them apart. In your Conditions tab, add another condition, call it "Normal," and leave the defaults (but set it's priority higher than the Zombie condition's priority).
Then, add the following code to the "ZombieTest" common event:

CODE: COMMON EVENT ZombieTest

<>Branch if [Hero1] Normal Condition
    <>Branch if Switch [0001:PrevZombie] is ON
        <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
        <>Variable Operation: [0002:Armor] Set, Zack Armor No.
        <>Variable Operation: [0003:Shield] Set, Zack Shield No.
        <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
        <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
        <>Change Class: [Hero1] Hero1_Normal, No Level Change, No Skill Change, No Stat Change
        <>Branch if Var [0001:Weapon] is 0 Greater
            <>Change Equipment: Zack V[0001] Equip
        : End
        <>Branch if Var [0002:Armor] is 0 Greater
            <>Change Equipment: Zack V[0002] Equip
        : End
        <>Branch if Var [0003:Shield] is 0 Greater
            <>Change Equipment: Zack V[0003] Equip
        : End
        <>Branch if Var [0004:Helm] is 0 Greater
            <>Change Equipment: Zack V[0004] Equip
        : End
        <>Branch if Var [0005:Accessory] is 0 Greater
            <>Change Equipment: Zack V[0005] Equip
        : End
        <>Change Cond: Zack Normal Remove
        <>Change Cond: Zack Zombie Remove
        <>Switch Operation: [0001:PrevZombie] OFF
    : End
: Else
    <>Comment: We'll add the zombie-detedcting code here.

: End


What does this do? Well, we are basically checking whether the hero is inflicted with the Normal condition (which is inflicted by a Zombie-removing spell). If he/she is inflicted with "Normal" and has been turned into a zombie (as indicated by the "PrevZombie" switch), then change their class back to the original class, and remove both the "Zombie" and the "Normal" conditions.

If the hero is not inflicted with the Normal (zombie-curing) condition, then we proceed to check whether he is zombified, and change classes as usuall. So, select the zombie-checking code that you wrote earlier, and paste it into the "Else" part of the conditional branch.

But what about the life spells? Well, first, change the "Life" spells so that they remove the "Zombie" status as well. This will allow us to inflict death whenever the character is not inflicted with Zombie or Normal (zombie-curing), but has been inflicted before. But how do we accomplish this? With the PrevZombie switch from earlier, of course!

As you may recall, as soon as a character goes into Zombie status, PrevZombie is turned ON. Thus, if the life spells removed the Zombie condition, and the Zombie-curing spells inflicted the Normal (zombie-curing) status, then we can safely assume that if PrevZombie is ON and none of these statuses are inflicted, then a life spell has been cast, and the hero should die.

Remember the else branch from the Zombie status check earlier? Well, let's add the following code to it:

CODE: COMMON EVENT ZombieTest

: Else (from earlier)
    <>Branch if Switch [0001:PrevZombie] is ON
        <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
        <>Variable Operation: [0002:Armor] Set, Zack Armor No.
        <>Variable Operation: [0003:Shield] Set, Zack Shield No.
        <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
        <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
        <>Change Class: [Hero1] Hero1_Normal, No Level Change, No Skill Change, No Stat Change
        <>Branch if Var [0001:Weapon] is 0 Greater
            <>Change Equipment: Zack V[0001] Equip
        : End
        <>Branch if Var [0002:Armor] is 0 Greater
            <>Change Equipment: Zack V[0002] Equip
        : End
        <>Branch if Var [0003:Shield] is 0 Greater
            <>Change Equipment: Zack V[0003] Equip
        : End
        <>Branch if Var [0004:Helm] is 0 Greater
            <>Change Equipment: Zack V[0004] Equip
        : End
        <>Branch if Var [0005:Accessory] is 0 Greater
            <>Change Equipment: Zack V[0005] Equip
        : End
        <>Change Cond: Zack Death Inflict
        <>Switch Operation: [0001:PrevZombie] OFF
    : End
: End


As you can see, this code (which is very similar to the previous codes) will simply inflict death if the Zombie status is gone (ELSE), but the PrevZombie switch is still on.

So...we have a Cure Zombie spell, a Zombie spell, and a clause for casting life on a zombie...but what about an Esuna-like spell (which should be able to treat sombies)? Well, we can add another condition called Normal, and have the Esuna spell inflict this new condition. Then, add a new branch on top of the Normal (zombie-curing), have it detect whether the hero is inflicted with the Normal (esuna-induced) condition, and have it cure everything.

Finally, we just need to worry about the curative items. Instead of making them simple restorative items, make the potions and ethers "Skill Scroll," and associate them with newly-made curative spells that have "Healing" attribute set (or, in the case of Phoenix Downs or Status-curing items, associate them with the special Life spells/special Remedy spells, and you're set!

Here's the final code:

CODE: COMMON EVENT ZombieTest

<>Branch if [Hero1] Normal (Esuna-inflicted) Condition
    <>Branch if Switch [0001:PrevZombie] is ON
        <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
        <>Variable Operation: [0002:Armor] Set, Zack Armor No.
        <>Variable Operation: [0003:Shield] Set, Zack Shield No.
        <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
        <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
        <>Change Class: [Hero1] Hero1_Normal, No Level Change, No Skill Change, No Stat Change
        <>Branch if Var [0001:Weapon] is 0 Greater
            <>Change Equipment: Zack V[0001] Equip
        : End
        <>Branch if Var [0002:Armor] is 0 Greater
            <>Change Equipment: Zack V[0002] Equip
        : End
        <>Branch if Var [0003:Shield] is 0 Greater
            <>Change Equipment: Zack V[0003] Equip
        : End
        <>Branch if Var [0004:Helm] is 0 Greater
            <>Change Equipment: Zack V[0004] Equip
        : End
        <>Branch if Var [0005:Accessory] is 0 Greater
            <>Change Equipment: Zack V[0005] Equip
        : End
        <>Change Cond: Zack Poison Remove
        <>Change Cond: Zack Blind Remove
        <>Change Cond: Zack Silence Remove
        <>Change Cond: Zack Berserk Remove
        <>Change Cond: Zack Confuse Remove
        <>Change Cond: Zack Paralyze Remove
        <>Change Cond: Zack Sleep Remove
        <>Change Cond: Zack Normal (esuna-induced) Remove
        <>Change Cond: Zack Zombie Remove
        <>Switch Operation: [0001:PrevZombie] OFF
    : End
    : Else
    <>Branch if [Hero1] Normal (Esuna-inflicted) Condition
        <>Branch if Switch [0001:PrevZombie] is ON
            <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
            <>Variable Operation: [0002:Armor] Set, Zack Armor No.
            <>Variable Operation: [0003:Shield] Set, Zack Shield No.
            <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
            <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
            <>Change Class: [Hero1] Hero1_Normal, No Level Change, No Skill Change, No Stat Change
            <>Branch if Var [0001:Weapon] is 0 Greater
                <>Change Equipment: Zack V[0001] Equip
            : End
            <>Branch if Var [0002:Armor] is 0 Greater
                <>Change Equipment: Zack V[0002] Equip
            : End
            <>Branch if Var [0003:Shield] is 0 Greater
                <>Change Equipment: Zack V[0003] Equip
            : End
            <>Branch if Var [0004:Helm] is 0 Greater
                <>Change Equipment: Zack V[0004] Equip
            : End
            <>Branch if Var [0005:Accessory] is 0 Greater
                <>Change Equipment: Zack V[0005] Equip
            : End
            <>Change Cond: Zack Poison Remove
            <>Change Cond: Zack Blind Remove
            <>Change Cond: Zack Silence Remove
            <>Change Cond: Zack Berserk Remove
            <>Change Cond: Zack Confuse Remove
            <>Change Cond: Zack Paralyze Remove
            <>Change Cond: Zack Sleep Remove
            <>Change Cond: Zack Normal (esuna-induced) Remove
            <>Change Cond: Zack Zombie Remove
            <>Switch Operation: [0001:PrevZombie] OFF
        : End
    : Else
        <>Branch if [Hero1] Zombie Condition
            <>Branch if Switch [0001:PrevZombie] is OFF
                <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
                <>Variable Operation: [0002:Armor] Set, Zack Armor No.
                <>Variable Operation: [0003:Shield] Set, Zack Shield No.
                <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
                <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
                <>Change Class: [Hero1] Hero1_Zombie, No Level Change, No Skill Change, No Stat Change
                <>Branch if Var [0001:Weapon] is 0 Greater
                    <>Change Equipment: Zack V[0001] Equip
                : End
                <>Branch if Var [0002:Armor] is 0 Greater
                    <>Change Equipment: Zack V[0002] Equip
                : End
                <>Branch if Var [0003:Shield] is 0 Greater
                    <>Change Equipment: Zack V[0003] Equip
                : End
                <>Branch if Var [0004:Helm] is 0 Greater
                    <>Change Equipment: Zack V[0004] Equip
                : End
                <>Branch if Var [0005:Accessory] is 0 Greater
                    <>Change Equipment: Zack V[0005] Equip
                : End
                <>Switch Operation: [0001:PrevZombie] ON
            : End
        : Else
                <>Branch if Switch [0001:PrevZombie] is ON
                    <>Variable Operation: [0001:Weapon] Set, Zack Weapon No.
                    <>Variable Operation: [0002:Armor] Set, Zack Armor No.
                    <>Variable Operation: [0003:Shield] Set, Zack Shield No.
                    <>Variable Operation: [0004:Helm] Set, Zack Helmet No.
                    <>Variable Operation: [0005:Accessory] Set, Zack Accessory No.
                    <>Change Class: [Hero1] Hero1_Normal, No Level Change, No Skill Change, No Stat Change
                    <>Branch if Var [0001:Weapon] is 0 Greater
                        <>Change Equipment: Zack V[0001] Equip
                    : End
                    <>Branch if Var [0002:Armor] is 0 Greater
                        <>Change Equipment: Zack V[0002] Equip
                    : End
                    <>Branch if Var [0003:Shield] is 0 Greater
                        <>Change Equipment: Zack V[0003] Equip
                    : End
                    <>Branch if Var [0004:Helm] is 0 Greater
                        <>Change Equipment: Zack V[0004] Equip
                    : End
                    <>Branch if Var [0005:Accessory] is 0 Greater
                        <>Change Equipment: Zack V[0005] Equip
                    : End
                    <>Change Cond: Zack Death Inflict
                    <>Switch Operation: [0001:PrevZombie] OFF
                : End
            : End
        : End
    : End
: End



NOTE:

There is one large problem with this zombifying code - you can't kill a zombified party member with curative spells. The spells will reduce their HP, but will never take their HP any lower than one.

I can't really think of an workaround for this, but it's not really that big of a problem.