Help - Search - Members - Calendar
Full Version: A script to make armor increase attack?
RPG RPG Revolution Forums > Scripting > Script Development and Support > Script Requests
jonathan4210
I know i can just make the armor increase STR, but I want a script to make certain armor pieces increase attack. Please help.
brewmeister
You could set the Auto State on the armor to a new State with an increased ATK value
jonathan4210
QUOTE (brewmeister @ Mar 27 2012, 12:35 PM) *
You could set the Auto State on the armor to a new State with an increased ATK value


ya but a state will have to increase ATK by a percentage. I want some armor pieces to increase attack by a fixed value, like +5.
jonathan4210
nvm, i decided to make an item increase attack instead of armor, which is easier for me to do. Thanks anyways.
brewmeister
Try this...

CODE
class Game_Actor
  #--------------------------------------------------------------------------
  # * Get Basic Attack Power
  #--------------------------------------------------------------------------
  def base_atk
    armor_array = []
    armor_array[0] = 0
    
    # Enter one value for each armor3 (body armor) ID
    
    armor_array[13] = 0
    armor_array[14] = 0
    armor_array[15] = 0
    armor_array[16] = 0
    armor_array[17] = 0
    armor_array[18] = 0
    armor_array[19] = 0
    armor_array[20] = 0
    armor_array[21] = 0
    armor_array[22] = 0
    armor_array[23] = 10
    armor_array[24] = 50
  
    #######
    weapon = $data_weapons[@weapon_id]
    armor3 = $data_armors[@armor3_id]
    atk = 0
    if weapon != nil
      atk += weapon.atk
    end
    if armor3 != nil
      atk += armor_array[@armor3_id]
    end
    return atk
  end
end
jonathan4210
Cool, this seems to do it. So I'll use this instead, thanks again.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.