Changing weapon parameters script

EDIT: Sorry, this is for ACE

Hello,

 I am trying to write a script that will change a weapon's parameters(ATK, DEF, etc). My test involves calling my script when I click an event, however I get an error: "undefined method params for 61:fixnum"

(61 is the weapon id equipped on my main)

My event: Script: upgrade_weapon(1)  #To upgrade slot 0 of actor 1

My script(used Vlue's random weapon script to get some of the methods):

WEAPON_UPGRADES ={    # ACTOR_ID  => [weapon_id, ATK_up, DEF_up, MAT_up, MDF_up, AGI_up, LUK_up, MHP_up, MMP_up],       1  => [61, 10, 10, 10, 10, 10, 10, 10, 10],    }class Game_Interpreter  def upgrade_weapon(character)    item = $game_party.weapon_upgrade_test(character)    msgbox(item)    $game_actors[character].change_equip_by_id(0, item)    item  endendclass Game_Party  alias rig_initialize initialize  def initialize    rig_initialize    @saved_weapons = $data_weapons    @saved_armors = $data_armors  end  attr_accessor :saved_weapons  attr_accessor :saved_armors  def weapon_upgrade_test(character)      weapon_equip = $game_actors[character].equips[0].id                  weapon_equip.params[2] += WEAPON_UPGRADES[character][1]      weapon_equip.params[3] += WEAPON_UPGRADES[character][2]      weapon_equip.params[4] += WEAPON_UPGRADES[character][3]      weapon_equip.params[5] += WEAPON_UPGRADES[character][4]       weapon_equip.params[6] += WEAPON_UPGRADES[character][5]      weapon_equip.params[7] += WEAPON_UPGRADES[character][6] weapon_equip.params[0] += WEAPON_UPGRADES[character][7]      weapon_equip.params[1] += WEAPON_UPGRADES[character][8]    $data_weapons.push(weapon_equip)    return weapon_equip  end endHow do I change the parameters of a weapon?
So I figured out how to do it, weapon_equip can't just be a weapon ID value(duh).

Here is my updated code. This is used with a weapon that has "Lvl #" at the end of it, and it will increment that # by 1.  Now to just create a "blacksmith" shop where you have to pay to have this done, and limits how many levels you can upgrade! (this code lets you do it forever haha)

Code:
#--------------------------------------------------------# Update this hash with each weapon you want to upgrade and which # Character they are equipped on(by actor ID)## Highly recommend adding the "fix equip [Weapon]" Feature# Special thanks to Vlue, since his item randomization helped me understand# What is going on with the weapon classWEAPON_UPGRADES ={    # ACTOR_ID  => [weapon_id, ATK_up, DEF_up, MAT_up, MDF_up, AGI_up, LUK_up, MHP_up, MMP_up],       1  => [61, 10, 10, 10, 10, 10, 10, 10, 10],    } class Game_Interpreter  def upgrade_weapon(character)    item = $game_party.weapon_upgrade(character)	      item  endendclass Game_Party  alias rig_initialize initialize  def initialize    rig_initialize    @saved_weapons = $data_weapons    @saved_armors = $data_armors  end  attr_accessor :saved_weapons  attr_accessor :saved_armors  def weapon_upgrade(character)        #Weapon values	  weapon_id = $game_actors[character].equips[0].id    weapon_equip = Marshal.load(Marshal.dump($data_weapons[weapon_id]))    weapon_name = weapon_equip.name    weapon_prefix = weapon_name.gsub(/\d*/) {|s| ""}    weapon_level = weapon_name.gsub(/\D*/) {|s| ""}    	  if !weapon_equip.is_a?(RPG::Item)      weapon_equip.params[0] += WEAPON_UPGRADES[character][7]       weapon_equip.params[1] += WEAPON_UPGRADES[character][8]             weapon_equip.params[2] += WEAPON_UPGRADES[character][1]       weapon_equip.params[3] += WEAPON_UPGRADES[character][2]       weapon_equip.params[4] += WEAPON_UPGRADES[character][3]       weapon_equip.params[5] += WEAPON_UPGRADES[character][4]       weapon_equip.params[6] += WEAPON_UPGRADES[character][5]       weapon_equip.params[7] += WEAPON_UPGRADES[character][6]    end    weapon_equip.id = $data_weapons.size    #Update weapon name for next level    weapon_equip.name = weapon_prefix + (weapon_level.to_i + 1).to_s    $data_weapons.push(weapon_equip)    $game_party.gain_item(weapon_equip, 1)    $game_actors[character].change_equip_by_id(0, weapon_equip.id)    $game_party.lose_item( $data_weapons[weapon_id], 1)    return weapon_equip  end end

Original thread: https://forums.rpgmakerweb.com/threads/changing-weapon-parameters-script.52430/