Advertisement
Dekita

param limit breaker

Oct 19th, 2012
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.69 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.0
  3. ★ Param Limit Breaker™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. Simple script to allow for higher stats than normally allowed, e.g 1,000,000 hp
  9. use notetags in the class noteboxes to set different max tp limits for each class.
  10.  
  11. ================================================================================
  12. FEATURES:
  13. ==========
  14. - Big Numbers ^_^
  15.  
  16. ================================================================================
  17. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  18. ================================================================================
  19. 1. You must give credit to "Dekita"
  20. 2. You are NOT allowed to repost this script.(or modified versions)
  21. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  22. 4. You are NOT allowed to use this script for Commercial games.
  23. 5. ENJOY!
  24.  
  25. "FINE PRINT"
  26. By using this script you hereby agree to the above terms and conditions,
  27. if any violation of the above terms occurs "legal action" may be taken.
  28. Not understanding the above terms and conditions does NOT mean that
  29. they do not apply to you.
  30. If you wish to discuss the terms and conditions in further detail you can
  31. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  32.  
  33. ================================================================================
  34. History:
  35. =========
  36. D /M /Y
  37. 10/10/2o12 - Started and finished.
  38.  
  39. ================================================================================
  40. INSTRUCTIONS:
  41. ==============
  42. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  43.  
  44. ================================================================================
  45. Script Calls:
  46. ==============
  47. =end
  48.  
  49. module Dekita__Stat_Limits
  50.  
  51. MHP_Default_Limit = 9999
  52. MHP_Notetag = /<mhp limit: (.*)>/i
  53.  
  54. MMP_Default_Limit = 9999
  55. MMP_Notetag = /<mmp limit: (.*)>/i
  56.  
  57. ATK_Default_Limit = 50
  58. ATK_Notetag = /<atk limit: (.*)>/i
  59.  
  60. DEF_Default_Limit = 50
  61. DEF_Notetag = /<def limit: (.*)>/i
  62.  
  63. MAT_Default_Limit = 50
  64. MAT_Notetag = /<mat limit: (.*)>/i
  65.  
  66. MDF_Default_Limit = 50
  67. MDF_Notetag = /<mdf limit: (.*)>/i
  68.  
  69. AGI_Default_Limit = 50
  70. AGI_Notetag = /<agi limit: (.*)>/i
  71.  
  72. LUK_Default_Limit = 50
  73. LUK_Notetag = /<luk limit: (.*)>/i
  74.  
  75. # Do not remove this .
  76. p 'Loaded : DPBz - Param Limit Breaker'
  77. end # module Dekita__Character_Core
  78. #===============================================================================#
  79. # #
  80. # - CUSTOMISATION END - #
  81. # #
  82. #===============================================================================#
  83. # http://dekitarpg.wordpress.com/
  84. #===============================================================================#
  85. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  86. # YES?\.\. #
  87. # OMG, REALLY? #
  88. # WELL SLAP MY FACE AND CALL ME A DRAGON.\..\.. #
  89. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  90. #===============================================================================#
  91.  
  92. $imported = {} if $imported.nil?
  93. $imported[:Dekita__Param_Limit_Breaker] = true
  94.  
  95. #==============================================================================
  96. module DataManager
  97. #==============================================================================
  98.  
  99. class <<self; alias load_database_stat_limits_DPBz load_database; end
  100. def self.load_database
  101. load_database_stat_limits_DPBz
  102. load_notetags_stat_limits_DPBz
  103. end
  104.  
  105. def self.load_notetags_stat_limits_DPBz
  106. groups = [$data_classes]
  107. for group in groups
  108. for obj in group
  109. next if obj.nil?
  110. obj.load_notetags_stat_limits_DPBz
  111. end
  112. end
  113. end
  114.  
  115. end # DataManager
  116.  
  117. #==============================================================================
  118. class RPG::Class < RPG::BaseItem
  119. #==============================================================================
  120.  
  121. attr_accessor :param_max_DPBz
  122.  
  123. def load_notetags_stat_limits_DPBz
  124. @param_max_DPBz = [0] * 8
  125. @param_max_DPBz[0] = Dekita__Stat_Limits::MHP_Default_Limit
  126. @param_max_DPBz[1] = Dekita__Stat_Limits::MMP_Default_Limit
  127. @param_max_DPBz[2] = Dekita__Stat_Limits::ATK_Default_Limit
  128. @param_max_DPBz[3] = Dekita__Stat_Limits::DEF_Default_Limit
  129. @param_max_DPBz[4] = Dekita__Stat_Limits::MAT_Default_Limit
  130. @param_max_DPBz[5] = Dekita__Stat_Limits::MDF_Default_Limit
  131. @param_max_DPBz[6] = Dekita__Stat_Limits::AGI_Default_Limit
  132. @param_max_DPBz[7] = Dekita__Stat_Limits::LUK_Default_Limit
  133. self.note.split(/[\r\n]+/).each { |line|
  134. case line
  135. when Dekita__Stat_Limits::MHP_Notetag
  136. @param_max_DPBz[0] = $1.to_i
  137. p "Loaded : DPBz - Stat Limits - Max MHP Param Note's for #{@name.to_s}"
  138. when Dekita__Stat_Limits::MMP_Notetag
  139. @param_max_DPBz[1] = $1.to_i
  140. p "Loaded : DPBz - Stat Limits - Max MMP Param Note's for #{@name.to_s}"
  141. when Dekita__Stat_Limits::ATK_Notetag
  142. @param_max_DPBz[2] = $1.to_i
  143. p "Loaded : DPBz - Stat Limits - Max ATK Param Note's for #{@name.to_s}"
  144. when Dekita__Stat_Limits::DEF_Notetag
  145. @param_max_DPBz[3] = $1.to_i
  146. p "Loaded : DPBz - Stat Limits - Max DEF Param Note's for #{@name.to_s}"
  147. when Dekita__Stat_Limits::MAT_Notetag
  148. @param_max_DPBz[4] = $1.to_i
  149. p "Loaded : DPBz - Stat Limits - Max MAT Param Note's for #{@name.to_s}"
  150. when Dekita__Stat_Limits::MDF_Notetag
  151. @param_max_DPBz[5] = $1.to_i
  152. p "Loaded : DPBz - Stat Limits - Max MDF Param Note's for #{@name.to_s}"
  153. when Dekita__Stat_Limits::AGI_Notetag
  154. @param_max_DPBz[6] = $1.to_i
  155. p "Loaded : DPBz - Stat Limits - Max AGI Param Note's for #{@name.to_s}"
  156. when Dekita__Stat_Limits::LUK_Notetag
  157. @param_max_DPBz[7] = $1.to_i
  158. p "Loaded : DPBz - Stat Limits - Max LUK Param Note's for #{@name.to_s}"
  159. end
  160. } # self.note.split
  161. end
  162.  
  163. end # class RPG::Class < RPG::BaseItem
  164.  
  165. #==============================================================================
  166. class Game_Actor < Game_Battler
  167. #==============================================================================
  168.  
  169. def param_max(param_id)
  170. return self.class.param_max_DPBz[0] if param_id == 0 # MHP
  171. return self.class.param_max_DPBz[1] if param_id == 1 # MMP
  172. return self.class.param_max_DPBz[2] if param_id == 2 # ATK
  173. return self.class.param_max_DPBz[3] if param_id == 3 # DEF
  174. return self.class.param_max_DPBz[4] if param_id == 4 # MAT
  175. return self.class.param_max_DPBz[5] if param_id == 5 # MDF
  176. return self.class.param_max_DPBz[6] if param_id == 6 # AGI
  177. return self.class.param_max_DPBz[7] if param_id == 7 # LUK
  178. return super
  179. end
  180.  
  181. end # class Game_Actor < Game_Battler
  182.  
  183. #===============================================================================#
  184. # - SCRIPT END - #
  185. #===============================================================================#
  186. # http://dekitarpg.wordpress.com/ #
  187. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement