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

Cleaned character animation and new room


I'm not sure if I should open a thread for this in games in development..
It's weird I actually have MORE work to do when stuck at home than before.
The No Travel Game Jam is here! Jump in to make a game in the month of April that takes place all in one town!

Forum statistics

Threads
95,473
Messages
929,422
Members
125,716
Latest member
DarkPatisserie
Top