Gain Extra Stats (HP, MP) after each Battle

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
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
 
Last edited:

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
Nice useful PlugIn, since I need a MP reg as well, I edited it, also I found a little problem with uneven numbers.

/*: * @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.
 
Last edited by a moderator:

SOC

Be your own hero
Veteran
Joined
Mar 22, 2012
Messages
570
Reaction score
490
First Language
English
Primarily Uses
RMMV
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?
 

Halrawk

Veteran
Veteran
Joined
Dec 14, 2012
Messages
97
Reaction score
24
First Language
English
Primarily Uses
I would love to see this added to equipment. So as long as armor X is equipped, you'll regenerate.
 
  • Like
Reactions: SOC

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
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 :)
 
  • Like
Reactions: SOC

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
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 :)
 

wrigty12

Just a QAer playing with Javascript
Veteran
Joined
Jan 11, 2014
Messages
584
Reaction score
118
First Language
English
Primarily Uses
RMMZ
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?
 
  • Like
Reactions: SOC

BloodletterQ

Chaotic Neutral Assassin
Veteran
Joined
Aug 15, 2012
Messages
1,526
Reaction score
1,164
First Language
English
Primarily Uses
N/A
Good to have although the others have good suggestions, even though it isn't necessary for on-touch battles.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,932
Reaction score
13,569
First Language
English
Primarily Uses
RMMV
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.
 
Joined
Mar 9, 2013
Messages
328
Reaction score
80
First Language
Spanish
Primarily Uses
N/A
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 :)
 

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
I added a new version. Seems like this plugin is going to be an extra Status After battle plugin after all :D

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.
 

SOC

Be your own hero
Veteran
Joined
Mar 22, 2012
Messages
570
Reaction score
490
First Language
English
Primarily Uses
RMMV
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.
 

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
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
 
  • Like
Reactions: SOC

SOC

Be your own hero
Veteran
Joined
Mar 22, 2012
Messages
570
Reaction score
490
First Language
English
Primarily Uses
RMMV
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.
 

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
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 :)
 
Last edited by a moderator:

SOC

Be your own hero
Veteran
Joined
Mar 22, 2012
Messages
570
Reaction score
490
First Language
English
Primarily Uses
RMMV
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.









 
Last edited by a moderator:

Gilles

Veteran
Veteran
Joined
Oct 31, 2015
Messages
41
Reaction score
33
First Language
German
@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
 

RogdagoR

Veteran
Veteran
Joined
Oct 1, 2015
Messages
134
Reaction score
32
First Language
Italian
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.
 

gekigengar

Villager
Member
Joined
Oct 27, 2015
Messages
23
Reaction score
5
First Language
English
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?
 

SOC

Be your own hero
Veteran
Joined
Mar 22, 2012
Messages
570
Reaction score
490
First Language
English
Primarily Uses
RMMV
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%.
 

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

Latest Threads

Latest Profile Posts


finally, the B-tile is added to the forum and steam!
I hope my annual #DoItForHargon contest gets lots of entries this year (since a Playstation 5 is a pretty big prize lol) XD On further news - I'm back to game devving next week after hiatus cause of that tragedy of losing everything I own.
Rome Trastevere deserve a tileset. Mumble mumble...
Before the full time job, I can make 1 MZ plugin per day, even though it's still hard; With the full time job, making 1 such plugin per week becomes just as hard lol

Forum statistics

Threads
102,989
Messages
996,504
Members
134,460
Latest member
Rbattew
Top