SHARE
TWEET

Dekita's EXP Curve

a guest Dec 16th, 2017 4 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. =begin =========================================================================
  2. Dekita's                                                                   v1.1
  3.                              ★ Perfect EXP Curve™ ★
  4.  
  5. #===============================================================================
  6. # ☆ Script Information:
  7. #=======================
  8. # As you may well know the default exp curve system in RPG Maker VX Ace is not the
  9. # most dynamic exp system...
  10. # Below is a chart to show the minimum and maximum values that you can acheive
  11. # by using the default system
  12.                       #---------------# #---------------#
  13.                       # Basis 10 - 50 # # extra  0 - 40 #
  14.                       #---------------# #---------------#
  15.                       # Acc A 10 - 50 # # Acc B 10 - 50 #
  16.                       #---------------# #---------------#
  17.                      
  18.             #-----------------------#     #-----------------------#
  19.             # Exp using min values  #     # Exp using max values  #
  20.             #-----------------------#     #-----------------------#
  21.             # Level 10 = 1400       #     # Level 10 = 10,569     #
  22.             # Level 25 = 17,782     #     # Level 25 = 172,449    #
  23.             # Level 50 = 89,936     #     # Level 50 = 1,319,088  #
  24.             # Level 99 = 287,815    #     # Level 99 = 7,738,286  #
  25.             #-----------------------#     #-----------------------#
  26.            
  27. # Via the default system is is very difficult to acheive lets say a very low
  28. # amount of exp needed at low levels and a very high amount needed at higher
  29. # levels or have a set amount of exp per level
  30. # e.g lv1 - lv2 = 100 exp , lv2 - lv3 = 100 exp, lv3 - lv4 = 100 exp...
  31. # with this script you can acheive a vast number of unique exp curves.
  32. #
  33. # NOTE: if you dont insert a notetag into [x] class then [x] class will use
  34. # the default exp curve defined in the database under the class tab.
  35. #
  36. ================================================================================
  37.  ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  38. ================================================================================
  39.  1. You must give credit to "Dekita"
  40.  2. You are NOT allowed to repost this script.(or modified versions)
  41.  3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  42.  4. You are NOT allowed to use this script for Commercial games.
  43.  5. ENJOY!
  44.  
  45. "FINE PRINT"
  46. By using this script you hereby agree to the above terms and conditions,
  47.  if any violation of the above terms occurs "legal action" may be taken.
  48. Not understanding the above terms and conditions does NOT mean that
  49.  they do not apply to you.
  50. If you wish to discuss the terms and conditions in further detail you can
  51. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  52.  
  53. ================================================================================
  54.  History:
  55. =========
  56.  05/11/2o12 - Added unique exp gain,
  57.  22/08/2o12 - Started and Finished.
  58. ===============================================================================
  59. ===============================================================================
  60.  ☆ INSTRUCTIONS:
  61. =================
  62.  Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  63.  
  64. ===============================================================================
  65.  NoteTags: (place these into "class" noteboxes in the database)
  66. ===========
  67.  <expcurve1>  
  68.  <expcurve2>
  69.  <expcurve3>
  70.  <expcurve4>
  71.  <expcurve5>
  72.  <unique exp gain>
  73.  
  74.  NOTE: DO NOT PUT THE NOTETAGS IN AN ACTORS NOTEBOX < IT WONT WORK.
  75. ===============================================================================
  76. =end
  77. module DPB ###
  78. module PEXP ##
  79. #=====================#
  80. # CUSTOMISATION - YAY #
  81. #=====================#
  82. # Basis = The base value for calculating nessesary exp.
  83. #
  84. # Extra = A simple extra value added onto the exp nessesary for each level
  85. #
  86. # Acceleration A = A value representing the rate at which to increase the
  87. #                  nessesary exp. Affects the whole exp curve.
  88. #
  89. # Acceleration B = A value representing the degree at which to exponentially
  90. #                  increase the nessesary exp. Mainly affects the high level range.
  91. #
  92. #=============#
  93. # EXP CURVE 1 #
  94. #-------------#
  95. # This setting,(by default) the exp needed will be a constant 5 exp per level
  96. # TOTAL EXP NEEDED:
  97. # level 10 = 45
  98. # Level 25 = 120
  99. # Level 50 = 245
  100. # Level 99 = 490
  101.          BASIS = 0
  102.          EXTRA = 5
  103. ACCELERATION_A = 0
  104. ACCELERATION_B = 0
  105.  
  106. #=============#
  107. # EXP CURVE 2 #
  108. #-------------#
  109. # This setting,(by default) the exp needed per level will increase very slightly,
  110. # MUCH lower than vx ace normally allows.
  111. # TOTAL EXP NEEDED:
  112. # level 10 = 108
  113. # Level 25 = 638
  114. # Level 50 = 1561
  115. # Level 99 = 3134
  116.          BASIS2 = 1
  117.          EXTRA2 = 1
  118. ACCELERATION_A2 = 1
  119. ACCELERATION_B2 = 1
  120.  
  121. #=============#
  122. # EXP CURVE 3 #
  123. #-------------#
  124. # This setting,(by default) the exp needed per level will be slightly more than
  125. # vx ace normally allows.
  126. # TOTAL EXP NEEDED:
  127. # level 10 = 14,123
  128. # Level 25 = 189,663
  129. # Level 50 = 1,359,580
  130. # Level 99 = 8,797,536
  131.          BASIS3 = 100
  132.          EXTRA3 = 100
  133. ACCELERATION_A3 = 200
  134. ACCELERATION_B3 = 200
  135.  
  136. #=============#
  137. # EXP CURVE 4 #
  138. #-------------#
  139. # This setting,(by default) the exp needed per level will be ridiculously more
  140. # than vx ace normally allows.
  141. # TOTAL EXP NEEDED:
  142. # level 10 = 79,550
  143. # Level 25 = 4,534,130
  144. # Level 50 = 68,442,075
  145. # Level 99 = 962,585,688. lol @ 962 mil exp...
  146.          BASIS4 = 100
  147.          EXTRA4 = 200
  148. ACCELERATION_A4 = 400
  149. ACCELERATION_B4 = 800
  150.  
  151. #=============#
  152. # EXP CURVE 5 #
  153. #-------------#
  154. # This setting,(by default) the exp needed for low levels will be lower than vx ace
  155. # normally allows but much more than vx ace normally allows at higher levels.
  156. # TOTAL EXP NEEDED:
  157. # level 10 = 2401
  158. # Level 25 = 90,682
  159. # Level 50 = 1,371,571
  160. # Level 99 = 19,403,779
  161.          BASIS5 = 2
  162.          EXTRA5 = 2
  163. ACCELERATION_A5 = 250
  164. ACCELERATION_B5 = 1000
  165.  
  166. #====================#
  167. # Not Even a Curve ! #
  168. Unique_Gains = []#---#
  169. # This setting is very simple, just enter the exp you need for each level
  170. # e.g Unique_Gains[1] = 0 because you need 0 exp to reach level 1,
  171. # Unique_Gains[2] = 20, this means you need a total of 20 exp to reach level 2
  172. # Unique_Gains[3] = 30, this means you need a total of 30 exp to reach level 3
  173. # a.k.a 10 more exp than needed for level 2.
  174. # NOTE: the ' _ ' are just spacers to seperate the 0's and keep track of them :p
  175.  
  176. Unique_Gains[1] = 0
  177. Unique_Gains[2] = 500
  178. Unique_Gains[3] = 1025
  179. Unique_Gains[4] = 1576
  180. Unique_Gains[5] = 2154
  181. Unique_Gains[6] = 2760
  182. Unique_Gains[7] = 3396
  183. Unique_Gains[8] = 4063
  184. Unique_Gains[9] = 4763
  185. Unique_Gains[10] = 5498
  186. Unique_Gains[11] = 6269
  187. Unique_Gains[12] = 7078
  188. Unique_Gains[13] = 7927
  189. Unique_Gains[14] = 8818
  190. Unique_Gains[15] = 9753
  191. Unique_Gains[16] = 10734
  192. Unique_Gains[17] = 11764
  193. Unique_Gains[18] = 12845
  194. Unique_Gains[19] = 13980
  195. Unique_Gains[20] = 15171
  196. Unique_Gains[21] = 16421
  197. Unique_Gains[22] = 17733
  198. Unique_Gains[23] = 19110
  199. Unique_Gains[24] = 20555
  200. Unique_Gains[25] = 22072
  201. Unique_Gains[26] = 23664
  202. Unique_Gains[27] = 25335
  203. Unique_Gains[28] = 27089
  204. Unique_Gains[29] = 28930
  205. Unique_Gains[30] = 30863
  206. Unique_Gains[31] = 32892
  207. Unique_Gains[32] = 35022
  208. Unique_Gains[33] = 37258
  209. Unique_Gains[34] = 39605
  210. Unique_Gains[35] = 42069
  211. Unique_Gains[36] = 44656
  212. Unique_Gains[37] = 47372
  213. Unique_Gains[38] = 50223
  214. Unique_Gains[39] = 53216
  215. Unique_Gains[40] = 56358
  216. Unique_Gains[41] = 59657
  217. Unique_Gains[42] = 63120
  218. Unique_Gains[43] = 66756
  219. Unique_Gains[44] = 70573
  220. Unique_Gains[45] = 74580
  221. Unique_Gains[46] = 78787
  222. Unique_Gains[47] = 83204
  223. Unique_Gains[48] = 87841
  224. Unique_Gains[49] = 92709
  225. Unique_Gains[50] = 97820
  226. Unique_Gains[51] = 103186
  227. Unique_Gains[52] = 108820
  228. Unique_Gains[53] = 114735
  229. Unique_Gains[54] = 120945
  230. Unique_Gains[55] = 127465
  231. Unique_Gains[56] = 134311
  232. Unique_Gains[57] = 141499
  233. Unique_Gains[58] = 149046
  234. Unique_Gains[59] = 156970
  235. Unique_Gains[60] = 165290
  236. Unique_Gains[61] = 174026
  237. Unique_Gains[62] = 183198
  238. Unique_Gains[63] = 192828
  239. Unique_Gains[64] = 202939
  240. Unique_Gains[65] = 213555
  241. Unique_Gains[66] = 224701
  242. Unique_Gains[67] = 236404
  243. Unique_Gains[68] = 248692
  244. Unique_Gains[69] = 261594
  245. Unique_Gains[70] = 275141
  246. Unique_Gains[71] = 289365
  247. Unique_Gains[72] = 304300
  248. Unique_Gains[73] = 319981
  249. Unique_Gains[74] = 336446
  250. Unique_Gains[75] = 353734
  251. Unique_Gains[76] = 371886
  252. Unique_Gains[77] = 390945
  253. Unique_Gains[78] = 410956
  254. Unique_Gains[79] = 431967
  255. Unique_Gains[80] = 454028
  256. Unique_Gains[81] = 477192
  257. Unique_Gains[82] = 501514
  258. Unique_Gains[83] = 527052
  259. Unique_Gains[84] = 553866
  260. Unique_Gains[85] = 582020
  261. Unique_Gains[86] = 611581
  262. Unique_Gains[87] = 642620
  263. Unique_Gains[88] = 675210
  264. Unique_Gains[89] = 709429
  265. Unique_Gains[90] = 745358
  266. Unique_Gains[91] = 783083
  267. Unique_Gains[92] = 822694
  268. Unique_Gains[93] = 864285
  269. Unique_Gains[94] = 907955
  270. Unique_Gains[95] = 953808
  271. Unique_Gains[96] = 1001953
  272. Unique_Gains[97] = 1052505
  273. Unique_Gains[98] = 1105584
  274. Unique_Gains[99] = 1161316
  275. #===============================================================================
  276. #
  277. #                              ★ Perfect EXP Curve ★
  278. #
  279. #                              ★ CUSTOMISATION END ★
  280. #
  281. #===============================================================================
  282. ################################################################################
  283. end # PEXP
  284. end # DPB
  285.  
  286. #===============================================================================
  287. # ☆ Import:
  288. #===========
  289. $imported = {} if $imported.nil?
  290. $imported["DPB-PEXP"] = true
  291. #
  292. #===============================================================================
  293.  
  294. class RPG::Class < RPG::BaseItem
  295.   def exp_for_level(level)
  296.   if self.note =~ /<unique exp gain>/i
  297.     _Exp = DPB::PEXP::Unique_Gains
  298.     return _Exp[level]
  299.   elsif self.note =~ /<expcurve1>/i
  300.     lv = level.to_f
  301.     basis = DPB::PEXP::BASIS  
  302.     extra = DPB::PEXP::EXTRA
  303.     acc_a = DPB::PEXP::ACCELERATION_A
  304.     acc_b = DPB::PEXP::ACCELERATION_B
  305.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  306.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  307.   elsif self.note =~ /<expcurve2>/i
  308.     lv = level.to_f
  309.     basis = DPB::PEXP::BASIS2
  310.     extra = DPB::PEXP::EXTRA2
  311.     acc_a = DPB::PEXP::ACCELERATION_A2
  312.     acc_b = DPB::PEXP::ACCELERATION_B2
  313.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  314.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  315.   elsif self.note =~ /<expcurve3>/i
  316.     lv = level.to_f
  317.     basis = DPB::PEXP::BASIS3
  318.     extra = DPB::PEXP::EXTRA3
  319.     acc_a = DPB::PEXP::ACCELERATION_A3
  320.     acc_b = DPB::PEXP::ACCELERATION_B3
  321.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  322.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  323.   elsif self.note =~ /<expcurve4>/i
  324.     lv = level.to_f
  325.     basis = DPB::PEXP::BASIS4
  326.     extra = DPB::PEXP::EXTRA4
  327.     acc_a = DPB::PEXP::ACCELERATION_A4
  328.     acc_b = DPB::PEXP::ACCELERATION_B4
  329.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  330.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  331.   elsif self.note =~ /<expcurve5>/i
  332.     lv = level.to_f
  333.     basis = DPB::PEXP::BASIS5
  334.     extra = DPB::PEXP::EXTRA5
  335.     acc_a = DPB::PEXP::ACCELERATION_A5
  336.     acc_b = DPB::PEXP::ACCELERATION_B5
  337.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  338.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  339.   else
  340.     lv = level.to_f
  341.     basis = @exp_params[0].to_f
  342.     extra = @exp_params[1].to_f
  343.     acc_a = @exp_params[2].to_f
  344.     acc_b = @exp_params[3].to_f
  345.     return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/
  346.       (6+lv**2/50/acc_b)+(lv-1)*extra).round.to_i
  347.     end
  348.   end # Def exp_for_lv
  349. end # class RPG::Class
  350. #===============================================================================
  351. #                                                                          
  352. #                              ★ Perfect EXP Curve ★
  353. #
  354. #                                 ★ SCRIPT END  ★
  355. #
  356. #===============================================================================
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top