Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> A script to make armor increase attack?
jonathan4210
post Mar 25 2012, 06:44 PM
Post #1


Level 10
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Skilled




I know i can just make the armor increase STR, but I want a script to make certain armor pieces increase attack. Please help.


__________________________
For goodness sake, let's have some cake!
Go to the top of the page
 
+Quote Post
   
brewmeister
post Mar 27 2012, 12:35 PM
Post #2


Paste above Main
Group Icon

Group: Revolutionary
Posts: 408
Type: Scripter
RM Skill: Skilled




You could set the Auto State on the armor to a new State with an increased ATK value


__________________________
Go to the top of the page
 
+Quote Post
   
jonathan4210
post Mar 27 2012, 04:07 PM
Post #3


Level 10
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Skilled




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.


__________________________
For goodness sake, let's have some cake!
Go to the top of the page
 
+Quote Post
   
jonathan4210
post Mar 27 2012, 06:21 PM
Post #4


Level 10
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Skilled




nvm, i decided to make an item increase attack instead of armor, which is easier for me to do. Thanks anyways.


__________________________
For goodness sake, let's have some cake!
Go to the top of the page
 
+Quote Post
   
brewmeister
post Mar 27 2012, 06:49 PM
Post #5


Paste above Main
Group Icon

Group: Revolutionary
Posts: 408
Type: Scripter
RM Skill: Skilled




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


__________________________
Go to the top of the page
 
+Quote Post
   
jonathan4210
post Mar 28 2012, 04:30 PM
Post #6


Level 10
Group Icon

Group: Revolutionary
Posts: 165
Type: Event Designer
RM Skill: Skilled




Cool, this seems to do it. So I'll use this instead, thanks again.


__________________________
For goodness sake, let's have some cake!
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 08:57 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker