MZ Visustella Editing Parameter Formula

I might be trying to do something that maybe is immensely over complicating a non-issue, but I'm trying to jury rig Visu Core's base parameter formula to work a certain way.

I think it might be best if I show what I'm trying to do in a visual way.

Here's the normal parameter formula:

Code:
(base + plus) * paramRate * buffRate + flatBonus

And here's what I'm trying to do:

Code:
base + (flatBonus * current actor level) * paramRate * buffRate + plus

Here's the full javascript that's used, for context purposes.

JavaScript:
// Determine the variables used in this calculation.

let paramId = arguments[0];

let base = this.paramBase(paramId);

let plus = this.paramPlus(paramId);

let paramRate = this.paramRate(paramId);

let buffRate = this.paramBuffRate(paramId);

let flatBonus = this.paramFlatBonus(paramId);



// Formula to determine total parameter value.

let value = (base + plus) * paramRate * buffRate + flatBonus;



// Determine the limits

const maxValue = this.paramMax(paramId);

const minValue = this.paramMin(paramId);



// Final value

return Math.round(value.clamp(minValue, maxValue));

So what I'm trying to do is use the base (The value set in the database) as the flat starting number, and use the flatBonus as a set number added to the parameter every level. I'm just not sure how to get the actor level.

Could I just use another plugin? Yes, yes I could. I just want to see if my stupid idea is even doable.
Greetings,

So I'm not certain what you've tried or what exactly you're after with "current actor level". Do you mean the level of the actor whose parameter is being determined? Or are you trying to target a specific actor?

That being said, I thought I'd link you to a couple things that could be helpful.



This is the RPG MAKER MZ Script Calls sheet. On it you can find the code for just about everything. For example, you can use actor.level to get the level of an actor.



This is the RPG MAKER MZ Script Call Reference Sheet. I scanned through and didn't find code relevant to your query here, but you may want to take a look yourself and see what you can find.

Hope this helps! If not, I'm sure someone with a little more grit in their Javascript skills will see this post and provide some assistance.
So I'm not certain what you've tried or what exactly you're after with "current actor level".
The current actor's level would be the level of the actor whose parameters are being calculated, as demonstrated in the formula the OP provided higher up in their post.

I'm just not sure how to get the actor level.
Code:
this.level
The current actor's level would be the level of the actor whose parameters are being calculated, as demonstrated in the formula the OP provided higher up in their post.


Code:
this.level
That is what I assumed the OP was asking about, but I didn't want to assume 😛.
The current actor's level would be the level of the actor whose parameters are being calculated, as demonstrated in the formula the OP provided higher up in their post.


Code:
this.level
Thank you!
Hey! I have a question regarding the Parameter Formula. Is there a way to edit it so I can use Custom Stats to influence any of the Parameters, including by class? For example, Constitution adds to Maximum Hit Points, and Intelligence/Wisdom/Charisma (depending on class) adds to Maximum Magic Points.
@ArkhamVI Do not post disruptively. This includes but is not limited to: thread hijacking (using another member’s support/request thread to fulfill your support/request needs - especially if OP still needs assistance). Forum rules can be reviewed below.

Original thread: https://forums.rpgmakerweb.com/threads/visustella-editing-parameter-formula.165037/