Maliki's MZ Rolling Stats ver 1.1b

Thank you for replying and sharing the link. Much appreciated 😀

Unfortunately after some testing it doesn't seem to be working as intended, at least not for me.

Rather than rolling, HP damage (and healing) seems to just be reduced by some amount and then instantly brought to the end value. The MP value didn't seem to change at all, even if I spammed the same high-cost skill over and over. I'm not using TP, so I had that set to 0 in the parameters. I tried setting the tick delay to higher values (30, 60, and 300) and then waiting but it didn't seem to change anything.

The only other plugins I'm running that should affect battles are Yanfly's BattleEngineCore and some of its dependents that should only affect visuals.

I might be missing something obvious, but these are the issues I'm having rn.
I just rolled out the updated MV ver 1.1.

See if you get that to work better.

LINK - MV Rolling Stats v1.1
Same result as before unfortunately.
Hmmm... It works in my project just fine. And I also use the Battle Engine.
So I'll have to assume you either didn't turn it on, renamed it, or there is another plugin causing a conflict.
Yep! Turns out it was the second one. I had copied the pastebin into a notepad and just saved it as "Maliki'sRollingStats.js" instead of the right name. I didn't realize that it had to be "MalMVRollingStats.js" in order to work. It's working perfectly now! Thank you so much for your time.
Hello, I'm having an issue with this plugin on the MZ version, when a character takes Slip damage or damage over time through negative regeneration; the player seems to take the damage but then instantly start to heal from that instance. Regular damage seems to stay like normal.
@Rohkuro , I tried to replicate the problem, but the plugin worked fine for me.

So, just to cover the bases, are you using the current version of this plugin?
(Currently MZ ver 1.1b)
Also note that my plugin does not work outside of battles.

And for clarity, what I did to test was make a poison state and have the enemy place it on my PCs.
The poison state kicked in at the HP stats rolled down as expected.
This was in a vanilla project with no other plugins installed, including the VS stuff.

So if you have any other plugins, consider moving mine around to see if it helps.

Let me know if this helped.
@Rohkuro , I tried to replicate the problem, but the plugin worked fine for me.

So, just to cover the bases, are you using the current version of this plugin?
(Currently MZ ver 1.1b)
Also note that my plugin does not work outside of battles.

And for clarity, what I did to test was make a poison state and have the enemy place it on my PCs.
The poison state kicked in at the HP stats rolled down as expected.
This was in a vanilla project with no other plugins installed, including the VS stuff.

So if you have any other plugins, consider moving mine around to see if it helps.

Let me know if this helped
I'm posting a list of plugins I'm using Idk what would be causing the conflict. I'm not sure if it's because of the jav code i'm using for my poison status effect. It seem to work fine when I'm not using the rolling stats. I double checked the Rolling stats js and it says it's version 1.1b
Poison status code:
<JS On Add State>

target._stackingPoison ??= 0;

target._stackingPoison++;

</JS On Add State>



<JS On Erase State>

delete target._stackingPoison;

</JS On Erase State>



<JS Pre-Regenerate>

target._stackingPoison ??= 0;

const stacks = Math.min(5, target._stackingPoison);

const damage = stacks * 10;

$gameTemp.requestAnimation([target], 61);

target.gainHp(-damage);

</JS Pre-Regenerate>
Ok.

I think I see the issue.
Your Pre-Regenerate tag is working around the rolling code.

so to try to fix it, try this tag instead:


<JS Pre-Regenerate>

target._stackingPoison ??= 0;

const stacks = Math.min(5, target._stackingPoison);

const damage = stacks * 10;

$gameTemp.requestAnimation([target], 61);

this.executeHpDamage(target, -damage);

</JS Pre-Regenerate>

Doing it this way will allow the code to check if the target is an actor or not, which will keep the game from crashing.

Let me know if this works.
I'm not familiar with how the VS code is done so this might not work.
If it doesn't, we can still try other things, but we'll have to put conditionals in your code to make sure it doesn't affect enemies.
Ok.

I think I see the issue.
Your Pre-Regenerate tag is working around the rolling code.

so to try to fix it, try this tag instead:


<JS Pre-Regenerate>

target._stackingPoison ??= 0;

const stacks = Math.min(5, target._stackingPoison);

const damage = stacks * 10;

$gameTemp.requestAnimation([target], 61);

this.executeHpDamage(target, -damage);

</JS Pre-Regenerate>

Doing it this way will allow the code to check if the target is an actor or not, which will keep the game from crashing.

Let me know if this works.
I'm not familiar with how the VS code is done so this might not work.
If it doesn't, we can still try other things, but we'll have to put conditionals in your code to make sure it doesn't affect enemies.
Thanks that seems to have worked.
I have done some testing and found that the plugin doesn't to like the VS code when it comes to slip damage/damage over time status effects. It works fine with the in game damage over time, but that is pretty limited in it's uses only dealing percentage damage.
If you are referring to my plugin, it's just the way I needed to set it up.

Basically, anywhere you would put a

target.gainHp(-damage)

call, you can sub it with

this.executeHpDamage(target, -damage)

and it should work most of the time.
(Again, the rolling stats only work DURING battle)

And with that, I'm glad we were able to fix that issue.
[REDACTED]
@Rohkuro
I appreciate the edits.
In the future, ask before making (and releasing) such sweeping changes to someone else's work.
(You could always make an extension plugin of your own, but making and releasing these kinds of edits are frowned upon here.)

I'll integrate your suggested changes and release a proper ver 1.2.

Thanks
Is there anyway to make this work where the rolling HP works for certain poison or slip damage only?
@Lonewulf123 I see you are using the VS suite.
I'm not going to go thru it, but if there is a place to put formulas for states, you can try to change the actor's rollingHP. (battler.rollingHP)
Just make sure NOT to try to use this on enemies as it will cause a crash.

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