Advertisement
Dekita

Perfect EXP Curves v1.0

Aug 29th, 2012
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 10.94 KB | None | 0 0
  1. #Dekita's=======================================================================
  2. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  3. #===============================================================================
  4. #                                                                          v1.0
  5. #                             ★ Perfect EXP Curve™ ★
  6. #
  7. #===============================================================================
  8. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  9. #===============================================================================
  10. #
  11. # -- Last updated: 22/08/2012 <-(D/M/Y)
  12. #
  13. # -- Difficulty: Plug'n'play - (Easy)
  14. #
  15. # -- Customisation: Like a Pimped out ride! - (Very Low)
  16. #
  17. # -- Requires: N/A
  18. #
  19. # -- Recommended: N/A
  20. #
  21. # -- Compatable:  RPG Maker VX Ace ONLY!
  22. #                
  23. #===============================================================================
  24. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  25. #===============================================================================
  26. #===============================================================================
  27. # ☆ Script Information:
  28. #=======================
  29. # As you may well know the default exp curve system in RPG Maker VX Ace is not the
  30. # most dynamic exp system...
  31. # Below is a chart to show the minimum and maximum values that you can acheive
  32. # by using the default system
  33.                       #---------------# #---------------#
  34.                       # Basis 10 - 50 # # extra  0 - 40 #
  35.                       #---------------# #---------------#
  36.                       # Acc A 10 - 50 # # Acc B 10 - 50 #
  37.                       #---------------# #---------------#
  38.                      
  39.             #-----------------------#     #-----------------------#
  40.             # Exp using min values  #     # Exp using max values  #
  41.             #-----------------------#     #-----------------------#
  42.             # Level 10 = 1400       #     # Level 10 = 10,569     #
  43.             # Level 25 = 17,782     #     # Level 25 = 172,449    #
  44.             # Level 50 = 89,936     #     # Level 50 = 1,319,088  #
  45.             # Level 99 = 287,815    #     # Level 99 = 7,738,286  #
  46.             #-----------------------#     #-----------------------#
  47.            
  48. # Via the default system is is very difficult to acheive lets say a very low
  49. # amount of exp needed at low levels and a very high amount needed at higher
  50. # levels or a set amoount of exp per level
  51. # e.g lv1 - lv2 = 100 exp , lv2 - lv3 = 100 exp, lv3 - lv4 = 100 exp...
  52. # with this script you can acheive a vast number of unique exp curves.
  53. #
  54. # NOTE: if you dont insert a notetag into [x] class then [x] class will use
  55. # the default exp curve defined in the database under the class tab.
  56. #===============================================================================
  57. #===============================================================================
  58. # ☆ TERMS OF USE:
  59. #===============================================================================
  60. #
  61. # 1. You must give credit to Dekita.
  62. #
  63. # 2. This script is for NON-Commercial use ONLY!*
  64. #
  65. # 3. You CANNOT give credit to yourself for Re-posting this script
  66. #    or Posting a modified version.*
  67. #
  68. # 4. Do not Re-Distribute this script.
  69. #
  70. # 5. You are NOT allowed to convert this script to any other engine,
  71. #    E.G converting it from RGSS3 into RGSS2.*
  72. #
  73. # 6. ENJOY!
  74. #
  75. #-------------------------------------------------------------------------------
  76. # * = Unless permissions are given by Dekita. < e-mail DekitaRPG@gmail.com
  77. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  78. #===============================================================================
  79. # History:
  80. #=========
  81. # 22/08/2o12 - Started and Finished.
  82. #===============================================================================
  83. #===============================================================================
  84. # ☆ Credit and Thanks to :
  85. #==========================
  86. # N/A
  87. #===============================================================================
  88. #===============================================================================
  89. # ☆ Foresight Into The Future:
  90. #==============================
  91. # N/A
  92. #-------------------------------------------------------------------------------
  93. # If you have any ideas e-mail me at DekitaRPG@gmail.com
  94. #===============================================================================
  95. #===============================================================================
  96. # ☆ Known Bugs:
  97. #=================
  98. # N/A
  99. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  100. # If a new bug is found please e-mail me at DekitaRPG@gmail.com
  101. #===============================================================================
  102. #===============================================================================
  103. # ☆ INSTRUCTIONS:
  104. #=================
  105. # Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  106. #
  107. #===============================================================================
  108. # NoteTags: place these into "class" noteboxes in the database.
  109. #----------
  110. # <expcurve1>  
  111. # <expcurve2>
  112. # <expcurve3>
  113. # <expcurve4>
  114. # <expcurve5>
  115. #
  116. # NOTE: DO NOT PUT THE NOTETAGS IN AN ACTORS NOTEBOX < IT WONT WORK.
  117. #===============================================================================
  118. module DPB ####
  119. module PEXP ##
  120. #=====================#
  121. # CUSTOMISATION - YAY #
  122. #=====================#
  123. # Basis = The base value for calculating nessesary exp.
  124. #
  125. # Extra = A simple extra value added onto the exp nessesary for each level
  126. #
  127. # Acceleration A = A value representing the rate at which to increase the
  128. #                  nessesary exp. Affects the whole exp curve.
  129. #
  130. # Acceleration B = A value representing the degree at which to exponentially
  131. #                  increase the nessesary exp. Mainly affects the high level range.
  132. #
  133. #=============#
  134. # EXP CURVE 1 #
  135. #-------------#
  136. # This setting,(by default) the exp needed will be a constant 5 exp per level
  137. # TOTAL EXP NEEDED:
  138. # level 10 = 45
  139. # Level 25 = 120
  140. # Level 50 = 245
  141. # Level 99 = 490
  142.          BASIS = 0
  143.          EXTRA = 5
  144. ACCELERATION_A = 0
  145. ACCELERATION_B = 0
  146.  
  147. #=============#
  148. # EXP CURVE 2 #
  149. #-------------#
  150. # This setting,(by default) the exp needed per level will increase very slightly,
  151. # MUCH lower than vx ace normally allows.
  152. # TOTAL EXP NEEDED:
  153. # level 10 = 108
  154. # Level 25 = 638
  155. # Level 50 = 1561
  156. # Level 99 = 3134
  157.          BASIS2 = 1
  158.          EXTRA2 = 1
  159. ACCELERATION_A2 = 1
  160. ACCELERATION_B2 = 1
  161.  
  162. #=============#
  163. # EXP CURVE 3 #
  164. #-------------#
  165. # This setting,(by default) the exp needed per level will be slightly more than
  166. # vx ace normally allows.
  167. # TOTAL EXP NEEDED:
  168. # level 10 = 14,123
  169. # Level 25 = 189,663
  170. # Level 50 = 1,359,580
  171. # Level 99 = 8,797,536
  172.          BASIS3 = 100
  173.          EXTRA3 = 100
  174. ACCELERATION_A3 = 200
  175. ACCELERATION_B3 = 200
  176.  
  177. #=============#
  178. # EXP CURVE 4 #
  179. #-------------#
  180. # This setting,(by default) the exp needed per level will be ridiculously more
  181. # than vx ace normally allows.
  182. # TOTAL EXP NEEDED:
  183. # level 10 = 79,550
  184. # Level 25 = 4,534,130
  185. # Level 50 = 68,442,075
  186. # Level 99 = 962,585,688) lol @ 962 mil exp...
  187.          BASIS4 = 100
  188.          EXTRA4 = 200
  189. ACCELERATION_A4 = 400
  190. ACCELERATION_B4 = 800
  191.  
  192. #=============#
  193. # EXP CURVE 5 #
  194. #-------------#
  195. # This setting,(by default) the exp needed for low levels will be lower than vx ace
  196. # normally allows but much more than vx ace normally allows at higher levels.
  197. # TOTAL EXP NEEDED:
  198. # level 10 = 2401
  199. # Level 25 = 90,682
  200. # Level 50 = 1,371,571
  201. # Level 99 = 19,403,779)
  202.          BASIS5 = 2
  203.          EXTRA5 = 2
  204. ACCELERATION_A5 = 250
  205. ACCELERATION_B5 = 1000
  206.  
  207. #===============================================================================
  208. #                                                                          
  209. #                              ★ Perfect EXP Curve ★
  210. #
  211. #                              ★ CUSTOMISATION END ★
  212. #
  213. #===============================================================================
  214. ################################################################################
  215. end # PEXP
  216. end # DPB
  217.  
  218. #===============================================================================
  219. # ☆ Import:
  220. #===========
  221. $imported = {} if $imported.nil?
  222. $imported["DPB-PEXP"] = true
  223. #
  224. #===============================================================================
  225.  
  226. class RPG::Class < RPG::BaseItem
  227.   def exp_for_level(level)
  228.     if self.note =~ /<expcurve1>/i
  229.     lv = level.to_f
  230.     basis = DPB::PEXP::BASIS  
  231.     extra = DPB::PEXP::EXTRA
  232.     acc_a = DPB::PEXP::ACCELERATION_A
  233.     acc_b = DPB::PEXP::ACCELERATION_B
  234.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  235.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  236.   elsif self.note =~ /<expcurve2>/i
  237.     lv = level.to_f
  238.     basis = DPB::PEXP::BASIS2
  239.     extra = DPB::PEXP::EXTRA2
  240.     acc_a = DPB::PEXP::ACCELERATION_A2
  241.     acc_b = DPB::PEXP::ACCELERATION_B2
  242.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  243.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  244.   elsif self.note =~ /<expcurve3>/i
  245.     lv = level.to_f
  246.     basis = DPB::PEXP::BASIS3
  247.     extra = DPB::PEXP::EXTRA3
  248.     acc_a = DPB::PEXP::ACCELERATION_A3
  249.     acc_b = DPB::PEXP::ACCELERATION_B3
  250.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  251.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  252.   elsif self.note =~ /<expcurve4>/i
  253.     lv = level.to_f
  254.     basis = DPB::PEXP::BASIS4
  255.     extra = DPB::PEXP::EXTRA4
  256.     acc_a = DPB::PEXP::ACCELERATION_A4
  257.     acc_b = DPB::PEXP::ACCELERATION_B4
  258.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  259.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  260.   elsif self.note =~ /<expcurve5>/i
  261.     lv = level.to_f
  262.     basis = DPB::PEXP::BASIS5
  263.     extra = DPB::PEXP::EXTRA5
  264.     acc_a = DPB::PEXP::ACCELERATION_A5
  265.     acc_b = DPB::PEXP::ACCELERATION_B5
  266.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  267.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  268.   else
  269.     lv = level.to_f
  270.     basis = @exp_params[0].to_f
  271.     extra = @exp_params[1].to_f
  272.     acc_a = @exp_params[2].to_f
  273.     acc_b = @exp_params[3].to_f
  274.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  275.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  276.     end
  277.   end # Def exp_for_lv
  278. end # class RPG::Class
  279. #===============================================================================
  280. #                                                                          
  281. #                              ★ Perfect EXP Curve ★
  282. #
  283. #                                 ★ SCRIPT END  ★
  284. #
  285. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement