Maliki's MZ Rolling Stats ver 1.1b

Maliki's Rolling Stats MZ
ver 1.1b


Introduction:
Allows devs to set basic stats (HP, MP or TP) to "roll" from a starting value to ending value.

Features:
Normally, when an enemy hits an actor, the damage is instantly removed from their current value.
However, with this plugin, you can institute an "odometer" type of gradual move from the starting and ending values! This can be used to enable an otherwise killing blow to be recovered from or to use a skill when you technically don't have enough MP for it.

The way this works is by taking the damage value and applying some of it to a secondary value.
The amount of this value is determined by the luck stat of the battlers involved. (Finally found a use for luck!)
The new value then slowly matches up with the new one, changing the stat in question over time.
(The speed of this change can be set via the plugin params)

Note that this plugin only works in battles.

Howto:
To use this plugin, simply set the plugin params to your desired setting.
(This will require some trial and error based on the speeds you want and your project's general stat range)

Outside of that, it's plug and play.

(Detailed instructions can be found in the Help section.)

Plugin Conflicts: No conflicts with vanilla MZ, but this plugin does rewrite a few touched on functions.
If you see unintended results, consider changing your plugin order.


Permissions: This plugin can be used in any project, commercial or otherwise, as long as credit is given.


Download: HERE
hello. is it possible for your plugin to have the numbers be ''animated'' when they roll?
I'm sure it's possible, but my plugin simply handles the process of the "rolling" numbers. For visual effects, you'd need to commission another plugin to do it. This is to help preserve compatibility with other plugins.
yo um theres a glitch where if an actor is poisoned and takes damage, the damage is fully healed, and if the actor tries to drain MP from an enemy, the same occurs. any fix?
Made a hotfix to address the issues.
Please DL version 1.1a and let me know if that helps.
Made a hotfix to address the issues.
Please DL version 1.1a and let me know if that helps.
Thank you for the fast response, however I've got some bad news xD
We've got another round of "why is coding so damn stupid"
Upon starting the game this appears:
Syntax Error: Unexpected Token ')'
I made an entirely vanilla project with absolutely 0 extra plugins and it still occurs. Turning the RollingStats plugin off fixes it immediately.
No worries. That was likely my rush to send the fix. I'll work on it when I get some time later today. Sorry for that.

If you could give me the line number the error references, that might help.
No worries. That was likely my rush to send the fix. I'll work on it when I get some time later today. Sorry for that.

If you could give me the line number the error references, that might help.
Don't feel rushed bestie <3 U got this.

I think it said line 259:59 or something of the sort
Yup. Found and corrected. Try to DL it again.
Yup. Found and corrected. Try to DL it again.
Everything is working perfectly! You rock 😀
I've resumed a project that I started in 2021, a sort of Earthbound sequel. I'll use the script religiously and keep you posted of any other oddities.
Thank you so much for your hard work!! Take care Mali <3
I found a bug with this script.
I have a Sacrifice skill which triggers a common event, and in that comment event I have the command "Change HP : [actor1name], -9999 (Allow Death)", but it doesn't work correctly. The actor seems to die very briefly but immediately comes back to life due to the rolling HP.
I also tried just adding the "Death" state, but that doesn't work either, same issue occurs.

There's also a minor bug I've noticed where sometimes, when the actors are attacked, it'll display a "1" over the sideview battler even if they took significantly more damage than that; it seems to be purely visual though as the HP still rolls correctly.
I'll look into the common event interaction with this plugin. In the meantime, is it possible to just add the death state in your common event?

As for the damage numbers, are you using a plugin to display those numbers? Also, is there a way to reproduce the error?
I'll need that to best fix that bug.
I'll look into the common event interaction with this plugin. In the meantime, is it possible to just add the death state in your common event?
For some reason, the Death state being added works when a skill or item does it directly, but for some reason, adding it through a common event does not (and I need the latter, since the skill needs to both kill the user but heal the party). I tested this with only the rolling HP plugin and still had that problem, so, it doesn't seem to be a conflict.
As for the damage numbers, are you using a plugin to display those numbers? Also, is there a way to reproduce the error?
I'll need that to best fix that bug.
it might be a conflicting plugin........
I'll do some testing and get back on that
When you say it doesn't work, what do you mean? I need specifics to better pin down the problem.
When you say it doesn't work, what do you mean? I need specifics to better pin down the problem
Whenever I use Add State/Change HP in a common event in battle the actor just doesn't die at all, their HP drops to 1 or 0 for like one or two frames before the health rolling kicks in and brings their health up again.

It's weird because like I said, if you make a skill or item add Death state directly, the actor dies correctly, it's only if it's added by a common event it fails to actually kill them.
I think I fixed both the state add and the extra 1 popup issue.

DL ver 1.1b and see if it helps.
I think I fixed both the state add and the extra 1 popup issue.

DL ver 1.1b and see if it helps.
Sorry for the long wait. I noticed what I thought was another bug, but I didn't have time to properly test it to confirm until now.

But firstly, yeah, seems both of the issues I mentioned were fixed with your update! Works flawlessly now from what I can tell, thank you.

The other thing I noticed turned out not to be a bug, so that's good. It turns out, though, that for some reason I can't understand, your Rolling HP script has an incompatibility when the plugin "VisuMZ_1_SkillStatesCore" is below it. For some reason, having that script causes the rolling MP gauge (and only MP, HP and TP are unaffected) to immediately start raising to full whenever you use a skill. Setting MP Tick Delay to 0 fixed it, and it turns out that moving your Rolling Stats plugin below the VS plugin also fixes that bizarre MP issue with the other plugin. So something for other VS plugin users to be wary of I guess.
The VS plugins should be considered Core plugins and should be at the top of your plugin order anyway for general compatibility purposes.

Besides that, I'm glad the initial bugs were ironed out ok.
Hello, I've been looking for a plugin like this one that allows you to have rolling HP/MP. Specifically, I noticed your version allows characters to use skills they technically don't have the MP for, which I think would be a fun mechanic to design skills around. However, the thing is that I'm using RPG Maker MV, not MZ. Are you interested in making a version of this that works for MV at some point?
I actually made one once upon a time.

I think there were issues with it, tho.

Feel free to check it out and let me know if it works for you.

LINK - MV Rolling Stats

EDIT: I revisited the MV version and found out what the issue was.
Namely, the rolling stats pause during player action selection.
(That and the frame rate seems to suck, at least on my PC...)
Not a huge deal, but I know I'd rather it continue during that part.

I did update it so it matches the MZ one.
I'll look into it further as I'd love to add it to my MV project if I could get it working the way I want. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/malikis-mz-rolling-stats-ver-1-1b.133597/