[Solved] Where are Traits applied to the actor?

I found where it happens for the Battler. But I can't seem to find where this happens for an actor. Say I equip a weapon and it has a trait that increases max_hp by 5%, where is the code located that actually adds this 5%? Same for unequipping.

I ctrl-f-ed through the files but no success 🙁 . It's not internally done I hope.

I'd like to manually increase/decrease actor hp and would like to see how traits do this in case I would consider using custom-traits.
Game_BattlerBase is the superclass of Game_Battler, which itself is the superclass of Game_Actor and Game_Enemy, so you are already at the right place.
Good then I found it 🙂 .

If I were to add say +10 max_hp to the actor (permanently, should remain through level-ups), how would I do this w/o adding buffs. This code looks so complex.

Just coding:

$gameActors.actor(1).mhp += 10; // Does nothing (it's a getter w/o a setter)alert($gameActors.actor(1).param(0)) // displays mhp, but can't alter it once againI can't find where it's retrieved from the database.

I checked the levelup, changexp, other stuff alike but could not find where it's done.

I found it here (even though it's very dirty to do it here but it works):

Code:
// for constant values:var testa  = Game_Actor.prototype.paramBase;Game_Actor.prototype.paramBase = function(paramId) {	var retVal = testa.apply(this, arguments);		if (paramId == 0) //mhp	{		retVal -= 1000;	}	    return retVal;};// for %-values:var testb  = Game_Actor.prototype.paramRate;Game_Actor.prototype.paramRate = function(paramId) {    var retVal = testb.apply(this, arguments);    retVal += 0.05; // add 5%    return retVal;};

Original thread: https://forums.rpgmakerweb.com/threads/solved-where-are-traits-applied-to-the-actor.53247/