#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Warrior of Add-ons by Bigace360 # ■ Type: Add-on Collection Control Script # ■ Date: September. 29, 2012 # # v1.00 09.29.2012 # v1.32 01.21.2013 # (Version History at bottom) #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # # ■ Introduction: # # This is my own personal Add-On Collection. All the scripts are my own # original creation, This will also be a work in progress, I plan to continue # to update the scripts with any improvements, bug fixes (I'm sure there's # gonna be a few), and add new scripts as I write them. # # For the sake of simplicity, this script will be in the same format and # work exactly the same as Blizzard's Tons-of-Add-ons. The main controls # to enable/disable the scripts will be at the top, with the configuration # for the individual scripts within its respective section. I will post new # updates, if any, every Friday or Saturday. For any new add-on the version # will increase by 0.1, for any update of the collection or any update on an # add-on the version will increase by 0.01. # # As any other scripter can likely relate, its not always the scripts that are # difficult, it is coming up with the ideas for what to write. If you have any # ideas for scripts, or an idea of how to improve an existing one, don't # hesitate to give some feedback. # #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # ■ Features: (Total = 7) # # ▼ Status Effect (non-standard status effects): # ● Heal After Battle (The Party is healed after battle by a percentage.) # ● Special Elements (Only certain enemies to be hurt by certain elements.) # ● Enemy Auto States (States that stay always active for enemies.) # # ▼ Utility (make your game more unique and better/help you during debug): # ● Randomized Gold (It randomizes the gold drop by enemies.) # ● Speed Save Option (Adds a hotkey to open the save menu quickly on the map.) # ● Singular EXP (Allow for a singular actor as a lead actor.) # ● Warning System (Warning system when your HP is low.) # #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # # ■ Instructions: # # - Configuration is below. Scripts can be enabled/disabled completely by # setting them to true/false # - If any configuration requires you to add data into [ ], make sure that # all values are seperated with commas. # - For any configuration that allows to set values to a float (decimal), # include the 0. ex. (0.5) NOT (.5) # - For better performance, unless otherwise specified, any configuration that # is a string, use single quotes (''), not double (""). # #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # Variable for recognition by other scripts. ($ace_script ||= {})[:warrior_addons] = 1.32 #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# # # # ### ### # # ##### # #### # # #### ### ##### # ### # # # # # # # # ## # # # # # # # # # # # # # # ## # # # # # # # # # #### # # ## # # #### # # # # # # # # # # # # # # # # ## # # # # # # # # ##### # # # # # ## # # ### ### # # # # #### ### # # # # # # ### # # # # # #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::# #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Warrior Engine (Setting module for the Warrior Engine) #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= module Warrior_Engine #----------------------------------------------------------------------------- # * BEGIN CONFIGURATION SECTION 1 #----------------------------------------------------------------------------- # Settings in this section cannot be altered in-game #----------------------------------------------------------------------------- ENEMY_AUTO_STATES = false SPEED_SAVE = false RANDOM_GOLD = false end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # Game_System #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= class Game_System alias warrior_addon_initi initialize def initialize warrior_addon_initi #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Configuration # # You can enable/disable any add-on here if you wish. Set the value to # false to disable it initially. To turn it on/off ingame, just use the # Call script command with one of these syntaxes: # # $game_system.NAME_OF_THE_ADDON = true/false # # where NAME_OF_THE_ADDON is the same variable as the one used below. #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @special_elements = false @singular_exp = false @heal_after_battle = false @warning_system = false end #------------------------------------------------------------------------------- # * END CONFIGURATION SECTION 1 #------------------------------------------------------------------------------- attr_accessor(:special_elements, :singular_exp, :heal_after_battle, :warning_system) end #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # # SECTION 2: THE ADD-ONS # # Main body. Configuration for each script is in its respective section. # #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Enemy Auto States # ■ Type: Enemy Add-on # ■ Date: Feb. 18, 2012 # ■ Version: 1.0 # # This script allows you to create effects that stay always active for enemies #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= AUTO_STATUS_ENEMY ={# Do not remove this line #Enemy_ID => [States] 1 => 13, 32 => [13, 14, 15], }# Do not remove this line #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Game_Enemy #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= if Warrior_Engine::ENEMY_AUTO_STATES class Game_Enemy < Game_Battler alias warrior_auto_state_initi initialize unless $@ def initialize(troop_id, member_index) warrior_auto_state_initi(troop_id, member_index) update_auto_state end def update_auto_state st = AUTO_STATUS_ENEMY multi_auto_state_id = (st != nil && st[@enemy_id] != nil) ? st[@enemy_id] : [] multi_auto_state_id.each {|state| add_state(state, true)} end end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Heal After Battle # ■ Type: Battle Add-on # ■ Date: Jan. 20, 2013 # ■ Version: 1.0 # # This causes the party to be healed after battle by a percentage. Options are # adjustable in the module. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= AFTER_BATTLE ={ # Change these constants to adjust what percentage of HP or MP is healed # after battle and whether or not states will be cleared, too. :heal_hp => 25 :heal_sp => 25 :recovery => true } #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Game_Actor #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= class Game_Actor < Game_Battler def heal_after_battle states.each {|state| remove_state(state.id)} if AFTER_BATTLE[:recovery] return if dead? self.hp += maxhp * AFTER_BATTLE[:heal_hp] / 100 self.mp += maxmp * AFTER_BATTEE[:heal_sp] / 100 end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Scene_Battle #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= class Scene_Battle < Scene_Base alias warrior_heal_after_battle_end_ace battle_end unless $@ def battle_end(result) warrior_heal_after_battle_end_ace(result) return unless $game_system.heal_after_battle $game_party.actors.each {|actor| actor.heal_after_battle} if result != 2 end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Randomized Gold # ■ Type: Enemy Add-on # ■ Date: Jan. 20, 2013 # ■ Version: 1.0 # # Instead of every single slime dropping exactly 100 gold, have them randomized # so that they drop anywhere from 90 to 110. The amount of variation can be # adjusted. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # This is the percentage used to randomize gold. RANDOMIZED_GOLD_VARIATION = 10 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Game_Enemy #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= if Warrior_Engine::RANDOM_GOLD class Game_Enemy < Game_Battler def gold default_gold = $data_enemies[@enemy_id].gold variation = RANDOMIZED_GOLD_VARIATION lower = Integer(default_gold * (100 - variation) / 100) upper = Integer(default_gold * (100 + variation) / 100) value = lower + rand(upper - lower + 1) return value end end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Special Elements # ■ Verison: 1.0 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # This script allows it so for only certain enemies to be hurt by certain # elements. Mostly for items that are supposed to target a certain type of # enemy. Like If you have a Item called 'Dragoon Slayer'. That Item should only # hurt dragons, other enemies would be uneffected by this item. You can do the # same with skills to. # # In the Database Under 'Items' add the type of element, most preferably an # animal type like demon or dragon, and then in this script add the monster ID # for the one that certain element works on. #------------------------------------------------------------------------------ SPECIAL_ELEMENTS= { 9 => [1], 10 => [3, 7, 12], #element 4 only works against monsters 3, 7 and 12 11 => [6, 14], #element 8 only works against monsters 6 and 14 12 => [1], 13 => [1], 14 => [1], 15 => [1], 16 => [1] } #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Game_Enemy #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= class Game_Enemy alias special_element_rate element_rate unless $@ def element_rate(*args) if $game_system.special_elements result = special_element_rate(*args) if SPECIAL_ELEMENTS.keys.include?(*args) result = 0 unless SPECIAL_ELEMENTS[*args].include?(@enemy_id) end end return result end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Speed Save Option # ■ Type: Save/Load System # ■ Date: Feb. 18, 2012 # ■ Version: 1.0 # # This snippet adds a hotkey to open the save menu quickly on the map. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= COMMAND_BUTTON = Input::F7 # This is what button is set to make you save. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Scene_Map #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= if Warrior_Engine::SPEED_SAVE class Scene_Map alias ace_warrior_save_update update unless $@ def update ace_warrior_save_update update_save end def update_save return unless Input.trigger?(COMMAND_BUTTON) if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) else $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new end end end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Singular EXP # ■ Type: Actor Add-on # ■ Date: Feb. 18, 2012 # ■ Version: 1.0 # # This snippet will allow you to use a singular actor as a lead actor. This # means, only that actor gains exp and the others level up with the leader. # ----------------------------------------------------------------------------- # How To Set-Up: # # Change LEAD_ACTOR to the leader that everyone will level with. # # To set-up synchronized EXP, you must change every acotrs EXP chart to be # identical in the database. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= LEAD_ACTOR = 1 #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Game_Actor #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= class Game_Actor alias warrior_single_exp exp= def exp=(exp) return unless $game_system.singular_exp if self.id == LEAD_ACTOR ($game_party.actors.size).times do |i| $game_party.actors[i].warrior_single_exp(exp) end else self.warrior_single_exp(exp) end end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= # ■ Warning System # ■ Author: Bigace360 # ■ Type: # ■ Date: Jan. 20, 2013 # ■ Version: 1.0 # # Warning system when your HP is low. #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:= WARNING ={ # Percentage for which the system is activated danger. :low_hp => 25, # Sound to be activated. :se => "057-Wrong01", # Enable flash on the screen. :flash => true, # Speed ​​warning. :loop => 35, } #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # Game_Player #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: class Game_Player < Game_Character alias :warrior_warning_initi :initialize unless $@ alias :warrior_warning_update :update unless $@ def initialize warrior_warning_initi @warning = 0 end def update if $game_system.warning_system @warning += 1 @warning = 0 if @warning > WARNING[:loop] $game_party.actors.size.times do |i| actor = $game_party.actors[i] if actor.hp * 100 / actor.maxhp <= WARNING[:low_hp] && @warning == 1 Audio.se_play("Audio/SE/#{WARNING[:se]}", 100, 100) rescue nil $game_screen.start_flash(Color.new(255,50,0,128), 10) if WARNING[:flash] end end end warrior_warning_update end end #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # VERSION HISTORY #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: # # v1.00 09.29.2012 (Original Release) # # ● Special Elements v1.0 # ● No Zombie Leaders! v1.0 # ● Enemy Auto States v1.0 # ● Speed Save Option v1.0 # ● Singular EXP v1.0 # # v1.32 01.21.2013 # # ▼ Updates # ● I removed 'No Zombie Leaders!' and made it standalone. # ● Special Elements v1.1 # # ▼ New Additions: # ● Randomized Gold v1.0 # ● Warning System v1.0 # ● Heal After Battle v1.0 # #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=: