Hello, I'm really sorry for bothering you (that is probably either dumb issue with a easy fix, or a completely impossible task...haha.. <pain>)
Anyway, I got in a bit of a weird issue with your script.
As you stated before helping someone else, I could put cparams values on the curve formulas and I did in a similar fashion of what you exemplified on page 2 with the exception of being in the initial value rather than the growth values, but it doesnt seem to be working for me.
View attachment 241752
Thats the atk formula for example with is aways returning 1 ingame when it was supposed to return 5, since its the initial value for that param, and the same thing happens for the other stats.
Debug screen confirming it:
View attachment 241755
View attachment 241751
(The plugin setup, they are the only ones that are on atm)
My idea (for context) is making all of the rpg maker standard stats as completely derivated ones from stuff like Strength/Constitution/Mind etc, and then I would manage their growth with your (very impressive by the way) script.
(I did make it work on MV by the way with other set of scripts ofcourse, but for MZ the options for what I'm trying to do are quite limited, your script seemed like the best approach for what i'm trying to do in the long run)
Thanks in advance, have a nice weekend.
Hi there!
So I believe this is a little hard to explain. But I will try my best.
In fact, what you are doing is working.
But when the code is setting the
Initial Value for the
Atk parameter, the Custom parameter value is not 5,
yet.
By default, inside code, all actors start at
Level 0.
On the plugin parameters, you can see that there are two parameters that define the Minimum Value for all parameters, both default, and custom. These are the values for all actors, on all parameters, at
Level 0.
When an actor raises a level, it will have its parameter values changed in the following order:
- HP
- MP
- ATK
- DEF
- MAT
- MDF
- AGI
- LUK
- CUSTOM PARAMETERS
So, when the code is filling the
HP value from
Level 0 to Level 1, your Custom Parameter value is still using the value of the previous level, which is
Level 0.
And so, it is taking the value set on the minimum custom stats plugin parameter.
You can confirm that by changing the minimum stats value to another number, like 3. And you will see the results.
This is the intended behavior.
But, besides that, there is no point for you to try putting the Initial value based on the custom parameter value by using a function/formula(I guess).
You can just put there the same number that you set for the custom parameter curve data.
What will make a difference when the actor levels up, will be the
Min and
Max value. There makes sense for you to use the formula:
this.cparam(0)
So the actor will change his stats value from level 2 and forward, based on the Custom parameter.
Got it?