I don't want armor to give auto states, I want armor to increase the HP and SP parameters when equipped. I tried doing this with common event, but when I unequip the armor, I still keep the HP/SP bonus.
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # Weapon/Armor HP/SP Plus by Blizzard # Version: 2.1b # Type: Weapon/Armor Attribute Alteration # Date: 18.8.2006 # Date v1.01b: 12.3.2007 # Date v2.0: 15.5.2007 # Date v2.0b: 30.7.2007 # Date v2.1b: 11.6.2009 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # Compatibility: # # 95% compatible with SDK v1.x. 50% compatible with SDK v2.x. May cause # slight incompatibility issues with CBS-es, but can be made compatible # easily. Can cause imcompatibility issues with other weapon/armor changing # scripts and custom equipments scripts. # # # Features: # # - uses static (i.e. 500 HP more) or dynamic (i.e. 30% HP more) increasements # - easy to set up # - does NOT change any rxdata files # - this script comes UNDER SDK SCRIPTS if you use any # # new in v2.0: # - completely overworked and changed code for better compatibility # # new in v2.0b: # - fixed a bug that appeared because of a typing mistake # # new in v2.1b: # - improve coding # # # Instructions: # # - Explanation: # # This script will add the option for Weapons/Armors to have HP/SP pluses # while equipped just like the usual STR, DEX, INT etc. pluses. # # - Configuration # # Find the phrase saying "START" (CTRL+F) to find the database parts. Use the # following template to configure your database: # # when ID then return [EXPR, VAL] # # ID - Weapon/Armor ID in the normal database # EXPR - set to false if you want "static" increasement or true if you want # "dynamic" increasement # VAL - if you use static increasement, set this value to any integer you # want (i.e. 100, -500, 831 etc.) to increase the HP/SP, otherwise set # it to any decimal value of the final HP/SP (i.e. 1.2 = 20% more, # 2.3 = 130% more, 0.7 = 30% less) # # VAL can be a signed integer (static increasement) OR a decimal number # greater than 0 (dynamic increasement). Change MAX_HP and MAX_SP to # different values if you use another max HP and/or max SP limit than 9999. # # # Side Note: # # It took more to write the instructions than to write and test script # itself. # # # If you find any bugs, please report them here: # http://forum.chaos-project.com #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
MAX_HP = 9999 # change if needed, 9999 is standard MAX_SP = 9999 # change if needed, 9999 is standard
def self.weapon_hp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Weapon HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [false, 100] # when 5 then return [true, 1.2] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Weapon HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
def self.weapon_sp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Weapon SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [false, 500] # when 29 then return [true, 1.5] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Weapon SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
def self.armor_hp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Armor HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [true, 1.5] # when 5 then return [true, 0.5] # when 13 then return [false, 90] # when 17 then return [false, -450] # when 9 then return [true, 1.3] # when 21 then return [true, 1.3] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Armor HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
def self.armor_sp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Armor SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [true, 1.5] # when 21 then return [true, 1.3] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Armor SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
alias maxhp_hpsp_add_on_later maxhp def maxhp # return maxhp_hpsp_add_on_later unless $game_system.HPSPPLUS val = [MAX_HP, maxhp_hpsp_add_on_later].min @hp = val if @hp > val return val end
alias base_maxhp_hpsp_add_on_later base_maxhp def base_maxhp # return base_maxhp_hpsp_add_on_later unless $game_system.HPSPPLUS plus, multi = 0, 1.0 if @weapon_id != 0 result = BlizzCFG.weapon_hp_plus(@weapon_id) result[0] ? (multi *= result[1]) : (plus += result[1]) end [@armor1_id, @armor2_id, @armor3_id, @armor4_id].each {|id| if id != 0 result = BlizzCFG.armor_hp_plus(id) result[0] ? (multi *= result[1]) : (plus += result[1]) end} return (multi * (plus + base_maxhp_hpsp_add_on_later)).to_i end
alias base_maxsp_hpsp_add_on_later base_maxsp def base_maxsp # return base_maxsp_hpsp_add_on_later unless $game_system.HPSPPLUS plus, multi = 0, 1.0 if @weapon_id != 0 result = BlizzCFG.weapon_sp_plus(@weapon_id) result[0] ? (multi *= result[1]) : (plus += result[1]) end [@armor1_id, @armor2_id, @armor3_id, @armor4_id].each {|id| if id != 0 result = BlizzCFG.armor_sp_plus(id) result[0] ? (multi *= result[1]) : (plus += result[1]) end} return (multi * (plus + base_maxsp_hpsp_add_on_later)).to_i end
end
theres also a script for passive skill to increase all status in that website
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # Weapon/Armor HP/SP Plus by Blizzard # Version: 2.1b # Type: Weapon/Armor Attribute Alteration # Date: 18.8.2006 # Date v1.01b: 12.3.2007 # Date v2.0: 15.5.2007 # Date v2.0b: 30.7.2007 # Date v2.1b: 11.6.2009 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # Compatibility: # # 95% compatible with SDK v1.x. 50% compatible with SDK v2.x. May cause # slight incompatibility issues with CBS-es, but can be made compatible # easily. Can cause imcompatibility issues with other weapon/armor changing # scripts and custom equipments scripts. # # # Features: # # - uses static (i.e. 500 HP more) or dynamic (i.e. 30% HP more) increasements # - easy to set up # - does NOT change any rxdata files # - this script comes UNDER SDK SCRIPTS if you use any # # new in v2.0: # - completely overworked and changed code for better compatibility # # new in v2.0b: # - fixed a bug that appeared because of a typing mistake # # new in v2.1b: # - improve coding # # # Instructions: # # - Explanation: # # This script will add the option for Weapons/Armors to have HP/SP pluses # while equipped just like the usual STR, DEX, INT etc. pluses. # # - Configuration # # Find the phrase saying "START" (CTRL+F) to find the database parts. Use the # following template to configure your database: # # when ID then return [EXPR, VAL] # # ID - Weapon/Armor ID in the normal database # EXPR - set to false if you want "static" increasement or true if you want # "dynamic" increasement # VAL - if you use static increasement, set this value to any integer you # want (i.e. 100, -500, 831 etc.) to increase the HP/SP, otherwise set # it to any decimal value of the final HP/SP (i.e. 1.2 = 20% more, # 2.3 = 130% more, 0.7 = 30% less) # # VAL can be a signed integer (static increasement) OR a decimal number # greater than 0 (dynamic increasement). Change MAX_HP and MAX_SP to # different values if you use another max HP and/or max SP limit than 9999. # # # Side Note: # # It took more to write the instructions than to write and test script # itself. # # # If you find any bugs, please report them here: # http://forum.chaos-project.com #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
MAX_HP = 9999 # change if needed, 9999 is standard MAX_SP = 9999 # change if needed, 9999 is standard
def self.weapon_hp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Weapon HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [false, 100] # when 5 then return [true, 1.2] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Weapon HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
def self.weapon_sp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Weapon SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [false, 500] # when 29 then return [true, 1.5] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Weapon SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
def self.armor_hp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Armor HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [true, 1.5] # when 5 then return [true, 0.5] # when 13 then return [false, 90] # when 17 then return [false, -450] # when 9 then return [true, 1.3] # when 21 then return [true, 1.3] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Armor HP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
def self.armor_sp_plus(id) case id #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Armor SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: when 1 then return [true, 1.5] # when 21 then return [true, 1.3] #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Armor SP plus Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: else return [false, 0] end end
alias maxhp_hpsp_add_on_later maxhp def maxhp # return maxhp_hpsp_add_on_later unless $game_system.HPSPPLUS val = [MAX_HP, maxhp_hpsp_add_on_later].min @hp = val if @hp > val return val end
alias base_maxhp_hpsp_add_on_later base_maxhp def base_maxhp # return base_maxhp_hpsp_add_on_later unless $game_system.HPSPPLUS plus, multi = 0, 1.0 if @weapon_id != 0 result = BlizzCFG.weapon_hp_plus(@weapon_id) result[0] ? (multi *= result[1]) : (plus += result[1]) end [@armor1_id, @armor2_id, @armor3_id, @armor4_id].each {|id| if id != 0 result = BlizzCFG.armor_hp_plus(id) result[0] ? (multi *= result[1]) : (plus += result[1]) end} return (multi * (plus + base_maxhp_hpsp_add_on_later)).to_i end
alias base_maxsp_hpsp_add_on_later base_maxsp def base_maxsp # return base_maxsp_hpsp_add_on_later unless $game_system.HPSPPLUS plus, multi = 0, 1.0 if @weapon_id != 0 result = BlizzCFG.weapon_sp_plus(@weapon_id) result[0] ? (multi *= result[1]) : (plus += result[1]) end [@armor1_id, @armor2_id, @armor3_id, @armor4_id].each {|id| if id != 0 result = BlizzCFG.armor_sp_plus(id) result[0] ? (multi *= result[1]) : (plus += result[1]) end} return (multi * (plus + base_maxsp_hpsp_add_on_later)).to_i end
end
theres also a script for passive skill to increase all status in that website