Game Development Reference
In-Depth Information
For every 5 LUK that the user has, he/she gains 1% to his/her CRI. For every 5 LUK that the target has, the user
loses 1% to his/her CRI. So, how can I be so certain that we are working with percentages? There are two good ways to
prove it.
1.
Change the multiplier on user.luk to 1. You will notice that the attacker always lands
critical hits, no matter how low its LUK is. If we were working with whole numbers, the
attacker's CRI would be equal to its LUK and not a guaranteed 100%.
2.
Note that CEV is expressed in the Database as a percentage, yet it is subtracted from 1 here.
If we were working with whole numbers, you would have to subtract from 100 instead. 10%
CEV will result in (1 - 0.10) and not (1 - 10), for example.
To be honest, it also helps that I tested this while initially attempting to figure it out and noticed how the attacker
would land guaranteed critical hits when I had whole numbers for multipliers within the formula. So, another thing
that I wanted to fix within RMVXA was the way that battle messages were expressed. Mainly, the ones that appear
when damage is dealt or healing is performed. You've probably noticed that the default messages are a bit clunky, to
put it mildly. How do we go about this? Welcome to the next section!
Coded Messages (in a Bottle)
What I seek to change is the messages that are displayed after an actor or an enemy performs a skill that has a
damaging or healing effect. As those are possible results of actions taken, we can skim the list of classes and methods
within the Script Editor, to see if that is covered by anything. As it turns out, this is covered in its very own class called
Game_ActionResult . Now that we know that, we can head over there to take a look. As circumstances would have it,
the three methods we are looking for are the very last ones of the entire class. Here's the first of them:
#--------------------------------------------------------------------------
# * Get Text for HP Damage
#--------------------------------------------------------------------------
def hp_damage_text
if @hp_drain > 0
fmt = @battler.actor? ? Vocab::ActorDrain : Vocab::EnemyDrain
sprintf(fmt, @battler.name, Vocab::hp, @hp_drain)
elsif @hp_damage > 0
fmt = @battler.actor? ? Vocab::ActorDamage : Vocab::EnemyDamage
sprintf(fmt, @battler.name, @hp_damage)
elsif @hp_damage < 0
fmt = @battler.actor? ? Vocab::ActorRecovery : Vocab::EnemyRecovery
sprintf(fmt, @battler.name, Vocab::hp, -hp_damage)
else
fmt = @battler.actor? ? Vocab::ActorNoDamage : Vocab::EnemyNoDamage
sprintf(fmt, @battler.name)
end
end
 
Search WWH ::




Custom Search