Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin =========================================================================
- Dekita's v1.1
- ★ Param Limit Breaker™ ★
- ================================================================================
- Script Information:
- ====================
- Simple script to allow for higher stats than normally allowed, e.g 1,000,000 hp
- use notetags in the class noteboxes to set different max tp limits for each class.
- ================================================================================
- FEATURES:
- ==========
- - Big Numbers ^_^
- ================================================================================
- ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- ================================================================================
- 1. You must give credit to "Dekita"
- 2. You are NOT allowed to repost this script.(or modified versions)
- 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
- 4. You are NOT allowed to use this script for Commercial games.
- 5. ENJOY!
- "FINE PRINT"
- By using this script you hereby agree to the above terms and conditions,
- if any violation of the above terms occurs "legal action" may be taken.
- Not understanding the above terms and conditions does NOT mean that
- they do not apply to you.
- If you wish to discuss the terms and conditions in further detail you can
- contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
- ================================================================================
- History:
- =========
- D /M /Y
- 10/10/2o12 - Started and finished.
- ================================================================================
- INSTRUCTIONS:
- ==============
- Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
- ================================================================================
- =end
- module Dekita__Stat_Limits
- # Default limits FOR ACTORS
- MHP_Default_Limit = 99999
- MMP_Default_Limit = 99999
- ATK_Default_Limit = 999#9
- DEF_Default_Limit = 999#9
- MAT_Default_Limit = 999#9
- MDF_Default_Limit = 999#9
- AGI_Default_Limit = 999#9
- LUK_Default_Limit = 999#9
- # Default limits FOR ENEMIES
- MHP_Default_Limit_Enemy = 999_999_999
- MMP_Default_Limit_Enemy = 999_999_999
- ATK_Default_Limit_Enemy = 999_999
- DEF_Default_Limit_Enemy = 999_999
- MAT_Default_Limit_Enemy = 999_999
- MDF_Default_Limit_Enemy = 999_999
- AGI_Default_Limit_Enemy = 999_999
- LUK_Default_Limit_Enemy = 999_999
- # Notetags for class noteboxes
- # These change the limits
- MHP_Notetag = /<mhp limit: (.*)>/i
- MMP_Notetag = /<mmp limit: (.*)>/i
- ATK_Notetag = /<atk limit: (.*)>/i
- DEF_Notetag = /<def limit: (.*)>/i
- MAT_Notetag = /<mat limit: (.*)>/i
- MDF_Notetag = /<mdf limit: (.*)>/i
- AGI_Notetag = /<agi limit: (.*)>/i
- LUK_Notetag = /<luk limit: (.*)>/i
- # Notetags for equipment/enemies
- # These increase their params
- MHP_Increase_Notetag = /<mhp: (.*)>/i
- MMP_Increase_Notetag = /<mmp: (.*)>/i
- ATK_Increase_Notetag = /<atk: (.*)>/i
- DEF_Increase_Notetag = /<def: (.*)>/i
- MAT_Increase_Notetag = /<mat: (.*)>/i
- MDF_Increase_Notetag = /<mdf: (.*)>/i
- AGI_Increase_Notetag = /<agi: (.*)>/i
- LUK_Increase_Notetag = /<luk: (.*)>/i
- # These increase their params
- MAX_MHP_Increase_Notetag = /<maxmhp: (.*)>/i
- MAX_MMP_Increase_Notetag = /<maxmmp: (.*)>/i
- MAX_ATK_Increase_Notetag = /<maxatk: (.*)>/i
- MAX_DEF_Increase_Notetag = /<maxdef: (.*)>/i
- MAX_MAT_Increase_Notetag = /<maxmat: (.*)>/i
- MAX_MDF_Increase_Notetag = /<maxmdf: (.*)>/i
- MAX_AGI_Increase_Notetag = /<maxagi: (.*)>/i
- MAX_LUK_Increase_Notetag = /<maxluk: (.*)>/i
- # Do not remove this .
- p 'Loaded : DPBz - Param Limit Breaker'
- end # module Dekita__Character_Core
- $imported = {} if $imported.nil?
- $imported[:Dekita__Param_Limit_Breaker] = true
- #==============================================================================
- module DataManager
- #==============================================================================
- class <<self; alias load_database_stat_limits_DPBz load_database; end
- def self.load_database
- load_database_stat_limits_DPBz
- load_notetags_stat_limits_DPBz
- end
- def self.load_notetags_stat_limits_DPBz
- groups = [$data_weapons, $data_armors, $data_classes, $data_enemies]
- for group in groups
- for obj in group
- next if obj.nil?
- obj.load_notetags_stat_limits_DPBz
- end
- end
- end
- end # DataManager
- #==============================================================================
- class RPG::Class < RPG::BaseItem
- #==============================================================================
- attr_accessor :param_max_DPBz
- def load_notetags_stat_limits_DPBz
- @param_max_DPBz = [0] * 8
- @param_max_DPBz[0] = Dekita__Stat_Limits::MHP_Default_Limit
- @param_max_DPBz[1] = Dekita__Stat_Limits::MMP_Default_Limit
- @param_max_DPBz[2] = Dekita__Stat_Limits::ATK_Default_Limit
- @param_max_DPBz[3] = Dekita__Stat_Limits::DEF_Default_Limit
- @param_max_DPBz[4] = Dekita__Stat_Limits::MAT_Default_Limit
- @param_max_DPBz[5] = Dekita__Stat_Limits::MDF_Default_Limit
- @param_max_DPBz[6] = Dekita__Stat_Limits::AGI_Default_Limit
- @param_max_DPBz[7] = Dekita__Stat_Limits::LUK_Default_Limit
- self.note.split(/[\r\n]+/).each { |line|
- case line
- when Dekita__Stat_Limits::MHP_Notetag
- @param_max_DPBz[0] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MHP Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MMP_Notetag
- @param_max_DPBz[1] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MMP Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::ATK_Notetag
- @param_max_DPBz[2] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max ATK Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::DEF_Notetag
- @param_max_DPBz[3] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max DEF Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MAT_Notetag
- @param_max_DPBz[4] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MAT Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MDF_Notetag
- @param_max_DPBz[5] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MDF Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::AGI_Notetag
- @param_max_DPBz[6] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max AGI Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::LUK_Notetag
- @param_max_DPBz[7] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max LUK Param Note's for #{@name.to_s}"
- end
- } # self.note.split
- end
- end # class RPG::Class < RPG::BaseItem
- #==============================================================================
- class RPG::EquipItem < RPG::BaseItem
- #==============================================================================
- attr_accessor :max_param_modies
- def load_notetags_stat_limits_DPBz
- @max_param_modies = [0] * 8
- self.note.split(/[\r\n]+/).each { |line|
- case line
- when Dekita__Stat_Limits::MHP_Increase_Notetag
- @params[0] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - MHP Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MMP_Increase_Notetag
- @params[1] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - MMP Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::ATK_Increase_Notetag
- @params[2] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - ATK Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::DEF_Increase_Notetag
- @params[3] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - DEF Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MAT_Increase_Notetag
- @params[4] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - MAT Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MDF_Increase_Notetag
- @params[5] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - MDF Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::AGI_Increase_Notetag
- @params[6] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - AGI Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::LUK_Increase_Notetag
- @params[7] += $1.to_i
- p "Reading : DPBz - Param Limit Breaker - LUK Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MAX_MHP_Increase_Notetag
- @max_param_modies[0] += $1.to_i
- when Dekita__Stat_Limits::MAX_MMP_Increase_Notetag
- @max_param_modies[1] += $1.to_i
- when Dekita__Stat_Limits::MAX_ATK_Increase_Notetag
- @max_param_modies[2] += $1.to_i
- when Dekita__Stat_Limits::MAX_DEF_Increase_Notetag
- @max_param_modies[3] += $1.to_i
- when Dekita__Stat_Limits::MAX_MAT_Increase_Notetag
- @max_param_modies[4] += $1.to_i
- when Dekita__Stat_Limits::MAX_MDF_Increase_Notetag
- @max_param_modies[5] += $1.to_i
- when Dekita__Stat_Limits::MAX_AGI_Increase_Notetag
- @max_param_modies[6] += $1.to_i
- when Dekita__Stat_Limits::MAX_LUK_Increase_Notetag
- @max_param_modies[7] += $1.to_i
- end
- } # self.note.split
- end
- end # class RPG::Class < RPG::BaseItem
- #==============================================================================
- class RPG::Enemy < RPG::BaseItem
- #==============================================================================
- def load_notetags_stat_limits_DPBz
- self.note.split(/[\r\n]+/).each { |line|
- case line
- when Dekita__Stat_Limits::MHP_Increase_Notetag
- @params[0] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MHP Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MMP_Increase_Notetag
- @params[1] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MMP Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::ATK_Increase_Notetag
- @params[2] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max ATK Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::DEF_Increase_Notetag
- @params[3] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max DEF Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MAT_Increase_Notetag
- @params[4] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MAT Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::MDF_Increase_Notetag
- @params[5] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max MDF Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::AGI_Increase_Notetag
- @params[6] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max AGI Param Note's for #{@name.to_s}"
- when Dekita__Stat_Limits::LUK_Increase_Notetag
- @params[7] = $1.to_i
- p "Reading : DPBz - Param Limit Breaker - Max LUK Param Note's for #{@name.to_s}"
- end
- } # self.note.split
- end
- end # class RPG::Class < RPG::BaseItem
- #==============================================================================
- class Game_Actor < Game_Battler
- #==============================================================================
- def param_max(param_id)
- return self.class.param_max_DPBz[0] + param_limit_equip_modies(param_id)
- return super if param_id >= 8
- end
- def param_limit_equip_modies(param_id)
- val = 0.0
- val += equips.compact.inject(0) {|r, i|
- r += i.max_param_modies[param_id] rescue 0 }
- end
- end # class Game_Actor < Game_Battler
- #==============================================================================
- class Game_Enemy < Game_Battler
- #==============================================================================
- def param_max(param_id)
- return Dekita__Stat_Limits::MHP_Default_Limit_Enemy if param_id == 0 # MHP
- return Dekita__Stat_Limits::MMP_Default_Limit_Enemy if param_id == 1 # MMP
- return Dekita__Stat_Limits::ATK_Default_Limit_Enemy if param_id == 2 # ATK
- return Dekita__Stat_Limits::DEF_Default_Limit_Enemy if param_id == 3 # DEF
- return Dekita__Stat_Limits::MAT_Default_Limit_Enemy if param_id == 4 # MAT
- return Dekita__Stat_Limits::MDF_Default_Limit_Enemy if param_id == 5 # MDF
- return Dekita__Stat_Limits::AGI_Default_Limit_Enemy if param_id == 6 # AGI
- return Dekita__Stat_Limits::LUK_Default_Limit_Enemy if param_id == 7 # LUK
- return super
- end
- end # Game_Enemy < Game_Battler
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement