My base idea is to find what function handles this aspect
Game_Actor.paramPlus is what handles stats from gear and stat grow effects.
Game_Actor.paramBase is what handles the base stats (raw stats from class)
even though it looks like a regular property that holds a number, when you call a battler's param directly (mhp, def, etc), its actually calls their param() function and it calculates what the param should be right then and there based on paramBase and ParamPlus. because param() uses paramPlus() in its own calculation, you shouldnt reference param() within paramPlus() directly.
you can edit paramPlus so that if the paramId is 3, look at if the current equipment is an armor, and if so add a bonus based on its atypeId.
- if its heavy, just use the armor's def
- if its medium, add in Math.min(Math.floor((this.paramBase(3)-10/)2), 2)
- if its light, add in Math.floor((this.paramBase(3)-10/)2)
Edit: I suppose you would also want to also make paramPlus no longer factor in this._paramPlus and move that into paramBase so that parameter grow effects count in dex bonuses