I did this as a request on another forum this morning. Although I've seen this asked here before, I haven't seen the script. Apologies if someone else has already done the same thing.
Add to Game_Battler 2, right under the method slip_damage?, the following new method:
#--------------------------------------------------------------------------
# * Ccoa - Determine [Regen] States
#--------------------------------------------------------------------------
def regen?
for i in @states
if $data_states[i].guard_element_set.include?($REGEN_ELEMENT)
return true
end
end
return false
end
And to Game_Battler 3, right under the method slip_damage_effect:
#--------------------------------------------------------------------------
# * Ccoa - application of Regen Effect
#--------------------------------------------------------------------------
def regen_effect
# Set "damage"
self.damage = -(self.maxhp / 10)
# Dispersion
if self.damage.abs > 0
amp = [self.damage.abs * 15 / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
# Add damage to HP
self.hp -= self.damage
return true
end
And to Scene Battle 4, look for the comment # Slip Damage, and replace the if statement right under it with this:
# Slip damage and regen - ccoa
if @active_battler.hp > 0
if @active_battler.slip_damage?
@active_battler.slip_damage_effect
@active_battler.damage_pop = true
end
if @active_battler.regen?
@active_battler.regen_effect
@active_battler.damage_pop = true
end
end
Finally, insert a new file above Game_Temp, and name it CONSTANTS. Put the following line in it:
Now go to the database, and create a new element called Regen. If it is not element 17, go back to CONSTANTS, and change the 17 to the number of the element you just created. Now go to the states tab, and create a new status effect. Check the checkbox next to Regen for the element defense attribute. All done, you have a regen status!
To change how much HP the hero gains each turn, fiddle with this line:
self.damage = -(self.maxhp / 10)
Currently, she gains 1/10 of her max hp each turn. To make it less, make the 10 higher, to make it more, make it smaller.