Changing battler stats?

I wish to change the stats of the enemies during a battle scene.

Further explanation: The enemies that you target during the standard VX Ace battle scene are the only ones I want to change stats on, their strength, hp, def, etc.

If anyone could help, that would be amazing.

Disclaimer: I have trolled these forums looking for some type of $game_ variable to use, as I have some familiarity with the Script function.
You could make @param_plus an attr_accessor and use that to modify the stat values up/down as needed.
There already is a method for that, you can use a battlers add_param method to increase/reduce one of their parameters. This does also ensure HP/MP won't exceed their maximum values after you reduced them.
Bleh, I forgot add_param does take negatives; I was thinking you could only use positive values for it.
Ok, thanks! It works fine now, and I'm able to manipulate their stats directly. Now I can move on with my game.

Once again, thanks for the help!

Btw, for anyone reading this, a few things:

#For Single in Party

#$game_party.members[0].add_param(1,50)

# For Entire Party

#$game_party.members.each { |actor| actor.add_param(pid, value)

# where id is the actor id

# pid is the parameter id (0=MHP, 1=MMP, 2=ATK, 3=DEF, 4=MAT, 5=MDF, 6=AGI, 7=LUK)

# value is the amount to add or subtract

 

#For Single Enemy

$game_troop.members[0].add_param(1,50)

#For Every Enemy

$game_troop.members.each { |enemy| enemy.add_param(1, 20) }

 

To get enemy stats

   $game_variables[6] = $game_troop.members[0].mp

 

To get player stats

   $game_variables[6] = $game_party.members[0].mp


If you want something other than mp, then follow the number system above.

PPS, you'll have to get stats AFTER you change hp/mp if that is what you are getting.

Original thread: https://forums.rpgmakerweb.com/threads/changing-battler-stats.40342/