Max Param. Distribution thru YEP Learn Skill

So I'm basically new to the RPG Maker scene with zero experience in Java.

I love the fact that we can increase character parameters through the YEP Learn Skill and I've seen the tutorial on Youtube. My question, however, is how can we set a maximum cap in "learning" these parameters without affecting parameters obtained from weapons and armors?

For example, in Ragnarok Online, you can manually increase a parameter until 99 only, but you still get bonus parameters from job level, weapons and armors. Is there any way to set this maximum cap through said plugin?

Much thanks and appreciation. 🙂
(Disclaimer: I haven't worked with either character parameters in RMMV or YEP)

Usually codes about these parameters work like this (care that I invented name of variables, functions etc)

//example codetotal_Strenght = function() { var strenght = this.baseStrenght; for (i = 0; i < this.equips.lenght; i++) { strenght += this.equips.strenght_modifier; } return strenght;};So I the best thing you can do is modifying how the code access the base_strenght parameter or the actor, you can do something like this:

/*Here you store the max value of a parameter/staistic, (you can story anywhere you want)care to notice that i didn't use the prototype word, that's because it means that the variable/objects will be instantiated when you create a new actor, but since u need this value once you just better create it static. Also it's all in caps because it's aconstant but in javascript there are not things like "var const myConstant;" so you just name it all caps for common agreement, other agreements are:$myInstatiation (u use $ to denote instatiated objects)_myVariable (the variable is "private" and sould be accessed through a function like myVAriable()*/Game_Actor.STATS_MAX_VALUE = 99; Game_Actor.prototype.base_strength = function() { return Math.min(this.base_strenght, Game_Actor.STATS_MAX_VALUE);};in this case you have to modify also the base code, i'll use my example to just to let u understand

Code:
//modified example codetotal_Strenght = function() {   var strenght = this.base_strenght(); //note that i call the funciton not the real value   for (i = 0; i < this.equips.lenght; i++) {      strenght += this.equips[i].strenght_modifier;   }   return strenght;};
Other 2 ways to do this are:
1) changing the way u increase the stat rather than the way u read it:

//example code//option aGame_Actor.prototype.modify_Strength = function(amount) { this.base_strength += amount;};//option bGame_Actor.prototype.set_Strength = function(new_value) { this.base_strength = new_value;};//calling the funcitons$actor.modify_Strenght(5); //a$actor.set_Strength($actor.base_strength + 5); //b2) the last way you can cap these parameter is the less effcient and probaly reliable, it requires you to check every update cicle if the value exceeds the cap and reduce it in that case, i would write you how to du it bit i highly recommend you not to do it this way.

Ok, now all you have to do ( hopefully 😛 ) is to find the real name of the variables and or functions to modify.
I found out where you access the base value or the value + equips is identical to my code XD

Game_Actor.prototype.paramBase = function(paramId) { return this.currentClass().params[paramId][this._level];};Game_Actor.prototype.paramPlus = function(paramId) { var value = Game_Battler.prototype.paramPlus.call(this, paramId); var equips = this.equips(); for (var i = 0; i < equips.length; i++) { var item = equips; if (item) { value += item.params[paramId]; } } return value;};Btw i ust checked and if YEP doesnt' modify that all parameters already have a value cap:

Game_BattlerBase.prototype.paramMax = function(paramId) { if (paramId === 0) { return 999999; // MHP } else if (paramId === 1) { return 9999; // MMP } else { return 999; }};this basically returns 999999 when the code gets the max HP value, 9999 for MP and 999 for the rest. I think the best thing you can do is to store the max values in some constants and to modify this function:

// REMEMBER TO PUT THIS IN ONE OF YOUR SCRIPTS, IS BETTER NOT TO MODIFY THE ORIGINAL CODE// YOUR SCRIPTS OVERRIDE THE FUNCTIONS YOU MODIFY ANYWAY// METHOD 1, max param constants are global, so are the same for every ActorGame_Actor.HP_MAX = 999999;Game_Actor.MP_MAX = 9999;Game_Actor.PARAM_MAX = 999;//override base functionGame_BattlerBase.prototype.paramMax = function(paramId) { if (paramId === 0) { return Game_Actor.HP_MAX; // MHP } else if (paramId === 1) { return Game_Actor.MP_MAX; // MMP } else { return Game_Actor.PARAM_MAX; }};// METHOD 2, every character is created with the same caps, but caps can be modified to be// different from actor to actorGame_Actor.prototype.HP_MAX = 999999;Game_Actor.prototype.MP_MAX = 9999;Game_Actor.prototype.PARAM_MAX = 999;//override base functionGame_BattlerBase.prototype.paramMax = function(paramId) { if (paramId === 0) { return this.HP_MAX; // MHP } else if (paramId === 1) { return this.MP_MAX; // MMP } else { return this.PARAM_MAX; }};this should work if YEP doesn't interfeer with this functions
Thank you so much for the reply. I will try this out when I get back home. 😀

Original thread: https://forums.rpgmakerweb.com/threads/max-param-distribution-thru-yep-learn-skill.53158/