Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # ♫ ~ Difficulty setting by parameter by TheoAllen ~ ♫
- # Version : 1.2d
- # Requires : (Optional) YEA - System Option for in game difficulty change
- # Contact : www.rpgmakerid.com
- # =============================================================================
- # ♫ UPDATES :
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # 2013.10.12 - Fixed another bug in Game Troop
- # 2013.06.03 - Fixed another bug in Scene Shop
- # 2013.04.27 - Fixed bug in Scene Shop
- # 2013.03.02 - Begin and finished rewrite script
- # - Simplify variable use
- # 2013.03.01 - Add shop price change
- # - Add exp gain change
- # - Add gold drop change
- # - Compatibility Patch
- # 2013.02.24 - Fixed bugs
- # 2013.02.24 - Started and finished script
- #
- # =============================================================================
- # ♫ DESCRIPTION :
- # This script allow you to change enemy's parameter for difficulty setting.
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ♫ INSTRUCTION :
- # Put this script below material but above main in script editor. Don't forget
- # to save.
- # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ♫ HOW TO USE :
- # Just edit the configuration below
- # =============================================================================
- # ♫ TERMS OF USE :
- # - Credit me, TheoAllen. If you think it's necessary.
- # - You may use this script both commercial and non-commercial purposes or even
- # adult game as long as you don't claim it's yours.
- # - I'll be glad if you give me a free copy of your game if you use this script
- # in your commercial project.
- # =============================================================================
- $imported = {} if $imported.nil?
- $imported["Theo-DiffSetting"] = true
- # =============================================================================
- # ♫ CONFIGURATIONS ~ ♫
- # =============================================================================
- module THEOLIZED
- module DIFFSETTING
- VAR_ID = 9 # variable id. 0 to disable
- DIFFICULTY_HASH = { # <- don't touch this
- # variable value => [modifiers in percent]
- # value => [mhp ,mmp ,atk ,def ,mat ,mdf ,agi ,luk , exp,gold, buy,sell]
- 1 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
- 2 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
- 3 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
- 4 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
- 5 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
- } # <- don't touch this
- end
- end
- # =============================================================================
- # ♫ Do not edit unless you know what to do ~ ♫
- # =============================================================================
- # SCRIPT INFOS:
- # ------------------------------------------
- # Rewriten method : N/A
- # ------------------------------------------
- # Aliased method :
- # - Game_Enemy
- # def initialize
- # def mhp
- # def mmp
- # def atk
- # def def
- # def mat
- # def mdf
- # def agi
- # def luk
- # - Game_Troop
- # def initialize
- # def exp_total
- # def gold_total
- # - Scene_Shop
- # def buying_price
- # def selling_price
- # =============================================================================
- # ♫ Game_Enemy ~ ♫
- # =============================================================================
- class Game_Enemy < Game_Battler
- def var_value
- $game_variables[THEOLIZED::DIFFSETTING::VAR_ID]
- end
- def check_var
- @diff_hash = THEOLIZED::DIFFSETTING::DIFFICULTY_HASH
- THEOLIZED::DIFFSETTING::VAR_ID > 0 &&
- @diff_hash.include?(var_value)
- end
- #--------------------------------------------------------------------------
- # ♫ Maximum hit point
- #--------------------------------------------------------------------------
- alias theolized_mhp mhp
- def mhp
- check_var ? theolized_mhp*@diff_hash[var_value][0]/100 : theolized_mhp
- end
- #--------------------------------------------------------------------------
- # ♫ Maximum magic point
- #--------------------------------------------------------------------------
- alias theolized_mmp mmp
- def mmp
- check_var ? theolized_mmp*@diff_hash[var_value][1]/100 : theolized_mmp
- end
- #--------------------------------------------------------------------------
- # ♫ Attack point
- #--------------------------------------------------------------------------
- alias theolized_atk atk
- def atk
- check_var ? theolized_atk*@diff_hash[var_value][2]/100 : theolized_atk
- end
- #--------------------------------------------------------------------------
- # ♫ Defense point
- #--------------------------------------------------------------------------
- alias theolized_def def
- def def
- check_var ? theolized_def*@diff_hash[var_value][3]/100 : theolized_def
- end
- #--------------------------------------------------------------------------
- # ♫ Magic attack
- #--------------------------------------------------------------------------
- alias theolized_mat mat
- def mat
- check_var ? theolized_mat*@diff_hash[var_value][4]/100 : theolized_mat
- end
- #--------------------------------------------------------------------------
- # ♫ Magic defense
- #--------------------------------------------------------------------------
- alias theolized_mdf mdf
- def mdf
- check_var ? theolized_mdf*@diff_hash[var_value][5]/100 : theolized_mdf
- end
- #--------------------------------------------------------------------------
- # ♫ Agility point
- #--------------------------------------------------------------------------
- alias theolized_agi agi
- def agi
- check_var ? theolized_agi*@diff_hash[var_value][6]/100 : theolized_agi
- end
- #--------------------------------------------------------------------------
- # ♫ Luck point
- #--------------------------------------------------------------------------
- alias theolized_luk luk
- def luk
- check_var ? theolized_luk*@diff_hash[var_value][7]/100 : theolized_luk
- end
- #--------------------------------------------------------------------------
- # ♫ Get variable id
- #--------------------------------------------------------------------------
- end
- # =============================================================================
- # ♫ Game_Troop ♫
- # =============================================================================
- class Game_Troop < Game_Unit
- alias theolized_diffset_init initialize
- def initialize
- theolized_diffset_init
- @diff_hash = THEOLIZED::DIFFSETTING::DIFFICULTY_HASH.dup
- end
- def check_var
- THEOLIZED::DIFFSETTING::VAR_ID > 0 &&
- @diff_hash.include?(var_value)
- end
- def var_value
- $game_variables[THEOLIZED::DIFFSETTING::VAR_ID]
- end
- #--------------------------------------------------------------------------
- # * Calculate Total Experience
- #--------------------------------------------------------------------------
- alias theolized_exp_total exp_total
- def exp_total
- check_var ? theolized_exp_total*@diff_hash[var_value][8]/100 : theolized_exp_total
- end
- #--------------------------------------------------------------------------
- # * Calculate Total Gold
- #--------------------------------------------------------------------------
- alias theolized_gold_total gold_total
- def gold_total
- check_var ? theolized_gold_total*@diff_hash[var_value][9]/100 : theolized_gold_total
- end
- end
- # =============================================================================
- # ♫ Scene_Shop ♫
- # =============================================================================
- class Scene_Shop < Scene_MenuBase
- alias theolized_diffset_start start
- def start
- theolized_diffset_start
- @diff_hash = THEOLIZED::DIFFSETTING::DIFFICULTY_HASH.dup
- end
- def check_var
- THEOLIZED::DIFFSETTING::VAR_ID > 0 &&
- @diff_hash.include?(var_value)
- end
- def var_value
- $game_variables[THEOLIZED::DIFFSETTING::VAR_ID]
- end
- #--------------------------------------------------------------------------
- # ♫ Get Purchase Price
- #--------------------------------------------------------------------------
- alias theolized_buy_price buying_price
- def buying_price
- check_var ? theolized_buy_price*@diff_hash[var_value][10]/100 : theolized_buy_price
- end
- #--------------------------------------------------------------------------
- # ♫ Get Sale Price
- #--------------------------------------------------------------------------
- alias theolized_sell_price selling_price
- def selling_price
- check_var ? theolized_sell_price*@diff_hash[var_value][11]/100 : theolized_sell_price
- end
- end
- # =============================================================================
- # ♫ End of Script ♫
- # =============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement