Is there an easy way to reference 'raw" character stats, before equipment bonuses are added?

BlissAuthority

Dang, it feels good to be a Princess
Veteran
Joined
Dec 26, 2013
Messages
146
Reaction score
52
First Language
English
Primarily Uses
RMVXA
Exactly as it says.

For the purposes of some damage/healing formula, or to create "substats", I was wondering if there was an easy way to reference the raw value of a stat like A.Atk before equipment modifiers are considered, either in base MZ or using the free QoL plugins from VisuStella.

Example:

- Damage formula for a spells has it resisted by the sum of "Spirit" (Magic Attack) and "Mind" (Magic Defense) before equipment is considered.

- An event calls for a "roll" of 1-10, plus the raw value of a character's Agility, to see if the character succeeds at a task (parkouring up the inn's roof).

Is this possible?

(If this belongs in Tutorials, I have no problems with moving it there, but this seemed like Deep Magic rather than a basic function.)
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
973
Reaction score
434
First Language
english
Primarily Uses
RMMV
MZ uses all the same damage formula syntax as MV right?
for MV's damage formulas its a.paramBase(paramId)
ParamIDs
0
- Max HP
1 - Max MP
2 - Attack
3 - Defence
4 - Magic Attack
5 - Magic Defence
6 - Agility
7 - Luck
 

Arctica

The Arbiter of Time
Veteran
Joined
Jul 19, 2021
Messages
85
Reaction score
108
First Language
English
Primarily Uses
RMMZ
^That is correct.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
973
Reaction score
434
First Language
english
Primarily Uses
RMMV
if its all the same syntax then here is a good damage formula reference link
 

gstv87

Veteran
Veteran
Joined
Oct 20, 2015
Messages
2,486
Reaction score
1,506
First Language
Spanish
Primarily Uses
RMVXA
always refer to the database.
you just need to know how to cross IDs and objects to get from one collection to the other, but *everything* refers to the database.
that's simply how the system works, at any given moment: it pulls things from the database and then adds on top of that.

if you want to pull a base value from somewhere, always pull from the database.
for example:

$classes[$actors[$party[index].actor.id].classID].parameter

bring the parameter, from the class, assigned to the actor, at this position within the party.

if you used A.parameter in a damage formula, A could be an enemy.
depending on the parameter you call for, enemies might not have it (like, levels), and that'd cause a crash.
 
Last edited:

Arctica

The Arbiter of Time
Veteran
Joined
Jul 19, 2021
Messages
85
Reaction score
108
First Language
English
Primarily Uses
RMMZ
In the context of the damage formula, a.x is can suffice.

a.atk is pointing to the current value of the attack parameter, which includes modifications from weapons/armor/buffs, etc.

a.param(2) is the same as atk(since atk just returns param(2)).

a.paramBase returns the base value set by the class.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
973
Reaction score
434
First Language
english
Primarily Uses
RMMV
lol, dont forget about a.paramPlus which returns the amount from equipment and buffs but doesnt include the base amount from the class
 

BlissAuthority

Dang, it feels good to be a Princess
Veteran
Joined
Dec 26, 2013
Messages
146
Reaction score
52
First Language
English
Primarily Uses
RMVXA
Oh, of course that's a base functionality.

So that example spell using the syntax I wanted was just
((a.mtk+a.level)*2+20) - ((b.level*2)+b.mtkBase+b.mdfBase)

(and yes, I know that I'll need a plugin to set and refer to battler levels.)

That clears up a tremendous number of headaches, thanks very much!
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
973
Reaction score
434
First Language
english
Primarily Uses
RMMV
half of those brackets have no reason to exist.
P/E/MD/AS, multiplication and division are done at the same time in order of appearance in the equation.

(not the order of the letter in the acronym, this is the order of operation that schools only teach in passing while only drilling the acronym into peoples heads).

once those are done it will do addition and subtraction at the same time.
you only need brackets when want to break the order of operation.

(a.mat+a.level)*2+20-(b.level*2+b.paramBase(4)+b.paramBase(5))

b.level*2 will get done 1st, because it is P/MD/,
then it will do the a. addition followed by the rest of the b. side, P/AS/,
followed by the *2, /MD/, and finally the /AS/

math is math

edit after eating: ya... seeing weird math is 1 of my triggers.
just picture how bad i get when i see those "9/10 people cant solve" things on facebook and youtube.
at least the equation here wasnt technically wrong (aside from syntax), just weird.
(and dont even get me started on old D&D THAC0)
 
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

It does sometimes get a little embarrassing that I often come here to ask for help with something and seldom have anything to actually show for it. If there is one thing though I can commend myself for, it's for sticking with an idea I've been tinkering with for this long now and gradually making headways. Even though I've been reserved about my progress, I can say I'm farther now than where I initially started.
I'm gonna put my project on pause for a tiny bit so I can explore the engine outside of it... Winging it can only get you so far LMFAO
Have seen some of my favorite people here posting and helping others with questions today -- love to see it!
Haven't been on here actively in awhile, project is going strong my biggest issue is the STORY, i'm refining the plot and learning so much i decided to take a writers class to improve even more but the programming and functionality of the game is stepping up nicely!

Forum statistics

Threads
116,132
Messages
1,096,053
Members
151,552
Latest member
Staples
Top