Advertisement
Dekita

plb v1.1

Oct 20th, 2012
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.40 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. =end
  46.  
  47. module Dekita__Stat_Limits
  48.  
  49. # Default limits FOR ACTORS
  50. MHP_Default_Limit = 99999
  51. MMP_Default_Limit = 99999
  52. ATK_Default_Limit = 49
  53. DEF_Default_Limit = 49#9999
  54. MAT_Default_Limit = 49#9999
  55. MDF_Default_Limit = 49#9999
  56. AGI_Default_Limit = 49#9999
  57. LUK_Default_Limit = 49#9999
  58.  
  59.  
  60. # Default limits FOR ENEMIES
  61. MHP_Default_Limit_Enemy = 999_999_999
  62. MMP_Default_Limit_Enemy = 999_999_999
  63. ATK_Default_Limit_Enemy = 999_999
  64. DEF_Default_Limit_Enemy = 999_999
  65. MAT_Default_Limit_Enemy = 999_999
  66. MDF_Default_Limit_Enemy = 999_999
  67. AGI_Default_Limit_Enemy = 999_999
  68. LUK_Default_Limit_Enemy = 999_999
  69.  
  70. # Notetags for class noteboxes
  71. # These change the limits
  72. MHP_Notetag = /<mhp limit: (.*)>/i
  73. MMP_Notetag = /<mmp limit: (.*)>/i
  74. ATK_Notetag = /<atk limit: (.*)>/i
  75. DEF_Notetag = /<def limit: (.*)>/i
  76. MAT_Notetag = /<mat limit: (.*)>/i
  77. MDF_Notetag = /<mdf limit: (.*)>/i
  78. AGI_Notetag = /<agi limit: (.*)>/i
  79. LUK_Notetag = /<luk limit: (.*)>/i
  80.  
  81. # Notetags for equipment/enemies
  82. # These increase their params
  83. MHP_Increase_Notetag = /<mhp: (.*)>/i
  84. MMP_Increase_Notetag = /<mmp: (.*)>/i
  85. ATK_Increase_Notetag = /<atk: (.*)>/i
  86. DEF_Increase_Notetag = /<def: (.*)>/i
  87. MAT_Increase_Notetag = /<mat: (.*)>/i
  88. MDF_Increase_Notetag = /<mdf: (.*)>/i
  89. AGI_Increase_Notetag = /<agi: (.*)>/i
  90. LUK_Increase_Notetag = /<luk: (.*)>/i
  91.  
  92.  
  93. # Do not remove this .
  94. p 'Loaded : DPBz - Param Limit Breaker'
  95. end # module Dekita__Character_Core
  96.  
  97. $imported = {} if $imported.nil?
  98. $imported[:Dekita__Param_Limit_Breaker] = true
  99.  
  100. #==============================================================================
  101. module DataManager
  102. #==============================================================================
  103.  
  104. class <<self; alias load_database_stat_limits_DPBz load_database; end
  105. def self.load_database
  106. load_database_stat_limits_DPBz
  107. load_notetags_stat_limits_DPBz
  108. end
  109.  
  110. def self.load_notetags_stat_limits_DPBz
  111. groups = [$data_weapons, $data_armors, $data_classes, $data_enemies]
  112. for group in groups
  113. for obj in group
  114. next if obj.nil?
  115. obj.load_notetags_stat_limits_DPBz
  116. end
  117. end
  118. end
  119.  
  120. end # DataManager
  121.  
  122. #==============================================================================
  123. class RPG::Class < RPG::BaseItem
  124. #==============================================================================
  125.  
  126. attr_accessor :param_max_DPBz
  127.  
  128. def load_notetags_stat_limits_DPBz
  129. @param_max_DPBz = [0] * 8
  130. @param_max_DPBz[0] = Dekita__Stat_Limits::MHP_Default_Limit
  131. @param_max_DPBz[1] = Dekita__Stat_Limits::MMP_Default_Limit
  132. @param_max_DPBz[2] = Dekita__Stat_Limits::ATK_Default_Limit
  133. @param_max_DPBz[3] = Dekita__Stat_Limits::DEF_Default_Limit
  134. @param_max_DPBz[4] = Dekita__Stat_Limits::MAT_Default_Limit
  135. @param_max_DPBz[5] = Dekita__Stat_Limits::MDF_Default_Limit
  136. @param_max_DPBz[6] = Dekita__Stat_Limits::AGI_Default_Limit
  137. @param_max_DPBz[7] = Dekita__Stat_Limits::LUK_Default_Limit
  138. self.note.split(/[\r\n]+/).each { |line|
  139. case line
  140. when Dekita__Stat_Limits::MHP_Notetag
  141. @param_max_DPBz[0] = $1.to_i
  142. p "Reading : DPBz - Param Limit Breaker - Max MHP Param Note's for #{@name.to_s}"
  143. when Dekita__Stat_Limits::MMP_Notetag
  144. @param_max_DPBz[1] = $1.to_i
  145. p "Reading : DPBz - Param Limit Breaker - Max MMP Param Note's for #{@name.to_s}"
  146. when Dekita__Stat_Limits::ATK_Notetag
  147. @param_max_DPBz[2] = $1.to_i
  148. p "Reading : DPBz - Param Limit Breaker - Max ATK Param Note's for #{@name.to_s}"
  149. when Dekita__Stat_Limits::DEF_Notetag
  150. @param_max_DPBz[3] = $1.to_i
  151. p "Reading : DPBz - Param Limit Breaker - Max DEF Param Note's for #{@name.to_s}"
  152. when Dekita__Stat_Limits::MAT_Notetag
  153. @param_max_DPBz[4] = $1.to_i
  154. p "Reading : DPBz - Param Limit Breaker - Max MAT Param Note's for #{@name.to_s}"
  155. when Dekita__Stat_Limits::MDF_Notetag
  156. @param_max_DPBz[5] = $1.to_i
  157. p "Reading : DPBz - Param Limit Breaker - Max MDF Param Note's for #{@name.to_s}"
  158. when Dekita__Stat_Limits::AGI_Notetag
  159. @param_max_DPBz[6] = $1.to_i
  160. p "Reading : DPBz - Param Limit Breaker - Max AGI Param Note's for #{@name.to_s}"
  161. when Dekita__Stat_Limits::LUK_Notetag
  162. @param_max_DPBz[7] = $1.to_i
  163. p "Reading : DPBz - Param Limit Breaker - Max LUK Param Note's for #{@name.to_s}"
  164. end
  165. } # self.note.split
  166. end
  167.  
  168. end # class RPG::Class < RPG::BaseItem
  169.  
  170. #==============================================================================
  171. class RPG::EquipItem < RPG::BaseItem
  172. #==============================================================================
  173.  
  174. def load_notetags_stat_limits_DPBz
  175. self.note.split(/[\r\n]+/).each { |line|
  176. case line
  177. when Dekita__Stat_Limits::MHP_Increase_Notetag
  178. @params[0] += $1.to_i
  179. p "Reading : DPBz - Param Limit Breaker - MHP Param Note's for #{@name.to_s}"
  180. when Dekita__Stat_Limits::MMP_Increase_Notetag
  181. @params[1] += $1.to_i
  182. p "Reading : DPBz - Param Limit Breaker - MMP Param Note's for #{@name.to_s}"
  183. when Dekita__Stat_Limits::ATK_Increase_Notetag
  184. @params[2] += $1.to_i
  185. p "Reading : DPBz - Param Limit Breaker - ATK Param Note's for #{@name.to_s}"
  186. when Dekita__Stat_Limits::DEF_Increase_Notetag
  187. @params[3] += $1.to_i
  188. p "Reading : DPBz - Param Limit Breaker - DEF Param Note's for #{@name.to_s}"
  189. when Dekita__Stat_Limits::MAT_Increase_Notetag
  190. @params[4] += $1.to_i
  191. p "Reading : DPBz - Param Limit Breaker - MAT Param Note's for #{@name.to_s}"
  192. when Dekita__Stat_Limits::MDF_Increase_Notetag
  193. @params[5] += $1.to_i
  194. p "Reading : DPBz - Param Limit Breaker - MDF Param Note's for #{@name.to_s}"
  195. when Dekita__Stat_Limits::AGI_Increase_Notetag
  196. @params[6] += $1.to_i
  197. p "Reading : DPBz - Param Limit Breaker - AGI Param Note's for #{@name.to_s}"
  198. when Dekita__Stat_Limits::LUK_Increase_Notetag
  199. @params[7] += $1.to_i
  200. p "Reading : DPBz - Param Limit Breaker - LUK Param Note's for #{@name.to_s}"
  201. end
  202. } # self.note.split
  203. end
  204.  
  205. end # class RPG::Class < RPG::BaseItem
  206.  
  207. #==============================================================================
  208. class RPG::Enemy < RPG::BaseItem
  209. #==============================================================================
  210.  
  211. def load_notetags_stat_limits_DPBz
  212. self.note.split(/[\r\n]+/).each { |line|
  213. case line
  214. when Dekita__Stat_Limits::MHP_Increase_Notetag
  215. @params[0] = $1.to_i
  216. p "Reading : DPBz - Param Limit Breaker - Max MHP Param Note's for #{@name.to_s}"
  217. when Dekita__Stat_Limits::MMP_Increase_Notetag
  218. @params[1] = $1.to_i
  219. p "Reading : DPBz - Param Limit Breaker - Max MMP Param Note's for #{@name.to_s}"
  220. when Dekita__Stat_Limits::ATK_Increase_Notetag
  221. @params[2] = $1.to_i
  222. p "Reading : DPBz - Param Limit Breaker - Max ATK Param Note's for #{@name.to_s}"
  223. when Dekita__Stat_Limits::DEF_Increase_Notetag
  224. @params[3] = $1.to_i
  225. p "Reading : DPBz - Param Limit Breaker - Max DEF Param Note's for #{@name.to_s}"
  226. when Dekita__Stat_Limits::MAT_Increase_Notetag
  227. @params[4] = $1.to_i
  228. p "Reading : DPBz - Param Limit Breaker - Max MAT Param Note's for #{@name.to_s}"
  229. when Dekita__Stat_Limits::MDF_Increase_Notetag
  230. @params[5] = $1.to_i
  231. p "Reading : DPBz - Param Limit Breaker - Max MDF Param Note's for #{@name.to_s}"
  232. when Dekita__Stat_Limits::AGI_Increase_Notetag
  233. @params[6] = $1.to_i
  234. p "Reading : DPBz - Param Limit Breaker - Max AGI Param Note's for #{@name.to_s}"
  235. when Dekita__Stat_Limits::LUK_Increase_Notetag
  236. @params[7] = $1.to_i
  237. p "Reading : DPBz - Param Limit Breaker - Max LUK Param Note's for #{@name.to_s}"
  238. end
  239. } # self.note.split
  240. end
  241.  
  242. end # class RPG::Class < RPG::BaseItem
  243.  
  244.  
  245. #==============================================================================
  246. class Game_Actor < Game_Battler
  247. #==============================================================================
  248.  
  249. def param_max(param_id)
  250. return self.class.param_max_DPBz[0] if param_id == 0 # MHP
  251. return self.class.param_max_DPBz[1] if param_id == 1 # MMP
  252. return self.class.param_max_DPBz[2] if param_id == 2 # ATK
  253. return self.class.param_max_DPBz[3] if param_id == 3 # DEF
  254. return self.class.param_max_DPBz[4] if param_id == 4 # MAT
  255. return self.class.param_max_DPBz[5] if param_id == 5 # MDF
  256. return self.class.param_max_DPBz[6] if param_id == 6 # AGI
  257. return self.class.param_max_DPBz[7] if param_id == 7 # LUK
  258. return super
  259. end
  260.  
  261. end # class Game_Actor < Game_Battler
  262.  
  263. #==============================================================================
  264. class Game_Enemy < Game_Battler
  265. #==============================================================================
  266.  
  267. def param_max(param_id)
  268. return Dekita__Stat_Limits::MHP_Default_Limit_Enemy if param_id == 0 # MHP
  269. return Dekita__Stat_Limits::MMP_Default_Limit_Enemy if param_id == 1 # MMP
  270. return Dekita__Stat_Limits::ATK_Default_Limit_Enemy if param_id == 2 # ATK
  271. return Dekita__Stat_Limits::DEF_Default_Limit_Enemy if param_id == 3 # DEF
  272. return Dekita__Stat_Limits::MAT_Default_Limit_Enemy if param_id == 4 # MAT
  273. return Dekita__Stat_Limits::MDF_Default_Limit_Enemy if param_id == 5 # MDF
  274. return Dekita__Stat_Limits::AGI_Default_Limit_Enemy if param_id == 6 # AGI
  275. return Dekita__Stat_Limits::LUK_Default_Limit_Enemy if param_id == 7 # LUK
  276. return super
  277. end
  278.  
  279. end # Game_Enemy < Game_Battler
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement