RMMV Yanfly's Base Parameter Control and messing with HP/MP?

overlordmikey

BroCo. Gaming
Veteran
Joined
Sep 2, 2015
Messages
340
Reaction score
589
First Language
English
Primarily Uses
N/A
I'm using Yanfly's Base Parameters Control and for some reason things are going wrong and I need to understand what because this is a big part of how sweeping love decides certain stats.

Okay let's say a characters base stats are 25 HP and they gain a small portion of their ATK, DEF, and AGI into their HP. I wanted to tell the game that 33% (for testing reasons, not the final number) of each of those stats goes into HP. so if each of those was 3 the player would have 28 HP.

Okay so I tried this:

((atk * 0.33) + (def * 0.33) + (agi * 0.33) + base + plus) * paramRate * buffRate + flat

and this

(atk * 0.33) + (def * 0.33) + (agi * 0.33) + (base + plus) * paramRate * buffRate + flat

and for MP this.

((mat * 0.33) + (mdf * 0.33) + (luk * 0.33) + base + plus) * paramRate * buffRate + flat

and for some reason it makes HP 1 and MP 0.

Shouldn't this logically make it so that the 33% of each of those stats is added into HP and MP along with the base number? I haven't even gotten to the part where I need to use Math.floor() to make it so they round to the lowest interger and I'm already messing up.

Sometimes I worry I'll never understand this stuff. :(

 

ScorchedGround

Blizzards most disappointed fan (They keep going)
Veteran
Joined
Apr 12, 2020
Messages
809
Reaction score
1,262
First Language
German
Primarily Uses
RMMV
The problem is most likely that just writing "agi", "mat" and "mdf" does not do anything since the engine does not know whose parameter to take, i.e. it's "undefined".

That's why the value becomes 0.

try putting "user." in front of all the parameters. Like this for example:

((user.atk * 0.33) + (user.def * 0.33) + (user.agi * 0.33) + base + plus) * paramRate * buffRate + flat
 

overlordmikey

BroCo. Gaming
Veteran
Joined
Sep 2, 2015
Messages
340
Reaction score
589
First Language
English
Primarily Uses
N/A
The problem is most likely that just writing "agi", "mat" and "mdf" does not do anything since the engine does not know whose parameter to take, i.e. it's "undefined".

That's why the value becomes 0.

try putting "user." in front of all the parameters. Like this for example:

((user.atk * 0.33) + (user.def * 0.33) + (user.agi * 0.33) + base + plus) * paramRate * buffRate + flat
It really is always something obvious.
I tested it and that appears to be it, thank you so much!
 

eliaelia123

Veteran
Veteran
Joined
Mar 24, 2023
Messages
59
Reaction score
26
First Language
Deutsch/German
Primarily Uses
RMMV
Hey,
this thread is a bit older, but is close to the question I have, so i though I would try my luck here.
I also wanted to alter the formula in Yep Base Parameter Control, in my case to :

(base + plus + user.isActor() ? (gameVariables.value(12) : 0) ) * paramRate * buffRate + flat

what i though it would do is:
1. check if user is actor
2.a when yes, add var(12)
2.b when no, add 0

but it doesent work, any idea what I'm doing wrong with it?
 

eliaelia123

Veteran
Veteran
Joined
Mar 24, 2023
Messages
59
Reaction score
26
First Language
Deutsch/German
Primarily Uses
RMMV
@ATT_Turan ohh.. ok my bad then.
Thanks for the quick reply nonetheless!
 

Latest Threads

Latest Posts

Latest Profile Posts

Quick little one day make. Having mimosas on a boat tomorrow but wanted to feel productive today. Ask me about my sunburn later.

GABposterwork.png

Working on a new poster.
I just posted the first devlog for The Hidden Art of Innkeeping: https://seaphoenix.itch.io/hiddenart!

BeachLogo.png
Might start playing some rpg maker games and uploading the games on youtube. Realistically they're not going to be for views. Just to give anyone some feedback on any games they're working on. So if you'd like me to play and review your game just reply them down here. And I'll upload them on Rpg4MGames.
Ah, so THIS is what it feels like to sleep till I naturally wake up, and not be woken up by an alarm or other unwanted stimuli... holy crap I feel like I can lift a house! XD (Or work on my game)

Forum statistics

Threads
131,616
Messages
1,221,618
Members
173,345
Latest member
Wyvern756
Top