Calling a base stat parameter

Status
Not open for further replies.

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.


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.


problem 1.png


Edit: I appear to have posted this in the wrong forum since this has to do with scripting, yet I have no idea how to delete the post. I must apologize to the Admins/Moderators for this.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,784
Reaction score
12,215
First Language
English
Primarily Uses
RMMV
You can't delete posts yourself.  Normally you'd just report it and ask us to move it, which we'd happily do.  Since you've already made a new post in the correct section, I'll just close this one.
 
Status
Not open for further replies.

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

Latest Threads

Latest Posts

Latest Profile Posts

I was planning to release a useless plugin for april fools, but then I thought I let it be.
Tfw every dev around me is using Live2D in their MV games and make me question my skills repeatedly.

Spending the day reworking my maps, especially the first "biome". This time it's not even in the dark. :LZSwink:
Activity on the forums has increased lately, probably because of people staying home. The amount of work for moderators has increased lol.

Forum statistics

Threads
95,522
Messages
929,783
Members
125,791
Latest member
Oersted_LAL
Top