Change Enemy Stat to Variable

Hello!

Is there a way to either set an enemy's stat to be equal to a variable, or have an enemy's stat be increased by the value of a variable?
In regards to the basic parameters (Max HP/MaxMP, Attack, Defense, MAtk/MDef, Agility, Luck), here are parameter-related methods, where param_id for Max HP is 0 and Luck is 7

mmp/mhp/atk/def/ etc. - Returns param() with the matching id.
param(param_id) - Actually returns the (base and plus) multiplied by (rate and buffs), with an upper and lower limit.
param_base(param_id) - Initial amount. Enemy version copies from the database.
param_plus(param_id) - params from outside sources such as equipment.
add_param(param_id, value) - This adds a value to param_plus.

===

So let's say...you're using a Game Variable 1, which is $game_variables[1] and you want to change its Attack. Anyway, you had two questions, so...

1. Personally, I might overwrite param_base, param_plus or param, but I suppose an easier work-around is $game_troop.members[2].add_param(3, $game_variables[1] - $game_troop.members[2].param_base(3))

2. Increasing an enemy's stats is as simple as $game_troop.members[2].add_param(3, $game_variables[1])

This is, assuming that you plan to change specific monsters at Turn 0 through Script.
Without using an external script that allows it, your best bet is to make a troop event that runs at Turn 0 and use something similar to the script call (#2) stated by Harosata.

You just need to change the index of members to the index of the enemy on the troop that you want to change the parameter of (first enemy is 0 , 2nd is 1 and so on) and change the param number (the 3 on Haro's post) to the ID of the parameter that you want to change.
I followed your instructions. However, I'm getting an error when I start the battle...
Spoiler
Script 'Game_Interpreter' line 1411: NoMethodError occurred.

undefined method 'add_param' for nil:NilClass

This happens with any combinations found in Harosata's post.

What I'm trying to do is set the parameters of my enemies in variables according to the level of the party. If let's say the party's leve is 15, I want the enemy's MHP to be 1500, MMP to be 250, and all other parameters to be 15 (Meaning, while the party is between level 10 and 15, the parameters are as stated, but once over 15, they out level the monster until level 20 when the parameters become 2500, 500, and 25).

I set up an array for variable 15 where variable [15][0] = calculated number based off another script, all the way up to [15][7]. and then added at turn 0 = a script call of $game_troop.members[1].param_base(0, $game_variables[15][0]) And so forth to cover all the parameters.

I would also like to note that even with one monster in my troop, the first enemy is 1, not 0.

I tried to do this with Yanfly's Adjust Limits script, but I cannot get a variable to work with his script inside the notes section of an enemy when I use the note tag <stat: ##>, I don't think it is setup to REGEXP variables from the note tag... And my knowledge is not that strong with ruby to try an implement such an addition.

Any additional information would be greatly appreciated, as I'm trying to scale my enemies with my party.

Respectfully,
Altimos

Original thread: https://forums.rpgmakerweb.com/threads/change-enemy-stat-to-variable.77439/