Heal Over Time (on the map) Version 2.2.3 is up!

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
Heal Over Time v2.2.3
by Arty

FIXED A CRITICAL BUG INTRODUCED IN VERSION 2.2.1!
Please redownload the plugin, as v2.2.3 fixes an important issue with persistent states!

Introduction

After googling for a while, I have come to the conclusion that there were no plugins that allow you to heal your actors gradually while out of battle. Now there is one. It does everything I wanted it to do, but I'm not sure if there's a smarter/more convenient way to do it, so I'm posting it to the WIP section to get some feedback maybe...?

I completely changed everything from version 1, so now the plugin should be actually usable.

Features
- Define healing states in the database and plugin manager
- The script will automatically run in custom intervals (defined per State)
- The actors with specified State(s) will regain a certain amount of HP or MP everytime the script gets executed
- The plugin can remove the State(s) when the actor is fully healed, or leave it/them alone
- A popup will inform you of the healing (courtesy of Mr. Trivel), if you wish, with a specified icon
- When the state gets removed through other means than expiring, you can stop the healing effect now

Screenshots

Compact popup mode.


Verbose popup mode.


Preparing the states.


In the plugin manager.


How to Use
- Set up your State(s) in the database, pretty much just giving it a name and an icon.
- Give the State(s) a Custom Apply Effect as per Yanfly's Buffs and States plugin
- Set up the State(s) in the plugin manager
- Apply the State(s) to the actors in any way.
- Profit!

Changelog
- 2020/07/02: fixed conflict that led to states not getting removed properly
- 2020/07/01: fixed bug with auto-removal of states; added changelog to plugin
- 2020/06/29: Added functionality to prematurely remove healing effect
- 2020/06/23: Completely reworked code and fixed critical bugs
- 2019/06/22: Added option to heal MP instead of HP, small code improvements
- 2019/06/13: Completely rewrote the code based on feedback
- 2019/06/10: I added the option to heal a percentage of the actor's max HP instead of a flat number. Just type 20% instead of 20 to heal 20 percent of the max HP instead of exactly 20 HP.

Download
If you want to use popups, download Mr. Trivel's Popups plugin here.
Download my plugin here and let me know what you think. (Rightclick on the "Raw" button and save the file directly into your plugins folder. Do not change the filename.)

FAQ
Q: Do I NEED the additional Popups plugin?
A: No, you can turn this functionality off in the Plugin Parameters.

Q: Do I NEED Yanfly's Buffs and States Core?
A: Yes. For the time being, at least.

Credit and Thanks
- Credit me (Arty). Commercial and non-commercial use allowed, if credited.
- Special Thanks to Mr. Trivel for his Popups plugin

Author's Notes
Like I said, I'd like some feedback. I could not think of a better way to do this, so maybe you guys can give me some ideas/hints.
 
Last edited:

Eliaquim

Hakuen Studio
Veteran
Joined
May 22, 2018
Messages
1,535
Reaction score
857
First Language
Portuguese - Br
Primarily Uses
RMMV
Hi there!

I do this in my project with a parallel event on the map(without the pop up of course).
I would like to use it only if I was sure that using this plugin would be more optimized than using it in a common parallel event or a parallel event on the map.
Well I find it very easy to do this for events.
Adding visual effects and also adding more complex things like recovering a quantity of HP according to a percentage of the MAX HP could make things more interesting.
I like to think of using the plugin when it does something that by default rpg maker mv can't do it, or when it simplifies a process that per event would be very tricky (although possible to do).

Hope i helped it! ^^
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
there is also a little eventing that achieve the the same though. make it more usefull for more varities that avoind a long list of eventing :)
like, can it be -HP like poison or fire (while standing still and not moving) can't you make instead of a plugin command and place it in the notetag? if achieved, the effects goes on, but yanfly buff and state core can achieve this as well in the note tags. make something
smather that aren't out there yet.

but there can be improvements like @Eliaquim said :)
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
@Eliaquim and @ShadowDragon : Thank you for your honest feedback! In fact this started out as an event-only-driven thing, and I'm aware it's totally possible to mimic the effect with eventing, but for me it was quicker to type up a few lines of JS instead.

I'm not sure what you mean by being able to do this with Yanfly's Buff/States Core, ShadowDragon? I couldn't find such a functionality. I must have missed something there.

Again, thank you for the opinions. I will go back to the drawing board and see if I can make improvements!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
@autophagy by the buff state core, i mean you can do it with lunatic code in the states notetag, Im not sure if standing still will work,
but i know it can be done by a parallel event when a state is ON. A plugin for this and recieve xx HP dmg by poison, burning, freezing,
or i dont know what effect every 60 frames would be nicer in the state note tag.

