MZ how does base stats for rmmz work?

hi I know it seems like I'm pretty much here all the time and its prolly true but that's because you guys always help me out when I'm in a pinch, so I want to say thanks first.

(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄)

ok so my problem this time is that id like to access the base stats and kind of change the way its currently used but as this is the first time I'm attempting this I'm sorta at a loss for where to start.

The stats I'm referring to are the ones shown in database/classes : Max hp, Max mp, attack, defense, agility, luck, m.attack and m.defense.

ok, the things I'd like to know are where they are stored is it with weapons or actors or even somewhere else?
As my game is mostly using the one member and doesn't use a party system id mostly like to be able to change the stats pertaining to the first member/actor.

After searching for some hours and not seeing how the game implements or uses them I'm a little stuck. in all fairness i could create my own variables but I would really like to take advantage of the system the way it is without breaking it too much especially items and how they are used.

Thanks for always helping me.
(*˘︶˘*).。.:*♡
Most of the stats have no hardcoded functions at all, the engine only accumulates them to be used in the damage formulae of skills and items.

as such, an actor has an array for base values of the parameters, and a second array for any changes to the base parameters, and any given parameter is calculated at any time from those values plus all modifications by equipment and states.
Specifically (rmmz_objects.js):
JavaScript:
Game_BattlerBase.prototype.param = function(paramId) {
    const value =
        this.paramBasePlus(paramId) *
        this.paramRate(paramId) *
        this.paramBuffRate(paramId);
    const maxValue = this.paramMax(paramId);
    const minValue = this.paramMin(paramId);
    return Math.round(value.clamp(minValue, maxValue));
};
Like Andar said, for actors this is:
  • Base value - class/level;
  • Plus value - equips & permanent bonuses (Change Parameter command);
  • Rate - traits & buffs.
By default param 6 (agility/AGI) affects battle turn order/timing, surprise/preemptive rates, and escape chance; param 7 (luck/LUK) affects the chance of applying a state/debuff with an action that is not Certain Hit.

If you wanted to change how the parameters are calculated for a specific actor, a plugin something like this might work:
Spoiler: plugin code (untested)
JavaScript:
/*:
 * @target MZ
 * @plugindesc Change how actor 1's basic params are calculated.
 * @help Free to use and/or modify for any project, no credit required.
 */
(alias => {
  Game_Actor.prototype.param = function(paramId) {
    // if NOT actor ID 1...
    if (this.actorId() !== 1)
      // ...then calculate params as normal
      return alias.apply(this, arguments);
    switch (paramId) {
      case 0:  // mhp
        return 10;  // edit this
      case 1:  // mmp
        return 10;  // edit this
      case 2:  // atk
        return 10;  // edit this
      case 3:  // def
        return 10;  // edit this
      case 4:  // mat
        return 10;  // edit this
      case 5:  // mdf
        return 10;  // edit this
      case 6:  // agi
        return 10;  // edit this
      case 7:  // luk
        return 10;  // edit this
    }
    return 0;  // uh oh, unrecognised param ID
  };
})(Game_Actor.prototype.param);
Specifically (rmmz_objects.js):
JavaScript:
Game_BattlerBase.prototype.param = function(paramId) {
    const value =
        this.paramBasePlus(paramId) *
        this.paramRate(paramId) *
        this.paramBuffRate(paramId);
    const maxValue = this.paramMax(paramId);
    const minValue = this.paramMin(paramId);
    return Math.round(value.clamp(minValue, maxValue));
};
Like Andar said, for actors this is:
  • Base value - class/level;
  • Plus value - equips & permanent bonuses (Change Parameter command);
  • Rate - traits & buffs.
By default param 6 (agility/AGI) affects battle turn order/timing, surprise/preemptive rates, and escape chance; param 7 (luck/LUK) affects the chance of applying a state/debuff with an action that is not Certain Hit.

If you wanted to change how the parameters are calculated for a specific actor, a plugin something like this might work:
Spoiler: plugin code (untested)
JavaScript:
/*:
 * @target MZ
 * @plugindesc Change how actor 1's basic params are calculated.
 * @help Free to use and/or modify for any project, no credit required.
 */
(alias => {
  Game_Actor.prototype.param = function(paramId) {
    // if NOT actor ID 1...
    if (this.actorId() !== 1)
      // ...then calculate params as normal
      return alias.apply(this, arguments);
    switch (paramId) {
      case 0:  // mhp
        return 10;  // edit this
      case 1:  // mmp
        return 10;  // edit this
      case 2:  // atk
        return 10;  // edit this
      case 3:  // def
        return 10;  // edit this
      case 4:  // mat
        return 10;  // edit this
      case 5:  // mdf
        return 10;  // edit this
      case 6:  // agi
        return 10;  // edit this
      case 7:  // luk
        return 10;  // edit this
    }
    return 0;  // uh oh, unrecognised param ID
  };
})(Game_Actor.prototype.param);

Annnd done!
This took waaay too long to fully understand. lol
can I hug you? because just saying thanks doesn't feel like it would be enough to convey my appreciation.
~~~ (つ≧▽≦)つ


Most of the stats have no hardcoded functions at all, the engine only accumulates them to be used in the damage formulae of skills and items.

as such, an actor has an array for base values of the parameters, and a second array for any changes to the base parameters, and any given parameter is calculated at any time from those values plus all modifications by equipment and states.
also thanks for this as it played a vital part in my understanding the whole system. thanks! i'd give you a hug too.
(⁄ ⁄>⁄ ▽ ⁄<⁄ ⁄) ~~~ (つ✧ω✧)つ

Original thread: https://forums.rpgmakerweb.com/threads/how-does-base-stats-for-rmmz-work.148541/