Yanfly Base Parameters Issue

salohcin714

Villager
Member
Joined
Apr 4, 2017
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hello,

I'm not sure exactly how to set up this formula and would like some assistance.

Basically, I'm wanting MHP to be based off the base DEF value and not affected by any DEF changes caused by armor or weapons. Currently this is how I have the formula set up:
Code:
((Math.pow(this.def,2) * 73.6) / 64) * Math.cbrt( Math.floor(this.def / 3))
As you can imagine, this is not working how I want since as soon as equipment is changed, MHP changes.

Any help is appreciated
 
Last edited:

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
146
First Language
English
Primarily Uses
RMMV
But doesn't the equipment changing mhp mean the formula is working? I mean, if you have the equipment's mhp stat at 0, which I think you did since you don't want the equipment to affect mhp, then the mhp shouldn't change, and yet it does. This would happen if the equipment is affecting def, and since def affects mhp, the mhp changes.

Some things to change in your formula:

You started the equation with three brackets, but never closed one of them. Start with two brackets instead since one of them is redundant anyways.

Replace this.def with user.def
 

salohcin714

Villager
Member
Joined
Apr 4, 2017
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV
But doesn't the equipment changing mhp mean the formula is working? I mean, if you have the equipment's mhp stat at 0, which I think you did since you don't want the equipment to affect mhp, then the mhp shouldn't change, and yet it does. This would happen if the equipment is affecting def, and since def affects mhp, the mhp changes.

Some things to change in your formula:

You started the equation with three brackets, but never closed one of them. Start with two brackets instead since one of them is redundant anyways.

Replace this.def with user.def
Using the formula still causes the issue:
What I'm wanting is for the DEF I have set in the database for that class at that level to be used instead of the user's DEF.

At level one, the actor's base DEF is 17. When they equip armor, I want the formula to still use the base DEF of 17. Is there a way to specify the class DEF instead of the actor's?
 
Last edited:

Naveed

Veteran
Veteran
Joined
Nov 2, 2013
Messages
314
Reaction score
146
First Language
English
Primarily Uses
RMMV
Oh, so you want it to depend on the base defense.

In that case, replace user.def with user.paramBase(3).

So you're formula would be:

Code:
((Math.pow(user.paramBase(3),2) * 73.6) / 64) * Math.cbrt( Math.floor(user.paramBase(3) / 3))
 

salohcin714

Villager
Member
Joined
Apr 4, 2017
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV
Oh, so you want it to depend on the base defense.

In that case, replace user.def with user.paramBase(3).

So you're formula would be:

Code:
((Math.pow(user.paramBase(3),2) * 73.6) / 64) * Math.cbrt( Math.floor(user.paramBase(3) / 3))
It works! Thank you for your help! I ended up tweaking it a little but the end formula looks like this:

Code:
(((Math.pow(user.paramBase(3),2) * 73.6) / 128) + plus) * paramRate * buffRate + flat
 

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top