Restore/Set after Battle/Level v1.1
By V.M. of D.T.
Introduction
Simple simple simple... Lost where I was going with that. Small edit to allow you to set hp/mp after battle by percentage or certain amount.
Perfect if you say want full restores after battle or for hp or mp to recover by a certain amount after each battle.
Now with restore after Level!
How to Use
Plug and play and customize if need be.
Script:
By V.M. of D.T.
Introduction
Simple simple simple... Lost where I was going with that. Small edit to allow you to set hp/mp after battle by percentage or certain amount.
Perfect if you say want full restores after battle or for hp or mp to recover by a certain amount after each battle.
Now with restore after Level!
How to Use
Plug and play and customize if need be.
Script:
- Code:
#Restore After Battle
#----------#
#Features: Allows you to set designated amounts of hp or mp to restore after
# a battle for different methods of game style.
#
#Usage: Plug and play and customize
#
#Customization: Set below, in comments.
#----------#
#-- Script by: V.M of D.T
#--- Free to use in any project with credit given
LEVELRESTORE = true #Full restore Upon leveling
BATTLERESTORE = true #Set restore Upon battle end
#HPSETTYPE and MPSETTYPE
# Set to 0 for setting of hp/mp to a specific number after battle.
# Set to 1 for setting of hp/mp to a specific percentage after battle.
# Set to 2 for adding to hp/mp by a certain percentage of maxhp/maxmp
HPSETTYPE = 0
MPSETTYPE = 0
#The numbers to use when setting hp/mp after battle!
HPSET = 100
MPSET = 100
class Game_Actor < Game_Battler
alias recover_level_up level_up
def level_up
recover_level_up
self.hp = self.mhp if LEVELRESTORE
self.mp = self.mmp if LEVELRESTORE
end
end
class Scene_Battle < Scene_Base
alias recover_terminate terminate
def terminate
if BATTLERESTORE != true then recover_terminate else
recover_terminate
for actor in $game_party.members
case HPSETTYPE
when 0
actor.hp = HPSET
when 1
actor.hp = actor.mhp * HPSET / 100
when 2
actor.hp += actor.mhp * HPSET / 100
end
case MPSETTYPE
when 0
actor.mp = MPSET
when 1
actor.mp = actor.mmp * MPSET / 100
when 2
actor.mp += actor.mmp * MPSET / 100
end
end
end
end
end
FAQ
N/A
Credit and Thanks
- By V.M. of D.T.
- Free to use in any project with credit given.
History
Version 1.1 - Added restore after leveling