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
998
Reaction score
461
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
110
Reaction score
140
First Language
English
Primarily Uses
RMMZ
^That is correct.
 

Tiamat-86

old jrpg gamer
Veteran
Joined
Dec 5, 2017
Messages
998
Reaction score
461
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,523
Reaction score
1,566
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
110
Reaction score
140
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
998
Reaction score
461
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
998
Reaction score
461
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

Finally showing some updates again
I think it's ready - Chapter Selection:
unknown.png
On another more gaming topic, I paid 20 bucks for a visual novel to emotionally destroy me. I may write an entry about that.
1638611395177.png
Reading about metaverses recently. I can totally imagine myself in the future, logging in with VR glasses to a virtual beach villa sitting in a virtual chair, with a virtual laptop facing the sea...coding 16-bit RM.
Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."

Forum statistics

Threads
117,176
Messages
1,105,172
Members
153,293
Latest member
uwaphua
Top