I know several plugins in which this can be done, but there is a problem, all these plugins what they do is recover 100% of your HP and MP, I would like that when the player levels up, they recover HP and maybe MP, but not all HP, maybe 10% or something, does anyone know of a plugin to do this exactly? Thank you
MV Does anyone know how I can make the actor recover HP when he levels up?
JS Plugin RequestsI suppose you could always write your own.
The above code should work for 10% HP and 10% MP.
You can easily change the rate yourself by editing the
I won't put any Terms of Use on this plugin, so feel free to use it however you see fit.
JavaScript:
const hpRegenRate = 0.1;
const mpRegenRate = 0.1;
const Game_Actor_levelUp = Game_Actor.prototype.levelUp;
Game_Actor.prototype.levelUp = function() {
Game_Actor_levelUp.call(this);
this.gainHp(this.mhp * hpRegenRate);
this.gainMp(this.mmp * mpRegenRate);
}
The above code should work for 10% HP and 10% MP.
You can easily change the rate yourself by editing the
hpRegenRate and mpRegenRate variables. Setting the variable to 0 will disable regen on level up, 1 will regenerate full HP/MP, 0.01 will regenerate 1%, and so on.I won't put any Terms of Use on this plugin, so feel free to use it however you see fit.
thanks a lot my friend!!! it worked great! :3
And just to expand your knowledge base, I use HimeWorks' Level Up Events.
Original thread: https://forums.rpgmakerweb.com/threads/does-anyone-know-how-i-can-make-the-actor-recover-hp-when-he-levels-up.144571/