Game Development Reference
In-Depth Information
Those of you with programming experience (especially in Ruby, but even if not) will probably recognize the
preceding formula as an
if
conditional branch. The damage formula box is fully robust. It will hold any amount of
Ruby you can fit in there.
So, About That Winter up There . . .
Okay, first let's list some extra exercises for you to do. Then, I will cover what that strange method up there involves.
1.
Make a troop with a single monster that says some words before dying.
•
Death is prioritized over any other consideration in battle, so you'll have to make the
enemy immortal (there's a default state in RMVXA that covers exactly that), have a
conditional that triggers when the monster drops to 0% HP, have the monster say its
words, and then remove the Immortal state, so that Death can trigger.
•
This troop event can be done with two event pages. The first one should have a Turn No. 0
conditional and a Battle Span (as we only want this event to execute once per battle).
You can use the Change Enemy State event command to set the monster's Immortal state.
•
The second event page for this exercise should have a Condition of HP 0% or below and
a Battle Span. Because Death is prioritized, the monster must say its words before you
remove the state.
2.
Create an enemy with five different skills (including the normal Attack skill). Have one
skill require the enemy to be in a state to use, and have another one of its skills grant
that state.
3.
Create an enemy that uses a single skill on a three-turn countdown.
•
Perhaps the best way to do so within the confines of RMVXA is to create one “skill” for
each countdown turn, much like I did for the Sand Scorpion attack pattern I showed
you some time ago. If you look at the message box for a skill, you'll see it has two lines.
On line 1, you can write “is charging up a massively powerful attack,” and on line 2, you
can write the appropriate number (3, 2, or 1).
•
Remembering the whole thing about ratings and conditional uses of skills, you can also
have the monster use a normal attack pattern that changes to the countdown when the
monster is down to half HP or less.
4.
Create a damage formula that includes a variable.
•
A variable has to be expressed in the form
$game_variables[n]
, where n is the variable's ID.
Remember that a variable is, after all considerations, a number. You can use the variable
•
as an attack multiplier, for example.
If you're following along with the Lite version of RMVXA, you will not be able to perform this next exercise, so feel
free to skip ahead to Chapter 4, as this will be the last thing I post within this chapter. For the rest of you, let's go.
■
Objective
add a formula to the script editor that we can call from the damage formula box.