Gain Extra Stats (HP, MP) after each Battle

GainExtrasAfterBattle

Introduction


With this Plugin it is possible to regain some hp/mp for each actor after the battle. You have many options to choose if dead people should be revived or some actors should not be healed.

Video





Options


- Amount of HP healed in percent- Is the percent taken from the max hp or the current hp

Download

Version 1.3: https://raw.githubusercontent.com/g...js/master/js/plugins/GainExtrasAfterBattle.js


Credit and Thanks
- Gilles
You can use and edit this plugin as you want. This plugin is open for non commercial and commercial use. Just give me a little credit =)

Changelog:

v 1.3:

- Conditional Regain for Classes and Actors (Actors have a higher priority)

v 1.2:

- Conditional Regaining Stats via Switch. Only regain stats if the switch for the actor is on (can be combined with equipment regain) (see the help for example)

- Regain with equipment. You can use a note-tag in your equip to gain hp/mp (see help for more detail)

- Small bugfix with hp heal for dead

v 1.1:

- Plugin Name changed

- MP healing is possible

- Switching HP or MP Healing on/off is possible

- Healing dead can be switched on

- a specific amount for healing dead can be switched on
Nice useful PlugIn, since I need a MP reg as well, I edited it, also I found a little problem with uneven numbers.

Spoiler
/*: * @plugindesc Regains Some HP after each battle * @author Gilles Meyer * * @param useMaxHp * @desc Use Max Hp for regain HP? Else current hp will be used 1:yes 0:no * @default 1 * * @param useMaxMp * @desc Use Max Mp for regain MP? Else current hp will be used 1:yes 0:no * @default 1 * * @param percentageHP * @desc How many percent HP should be healed * @default 10 * * @param percentageMP * @desc How many percent MP should be healed * @default 10 * * @help This plugin does not provide plugin commands. * * */(function() { var parameters = PluginManager.parameters('HealHPAfterBattle'); var useMaxHp = Number(parameters['useMaxHp'] || 1); var percentageHP = Number(parameters['percentageHP'] || 10); var useMaxMp = Number(parameters['useMaxMp'] || 1); var percentageMP = Number(parameters['percentageMP'] || 10);var _Game_Battler_onBattleEnd = Game_Battler.prototype.onBattleEnd;Game_Battler.prototype.onBattleEnd = function() { // Only gain HP if not dead if(!this.isDead()) { var regainHP = this.mhp; var regainMP = this.mmp; if(useMaxHp < 1) { regainHP = this.hp; } if(useMaxMp < 1) { regainMP = this.mp; } var onePercentHP = regainHP/100; var onePercentMP = regainMP/100; var HealHP = Math.round(onePercentHP * percentageHP) var HealMP = Math.round(onePercentMP * percentageMP) this.gainHp(HealHP); this.gainMp(HealMP); } _Game_Battler_onBattleEnd.call(this,arguments);};})();
This one works fine for me, if there are any problems, please let me know.
Can you make it visible with +numbers of how much HP is recovered at the end of the battle during the victory pose on the actors? Can you make this work with MP as well?
I would love to see this added to equipment. So as long as armor X is equipped, you'll regenerate.
Can you make it visible with +numbers of how much HP is recovered at the end of the battle during the victory pose on the actors? Can you make this work with MP as well?
Thanks for you suggestion. The MP part is easy. But i tried a bit to show the popup and i'm still stuck there. But im going to solve it 🙂
I would love to see this added to equipment. So as long as armor X is equipped, you'll regenerate.
Your idea is the next one i'm going to implement. Thanks for it 🙂
Can this also be applied to a state or skill in the future? also, can you use tags on actors to determine who can ignore the effect?
Good to have although the others have good suggestions, even though it isn't necessary for on-touch battles.
spoiler:

Code:
[spoiler]stuff goes here[/spoiler]
We have a Site Feedback forum, where you can post "how to do stuff on the site" questions, rather than going off topic in someone's thread.
Also would be good if you do that the dead actors are healed too but either by a different percentage amount or just with 1HP.

Thank you 🙂
I added a new version. Seems like this plugin is going to be an extra Status After battle plugin after all 😀

The new file was added to my first post inclusive a changelog.

I try my best to implement your stuff. Next Progress will be conditional healing for different characters when a character has a specific note.
Does it show +HP/MP on the actors after the battle yet?

I tried it, but it didn't seem to work for me. I had HP and MP on and set to percentage and also 5% for both, but my actors didn't get any HP or MP back. It was after an evented battle, not a random battle, haven't tried random.
Does it show +HP/MP on the actors after the battle yet?

I tried it, but it didn't seem to work for me. I had HP and MP on and set to percentage and also 5% for both, but my actors didn't get any HP or MP back. It was after an evented battle, not a random battle, haven't tried random.
The heal Popup after victory is a bit tricky so im going to try it on sunday. But have you looked in to your character menu after the fight? It should work like this.

Btw: I will release a new version in a few minutes. Just needs some testing right now.

The next version will include:

- Equip which regains HP or MP after each Battle (Tags in the Equipment Note)

- Conditional Regain: a switch for each character. If the switch is set on, the character will regain hp & mp (if hp and mp is set to on). Can be combined with Equip regain
Yep, I cast a spell for 5 MP that finished the battle and that character still was missing exactly 5 MP at the end when I opened the menu.
Yep, I cast a spell for 5 MP that finished the battle and that character still was missing exactly 5 MP at the end when I opened the menu.
Hmm i tried it with the current version. I casted a spell which costs 40 MP and ended the battle. And my character got 33% back (i set the value to 33)

Can you try the new version please. If it still does not work. could you please show me your plugin options?

-----------

A new version has been release. See the first post! Press like if you like the new features 🙂
Sure! I updated to the newest version. Can you not include the version number in the plugin name it self, please? It makes it a hassle when we're trying to only update to your newest version and don't need your older versions any more. Instead, you could put the version number at the beginning of the plugin manager description.

Spoiler
VH1AZyB.png
dMxg3xf.png


8nGlzha.png


DvtZiia.jpg


zh9UrnM.jpg


MuHq7H4.png
@SOC: Please rename the js File to GainExtrasAfterBattle.js . I think the RPG Maker is case sensitive. Im going to put the number in the description
Is it possible to modify the reg value of hp/mp over a class parameter?

For example i rename the Luck parameter(that i don't need) as Regeneration, and the more regeneration i have, the more my character get hp/mp after each battle.
The heal Popup after victory is a bit tricky so im going to try it on sunday. But have you looked in to your character menu after the fight? It should work like this.

Btw: I will release a new version in a few minutes. Just needs some testing right now.

The next version will include:

- Equip which regains HP or MP after each Battle (Tags in the Equipment Note)

- Conditional Regain: a switch for each character. If the switch is set on, the character will regain hp & mp (if hp and mp is set to on). Can be combined with Equip regain
Tags on equipment note? that's awesome!

Can the tag be used in class note?
Thanks, it works now, but instead of healing 1.75 MP when she has 35 max MP and 30 MP remaining, it just restored her back to full 35 MP. I have it set to max MP true and 5%.

Original thread: https://forums.rpgmakerweb.com/threads/gain-extra-stats-hp-mp-after-each-battle.48977/