make something that if you hit by spikes you gain bleed dmg that leave bleed drups behinds (there is one but kinda broken),
if you get hit by lava or touch lave, fire prints left behind for xx frames (or able to set in the params), water prints if you walked over
water or swimmed in it.

try to see things that is unique, easier and user friendly plugin without the multi complex plugin commands or settings
(the complex plugin commands can be harder if there is no other way)

But if you see my point of view, its good. If it become a very nice plugin, Im happy to test it out for you and see if my
game can use it =) (not to ruin your plugin) because it can be very usefull for ppl with less JS knowledge.

Also I dont want to push you though, but I hope to see improvements.
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
Update: Version 2 is now live, with a whole lot of changes and new functionality!

Okay, so: I have had a long think and decided to completely restructure the plugin.
Instead of the current functionality, it will work differently, internally and externally:

Setup
  • Instead of calling a Plugin Command in a Common Event, the states' properties will be handled in plugin parameters via the Plugin Manager. There will be a developer-defined list of states and their interval of healing (in frames), as well how much they heal.
  • There will be the option to show "verbose" popups that also display the actor name, or "compact" popups that look like the current ones.
Behind the Scenes
  • The map's Update function will be hijacked. This way, the script will run automatically without the need to kick it off via Common Event. This completely eliminates the need for a performance-intensive Common Event.
  • A function inside this update process will loop through the defined states and check for each state if it needs to be processed further.
    • This will be determined by a state's property. This property will receive a value when a defined state is applied to any actor in the party (if it isn't active already), and deactivated when it has been removed from all actors. This avoids unnecessary code execution. It will also record when the state has been last executed, if activated.
    • This may require Yanfly's states plugin, or hijacking the state functions to determine when a state gets applied.
  • Next, the script will make a list of states that need to be processed.
  • If the defined frame count has passed since the last execution, the script will check which party members have the state. If none have it anymore, the state will be deactivated.
  • Finally the healing will be applied to all eligible members.
    • A popup (or multiple ones) will be shown, if this function is desired by the developer.
Feeback
I will start coding this new functionality today, please let me know if this is a better approach or if I'm on the wrong path.

Cheers!
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
it seems better, but also try to include -HP as in taking dmg which is usefull for burning effect or freezing as in snowy area's,
and can heal if you have a ice armor or heat armor to restore. at default if state is applied does nothing, but if you go to
the treats of the state is applied, it only works when taking steps, if you can turn that treat into seconds by example that does it ever xx frames,
than lunatic code is not needed and more user friendly.

but im also very curious on your setup though :)

Do it your way and see how it work out.
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
@ShadowDragon I'm not sure if I understand you right. Do you want an option for a state that works the same as the healing states, but causes damage instead? That would be easy to add with the new system, I think.

And states that heal OR damage depending on certain conditions? That sounds rather complex/complicated. Though I could imagine using functionality provided by other plugins (for example one that does things when certain armor is equipped) by simply calling my script from them.

Also, are you saying that you want an option for the healing/damaging to only be executed when the player has moved? That would be possible to add, even though I'm not sure if it falls into the scope of this plugin.

As for the trait thing, I'm not sure if this is possible (assuming I understand right what you want to do).
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
most traits like +20% is after using or after moving, like eventing the burning effect through variable (surveral) can take 2-3 for every effect,
not to mention the amount of seconds.

the thing i really need it that can cause hp dmg, i want to use 2 different poison, 2 freeze, 2 burning and maybe some one,
the difference between those, 1 goes off by 50 steps (or if possible 30-40 seconds, even by standing still, you still take dmg
over time.

as for the endless part, it goes continue unless you are in a save area or the right armor, so when standing still, you keep dmg every
second or every 2 seconds, rather than taking 5 steps. I use slip dmg and dmg floor, which deal dmg to the player,
the slip dmg add the state and when walking you take dmg every step, or every x steps you profide, a compability with
that plugin that also count on seconds when standing still whould be amazing.

you can see if you understand that js code and see what you can do better =)
but dmg when not moving would be awesome that saves over 8-10 variables.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
2,994
First Language
Tagalog
Primarily Uses
RMVXA
Since he allows you to define the amount healed per state, putting a negative number for your burn state should theoretically cause damage instead..

But if what you want is for the plugin to also handle the "healing/damage" done via the Traits system and slip damage of the engine so that they take effect over time when outside of battle too instead of just per evey few steps (the default way of how Regen Traits and Slip damage work outside of battle), then yeah, this plugin currently doesnt support that.

Theoretically, it can be done if he knows how the engine handles the regen traits and slip damage so that he can copy that procedure into his over time code.
 
