################################################################################ # Special Equip Max HP SP Mod Script by Black Mage (Credit required to use) # Version : 1.0 # https://burningwizard.wordpress.com/2016/01/16/special-equip-max-hp-sp-mod-script-rmxp-rgss/ ################################################################################ # This script enable you to have an equip that increase and decrease mzx HP # or max MP of a character by equiping it. # To use this script, put it above Main script in the script editor. ################################################################################ # MAX HP ################################################################################ # Put the weapon ID on the brackets to have them increase max HP of whoever use it. $weaponhp = [ 1, 2, 10] # Put how much the HP will be increased if the weapon is equiped. $weaponvaluehp = [100,200,500] ################################################################################ # Put the armor ID on the brackets to have them increase max HP of whoever use it. $armorhp = [ 1, 5, 3] # Put how much the HP will be increased if the armor is equiped. $armorvaluehp = [200, 10,100] ################################################################################ ################################################################################ # MAX MP ################################################################################ # Put the weapon ID on the brackets to have them increase max HP of whoever use it. $weaponmp = [ 1, 2, 10] # Put how much the HP will be increased if the weapon is equiped. $weaponvaluemp = [100,200,500] ################################################################################ # Put the armor ID on the brackets to have them increase max HP of whoever use it. $armormp = [ 1, 5, 3] # Put how much the HP will be increased if the armor is equiped. $armorvaluemp = [200, 10,100] ################################################################################ $weaponplushp = [] $armorplushp = [] $weaponplusmp = [] $armorplusmp = [] $data_weapons = load_data("Data/Weapons.rxdata") $data_armors = load_data("Data/Armors.rxdata") for i in 0..$data_weapons.size if $weaponhp.include?(i) else $weaponplushp[i] = 0 end end for i in 0..$data_armors.size if $armorhp.include?(i) else $armorplushp[i] = 0 end end for i in 0..$data_weapons.size if $weaponmp.include?(i) else $weaponplusmp[i] = 0 end end for i in 0..$data_armors.size if $armormp.include?(i) else $armorplusmp[i] = 0 end end for i in 0..($weaponhp.size - 1) $weaponplushp[$weaponhp[i]] = $weaponvaluehp[i] end for i in 0..($armorhp.size - 1) $armorplushp[$armorhp[i]] = $armorvaluehp[i] end for i in 0..($weaponmp.size - 1) $weaponplusmp[$weaponmp[i]] = $weaponvaluemp[i] end for i in 0..($armormp.size - 1) $armorplusmp[$armormp[i]] = $armorvaluemp[i] end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Get Maximum HP #-------------------------------------------------------------------------- def maxhp n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min n = n + $weaponplushp[@weapon_id] n = n + $armorplushp[@armor1_id] n = n + $armorplushp[@armor2_id] n = n + $armorplushp[@armor3_id] n = n + $armorplushp[@armor4_id] for i in @states n *= $data_states[i].maxhp_rate / 100.0 end n = [[Integer(n), 1].max, 9999].min return n end #-------------------------------------------------------------------------- # * Get Maximum SP #-------------------------------------------------------------------------- def maxsp n = [[base_maxsp + @maxsp_plus, 0].max, 9999].min n = n + $weaponplusmp[@weapon_id] n = n + $armorplusmp[@armor1_id] n = n + $armorplusmp[@armor2_id] n = n + $armorplusmp[@armor3_id] n = n + $armorplusmp[@armor4_id] for i in @states n *= $data_states[i].maxsp_rate / 100.0 end n = [[Integer(n), 0].max, 9999].min return n end end class Scene_Equip def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 return end # If C button was pressed if Input.trigger?(Input::C) # Play equip SE $game_system.se_play($data_system.equip_se) # Get currently selected data on the item window item = @item_window.item # Change equipment @actor.equip(@right_window.index, item == nil ? 0 : item.id) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 # Remake right window and item window contents @right_window.refresh @item_window.refresh if @actor.hp > @actor.maxhp @actor.hp = @actor.maxhp end if @actor.sp > @actor.maxsp @actor.sp = @actor.maxsp end return end end end