Heal after battle plugin

Hi guys, I hope you can help me with this problem I have.


For my game I have a food system: You eat something and for the next battle you get a bonus like an ATK buff,  better drop rate or ( this is were my problem starts) recovers some HP or MP at THE END OF THE BATTLE.


Basically it should work like this :


If you ,lets say , eat a piece of bread you recover about 5% HP at the end of the battle,


If you eat a steak you recover 30% HP at the end of the battle.


All this needs to able to do by a common event because I need to check if the actor  has a certain state before the effect takes place.


More or less like this:


r9LOBTB.png



Can someone help me?
No need for a plugin, this can be done completely by common event (unless you changed the battlesystem itself in a big way by plugin, but then you need to tell us which plugin you use anyway).


Make a common event as a parallel process, triggered by a switch "after battle".


Do whatevery you want to happen after a battle in that event, and as the last command add a "control switch after battle OFF" to prevent it from repeating.


Then, in every troop you make a troop event on turn zero that contains "control switch after battle ON".


Since parallel processes don't work during battlescreen, the common event will be triggered the first frame after battle on the map, no matter when during the battle the switch gets turned on.
@Iliketea


I can make a plugin for this. The actor will regenerate certain amount of HP/MP/TP at the end of battle depending on what state(s) the actor have. (You decide the amount.)


But, I'm not sure what you meant by common event part. Are you saying you want the healing to be "triggered" by common event?


Or, do you want the healing to be "executed" automatically by the plugin (my preferred method)? 🙂
@Moogle_X


Oh that would be awesome!


What I meant with the common event is this:


I have a food item, lets say bread. Once it is used a common event will run checking if the used has the state "Full" and if not will give the user special buffs/states. 


If you really can link that regeneration to a special state, that would be perfect!


So it would be this :

Or, do you want the healing to be "executed" automatically by the plugin (my preferred method)? 
default_smile.gif
@Iliketea


Okay, for clarification, I will...:


Make the plugin to check all actors in active battle party for their states at the end of battle.


This check will happen BEFORE the game perform checking on "Remove At Battle End" states (when it tries to delete those states).


The plugin will do the healing automatically based on what states those "battled actors" have.


If the actor(s) was dead at the end of battle, they will not receive any healing from this plugin. (Or do you want the healing to happen?)


So, in summary, I will "link the regeneration to states".
@Moogle_X


♥That would be absolutely perfect ♥
@Iliketea


I finished the plugin! You can get the plugin here.


Look for "Battle End Regeneration" trait part. You can use it on states that will automatically regenerate HP/MP at the end of battle. 😀
AWESOME!


I never felt more love for someone on the internet than for you!

Original thread: https://forums.rpgmakerweb.com/threads/heal-after-battle-plugin.55975/