Trouble with Yanfly's Class Base Parameters

Brancliff

Veteran
Veteran
Joined
Jul 21, 2015
Messages
31
Reaction score
1
First Language
English
Primarily Uses
From searching on the rest of the forums, I've found another post which lets you set an actor's parameter to a specific number. Handy, since it seems you can only add or subtract parameters using the engines that the event editor gives to you.

So I set Actor 1's MATK to 20.
But it turns out that includes equipment - presumably, any states and buffs you may have on as well. If I equip a weapon that increases MATK by 10, it actually sets the base MATK to 10 - but thanks to the weapon, its still 20 MATK.

Is there any way around this? I don't think it's feasible for me to set up pages of conditionals that will unequip / reequip items before and after every stat change.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,024
Reaction score
7,026
First Language
German
Primarily Uses
RMMV
one step back - why and when do you want to set the base parameters?

Because just for your info: the linked topic doesn't set the value either, it just adds a correction that will make the sum of base value and correction value the number you want.

And depending on what exactly you want to do there are two or three different ways to get there.
 

Brancliff

Veteran
Veteran
Joined
Jul 21, 2015
Messages
31
Reaction score
1
First Language
English
Primarily Uses
Oh, geez, is that how it works? I'm not at all experienced with the coding thing so I guess I can't tell if I've just picked up a dud or something

In my specific use case, I'd really just want to be able to change the base parameters to be a variable. It's a balance thing right now. But I don't want to just add the variable to the damage formula, because then it's not affected by states that would increase your stats.

Could I hear the multiple solutions there are? It's possible that one solution might be better than the other, even if they all work.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
30,024
Reaction score
7,026
First Language
German
Primarily Uses
RMMV
The default way is to edit the base value directly, especially if it is for balancing. You doubleclick on the parameter in the class database - and a lot of people don't know that you can do more there than just click on the buttons to generate a curve.
It is much more work, but you can click on the curve to select any level (or enter the level number into the field) and then set the number on that level manually with the second field above the curve. You can get even irregular curves that way.

Then there is the plugin solution, for example with yanfly's parameter formulae or a similar plugin. That will allow you to change the curve to almost any formulae, including using other parameters in your formula and so on.

Third way is using traits - there is a reason why the traits options are multiplicative instead of additive for the parameters, because being multiplicative it scales with the default on all levels. And for balancing purposes that is better than having a variable add fixed values.
 

Brancliff

Veteran
Veteran
Joined
Jul 21, 2015
Messages
31
Reaction score
1
First Language
English
Primarily Uses
The second option appealed to me because it seems to allow room for variables. I've found Yanfly's Class Base Parameters plugin, which according to this post, allows me to use variables.

It seemed to work, but the stats didn't change dynamically. If I changed a variable, the stat didn't change with it. Anything I can do about that?
 

Brancliff

Veteran
Veteran
Joined
Jul 21, 2015
Messages
31
Reaction score
1
First Language
English
Primarily Uses
I'm back with an update. I took a look back at that post, which seemed to almost have it down. My problem was that it wouldn't scale if I changed a variable, which I've found a solution for! It seems to force-update if the actor changes levels. So, by increasing and decreasing the actor's level by 1, I can cause an update.

That's great, except for one thing - it seems scaling with HP crashes the game. So here's what I've got going:

Code:
<Custom Class Parameters>
maxhp = v[27];
atk = v[21];
mat = v[24];
</Custom Class Parameters>
Attack scales with variable 21 and magic scales with variable 24 just fine. But when I try to scale with HP, the game will crash if I pull up the menu. Here's my crash error and console info:

TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.

rpg_managers.js:1949 TypeError: Failed to execute 'createLinearGradient' on 'CanvasRenderingContext2D': The provided double value is non-finite.
at Bitmap.gradientFillRect (rpg_core.js:1289)
at Bitmap.gradientFillRect (YEP_CoreEngine.js:986)
at Window_MenuStatus.Window_Base.drawGauge (YEP_CoreEngine.js:2287)
at Window_MenuStatus.Window_Base.drawActorHp (rpg_windows.js:555)
at Window_MenuStatus.Window_Base.drawActorHp (YEP_SkillCore.js:1190)
at Window_MenuStatus.Window_Base.drawActorSimpleStatus (YEP_CoreEngine.js:2347)
at Window_MenuStatus.drawItemStatus (YEP_CoreEngine.js:2424)
at Window_MenuStatus.drawItem (rpg_windows.js:1741)
at Window_MenuStatus.Window_Selectable.drawAllItems (rpg_windows.js:1256)
at Window_MenuStatus.Window_Selectable.refresh (rpg_windows.js:1283)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

So, uh, has anyone tried buying any resources from KokoroReflections? Because I've been looking for a 'buy' button on the site for like 10 minutes now and can't find one.
Any also thought it's too cringy to put the word "and you" in your credit as a special thanks?
Cause that's what I thought...
Everyone in the US right now: Please stay safe.
Symphony Celestia: Prophecy of the Falling Stars RPG Maker music pack WIP. Symphony Celestia is a new series that focuses on symphonic and orchestrated music to tell a story. Each story will include compositions that make up that story from beginning to end. Themes include: Battles, adventures, character themes, etc. Below is a video preview to the first story.

Jumping and gravitation 0.1 build - RPG Maker MV

Forum statistics

Threads
97,978
Messages
948,264
Members
129,228
Latest member
T-Rylo
Top