How to recover HP and MP when you level up?

Status
Not open for further replies.

Btobin98

Villager
Member
Joined
May 30, 2012
Messages
25
Reaction score
1
First Language
English
Primarily Uses
The name says it all. Is this done through the script editor? or the Database? I'm almost positive this can be achieved through one of those but I have been unable to find it.
 

SOC

Be your own hero
Veteran
Joined
Mar 22, 2012
Messages
570
Reaction score
490
First Language
English
Primarily Uses
RMMV
You'll have to do it in the scripts.
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
More specifically,



Code:
class Game_Actor < Game_Battler
  alias heal_on_level_up level_up
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  def level_up
	heal_on_level_up
	recover_all
  end
end
The above will also remove states. If you don't want to remove states, use this instead:



Code:
class Game_Actor < Game_Battler
  alias heal_on_level_up level_up
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  def level_up
	heal_on_level_up
	@hp = mhp
	@mp = mmp
  end
end
 
Last edited by a moderator:

Btobin98

Villager
Member
Joined
May 30, 2012
Messages
25
Reaction score
1
First Language
English
Primarily Uses
More specifically,



Code:
class Game_Actor < Game_Battler
  alias heal_on_level_up level_up
  #--------------------------------------------------------------------------
  # * Level Up
  #--------------------------------------------------------------------------
  def level_up
	heal_on_level_up
	recover_all
  end
end
Thanks this is just what I was looking for! Could you also tell me where in the Game Actor < Game Battler script to place this please? :huh:
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
You can just insert that scriptlet anywhere in the materials section.
 

Celianna

Tileset artist
Veteran
Joined
Mar 1, 2012
Messages
10,557
Reaction score
5,592
First Language
Dutch
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top