TheBreaker24998

Veteran
Veteran
Joined
May 18, 2020
Messages
42
Reaction score
4
First Language
Español
Primarily Uses
RMMV
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
 

Nolonar

Veteran
Veteran
Joined
Feb 18, 2018
Messages
504
Reaction score
712
First Language
French, German
Primarily Uses
RMMZ
I suppose you could always write your own.

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.
 

TheBreaker24998

Veteran
Veteran
Joined
May 18, 2020
Messages
42
Reaction score
4
First Language
Español
Primarily Uses
RMMV
I suppose you could always write your own.

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
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
8,799
Reaction score
6,619
First Language
English
Primarily Uses
RMMV
And just to expand your knowledge base, I use HimeWorks' Level Up Events.
 

Latest Threads

Latest Profile Posts

Someone please post some beginner problems so I can act like I'm a veteran and know what I'm doing? (Also someone please stop @Andar and @ATT_Turan from posting on them because they are way too fast?!)
Random reminder to work on yo games! Good day.
A preview of the second of five hidden arcade machines you can find in The Brothers, an upcoming JRPG from System Masters. They are fully playable, each with multiple levels, tracked hi-scores and related challenges / achievements / trophies!

Forum statistics

Threads
131,577
Messages
1,221,202
Members
173,275
Latest member
Kumba
Top