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,023
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,023
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

That moment when you realize you lost time frankenstiening a sprite together, only to realize it already exited.
My first game is going to have the main character more or less create monsters as his party members.

Thanks to the plugin creators still producing content for MV, I might be able to give each of the monster members a personalized range of tactics during combat. I liked how the devs made it like that in FF6.
Stream will be live shortly! Tonight will be the PREMIERE of Killer 7 for the first half of the stream, and at half-stream, we will switch to a session of the Interactive Text Adventure! Feel free to drop by!
Watching the launch, I felt a sort of detached excitement. Usually I'd think something like this would be extremely exciting. I'm fascinated by space exploration and am a big Sci-Fi fan. I guess it's just current events.
What did everyone else think about it?
Doing ep 1 of my RPG!
For those still craving more Konosuba madness
I'm new here, any tips welcome

Hope you fun! :LZSgrin: :LZSkiss:

Forum statistics

Threads
97,968
Messages
948,192
Members
129,220
Latest member
prevoid
Top