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

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,990
Members
137,562
Latest member
tamedeathman
Top