Change Parameter for Enemies Script/Plugin for enemies

I am hoping someone can help convert this script into a JS file plugin or some other MV-compatible format:

  class Game_Enemy < Game_Battler

  def change_param(param_id, value)

    enemy.params[param_id] = value

  end

end

 

This script allowed me to change enemy parameters based on variables in VX Ace.  As an example: if I was wanting to change the Max HP of my enemy into variable 162 I would add this script to my event:

 

val = $game_variables[162]

if $game_troop.members[0] != nil

  $game_troop.members[0].change_param(0, 

val)

end

 

The parameter I would change is identified by the number after change_param(0

 

0 = MHP    6 = AGI

1 = MMP    7 = LUK

2 = ATK

3 = DEF

4 = MAT

5 = MDF

 

I am hoping this information will help someone come up with something.  If not: basically what I am looking for is a Plugin that allows me to change the parameters of my enemies into variables.  

 

 
I don't think I can help with this. All it is doing for me is changed all the same enemies different parameters.
For example, 2 bats in a troop it will just change all bats parameters instead of one specific bat.
I don't think I can help with this. All it is doing for me is changed all the same enemies different parameters.

For example, 2 bats in a troop it will just change all bats parameters instead of one specific bat.
Still, getting it to change all the bats is an improvement over no bats.

So if you could post the JS file that allows me to do this for multiple enemies I would appreciate it.  There may be a way to make alterations to it that would allow for single enemies.  I wish I could find my old thread where this script was discussed but I guess it was deleted or something.

In any case: thank you for giving it a shot.
From what I can tell, the game generates the $gameTroop when you start battle, it generates this data based off of $dataTroop which stores the enemy Id and not the whole enemy object. You can edit the enemy object easily but like I said it changes all bats parameters. I am sure there probably is some code you can inject into $gameTroop and look for a specific troop number and then changes  the parameters of the enemies for that one specific battle and then changes them back to default.
From what I can tell, the game generates the $gameTroop when you start battle, it generates this data based off of $dataTroop which stores the enemy Id and not the whole enemy object. You can edit the enemy object easily but like I said it changes all bats parameters. I am sure there probably is some code you can inject into $gameTroop and look for a specific troop number and then changes  the parameters of the enemies for that one specific battle and then changes them back to default.
I think I understand what you're saying.

Could you post the JS file you are using to change the parameters of all bats?

At least that would give me something to work with in the meantime until someone figures out how to change it to where it affects only a single enemy rather the entire troop.

Original thread: https://forums.rpgmakerweb.com/threads/change-parameter-for-enemies-script-plugin-for-enemies.49008/