Advertisement
Dekita

pokexp

Nov 16th, 2012
859
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.47 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.0
  3. ★ Pokémon Exp Growth™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script replicates the exp curves from pokemon.
  9. information on each exp "curve" is below.
  10. NOTE: This works 100% like pokemon.
  11.  
  12. BIG_NOTE: You CANNOT reach level 100 by default in rpg vxa, it will require
  13. a "break levels" type script.
  14.  
  15. ================================================================================
  16. ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
  17. ================================================================================
  18. 1. You must give credit to "Dekita"
  19. 2. You are NOT allowed to repost this script.(or modified versions)
  20. 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
  21. 4. You are NOT allowed to use this script for Commercial games.
  22. 5. ENJOY!
  23.  
  24. "FINE PRINT"
  25. By using this script you hereby agree to the above terms and conditions,
  26. if any violation of the above terms occurs "legal action" may be taken.
  27. Not understanding the above terms and conditions does NOT mean that
  28. they do not apply to you.
  29. If you wish to discuss the terms and conditions in further detail you can
  30. contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
  31.  
  32. ================================================================================
  33. History:
  34. =========
  35. D /M /Y
  36. 16/11/2o12 - started and finished,
  37.  
  38. ================================================================================
  39. Credit and Thanks to :
  40. =======================
  41. http://bulbapedia.bulbagarden.net/wiki/Experience for Exp Growth calculations.
  42.  
  43. ================================================================================
  44. Known Bugs:
  45. ============
  46. N/A
  47.  
  48. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  49. If a new bug is found please contact me at
  50. http://dekitarpg.wordpress.com/
  51.  
  52. ================================================================================
  53. INSTRUCTIONS:
  54. ==============
  55. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  56.  
  57. ================================================================================
  58. Notetags: (default)
  59. ==========
  60. <fast>
  61. <medium fast>
  62. <medium slow>
  63. <slow>
  64. <erratic>
  65. <flux>
  66.  
  67. =end #==========================================================================#
  68. module Dékita__Pokémon_Exp
  69.  
  70. # The Fast experience group is one of the four experience groups introduced
  71. # in Generation I, with 800,000 experience points making for a level 100
  72. # Pokémon. Many common Normal-type Pokémon are in this group, among them the
  73. # Chansey, Clefairy, and Jigglypuff families.
  74. Fast_Note = /<fast>/i
  75. Fast = [
  76. 0, 6, 21, 51, 100,
  77. 172, 274, 409, 583, 800, # 6 - 10
  78. 1064, 1382, 1757, 2195, 2700,
  79. 3276, 3930, 4665, 5487, 6400, # 16 - 20
  80. 7408, 8518, 9733, 11059, 12500,
  81. 14060, 15746, 17561, 19511, 21600, # 26 - 30
  82. 23832, 26214, 28749, 31443, 34300,
  83. 37324, 40522, 43897, 47455, 51200, # 36 - 40
  84. 55136, 59270, 63605, 68147, 72900,
  85. 77868, 83058, 88473, 94119, 100000,# 46 - 50
  86. 106120, 112486, 119101, 125971, 133100,
  87. 140492, 148154, 156089, 164303, 172800,# 56 - 60
  88. 181584, 190662, 200037, 209715, 219700,
  89. 229996, 240610, 251545, 262807, 274400,# 66 - 70
  90. 286328, 298598, 311213, 324179, 337500,
  91. 351180, 365226, 379641, 394431, 409600,# 76 - 80
  92. 425152, 441094, 457429, 474163, 491300,
  93. 508844, 526802, 545177, 563975, 583200,# 86 - 90
  94. 602856, 622950, 643485, 664467, 685900,
  95. 707788, 730138, 752953, 776239, 800000 # 96 - 100
  96. ]
  97.  
  98. # The Medium Fast group, which was also introduced in Generation I.
  99. # Requiring Pokémon to have an even 1,000,000 experience points to be at
  100. # level 100, it is by far the most average of the experience groups,
  101. # and the one with the simplest equation:
  102. # to be at a given level, any Pokémon in this group requires experience equal
  103. # to that level cubed. This group is also often called "cubic", due to its
  104. # function being a simple cube of the level.
  105. # This experience group actually grows more slowly than the Medium Slow group
  106. # up until about level 68 (level 47, if considering amount of experience
  107. # required to reach the next level).
  108. MedFast_Note = /<medium fast>/i
  109. Medium_Fast = [
  110. 0, 8, 27, 64, 125,
  111. 216, 343, 512, 729, 1000, # 6 - 10
  112. 1331, 1728, 2197, 2744, 3375,
  113. 4096, 4913, 5832, 6859, 8000, # 16 - 20
  114. 9261, 10648, 12167, 13824, 15625,
  115. 17579, 19683, 21952, 24389, 27000, # 26 - 30
  116. 29791, 32786, 35937, 39304, 42875,
  117. 46656, 50653, 54872, 59319, 64000, # 36 - 40
  118. 68921, 74088, 79507, 85184, 91125,
  119. 97336, 103823, 110592, 117649, 125000,# 46 - 50
  120. 132651, 140608, 148877, 157464, 166375,
  121. 175616, 185193, 195112, 205379, 216000,# 56 - 60
  122. 226981, 238328, 250047, 262144, 274625,
  123. 287496, 300763, 314432, 328509, 343000,# 66 - 70
  124. 357911, 373248, 389017, 405224, 421875,
  125. 438976, 456533, 474552, 493039, 512000,# 76 - 80
  126. 531441, 551368, 571787, 592704, 614125,
  127. 636056, 658503, 681472, 704969, 729000,# 86 - 90
  128. 753571, 778688, 804357, 830584, 857375,
  129. 884736, 912673, 941192, 970299, 1000000 # 96 - 100
  130. ]
  131.  
  132. # The Medium Slow experience group, like the Medium Fast group, accounts
  133. # for many Pokémon, containing the second largest amount of them.
  134. # All normal starter Pokémon are in this group, as are several smaller
  135. # legendaries, such as Mew and Shaymin.
  136. # Requiring 1,059,860 experience points for a Pokémon to reach level 100,
  137. # it is the only experience group whose level 100 experience is not evenly
  138. # divisible by 10,000.
  139. # The inflection point for this polynomial function is actually at level 4,
  140. # not level 0. Thus, it actually takes more experience points to go from
  141. # level 2 to 3 than it does to go from 4 to 5.
  142. # In Generations I and II, this mislocation of the inflection point causes
  143. # the experience underflow glitch.
  144. # The starter Pokémon are all at level 5 at the start, and are all in the
  145. # Medium Slow group, so it appears that the Medium Slow group's experience
  146. # formula was calculated with the starter Pokémon in mind.
  147. # It is the only function to do so - all the other functions,
  148. # being simple multiples of the cube of the level,
  149. # have inflection points at Level 0, meaning that the number of experience
  150. # points required to advance one level will always increase as the level
  151. # increases because the level is positive.
  152. MedSlow_Note = /<medium slow>/i
  153. Medium_Slow = [
  154. 0, 9, 57, 96, 135,
  155. 179, 236, 314, 419, 560, # 6 - 10
  156. 742, 973, 1261, 1612, 2035,
  157. 2535, 3120, 3798, 4575, 5460, # 16 - 20
  158. 6458, 7577, 8825, 10208, 11735,
  159. 13411, 15244, 17242, 19411, 21760, # 26 - 30
  160. 24294, 27021, 29949, 33084, 36435,
  161. 40007, 43808, 47846, 52127, 56660, # 36 - 40
  162. 61450, 66505, 71883, 77440, 83335,
  163. 89523, 96012, 102810, 109923, 117360,# 46 - 50
  164. 125126, 133229, 141677, 150476, 159635,
  165. 169159, 179056, 189334, 199999, 211060,# 56 - 60
  166. 222522, 234393, 246681, 259392, 272535,
  167. 286115, 300140, 314618, 329555, 344960,# 66 - 70
  168. 360838, 377197, 394045, 411388, 429235,
  169. 447591, 466464, 485862, 505791, 526260,# 76 - 80
  170. 547274, 568841, 590969, 613664, 636935,
  171. 660787, 685228, 710266, 735907, 762160,# 86 - 90
  172. 789030, 816525, 844653, 873420, 902835,
  173. 932903, 963632, 995030, 1027103, 1059860 # 96 - 100
  174. ]
  175.  
  176. # The final of the four Generation I experience groups, the Slow group
  177. # features the highest amount of experience required for a Pokémon to
  178. # reach level 100 in Generations I and II, and the second highest amount
  179. # since then. Containing many rare, powerful, and legendary Pokémon,
  180. # Pokémon in this group are typically very hard to raise.
  181. # At level 100, a Pokémon in this experience group will have 1,250,000
  182. # experience points.
  183. Slow_Note = /<slow>/i
  184. Slow = [
  185. 0, 10, 33, 80, 156,
  186. 270, 428, 640, 911, 1250, # 6 - 10
  187. 1663, 2160, 2746, 3430, 4218,
  188. 5120, 6141, 7290, 8573, 10000, # 16 - 20
  189. 11576, 13310, 15208, 17280, 19531,
  190. 21970, 24603, 27440, 30486, 33750, # 26 - 30
  191. 37238, 40960, 44921, 49130, 53593,
  192. 58320, 63316, 68590, 74148, 80000, # 36 - 40
  193. 86151, 92610, 99383, 106480, 113906,
  194. 121670, 129778, 138240, 147061, 156250,# 46 - 50
  195. 165813, 175760, 186096, 196830, 207968,
  196. 219520, 231491, 243890, 256723, 270000,# 56 - 60
  197. 283726, 297910, 312558, 327680, 343281,
  198. 359370, 375953, 393040, 410636, 428750,# 66 - 70
  199. 447388, 466560, 486271, 506530, 527343,
  200. 548720, 570666, 593190, 616298, 640000,# 76 - 80
  201. 664301, 689210, 714733, 740880, 767656,
  202. 795070, 823128, 851840, 881211, 911250,# 86 - 90
  203. 941963, 973360, 1005446, 1038230, 1071718,
  204. 1105920, 1140841, 1176490, 1212873, 1250000 # 96 - 100
  205. ]
  206.  
  207. # The Erratic experience group, one of the two groups introduced in
  208. # Generation III, features the lowest level 100 value for experience,
  209. # at only 600,000 points.
  210. # Pokémon in this group level up rather slowly in their lower levels,
  211. # requiring the most experience to grow from level 1 to level 10
  212. # (1800 as compared to 1250 for Slow, the next highest requirement),
  213. # and increase the rate of their growth at higher levels, requiring the
  214. # least experience to grow from level 90 to level 100
  215. # (108654 points as compared to 216800 for Fast, the next lowest requirement).
  216. # Due to the erraticness of this function, it actually takes fewer experience
  217. # points to go from level 99 to 100 than it does to go from level 69 to 70.
  218. Erratic_Note = /<erratic>/i
  219. Erratic = [
  220. 0, 15, 52, 122, 237,
  221. 416, 637, 942, 1326, 1800, # 6 - 10
  222. 2369, 3041, 3822, 4719, 5737,
  223. 6881, 8155, 9564, 11111, 12800, # 16 - 20
  224. 14632, 16610, 18737, 21012, 23437,
  225. 26012, 28737, 31610, 34632, 37800, # 26 - 30
  226. 41111, 44564, 48155, 51881, 55737,
  227. 59719, 63822, 68041, 72369, 76800, # 36 - 40
  228. 81326, 85942, 90637, 95406, 100237,
  229. 105122, 110052, 115015, 120001, 125000,# 46 - 50
  230. 131324, 137795, 144410, 151165, 158056,
  231. 165079, 172229, 179503, 186894, 194400,# 56 - 60
  232. 202013, 209728, 217540, 225443, 233431,
  233. 241496, 249633, 257934, 267406, 276458,# 66 - 70
  234. 286328, 296358, 305767, 316074, 326531,
  235. 336255, 346965, 357812, 367807, 378880,# 76 - 80
  236. 390077, 400293, 411686, 423190, 433572,
  237. 445239, 457001, 467489, 479378, 491346,# 86 - 90
  238. 501878, 513934, 526049, 536557, 548720,
  239. 560922, 571333, 583539, 591882, 600000 # 96 - 100
  240. ]
  241.  
  242. # The second experience group introduced in Generation III, and a direct
  243. # opposite to the Erratic group,
  244. # the Fluctuating experience group contains the Pokémon which grow the
  245. # slowest of all, reaching level 100 with a whopping 1,640,000 exp points.
  246. # It is also, unsurprisingly, the smallest of the experience groups,
  247. # containing only 14 species. Pokémon within this group require the least
  248. # amount of experience to grow from level 1, needing only 540 points to reach
  249. # level 10, as compared to 560 for Medium Slow, the next lowest requirement.
  250. # They also require the most experience points to go from
  251. # level 90 to 100 - 517340 as compared to 338750 for Slow, the next highest.
  252. # Like the Erratic function, the Fluctuating group's level-up equation is
  253. # calculated in a piecewise fashion.
  254. # Also like the Erratic experience group, the Fluctuating group gets its name
  255. # from the wildly fluctuating requirement for each level to go to the next level,
  256. # from Level 36 to Level 100.
  257. Fluctuating_Note = /<flux>/i
  258. Fluctuating = [
  259. 0, 4, 13, 32, 65,
  260. 112, 178, 276, 393, 540, # 6 - 10
  261. 745, 967, 1230, 1591, 1957,
  262. 2457, 3046, 3732, 4526, 5440, # 16 - 20
  263. 6482, 7666, 9003, 10506, 12187,
  264. 14060, 16140, 18439, 20974, 23760, # 26 - 30
  265. 26811, 30146, 33780, 37731, 42017,
  266. 46656, 50653, 55969, 60505, 66560, # 36 - 40
  267. 71677, 78533, 84277, 91998, 98415,
  268. 107069, 114205, 123863, 131766, 142500,# 46 - 50
  269. 151222, 163105, 172697, 185807, 196322,
  270. 210739, 222231, 238036, 250562, 267840,# 56 - 60
  271. 281456, 300293, 315059, 335544, 351520,
  272. 373744, 390991, 415050, 433631, 459620,# 66 - 70
  273. 479600, 507617, 529063, 559209, 582187,
  274. 614566, 639146, 673863, 700115, 737280,# 76 - 80
  275. 765275, 804997, 834809, 877201, 908905,
  276. 954084, 987754, 1035837, 1071552, 1122660,# 86 - 90
  277. 1160499, 1214753, 1254796, 1312322, 1354652,
  278. 1415577, 1460276, 1524731, 1571884, 1640000 # 96 - 100
  279. ]
  280.  
  281. end
  282.  
  283. $imported = {} if $imported.nil?
  284. $imported[:Dekita_Pokémon_Exp] = true
  285.  
  286. #################################################################################
  287. #################################################################################
  288. # As team rocket where once again "blasting off" Ash, Brock and Misty slowly #
  289. # lifted their bodies from the ground, turning, gasping at the horror they could#
  290. # see before them... #
  291. #################################################################################
  292. #################### !! DONT MODIFY SHIT AFTER HERE !! ##########################
  293. #################################################################################
  294.  
  295. class RPG::Class < RPG::BaseItem
  296.  
  297. alias pokkemon_Exp_for_level exp_for_level
  298. def exp_for_level(level)
  299. if self.note =~ Dékita__Pokémon_Exp::Erratic_Note
  300. return Dékita__Pokémon_Exp::Erratic[level-1]
  301. elsif self.note =~ Dékita__Pokémon_Exp::Fast_Note
  302. return Dékita__Pokémon_Exp::Fast[level-1]
  303. elsif self.note =~ Dékita__Pokémon_Exp::MedFast_Note
  304. return Dékita__Pokémon_Exp::Medium_Fast[level-1]
  305. elsif self.note =~ Dékita__Pokémon_Exp::MedSlow_Note
  306. return Dékita__Pokémon_Exp::Medium_Slow[level-1]
  307. elsif self.note =~ Dékita__Pokémon_Exp::Slow_Note
  308. return Dékita__Pokémon_Exp::Slow[level-1]
  309. elsif self.note =~ Dékita__Pokémon_Exp::Fluctuating_Note
  310. return Dékita__Pokémon_Exp::Fluctuating[level-1]
  311. else
  312. return pokkemon_Exp_for_level(level)
  313. end
  314. end
  315.  
  316. end
  317.  
  318. #===============================================================================#
  319. # - SCRIPT END - #
  320. #===============================================================================#
  321. # http://dekitarpg.wordpress.com/ #
  322. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement