Advertisement
Dekita

asd

Nov 19th, 2012
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.33 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.1
  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 = 999#9
  53. DEF_Default_Limit = 999#9
  54. MAT_Default_Limit = 999#9
  55. MDF_Default_Limit = 999#9
  56. AGI_Default_Limit = 999#9
  57. LUK_Default_Limit = 999#9
  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. # These increase their params
  93. MAX_MHP_Increase_Notetag = /<maxmhp: (.*)>/i
  94. MAX_MMP_Increase_Notetag = /<maxmmp: (.*)>/i
  95. MAX_ATK_Increase_Notetag = /<maxatk: (.*)>/i
  96. MAX_DEF_Increase_Notetag = /<maxdef: (.*)>/i
  97. MAX_MAT_Increase_Notetag = /<maxmat: (.*)>/i
  98. MAX_MDF_Increase_Notetag = /<maxmdf: (.*)>/i
  99. MAX_AGI_Increase_Notetag = /<maxagi: (.*)>/i
  100. MAX_LUK_Increase_Notetag = /<maxluk: (.*)>/i
  101.  
  102. # Do not remove this .
  103. p 'Loaded : DPBz - Param Limit Breaker'
  104. end # module Dekita__Character_Core
  105.  
  106. $imported = {} if $imported.nil?
  107. $imported[:Dekita__Param_Limit_Breaker] = true
  108.  
  109. #==============================================================================
  110. module DataManager
  111. #==============================================================================
  112.  
  113. class <<self; alias load_database_stat_limits_DPBz load_database; end
  114. def self.load_database
  115. load_database_stat_limits_DPBz
  116. load_notetags_stat_limits_DPBz
  117. end
  118.  
  119. def self.load_notetags_stat_limits_DPBz
  120. groups = [$data_weapons, $data_armors, $data_classes, $data_enemies]
  121. for group in groups
  122. for obj in group
  123. next if obj.nil?
  124. obj.load_notetags_stat_limits_DPBz
  125. end
  126. end
  127. end
  128.  
  129. end # DataManager
  130.  
  131. #==============================================================================
  132. class RPG::Class < RPG::BaseItem
  133. #==============================================================================
  134.  
  135. attr_accessor :param_max_DPBz
  136.  
  137. def load_notetags_stat_limits_DPBz
  138. @param_max_DPBz = [0] * 8
  139. @param_max_DPBz[0] = Dekita__Stat_Limits::MHP_Default_Limit
  140. @param_max_DPBz[1] = Dekita__Stat_Limits::MMP_Default_Limit
  141. @param_max_DPBz[2] = Dekita__Stat_Limits::ATK_Default_Limit
  142. @param_max_DPBz[3] = Dekita__Stat_Limits::DEF_Default_Limit
  143. @param_max_DPBz[4] = Dekita__Stat_Limits::MAT_Default_Limit
  144. @param_max_DPBz[5] = Dekita__Stat_Limits::MDF_Default_Limit
  145. @param_max_DPBz[6] = Dekita__Stat_Limits::AGI_Default_Limit
  146. @param_max_DPBz[7] = Dekita__Stat_Limits::LUK_Default_Limit
  147. self.note.split(/[\r\n]+/).each { |line|
  148. case line
  149. when Dekita__Stat_Limits::MHP_Notetag
  150. @param_max_DPBz[0] = $1.to_i
  151. p "Reading : DPBz - Param Limit Breaker - Max MHP Param Note's for #{@name.to_s}"
  152. when Dekita__Stat_Limits::MMP_Notetag
  153. @param_max_DPBz[1] = $1.to_i
  154. p "Reading : DPBz - Param Limit Breaker - Max MMP Param Note's for #{@name.to_s}"
  155. when Dekita__Stat_Limits::ATK_Notetag
  156. @param_max_DPBz[2] = $1.to_i
  157. p "Reading : DPBz - Param Limit Breaker - Max ATK Param Note's for #{@name.to_s}"
  158. when Dekita__Stat_Limits::DEF_Notetag
  159. @param_max_DPBz[3] = $1.to_i
  160. p "Reading : DPBz - Param Limit Breaker - Max DEF Param Note's for #{@name.to_s}"
  161. when Dekita__Stat_Limits::MAT_Notetag
  162. @param_max_DPBz[4] = $1.to_i
  163. p "Reading : DPBz - Param Limit Breaker - Max MAT Param Note's for #{@name.to_s}"
  164. when Dekita__Stat_Limits::MDF_Notetag
  165. @param_max_DPBz[5] = $1.to_i
  166. p "Reading : DPBz - Param Limit Breaker - Max MDF Param Note's for #{@name.to_s}"
  167. when Dekita__Stat_Limits::AGI_Notetag
  168. @param_max_DPBz[6] = $1.to_i
  169. p "Reading : DPBz - Param Limit Breaker - Max AGI Param Note's for #{@name.to_s}"
  170. when Dekita__Stat_Limits::LUK_Notetag
  171. @param_max_DPBz[7] = $1.to_i
  172. p "Reading : DPBz - Param Limit Breaker - Max LUK Param Note's for #{@name.to_s}"
  173. end
  174. } # self.note.split
  175. end
  176.  
  177. end # class RPG::Class < RPG::BaseItem
  178.  
  179. #==============================================================================
  180. class RPG::EquipItem < RPG::BaseItem
  181. #==============================================================================
  182.  
  183. attr_accessor :max_param_modies
  184.  
  185. def load_notetags_stat_limits_DPBz
  186. @max_param_modies = [0] * 8
  187. self.note.split(/[\r\n]+/).each { |line|
  188. case line
  189. when Dekita__Stat_Limits::MHP_Increase_Notetag
  190. @params[0] += $1.to_i
  191. p "Reading : DPBz - Param Limit Breaker - MHP Param Note's for #{@name.to_s}"
  192. when Dekita__Stat_Limits::MMP_Increase_Notetag
  193. @params[1] += $1.to_i
  194. p "Reading : DPBz - Param Limit Breaker - MMP Param Note's for #{@name.to_s}"
  195. when Dekita__Stat_Limits::ATK_Increase_Notetag
  196. @params[2] += $1.to_i
  197. p "Reading : DPBz - Param Limit Breaker - ATK Param Note's for #{@name.to_s}"
  198. when Dekita__Stat_Limits::DEF_Increase_Notetag
  199. @params[3] += $1.to_i
  200. p "Reading : DPBz - Param Limit Breaker - DEF Param Note's for #{@name.to_s}"
  201. when Dekita__Stat_Limits::MAT_Increase_Notetag
  202. @params[4] += $1.to_i
  203. p "Reading : DPBz - Param Limit Breaker - MAT Param Note's for #{@name.to_s}"
  204. when Dekita__Stat_Limits::MDF_Increase_Notetag
  205. @params[5] += $1.to_i
  206. p "Reading : DPBz - Param Limit Breaker - MDF Param Note's for #{@name.to_s}"
  207. when Dekita__Stat_Limits::AGI_Increase_Notetag
  208. @params[6] += $1.to_i
  209. p "Reading : DPBz - Param Limit Breaker - AGI Param Note's for #{@name.to_s}"
  210. when Dekita__Stat_Limits::LUK_Increase_Notetag
  211. @params[7] += $1.to_i
  212. p "Reading : DPBz - Param Limit Breaker - LUK Param Note's for #{@name.to_s}"
  213. when Dekita__Stat_Limits::MAX_MHP_Increase_Notetag
  214. @max_param_modies[0] += $1.to_i
  215. when Dekita__Stat_Limits::MAX_MMP_Increase_Notetag
  216. @max_param_modies[1] += $1.to_i
  217. when Dekita__Stat_Limits::MAX_ATK_Increase_Notetag
  218. @max_param_modies[2] += $1.to_i
  219. when Dekita__Stat_Limits::MAX_DEF_Increase_Notetag
  220. @max_param_modies[3] += $1.to_i
  221. when Dekita__Stat_Limits::MAX_MAT_Increase_Notetag
  222. @max_param_modies[4] += $1.to_i
  223. when Dekita__Stat_Limits::MAX_MDF_Increase_Notetag
  224. @max_param_modies[5] += $1.to_i
  225. when Dekita__Stat_Limits::MAX_AGI_Increase_Notetag
  226. @max_param_modies[6] += $1.to_i
  227. when Dekita__Stat_Limits::MAX_LUK_Increase_Notetag
  228. @max_param_modies[7] += $1.to_i
  229. end
  230. } # self.note.split
  231. end
  232.  
  233. end # class RPG::Class < RPG::BaseItem
  234.  
  235. #==============================================================================
  236. class RPG::Enemy < RPG::BaseItem
  237. #==============================================================================
  238.  
  239. def load_notetags_stat_limits_DPBz
  240. self.note.split(/[\r\n]+/).each { |line|
  241. case line
  242. when Dekita__Stat_Limits::MHP_Increase_Notetag
  243. @params[0] = $1.to_i
  244. p "Reading : DPBz - Param Limit Breaker - Max MHP Param Note's for #{@name.to_s}"
  245. when Dekita__Stat_Limits::MMP_Increase_Notetag
  246. @params[1] = $1.to_i
  247. p "Reading : DPBz - Param Limit Breaker - Max MMP Param Note's for #{@name.to_s}"
  248. when Dekita__Stat_Limits::ATK_Increase_Notetag
  249. @params[2] = $1.to_i
  250. p "Reading : DPBz - Param Limit Breaker - Max ATK Param Note's for #{@name.to_s}"
  251. when Dekita__Stat_Limits::DEF_Increase_Notetag
  252. @params[3] = $1.to_i
  253. p "Reading : DPBz - Param Limit Breaker - Max DEF Param Note's for #{@name.to_s}"
  254. when Dekita__Stat_Limits::MAT_Increase_Notetag
  255. @params[4] = $1.to_i
  256. p "Reading : DPBz - Param Limit Breaker - Max MAT Param Note's for #{@name.to_s}"
  257. when Dekita__Stat_Limits::MDF_Increase_Notetag
  258. @params[5] = $1.to_i
  259. p "Reading : DPBz - Param Limit Breaker - Max MDF Param Note's for #{@name.to_s}"
  260. when Dekita__Stat_Limits::AGI_Increase_Notetag
  261. @params[6] = $1.to_i
  262. p "Reading : DPBz - Param Limit Breaker - Max AGI Param Note's for #{@name.to_s}"
  263. when Dekita__Stat_Limits::LUK_Increase_Notetag
  264. @params[7] = $1.to_i
  265. p "Reading : DPBz - Param Limit Breaker - Max LUK Param Note's for #{@name.to_s}"
  266. end
  267. } # self.note.split
  268. end
  269.  
  270. end # class RPG::Class < RPG::BaseItem
  271.  
  272. #==============================================================================
  273. class Game_Actor < Game_Battler
  274. #==============================================================================
  275.  
  276. def param_max(param_id)
  277. return self.class.param_max_DPBz[0] + param_limit_equip_modies(param_id)
  278. return super if param_id >= 8
  279. end
  280.  
  281. def param_limit_equip_modies(param_id)
  282. val = 0.0
  283. val += equips.compact.inject(0) {|r, i|
  284. r += i.max_param_modies[param_id] rescue 0 }
  285. end
  286.  
  287.  
  288.  
  289. end # class Game_Actor < Game_Battler
  290.  
  291. #==============================================================================
  292. class Game_Enemy < Game_Battler
  293. #==============================================================================
  294.  
  295. def param_max(param_id)
  296. return Dekita__Stat_Limits::MHP_Default_Limit_Enemy if param_id == 0 # MHP
  297. return Dekita__Stat_Limits::MMP_Default_Limit_Enemy if param_id == 1 # MMP
  298. return Dekita__Stat_Limits::ATK_Default_Limit_Enemy if param_id == 2 # ATK
  299. return Dekita__Stat_Limits::DEF_Default_Limit_Enemy if param_id == 3 # DEF
  300. return Dekita__Stat_Limits::MAT_Default_Limit_Enemy if param_id == 4 # MAT
  301. return Dekita__Stat_Limits::MDF_Default_Limit_Enemy if param_id == 5 # MDF
  302. return Dekita__Stat_Limits::AGI_Default_Limit_Enemy if param_id == 6 # AGI
  303. return Dekita__Stat_Limits::LUK_Default_Limit_Enemy if param_id == 7 # LUK
  304. return super
  305. end
  306.  
  307. end # Game_Enemy < Game_Battler
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement