Calling a base stat parameter

KeenWolf

Amateur Game Creator
Member
Joined
Mar 14, 2014
Messages
18
Reaction score
0
First Language
English
Primarily Uses
I would like to know if it is possible to pull information from the Classes.JSON file. What I am attempting to do is use Yanfly's armor scaling plugin to create a formula that uses the base defense of a class to calculate damage reduction. The formula I'm attempting is: armor = (target.def / (target.base_def + target.level)) * 100. The problem is obviously with target.base_def. I'm very new to rpg maker when it comes to scripting so I don't know how to look into the files myself so I ask if there is a way to call a class's base parameters in the notebox like this. This is important to make armor in the game more valuable while at the same time prevent an enemies attack from ever being 0 or so small that it might as well be 0.


This screen shot is of the enemies basic attack which should make an enemy that has 25 atk deal ~100 dmg. That damage should be decreased based on the armor formula in the notebox which if the target actor is level 1 and has a base def of 14 and a current defense of 26 it will do a calculation of: armor = (26 / (14 + 1)) * 100 = 173.33. This number then goes into Yanfly's armor scaling formula of: damage *= 100 / (100 + armor) which in this case would be 100 *= 100 / (100 + 173.33) = 37 damage dealt. That amounts to 63% damage reduction where as without that 12 additional defense the damage reduction would only be 48%. I'm looking to create a flexable armor system that makes building armor a viable strategy while not letting it get too powerful.


problem 1.png


If anyone reading this is confused as to what I am asking I would like to know if it is possible to call the base defense parameter to be put into a plugin rather than try and put it into the damage formula box which I already know can't be done.


Here is Yanfly's Page: http://yanfly.moe/2015/11/28/yep-33-armor-scaling/
 

Victor Sant

Veteran
Veteran
Joined
Mar 17, 2012
Messages
1,694
Reaction score
1,442
First Language
Portuguese
Primarily Uses
object.paramBase(paramId)


the param Id is the id of the parameter (0: max hp, 1: max mp. 2: atk, 3: def, 4: mta, 5: mdf, 6: agi, 7: luk)


This will get the base parameter without any addition (from equips, buffs, traits...)


In your case, the base defense is "target.paramBase(3)"
 

KeenWolf

Amateur Game Creator
Member
Joined
Mar 14, 2014
Messages
18
Reaction score
0
First Language
English
Primarily Uses
Thank you so very much this has perfected my formula.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

I usually don't enjoy survival games, but I absolutely love Conan Exiles.
Basically Everyone: Dont make a long game the first time. Me: I guess i'll make a REALLY long game in that case >:p
I've developed a habit of thanking cleaning ladies for their work.
Sorry Aerith... I will abandon your shoes... :guffaw:
Spent a whole bunch of time today reworking the area in the video because someone said it was too illusory. So I reworked it so it changes less, moved the grass up to the same level as the player.... And found enough extra resources to make the grass moves when the player touches it. Also lots more water, because it looks amazing. I'll probably put up a short updated video later today.

Forum statistics

Threads
95,774
Messages
931,787
Members
126,173
Latest member
emmanuelglover
Top