Using math to create max hp?

I am trying to create a max hp as a math script, but I'm not sure if I need a script for it, or if I can just put it in the note box in the class.

Basically what I'm trying to do is
Max HP = (Magic Attack + (a number) ) * Level;

Granted, I know it wouldn't look like that when I actually type it up, but I'm using phone right now and it keeps autocorrecting me.
Which engine is this for? You have MV on your profile but you posted in MZ support.

Both engines have plugins that allow you to specify parameter calculations, but they would use different plugins for it.
You can very easily create the MHP = number * Level part in the base engine, the only problem is the "add magic attack" part.

for that you'll need either a plugin or some rather tricky eventing
Which engine is this for? You have MV on your profile but you posted in MZ support.

Both engines have plugins that allow you to specify parameter calculations, but they would use different plugins for it.
Sorry, it is for MZ
The VisuStella Core Engine has notetags for you to calculate parameters. Referencing the actor (for the mat and level) would be this
The VisuStella Core Engine has notetags for you to calculate parameters. Referencing the actor (for the mat and level) would be this
I just see this but when I click it, it does nothing.
I just see thisbut when I click it, it does nothing.
its not a link. its the word you use when you're trying to refer to the actor within the notetag to set the parameter

like
Code:
(this.mat+5)*this.level
its not a link. its the word you use when you're trying to refer to the actor within the notetag to set the parameter

like
Code:
(this.mat+5)*this.level
Oh! I see, so if I wanted to do it with classes instead, would i still use this or would i use a.
Oh! I see, so if I wanted to do it with classes instead, would i still use this or would i use a.
I don't really know what you're asking. Please look at the actual plugin documentation, tell us what notetags you're looking at, and show us the formula you're trying to make.
would i still use thisor would i usea.
that depends on the context - you will need to use both at different times

"this" is basically a placeholder that can do different things based on where it is used.
"a" is either a reference to the skill user if processing a skill/item or undefined and unusable if used outside of that context.

So we need to know what you want to do where before telling you what the correct code is (sometimes neither of them will work)
So I am trying to make this happen, but the math isn't working.

The Code is supposed to be

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

Where Base = 5 (chosen from the Database Menu under Classes)
Plus = Mat
and Rate = level

So the Math is supposed to be
(5+1)*1*1+0=6 At level 1
and
(5*1)*5*5+0=150 At level 5

1733587309654.png
1733587373638.png
1733587415869.png
1733587444383.png
1733587467256.png
let value = (base + plus) * paramRate * buffRate + flatBonus;
(5*1)*5*5+0=150 At level 5
buffRate is going to be 1 unless the actor has (de)buffs active, so your projection already has 5x more hp than it should. then im assuming you have +2 flat from some equipment or state. theres not enough info to tell.
buffRate is going to be 1 unless the actor has (de)buffs active, so your projection already has 5x more hp than it should. then im assuming you have +2 flat from some equipment or state. theres not enough info to tell.
It does have an armor and a weapon equipped, but neither of them boost the Mat.

So while the math was wrong about the HP it should have been
The Real amount should be 30 then,
(5*1)*5*1+0=30 At level 5

Original thread: https://forums.rpgmakerweb.com/threads/using-math-to-create-max-hp.173672/