Last edited:

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
slip damg works for outside battle, and does work on steps on, no stepping movent per tile, but would be nice when taking
dmg when standing still, and to many parallel events can cause confliction or lagging. but if you can manage the dmg over time in frames
it would be awesome to addon =)
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
I'll look into the requests, but in the meantime I added the ability for a state to heal either HP or MP.
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
healing over time is nice, but only healing should also be capable of -HP.
like if state is poison (if possible for you) in the state notetag <hp dmg: 1> if it is always every second in the param
so it should take the state icon and the dmg you get. if <hp heal: 5> it heals 5 hp per sec.

it sounds easy, but making it might be a bit harder, but im sure its doable. this way in the notetag option,
you can use it in many ways, specially if they can defined the color pop up is added in the params.

Heal: green (RGB, #hex color, or name of color)
Poison: purple
Burn: orange
Freeze: blue (or blue for losing MP)

to call some effects. I think it will be more usefull to most ppls :) (its just a suggestion though)
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
Twenty years later I have realized that there were some CRITICAL bugs in this plugin so I fixed them all. You're welcome! Version 2.2 is now up in the first post and should work much better than the previous version.
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
383
Reaction score
255
First Language
English
Primarily Uses
RMMV
I was wondering if there was a way, when removing said states, remove the Heal over Time effect? Kind of like a resting buff in towns? Thanks.

Would like to see it something like this:

Code:
<Custom Remove Effect>
Arty.removeState(stateId, user);
</Custom Remove Effect>
 
Last edited:

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
@Jenova

Your wish is my command. :)
I updated the plugin to include the ability to remove a healing state whenever the state is removed from the actor (or other creative uses you could think of). Please let me know if it works the way you were thinking of!

The notetag code is the one you suggested:
Code:
<Custom Remove Effect>
Arty.removeState(stateId, user);
</Custom Remove Effect>
Grab the updated plugin here.
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
Over 72 hours have passed since my last post, so I hope double posting is okay.

I've fixed an important bug in the plugin with version 2.2.2, which would lead to states always getting removed after they finish healing, even if you set them to "persistent" in the plugin parameters setup. This bug was introduced with the code refactor I did recently. The true/false values didn't get read/translated correctly.

Please make sure to redownload the plugin (either with the link in the first post or here if you don't wanna scroll up)!
 

ShadowDragon

Veteran
Veteran
Joined
Oct 8, 2018
Messages
2,393
Reaction score
794
First Language
Dutch
Primarily Uses
RMMV
you say 2.2.2 but the plugin said 2.2.3 :p

nice job though, also able with -HP? or color codes or not yet?
 

autophagy

tank nerd
Veteran
Joined
Jun 9, 2014
Messages
86
Reaction score
76
First Language
German
Primarily Uses
RMMV
@ShadowDragon Apologies, I was too busy to update the thread yet. Version 2.2.3 contained further bugfixes with the great help of Jenova. :smile:

I have looked into your requests and this would be the results:
I haven't uploaded the new version of the plugin yet, but these are the changes I made for version 2.3.0. Please let me know if this is what you had in mind ShadowDragon, and I will upload the new version asap.

1. States will be able to damage (they actually always could, but the popups would not show the proper message), and use their own icon and text color.
damaging.jpg
If you tell a state to use its own icon, the HP/MP icon will not appear anymore and instead a text indicator. I figured this would be clearer than having two icons in a single popup.

The text color and whether to use the state's own icon or not is set in the plugin parameters for the respective state. The parameters have been extended for this:
newsetuphealingstates.jpg
The text color is the index number on the windowskin, the same number you'd use in a color code inside a text message.

It's important to note that damaging states (if they're HP states, at least) will always get removed if they kill the actor - no matter if they're set to persistent or not. The Knockout state simply nukes them. There's a workaround for this using plugins like Yanfly's State Categories for example, which I accounted for in my code but it's in no way required to use it. (And it's an edge case anyway, I guess.)

2. States that don't use their own icon will still display the "old-fashioned" way. Below is an example of a verbose and a compact popup, both using text colors.
verbosevscompact.jpg

That's what I have so far. If there's something you think should work differently or any additional requests, I can see what I can do.
 

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

Latest Threads

Latest Profile Posts

Hello I buyed RPG Maker VX Ace a long ago and I want to use it again but in the meantime I changed my pc but I lost the paper with my product key on so I can't use RPG maker again... someone can help me please ? or there is no hopes ?:'( ( I have a bad english I'm sorry )
I was away this days here in the forum but it was for a good cause!
The trailer of the demo of Luke Inn is on youtube and I am so happy!
I need to see the bugs of the game but I am happy that I have new content to show!

The last part of the modern interior will be ready soon. This will be a B-tile. With interior items for the kitchen, bathroom, toilet and storage room.
This frantic shooting ARPG plugin for MZ looks really great. Here is the link to a post from the official Japanese RPG Maker forum.

Forum statistics

Threads
102,941
Messages
996,125
Members
134,397
Latest member
Harwin
Top