Advertisement
Dekita

PSPDSv1.7

Sep 14th, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 122.53 KB | None | 0 0
  1. =begin =========================================================================
  2. Dekita's v1.7
  3. ★ Perfect Stat Point Distribution System™ ★
  4.  
  5. ================================================================================
  6. Script Information:
  7. ====================
  8. This script will Nullify the traditional RPG-Maker "Level up -> increases
  9. parameters" feature. Instead when you level you will be presented with a stat
  10. point distribution screen. you can then increase each parameter using the
  11. points you gain.
  12.  
  13. This script will give you COMPLETE control over all aspects of how your
  14. characters stats increase during gameplay.
  15.  
  16. The control and customisation for this "System" has been designed to be
  17. as dynamic as possible.
  18.  
  19. ================================================================================
  20. TERMS OF USE:
  21. ==============
  22.  
  23. 1. You MUST give credit to Dekita.
  24.  
  25. 2. This script is for NON-Commercial use ONLY!*
  26.  
  27. 3. You CANNOT give credit to yourself for Re-posting this script
  28. or Posting a modified version.*
  29.  
  30. 4. Do not Re-Distribute/Re-Post this script.
  31.  
  32. 5. You are NOT allowed to convert this script to any other engine,
  33. E.G converting it from RGSS3 into RGSS2.*
  34.  
  35. 6. ENJOY!
  36.  
  37. -------------------------------------------------------------------------------
  38. * = Unless permissions are given by Dekita.
  39. http://dekitarpg.wordpress.com/
  40.  
  41. ================================================================================
  42. History:
  43. =========
  44. D /M /Y
  45. 13/09/2o12 - Added More Notetags,
  46. 12/09/2o12 - Improved script layout and compatability with future features,
  47. Added Notetags for enemy's to drop Distribution/Attribute points,
  48. 29/08/2o12 - Added extra random-ness to the stat gains for each option,
  49. 24/08/2o12 - Improved Script calls,
  50. Changed vit/str/dex and mag from useless counters into unique params.
  51. 22/08/2o12 - Started "Re-Writing" script for compatibility with future add-on's,
  52. 21/08/2o12 - Finished.(v1.4),
  53. - other stuff,
  54. 15/08/2o12 - Added options for "Dekita - Perfect Element/Status Control"
  55. 14/08/2o12 - Compatability update for "Dekita - Perfect Element/Status Control"
  56. - Released Script.(v1.3)
  57. 13/08/2o12 - Added bonus level points.
  58. - Released Script.(v1.2)
  59. 12/08/2o12 - Added ability to continue using parameter curves growth.
  60. - Fixed bug where using "SceneManager.call(Scene_Level_Up)" gave an
  61. error message(if no actor had leveled).
  62. - Added main menu command, Added switch to show/enable menu command.
  63. - Removed a useless script call.(lose_pts)
  64. - General tidying of the script.
  65. 11/08/2o12 - Added script calls to increase vit,str,dex and mag counters.
  66. - Removed "Perfect Stat Point Control Mode"
  67. - Changed name of script to Perfect Stat Point Distribution System.
  68. - Updated script to give ALOT more control over how
  69. x-params/s-params increase/decrease via command options.
  70. - Removed formula's method for increasing x/s-params.
  71. 08/08/2o12 - Released Script. (v1.1)
  72. - Compatability update -> (Perfect Status Screen).
  73. 07/08/2o12 - Fixed PROPERTIES_BIGGER_NUMBERS < Customisation module.
  74. - Added Gain/Lose points script calls as requested by "The Attendee"
  75. @ http://www.rpgmakervxace.net
  76. - Released Script. (v1.0)
  77. 06/08/2o12 - Added TP cost, HP Cost and GOLD Cost formula's.
  78. - Improved layout again.
  79. 05/08/2O12 - Added visual Vit,Str,Mag,Dex counters.
  80. 02/08/2012 - Added Ability to convert from "PSPDS" into "PSPCS"
  81. - Added more customisation.
  82. 01/08/2o12 - Added MASS Customisation.
  83. - Finished Script Base.
  84. 31/07/2o12 - Improved layout.
  85. - Added customisation options for when the SPD Screen triggers.
  86. 30/07/2o12 - Script now displays actors JP if Yanfly's JP manager is installed.
  87. - Added minor customisation.
  88. - Improved Layout.
  89. 21/07/2o12 - Started script.
  90.  
  91. ================================================================================
  92. Credit and Thanks to :
  93. =======================
  94. mobychan & Tsukihime - for helping me understand notetags a little better ^_^
  95. Adrian Meza - for showing me how to add bonus level points.
  96. Niclas - for showing me how to properly define add_xparam.
  97. De Mack - for showing me how to write a basic distribute parameters script.
  98.  
  99. ================================================================================
  100. Known Bugs:
  101. ============
  102. Guardian/Summon Scripts usually override the SPD Screen process if
  103. "INBATTLE = true" < Customisation module
  104. If you encounter this problem simply set
  105. "ONMAP" to "true" and "INBATTLE" to "false" < Customisation module
  106.  
  107. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  108. If a new bug is found please contact me at
  109. http://dekitarpg.wordpress.com/
  110.  
  111. ================================================================================
  112. INSTRUCTIONS:
  113. ==============
  114. Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  115.  
  116. ================================================================================
  117. Script Calls:
  118. ==============
  119.  
  120. Use the following script call in game (an event) to change the amount of
  121. points you gain each time you level up
  122.  
  123. $pts = x
  124.  
  125. e.g
  126. $pts = 7 <- this will change the points gained per level to 7
  127.  
  128. --------------------------------------------------------------------------------
  129. Use the following script call to give an actor x amount of points
  130.  
  131. gain_pts(actor_id, value)
  132.  
  133. gain_atti(actor_id, value) < requires add-ons to spend attribute points.
  134.  
  135. e.g
  136. gain_pts(1, 10) < This will give actor 1, 10 points to distribute.
  137.  
  138. NOTE:
  139. value can be negative e.g
  140. gain_pts(1, -10) < This will remove 10 points from actor 1.
  141.  
  142. NOTE_2: if an actor does not have the points you try to remove it wont work!
  143.  
  144. --------------------------------------------------------------------------------
  145. Use the following script calls to add vit, str, dex or mag to an actor.
  146.  
  147. inc_vit(actor_id, value)
  148.  
  149. inc_str(actor_id, value)
  150.  
  151. inc_dex(actor_id, value)
  152.  
  153. inc_mag(actor_id, value)
  154.  
  155. NOTE: I have made these script calls work the same way as if you spend a point
  156. in a stat(vit,str,dex and mag) e.g if you increase vit it will increase
  157. all params/xparams and sparams that you define under option 1 customisation.
  158. The same goes for str, dex and mag also.
  159.  
  160. NOTE_2: as with gain_pts value can be negative.
  161.  
  162. --------------------------------------------------------------------------------
  163. Use the following script call in game (an event) to trigger the SPD Screen
  164.  
  165. SceneManager.call(Scene_Level_Up)
  166.  
  167. NOTE: If no actor has leveled when you call this scene it will display the first
  168. actor in the party. If an actor has leveled it will show the SPDS for them.
  169.  
  170. ================================================================================
  171. NoteTags:
  172. ==========
  173. <pts gain: X> (Gains Distribution Points)
  174. <atti gain: X> (Gains Attribute Points)
  175.  
  176. Place these notetags into enemy noteboxes to gain X amount of points when the
  177. enemy is defeated. replace X with a value of your choosing, e.g <pts gain: 99>
  178.  
  179. --------------------------------------------------------------------------------
  180.  
  181. <vit: X>
  182. <str: X>
  183. <dex: X>
  184. <mag: X>
  185.  
  186. Place these notetags into weapon or armor noteboxes to increase actors stats by
  187. X amount of points when the item is equipped,
  188.  
  189. Place these notetags into enemy noteboxes to increase the enemys stats by
  190. X amount of points.
  191.  
  192. NOTE: This will increase all params/x-params and s-params that you have set
  193. to increase for vit,str,dex and mag options within the stat point distribution
  194. script. e.g if option_1_MaxHP_GAIN = 9.5 for each one point of vit you will
  195. gain 1 vit and 9.5 MaxHP added to your current amount.
  196.  
  197. ================================================================================
  198. Import:
  199. ========
  200. =end
  201. $imported = {} if $imported.nil?
  202. $imported["DPB-PSPDS"] = true
  203. module DPB
  204. module PSPDS
  205. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  206. # ☆ Command's (selectable) DO NOT CHANGE OR REMOVE ANY OF THESE!
  207. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  208. COMMANDS =[
  209. :Vitality, # < DO NOT REMOVE OR
  210. :Strength, # < CHANGE ANY OF THESE
  211. :Dexterity,# < COMMANDS
  212. :Magic, # < DO NOT REMOVE !
  213. ] # Do not remove this.
  214. #===============================================================================#
  215. # #
  216. # PSPDS #
  217. # (Perfect Stat Point Distribution System) #
  218. # - CUSTOMISATION BEGIN - #
  219. # #
  220. # #
  221. #===============================================================================#
  222. # ☆ Customisation = Tah-Dah
  223. #===========================
  224. # I have added as much customisation as i thought was needed.
  225. # Probably a little too much, :o , if there is such a thing.\..\..
  226. #
  227. # It is advised you take a moment to look through the cusomisation options
  228. # to see if any apply to your current project.
  229. #
  230. #===============================================================================
  231.  
  232. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  233. # ☆ Vocab Settings
  234. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  235.  
  236. LVLUPPTSVOCAB = "Points" # Help info used for the name of your level up points
  237.  
  238. COST_VOCAB = "Points Cost:"
  239.  
  240. YANFLY_JP_VOCAB = "Yanfly-JP" # <Only visable if using yanfly's Jp Manager
  241.  
  242. ADDSTATTEXT = "Stat Added !" # Help info for when points are added
  243.  
  244. NOPOINTSTEXT = "No Points Left To Add !!" # Help info for when no points are remaining
  245.  
  246. VIT_GAIN_VOCAB = "Increases overall Survivability" # Help info for command option 1
  247.  
  248. STR_GAIN_VOCAB = "Increases overall Strength" # Help info for command option 2
  249.  
  250. DEX_GAIN_VOCAB = "Increases overall Dexterity" # Help info for command option 3
  251.  
  252. MAG_GAIN_VOCAB = "Increases overall Magic Power" # Help info for command option 4
  253.  
  254. WAIT_TIME = 30 # the time you wait (for the command window to re-activate)
  255. # after increasing a stat.
  256. # (time is in frames. 60 frames = 1 second)
  257. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  258. # - Victory Messages -
  259. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  260. # This adjusts the victory message shown for the default battle system.
  261. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  262.  
  263. GAINED_POINTS_MESSAGE = "%s has earned %s %s!"
  264.  
  265. GAINED_ATTRIBUTE_MESSAGE = "%s has gained %s %s!"
  266. # Attribute points require further add-ons to use.
  267.  
  268. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  269. # ☆ Display SPD (Stat Point Distribution) Screen
  270. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  271. # By default the SPD Screen will be displayed at the end of battle (if you
  272. # level up). Some scripts may interfere with this one e.g summoning scripts,
  273. # when you level after your summon kills a monster in battle, the De-Summon
  274. # process usually overrides this one :(
  275. #
  276. # NOTE: if your party has more than 1 member that levels at the same time
  277. # then i recommend having both these options = true
  278. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  279.  
  280. INBATTLE = false # IF "true" screen triggers at end of battle (if an actor levels up)
  281.  
  282. ONMAP = true # IF "true" screen triggers on map screen after an actor levels up.
  283.  
  284. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  285. # ☆ Draw Actor Graphic ?
  286. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  287.  
  288. DRAW_ACTOR_GRAPHIC = false
  289. DAG_X = 432 # x location for actor graphic
  290. DAG_Y = 90 # y location for actor graphic
  291.  
  292. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  293. # ☆ Font Settings
  294. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  295.  
  296. PROPFONTSIZE = 14 # For Displayed Properties
  297.  
  298. PARAMFONTSIZE = 20 # For Parameters in point selection window and JP if
  299. # Yanfly JP Manager is installed
  300.  
  301. FONTSIZE = 16 # For Almost Everything Else and information in PSS*
  302. # (PSS = Perfect Status Screen) * = If imported.
  303.  
  304. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  305. # ☆ Points gained after each level up
  306. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  307. # This is where you define the amount of distribution points each character
  308. # gains after each level up.
  309. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  310.  
  311. LVUPPTS = 5 # Recommended to be under 10
  312.  
  313. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  314. # ☆ Default parameter growth
  315. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  316. # This is where you define whether you still gain parameters via
  317. # the parameter curves in the database.
  318. # set this to true if you wish to use that method (as well as SPD method).
  319. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  320.  
  321. USE_DEFAULT_PARAM_GAIN = false
  322.  
  323. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  324. # ☆ Bonus Point Gains
  325. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  326. # Here you can grant bonus points on specific levels e.g reach level 10
  327. # gain 5 bonus spendable points as a reward .
  328. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  329.  
  330. BONUS_POINTS_ON_LEVELS = true # If 'true' this will only grant points on
  331. # levels listed in LEVELS.
  332.  
  333. LEVELS = [10, 20, 30, 40, 50, 75, 100] # If BONUS_POINTS_ON_LEVELS is 'true'
  334. # these will be the levels that the
  335. # actor(s) will gain bonus points on.
  336.  
  337. ONLY_GAIN_POINTS_ON_LEVELS = false # Make this option "true" if you only want
  338. # to gains points on the levels stated
  339. # in LEVELS.
  340. # NOTE: BONUS_POINTS_ON_LEVELS "MUST!" be
  341. # "true" for this option to work.
  342.  
  343. BONUSPOINTS = 10 # Define here how many bonus points your actors
  344. # gain on their bonus point levels.
  345.  
  346. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  347. # ☆ Parameter gain settings
  348. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  349. # These settings adjust the points gained for each point spent
  350. # in each command option as well as each command options name.
  351. # You can also put negative values for each parameter.
  352. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  353. # !! IMPORTANT !!
  354. #-----------------
  355. # It is important to note that Actor Ex-Parameters and Sp-Parameters deal
  356. # with percentage chance values. This means that their gain/reduce values
  357. # should be values that represent rates. What this means is:
  358. # 0.001 = 0.1%
  359. # 0.01 = 1%
  360. # 0.1 = 10%
  361. # 1.0 = 100%
  362. #
  363. # Be *VERY* careful with Ex/Sp-Parameters when defining their gain/reduce values.
  364. #
  365. # NOTE: the %-age of increase/decrease is of the current value e.g if you have
  366. # 50% and decrease it a further 1% it wouldnt go down to 49% instead it would be
  367. # 49.5% .
  368. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  369.  
  370. COMMAND_COLUMN_EXTRA_WIDTH = 0
  371.  
  372. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  373. # Option 1 settings (command option 1)
  374. #-------------------------------------
  375. # Adjust these to your liking. you can set it to decrease by using "-" before
  376. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  377. #
  378. # i have also introduced a random gain min - maximum value option
  379. # its quite simple enter the min and max extra value that you want it to increase
  380. # e.g OP_1_MaxHP_RAND_MIN = 0 | OP_1_MaxHP_RAND_MAX = 5
  381. # Will increase MaxHP by 0-5 + OPTION_1_MaxHP_GAIN . easy . no?
  382. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  383.  
  384. COMMAND_NAME_1 = "Vitality" # Name of command option
  385.  
  386. OPTION_1_COST = 1 # The amount of points it costs to increase this option
  387. # Default = 1
  388.  
  389. #Regular-Parameters
  390. OPTION_1_MaxHP_GAIN = 9.5 # Maximum HP Stat.
  391. OP_1_MaxHP_RAND_MIN = 0 # Random gain minimum.
  392. OP_1_MaxHP_RAND_MAX = 0 # Random gain maximum.
  393.  
  394. OPTION_1_MaxMP_GAIN = 0 # Maximum MP Stat.
  395. OP_1_MaxMP_RAND_MIN = 0 # Random gain minimum.
  396. OP_1_MaxMP_RAND_MAX = 0 # Random gain maximum.
  397.  
  398. OPTION_1_ATK_GAIN = 0 # Attack Stat.
  399. OP_1_ATK_RAND_MIN = 0 # Random gain minimum.
  400. OP_1_ATK_RAND_MAX = 0 # Random gain maximum.
  401.  
  402. OPTION_1_DEF_GAIN = 0.4 # Defence Stat.
  403. OP_1_DEF_RAND_MIN = 0 # Random gain minimum.
  404. OP_1_DEF_RAND_MAX = 0 # Random gain maximum.
  405.  
  406. OPTION_1_MAT_GAIN = 0 # Magic Attack Stat.
  407. OP_1_MAT_RAND_MIN = 0 # Random gain minimum.
  408. OP_1_MAT_RAND_MAX = 0 # Random gain maximum.
  409.  
  410. OPTION_1_MDF_GAIN = 0.4 # Magic Defence Stat.
  411. OP_1_MDF_RAND_MIN = 0 # Random gain minimum.
  412. OP_1_MDF_RAND_MAX = 0 # Random gain maximum.
  413.  
  414. OPTION_1_AGI_GAIN = 0 # Agility Stat.
  415. OP_1_AGI_RAND_MIN = 0 # Random gain minimum.
  416. OP_1_AGI_RAND_MAX = 0 # Random gain maximum.
  417.  
  418. OPTION_1_LUK_GAIN = 0 # Luck Stat.
  419. OP_1_LUK_RAND_MIN = 0 # Random gain minimum.
  420. OP_1_LUK_RAND_MAX = 0 # Random gain maximum.
  421.  
  422. #The following are % gains, 0.01 = 1%
  423. #X-Parameters
  424. OPTION_1_HIT_GAIN = 0.00 # Hit Rate.
  425. OP_1_HIT_RAND_MIN = 0 # Random gain minimum.
  426. OP_1_HIT_RAND_MAX = 0 # Random gain maximum.
  427.  
  428. OPTION_1_EVA_GAIN = 0.00 # Evasion Rate.
  429. OP_1_EVA_RAND_MIN = 0 # Random gain minimum.
  430. OP_1_EVA_RAND_MAX = 0 # Random gain maximum.
  431.  
  432. OPTION_1_CRI_GAIN = 0.00 # Critical Hit Rate.
  433. OP_1_CRI_RAND_MIN = 0 # Random gain minimum.
  434. OP_1_CRI_RAND_MAX = 0 # Random gain maximum.
  435.  
  436. OPTION_1_CEV_GAIN = 0.001 # Critical Evasion Rate.
  437. OP_1_CEV_RAND_MIN = 0 # Random gain minimum.
  438. OP_1_CEV_RAND_MAX = 0 # Random gain maximum.
  439.  
  440. OPTION_1_MEV_GAIN = 0.00 # Magic Evasion Rate.
  441. OP_1_MEV_RAND_MIN = 0 # Random gain minimum.
  442. OP_1_MEV_RAND_MAX = 0 # Random gain maximum.
  443.  
  444. OPTION_1_MRF_GAIN = 0.00 # Magic Reflect Rate.
  445. OP_1_MRF_RAND_MIN = 0 # Random gain minimum.
  446. OP_1_MRF_RAND_MAX = 0 # Random gain maximum.
  447.  
  448. OPTION_1_CNT_GAIN = 0.00 # Counter Rate.
  449. OP_1_CNT_RAND_MIN = 0 # Random gain minimum.
  450. OP_1_CNT_RAND_MAX = 0 # Random gain maximum.
  451.  
  452. OPTION_1_HRG_GAIN = 0.0005 # HP Regeneration Rate.
  453. OP_1_HRG_RAND_MIN = 0 # Random gain minimum.
  454. OP_1_HRG_RAND_MAX = 0 # Random gain maximum.
  455.  
  456. OPTION_1_MRG_GAIN = 0.00 # MP Regeneration Rate.
  457. OP_1_MRG_RAND_MIN = 0 # Random gain minimum.
  458. OP_1_MRG_RAND_MAX = 0 # Random gain maximum.
  459.  
  460. OPTION_1_TRG_GAIN = 0.00 # TP Regeneration Rate.
  461. OP_1_TRG_RAND_MIN = 0 # Random gain minimum.
  462. OP_1_TRG_RAND_MAX = 0 # Random gain maximum.
  463.  
  464. #S-Parameters
  465. OPTION_1_TGR_GAIN = 0.013 # Target Rate. (monsters targeting you)
  466. OP_1_TGR_RAND_MIN = 0 # Random gain minimum.
  467. OP_1_TGR_RAND_MAX = 0 # Random gain maximum.
  468.  
  469. OPTION_1_GRD_GAIN = 0.013 # Guard Effect Rate
  470. OP_1_GRD_RAND_MIN = 0 # Random gain minimum.
  471. OP_1_GRD_RAND_MAX = 0 # Random gain maximum.
  472.  
  473. OPTION_1_REC_GAIN = 0.00 # Recovery Effect Rate.
  474. OP_1_REC_RAND_MIN = 0 # Random gain minimum.
  475. OP_1_REC_RAND_MAX = 0 # Random gain maximum.
  476.  
  477. OPTION_1_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  478. OP_1_PHA_RAND_MIN = 0 # Random gain minimum.
  479. OP_1_PHA_RAND_MAX = 0 # Random gain maximum.
  480.  
  481. OPTION_1_MCR_GAIN = -0.00 # MP Cost Rate
  482. OP_1_MCR_RAND_MIN = 0 # Random gain minimum.
  483. OP_1_MCR_RAND_MAX = 0 # Random gain maximum.
  484.  
  485. OPTION_1_TCR_GAIN = -0.00 # TP Charge Rate.
  486. OP_1_TCR_RAND_MIN = 0 # Random gain minimum.
  487. OP_1_TCR_RAND_MAX = 0 # Random gain maximum.
  488.  
  489. OPTION_1_PDR_GAIN = -0.00025 # Physical Damage Rate.(incomming)
  490. OP_1_PDR_RAND_MIN = 0 # Random gain minimum.
  491. OP_1_PDR_RAND_MAX = 0 # Random gain maximum.
  492.  
  493. OPTION_1_MDR_GAIN = -0.00025 # Magical Damage Rate.(incomming)
  494. OP_1_MDR_RAND_MIN = 0 # Random gain minimum.
  495. OP_1_MDR_RAND_MAX = 0 # Random gain maximum.
  496.  
  497. OPTION_1_FDR_GAIN = -0.00 # Floor Damage Rate.
  498. OP_1_FDR_RAND_MIN = 0 # Random gain minimum.
  499. OP_1_FDR_RAND_MAX = 0 # Random gain maximum.
  500.  
  501. OPTION_1_EXR_GAIN = 0 # EXP Gain Rate.
  502. OP_1_EXR_RAND_MIN = 0 # Random gain minimum.
  503. OP_1_EXR_RAND_MAX = 0 # Random gain maximum.
  504.  
  505. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  506. # Option 2 settings (command option 2)
  507. #-------------------------------------
  508. # Adjust these to your liking. you can set it to decrease by using "-" before
  509. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  510. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  511.  
  512. COMMAND_NAME_2 = "Strength"
  513.  
  514. OPTION_2_COST = 1 # The amount of points it costs to increase this option
  515. # Default = 1
  516.  
  517. #Regular-Parameters
  518. OPTION_2_MaxHP_GAIN = 0 # Maximum HP Stat.
  519. OP_2_MaxHP_RAND_MIN = 0 # Random gain minimum.
  520. OP_2_MaxHP_RAND_MAX = 0 # Random gain maximum.
  521.  
  522. OPTION_2_MaxMP_GAIN = 0 # Maximum MP Stat.
  523. OP_2_MaxMP_RAND_MIN = 0 # Random gain minimum.
  524. OP_2_MaxMP_RAND_MAX = 0 # Random gain maximum.
  525.  
  526. OPTION_2_ATK_GAIN = 1.2 # Attack Stat.
  527. OP_2_ATK_RAND_MIN = 0 # Random gain minimum.
  528. OP_2_ATK_RAND_MAX = 0 # Random gain maximum.
  529.  
  530. OPTION_2_DEF_GAIN = 0.6 # Defence Stat.
  531. OP_2_DEF_RAND_MIN = 0 # Random gain minimum.
  532. OP_2_DEF_RAND_MAX = 0 # Random gain maximum.
  533.  
  534. OPTION_2_MAT_GAIN = -0.01 # Magic Attack Stat.
  535. OP_2_MAT_RAND_MIN = 0 # Random gain minimum.
  536. OP_2_MAT_RAND_MAX = 0 # Random gain maximum.
  537.  
  538. OPTION_2_MDF_GAIN = -0.01 # Magic Defence Stat.
  539. OP_2_MDF_RAND_MIN = 0 # Random gain minimum.
  540. OP_2_MDF_RAND_MAX = 0 # Random gain maximum.
  541.  
  542. OPTION_2_AGI_GAIN = 0 # Agility Stat.
  543. OP_2_AGI_RAND_MIN = 0 # Random gain minimum.
  544. OP_2_AGI_RAND_MAX = 0 # Random gain maximum.
  545.  
  546. OPTION_2_LUK_GAIN = 0.1 # Luck Stat.
  547. OP_2_LUK_RAND_MIN = 0 # Random gain minimum.
  548. OP_2_LUK_RAND_MAX = 0 # Random gain maximum.
  549.  
  550. #The following are % gains, 0.01 = 1%
  551. #X-Parameters
  552. OPTION_2_HIT_GAIN = 0.00 # Hit Rate.
  553. OP_2_HIT_RAND_MIN = 0 # Random gain minimum.
  554. OP_2_HIT_RAND_MAX = 0 # Random gain maximum.
  555.  
  556. OPTION_2_EVA_GAIN = 0.00 # Evasion Rate.
  557. OP_2_EVA_RAND_MIN = 0 # Random gain minimum.
  558. OP_2_EVA_RAND_MAX = 0 # Random gain maximum.
  559.  
  560. OPTION_2_CRI_GAIN = 0.00 # Critical Hit Rate.
  561. OP_2_CRI_RAND_MIN = 0 # Random gain minimum.
  562. OP_2_CRI_RAND_MAX = 0 # Random gain maximum.
  563.  
  564. OPTION_2_CEV_GAIN = 0.00 # Critical Evasion Rate.
  565. OP_2_CEV_RAND_MIN = 0 # Random gain minimum.
  566. OP_2_CEV_RAND_MAX = 0 # Random gain maximum.
  567.  
  568. OPTION_2_MEV_GAIN = 0.00 # Magic Evasion Rate.
  569. OP_2_MEV_RAND_MIN = 0 # Random gain minimum.
  570. OP_2_MEV_RAND_MAX = 0 # Random gain maximum.
  571.  
  572. OPTION_2_MRF_GAIN = 0.00 # Magic Reflect Rate.
  573. OP_2_MRF_RAND_MIN = 0 # Random gain minimum.
  574. OP_2_MRF_RAND_MAX = 0 # Random gain maximum.
  575.  
  576. OPTION_2_CNT_GAIN = 0.0005 # Counter Rate.
  577. OP_2_CNT_RAND_MIN = 0 # Random gain minimum.
  578. OP_2_CNT_RAND_MAX = 0 # Random gain maximum.
  579.  
  580. OPTION_2_HRG_GAIN = 0.00 # HP Regeneration Rate.
  581. OP_2_HRG_RAND_MIN = 0 # Random gain minimum.
  582. OP_2_HRG_RAND_MAX = 0 # Random gain maximum.
  583.  
  584. OPTION_2_MRG_GAIN = 0.00 # MP Regeneration Rate.
  585. OP_2_MRG_RAND_MIN = 0 # Random gain minimum.
  586. OP_2_MRG_RAND_MAX = 0 # Random gain maximum.
  587.  
  588. OPTION_2_TRG_GAIN = 0.00 # TP Regeneration Rate.
  589. OP_2_TRG_RAND_MIN = 0 # Random gain minimum.
  590. OP_2_TRG_RAND_MAX = 0 # Random gain maximum.
  591.  
  592. #S-Parameters
  593. OPTION_2_TGR_GAIN = 0.0009 # Target Rate. (monsters targeting you)
  594. OP_2_TGR_RAND_MIN = 0 # Random gain minimum.
  595. OP_2_TGR_RAND_MAX = 0 # Random gain maximum.
  596.  
  597. OPTION_2_GRD_GAIN = 0.005 # Guard Effect Rate
  598. OP_2_GRD_RAND_MIN = 0 # Random gain minimum.
  599. OP_2_GRD_RAND_MAX = 0 # Random gain maximum.
  600.  
  601. OPTION_2_REC_GAIN = 0.00 # Recovery Effect Rate.
  602. OP_2_REC_RAND_MIN = 0 # Random gain minimum.
  603. OP_2_REC_RAND_MAX = 0 # Random gain maximum.
  604.  
  605. OPTION_2_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  606. OP_2_PHA_RAND_MIN = 0 # Random gain minimum.
  607. OP_2_PHA_RAND_MAX = 0 # Random gain maximum.
  608.  
  609. OPTION_2_MCR_GAIN = -0.00 # MP Cost Rate
  610. OP_2_MCR_RAND_MIN = 0 # Random gain minimum.
  611. OP_2_MCR_RAND_MAX = 0 # Random gain maximum.
  612.  
  613. OPTION_2_TCR_GAIN = -0.00 # TP Charge Rate.
  614. OP_2_TCR_RAND_MIN = 0 # Random gain minimum.
  615. OP_2_TCR_RAND_MAX = 0 # Random gain maximum.
  616.  
  617. OPTION_2_PDR_GAIN = -0.0020 # Physical Damage Rate.(incomming)
  618. OP_2_PDR_RAND_MIN = 0 # Random gain minimum.
  619. OP_2_PDR_RAND_MAX = 0 # Random gain maximum.
  620.  
  621. OPTION_2_MDR_GAIN = -0.00 # Magical Damage Rate.(incomming)
  622. OP_2_MDR_RAND_MIN = 0 # Random gain minimum.
  623. OP_2_MDR_RAND_MAX = 0 # Random gain maximum.
  624.  
  625. OPTION_2_FDR_GAIN = -0.00 # Floor Damage Rate.
  626. OP_2_FDR_RAND_MIN = 0 # Random gain minimum.
  627. OP_2_FDR_RAND_MAX = 0 # Random gain maximum.
  628.  
  629. OPTION_2_EXR_GAIN = 0 # EXP Gain Rate.
  630. OP_2_EXR_RAND_MIN = 0 # Random gain minimum.
  631. OP_2_EXR_RAND_MAX = 0 # Random gain maximum.
  632.  
  633. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  634. # Option 3 settings (command option 3)
  635. #-------------------------------------
  636. # Adjust these to your liking. you can set it to decrease by using "-" before
  637. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  638. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  639.  
  640. COMMAND_NAME_3 = "Dexterity"
  641.  
  642. OPTION_3_COST = 1 # The amount of points it costs to increase this option
  643. # Default = 1
  644.  
  645. #Regular-Parameters
  646. OPTION_3_MaxHP_GAIN = 0 # Maximum HP Stat.
  647. OP_3_MaxHP_RAND_MIN = 0 # Random gain minimum.
  648. OP_3_MaxHP_RAND_MAX = 0 # Random gain maximum.
  649.  
  650. OPTION_3_MaxMP_GAIN = 0 # Maximum MP Stat.
  651. OP_3_MaxMP_RAND_MIN = 0 # Random gain minimum.
  652. OP_3_MaxMP_RAND_MAX = 0 # Random gain maximum.
  653.  
  654. OPTION_3_ATK_GAIN = 0 # Attack Stat.
  655. OP_3_ATK_RAND_MIN = 0 # Random gain minimum.
  656. OP_3_ATK_RAND_MAX = 0 # Random gain maximum.
  657.  
  658. OPTION_3_DEF_GAIN = 0 # Defence Stat.
  659. OP_3_DEF_RAND_MIN = 0 # Random gain minimum.
  660. OP_3_DEF_RAND_MAX = 0 # Random gain maximum.
  661.  
  662. OPTION_3_MAT_GAIN = 0 # Magic Attack Stat.
  663. OP_3_MAT_RAND_MIN = 0 # Random gain minimum.
  664. OP_3_MAT_RAND_MAX = 0 # Random gain maximum.
  665.  
  666. OPTION_3_MDF_GAIN = 0 # Magic Defence Stat.
  667. OP_3_MDF_RAND_MIN = 0 # Random gain minimum.
  668. OP_3_MDF_RAND_MAX = 0 # Random gain maximum.
  669.  
  670. OPTION_3_AGI_GAIN = 1.2 # Agility Stat.
  671. OP_3_AGI_RAND_MIN = 0 # Random gain minimum.
  672. OP_3_AGI_RAND_MAX = 0 # Random gain maximum.
  673.  
  674. OPTION_3_LUK_GAIN = 0.6 # Luck Stat.
  675. OP_3_LUK_RAND_MIN = 0 # Random gain minimum.
  676. OP_3_LUK_RAND_MAX = 0 # Random gain maximum.
  677.  
  678. #The following are % gains, 0.01 = 1%
  679. #X-Parameters
  680. OPTION_3_HIT_GAIN = 0.005 # Hit Rate.
  681. OP_3_HIT_RAND_MIN = 0 # Random gain minimum.
  682. OP_3_HIT_RAND_MAX = 0 # Random gain maximum.
  683.  
  684. OPTION_3_EVA_GAIN = 0.0005 # Evasion Rate.
  685. OP_3_EVA_RAND_MIN = 0 # Random gain minimum.
  686. OP_3_EVA_RAND_MAX = 0 # Random gain maximum.
  687.  
  688. OPTION_3_CRI_GAIN = 0.001 # Critical Hit Rate.
  689. OP_3_CRI_RAND_MIN = 0 # Random gain minimum.
  690. OP_3_CRI_RAND_MAX = 0 # Random gain maximum.
  691.  
  692. OPTION_3_CEV_GAIN = 0.0005 # Critical Evasion Rate.
  693. OP_3_CEV_RAND_MIN = 0 # Random gain minimum.
  694. OP_3_CEV_RAND_MAX = 0 # Random gain maximum.
  695.  
  696. OPTION_3_MEV_GAIN = 0.00025 # Magic Evasion Rate.
  697. OP_3_MEV_RAND_MIN = 0 # Random gain minimum.
  698. OP_3_MEV_RAND_MAX = 0 # Random gain maximum.
  699.  
  700. OPTION_3_MRF_GAIN = 0.00 # Magic Reflect Rate.
  701. OP_3_MRF_RAND_MIN = 0 # Random gain minimum.
  702. OP_3_MRF_RAND_MAX = 0 # Random gain maximum.
  703.  
  704. OPTION_3_CNT_GAIN = 0.0002 # Counter Rate.
  705. OP_3_CNT_RAND_MIN = 0 # Random gain minimum.
  706. OP_3_CNT_RAND_MAX = 0 # Random gain maximum.
  707.  
  708. OPTION_3_HRG_GAIN = 0.00 # HP Regeneration Rate.
  709. OP_3_HRG_RAND_MIN = 0 # Random gain minimum.
  710. OP_3_HRG_RAND_MAX = 0 # Random gain maximum.
  711.  
  712. OPTION_3_MRG_GAIN = 0.00 # MP Regeneration Rate.
  713. OP_3_MRG_RAND_MIN = 0 # Random gain minimum.
  714. OP_3_MRG_RAND_MAX = 0 # Random gain maximum.
  715.  
  716. OPTION_3_TRG_GAIN = 0.0005 # TP Regeneration Rate.
  717. OP_3_TRG_RAND_MIN = 0 # Random gain minimum.
  718. OP_3_TRG_RAND_MAX = 0 # Random gain maximum.
  719.  
  720. #S-Parameters
  721. OPTION_3_TGR_GAIN = 0.00 # Target Rate. (monsters targeting you)
  722. OP_3_TGR_RAND_MIN = 0 # Random gain minimum.
  723. OP_3_TGR_RAND_MAX = 0 # Random gain maximum.
  724.  
  725. OPTION_3_GRD_GAIN = 0.00 # Guard Effect Rate
  726. OP_3_GRD_RAND_MIN = 0 # Random gain minimum.
  727. OP_3_GRD_RAND_MAX = 0 # Random gain maximum.
  728.  
  729. OPTION_3_REC_GAIN = 0.00 # Recovery Effect Rate.
  730. OP_3_REC_RAND_MIN = 0 # Random gain minimum.
  731. OP_3_REC_RAND_MAX = 0 # Random gain maximum.
  732.  
  733. OPTION_3_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  734. OP_3_PHA_RAND_MIN = 0 # Random gain minimum.
  735. OP_3_PHA_RAND_MAX = 0 # Random gain maximum.
  736.  
  737. OPTION_3_MCR_GAIN = -0.00 # MP Cost Rate
  738. OP_3_MCR_RAND_MIN = 0 # Random gain minimum.
  739. OP_3_MCR_RAND_MAX = 0 # Random gain maximum.
  740.  
  741. OPTION_3_TCR_GAIN = -0.0025 # TP Charge Rate.
  742. OP_3_TCR_RAND_MIN = 0 # Random gain minimum.
  743. OP_3_TCR_RAND_MAX = 0 # Random gain maximum.
  744.  
  745. OPTION_3_PDR_GAIN = -0.00 # Physical Damage Rate.(incomming)
  746. OP_3_PDR_RAND_MIN = 0 # Random gain minimum.
  747. OP_3_PDR_RAND_MAX = 0 # Random gain maximum.
  748.  
  749. OPTION_3_MDR_GAIN = -0.00 # Magical Damage Rate.(incomming)
  750. OP_3_MDR_RAND_MIN = 0 # Random gain minimum.
  751. OP_3_MDR_RAND_MAX = 0 # Random gain maximum.
  752.  
  753. OPTION_3_FDR_GAIN = -0.00 # Floor Damage Rate.
  754. OP_3_FDR_RAND_MIN = 0 # Random gain minimum.
  755. OP_3_FDR_RAND_MAX = 0 # Random gain maximum.
  756.  
  757. OPTION_3_EXR_GAIN = 0 # EXP Gain Rate.
  758. OP_3_EXR_RAND_MIN = 0 # Random gain minimum.
  759. OP_3_EXR_RAND_MAX = 0 # Random gain maximum.
  760.  
  761. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  762. # Option 4 settings (command option 4)
  763. #-------------------------------------
  764. # Adjust these to your liking. you can set it to decrease by using "-" before
  765. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  766. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  767.  
  768. COMMAND_NAME_4 = "Magic"
  769.  
  770. OPTION_4_COST = 1 # The amount of points it costs to increase this option
  771. # Default = 1
  772.  
  773. #Regular-Parameters
  774. OPTION_4_MaxHP_GAIN = 0 # Maximum HP Stat.
  775. OP_4_MaxHP_RAND_MIN = 0 # Random gain minimum.
  776. OP_4_MaxHP_RAND_MAX = 0 # Random gain maximum.
  777.  
  778. OPTION_4_MaxMP_GAIN = 9.5 # Maximum MP Stat.
  779. OP_4_MaxMP_RAND_MIN = 0 # Random gain minimum.
  780. OP_4_MaxMP_RAND_MAX = 0 # Random gain maximum.
  781.  
  782. OPTION_4_ATK_GAIN = -0.01 # Attack Stat.
  783. OP_4_ATK_RAND_MIN = 0 # Random gain minimum.
  784. OP_4_ATK_RAND_MAX = 0 # Random gain maximum.
  785.  
  786. OPTION_4_DEF_GAIN = -0.01 # Defence Stat.
  787. OP_4_DEF_RAND_MIN = 0 # Random gain minimum.
  788. OP_4_DEF_RAND_MAX = 0 # Random gain maximum.
  789.  
  790. OPTION_4_MAT_GAIN = 1.2 # Magic Attack Stat.
  791. OP_4_MAT_RAND_MIN = 0 # Random gain minimum.
  792. OP_4_MAT_RAND_MAX = 0 # Random gain maximum.
  793.  
  794. OPTION_4_MDF_GAIN = 0.6 # Magic Defence Stat.
  795. OP_4_MDF_RAND_MIN = 0 # Random gain minimum.
  796. OP_4_MDF_RAND_MAX = 0 # Random gain maximum.
  797.  
  798. OPTION_4_AGI_GAIN = 0 # Agility Stat.
  799. OP_4_AGI_RAND_MIN = 0 # Random gain minimum.
  800. OP_4_AGI_RAND_MAX = 0 # Random gain maximum.
  801.  
  802. OPTION_4_LUK_GAIN = 0.1 # Luck Stat.
  803. OP_4_LUK_RAND_MIN = 0 # Random gain minimum.
  804. OP_4_LUK_RAND_MAX = 0 # Random gain maximum.
  805.  
  806. #The following are % gains, 0.01 = 1%
  807. #X-Parameters
  808. OPTION_4_HIT_GAIN = 0.00 # Hit Rate.
  809. OP_4_HIT_RAND_MIN = 0 # Random gain minimum.
  810. OP_4_HIT_RAND_MAX = 0 # Random gain maximum.
  811.  
  812. OPTION_4_EVA_GAIN = 0.00 # Evasion Rate.
  813. OP_4_EVA_RAND_MIN = 0 # Random gain minimum.
  814. OP_4_EVA_RAND_MAX = 0 # Random gain maximum.
  815.  
  816. OPTION_4_CRI_GAIN = 0.00 # Critical Hit Rate.
  817. OP_4_CRI_RAND_MIN = 0 # Random gain minimum.
  818. OP_4_CRI_RAND_MAX = 0 # Random gain maximum.
  819.  
  820. OPTION_4_CEV_GAIN = 0.00 # Critical Evasion Rate.
  821. OP_4_CEV_RAND_MIN = 0 # Random gain minimum.
  822. OP_4_CEV_RAND_MAX = 0 # Random gain maximum.
  823.  
  824. OPTION_4_MEV_GAIN = 0.001 # Magic Evasion Rate.
  825. OP_4_MEV_RAND_MIN = 0 # Random gain minimum.
  826. OP_4_MEV_RAND_MAX = 0 # Random gain maximum.
  827.  
  828. OPTION_4_MRF_GAIN = 0.00 # Magic Reflect Rate.
  829. OP_4_MRF_RAND_MIN = 0 # Random gain minimum.
  830. OP_4_MRF_RAND_MAX = 0 # Random gain maximum.
  831.  
  832. OPTION_4_CNT_GAIN = 0.00 # Counter Rate.
  833. OP_4_CNT_RAND_MIN = 0 # Random gain minimum.
  834. OP_4_CNT_RAND_MAX = 0 # Random gain maximum.
  835.  
  836. OPTION_4_HRG_GAIN = 0.00 # HP Regeneration Rate.
  837. OP_4_HRG_RAND_MIN = 0 # Random gain minimum.
  838. OP_4_HRG_RAND_MAX = 0 # Random gain maximum.
  839.  
  840. OPTION_4_MRG_GAIN = 0.0005 # MP Regeneration Rate.
  841. OP_4_MRG_RAND_MIN = 0 # Random gain minimum.
  842. OP_4_MRG_RAND_MAX = 0 # Random gain maximum.
  843.  
  844. OPTION_4_TRG_GAIN = 0.00 # TP Regeneration Rate.
  845. OP_4_TRG_RAND_MIN = 0 # Random gain minimum.
  846. OP_4_TRG_RAND_MAX = 0 # Random gain maximum.
  847.  
  848. #S-Parameters
  849. OPTION_4_TGR_GAIN = 0.00 # Target Rate. (monsters targeting you)
  850. OP_4_TGR_RAND_MIN = 0 # Random gain minimum.
  851. OP_4_TGR_RAND_MAX = 0 # Random gain maximum.
  852.  
  853. OPTION_4_GRD_GAIN = 0.004 # Guard Effect Rate
  854. OP_4_GRD_RAND_MIN = 0 # Random gain minimum.
  855. OP_4_GRD_RAND_MAX = 0 # Random gain maximum.
  856.  
  857. OPTION_4_REC_GAIN = 0.00 # Recovery Effect Rate.
  858. OP_4_REC_RAND_MIN = 0 # Random gain minimum.
  859. OP_4_REC_RAND_MAX = 0 # Random gain maximum.
  860.  
  861. OPTION_4_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  862. OP_4_PHA_RAND_MIN = 0 # Random gain minimum.
  863. OP_4_PHA_RAND_MAX = 0 # Random gain maximum.
  864.  
  865. OPTION_4_MCR_GAIN = -0.0025 # MP Cost Rate
  866. OP_4_MCR_RAND_MIN = 0 # Random gain minimum.
  867. OP_4_MCR_RAND_MAX = 0 # Random gain maximum.
  868.  
  869. OPTION_4_TCR_GAIN = -0.00 # TP Charge Rate.
  870. OP_4_TCR_RAND_MIN = 0 # Random gain minimum.
  871. OP_4_TCR_RAND_MAX = 0 # Random gain maximum.
  872.  
  873. OPTION_4_PDR_GAIN = -0.00 # Physical Damage Rate.(incomming)
  874. OP_4_PDR_RAND_MIN = 0 # Random gain minimum.
  875. OP_4_PDR_RAND_MAX = 0 # Random gain maximum.
  876.  
  877. OPTION_4_MDR_GAIN = -0.0020 # Magical Damage Rate.(incomming)
  878. OP_4_MDR_RAND_MIN = 0 # Random gain minimum.
  879. OP_4_MDR_RAND_MAX = 0 # Random gain maximum.
  880.  
  881. OPTION_4_FDR_GAIN = -0.00 # Floor Damage Rate.
  882. OP_4_FDR_RAND_MIN = 0 # Random gain minimum.
  883. OP_4_FDR_RAND_MAX = 0 # Random gain maximum.
  884.  
  885. OPTION_4_EXR_GAIN = 0 # EXP Gain Rate.
  886. OP_4_EXR_RAND_MIN = 0 # Random gain minimum.
  887. OP_4_EXR_RAND_MAX = 0 # Random gain maximum.
  888.  
  889. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  890. # ☆ Parameters Gauge Settings
  891. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  892. # Set this to "true" if you wish to have Gauges for params e.g
  893. # MaxHP, MaxMP, Atk, Def, Mat, Mdf, Agi, Luk
  894. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  895.  
  896. DRAW_PARAM_GAUGES = true
  897.  
  898. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  899. # ☆ Parameters Colour Settings
  900. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  901. # These settings adjust the way the parameters window visually appears.
  902. # Each of the stats have a non-window colour. Adjust them as you see fit.
  903. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  904.  
  905. PARAM_COLOUR ={
  906. # ParamID => [:stat, Colour1, Colour2 ],
  907. 2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
  908. 3 => [ :def, Color.new(250, 150, 30), Color.new(250, 180, 100)],
  909. 4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
  910. 5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
  911. 6 => [ :agi, Color.new( 60, 180, 80), Color.new(120, 200, 120)],
  912. 7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
  913. } # Do not remove this.
  914.  
  915. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  916. # ☆ Properties Window Settings
  917. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  918. # These settings adjust the way the properties window visually appears.
  919. # The properties have abbreviations, but leaving them as such makes things
  920. # confusing (as it's sometimes hard to figure out what the abbreviations
  921. # mean). Change the way the appear, whether or not they appear, and what
  922. # order they will appear in.
  923. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  924.  
  925. # These are the parameters that appear in column 1.
  926. # This column's settings are only relevant if DRAW_PARAM_GAUGES = false (above)
  927. PROPERTIES_PARAMCOLUMN =[
  928. [:mhp, "Max HP"], #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  929. [:mmp, "Max MP"], # <- Rename these to whatever you want your
  930. [:atk, "Attack"], # <- origional parameters to be called :)
  931. [:def, "Defence"], # <-
  932. [:mat, "M Attack"], # <- NOTE: Only applies if DRAW_PAAM_GAUGES is
  933. [:mdf, "M Defence"], # <- "false"
  934. [:agi, "Speed"], # <-
  935. [:luk, "Luck"], #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  936. ] # Do not remove this.
  937.  
  938. # These are the properties that appear in column 2.
  939. PROPERTIES_COLUMN1 =[
  940. [:hit, "Hit Rate"],
  941. [:eva, "Evasion"],
  942. [:cri, "Critical Hit"],
  943. [:cev, "Critical Evade"],
  944. [:mev, "Magic Evasion"],
  945. [:mrf, "Magic Reflect"],
  946. [:cnt, "Counter Rate"],
  947. [:tgr, "Target Rate"],
  948. ] # Do not remove this.
  949.  
  950. # These are the properties that appear in column 3.
  951. PROPERTIES_COLUMN2 =[
  952. [:hrg, "HP Regen"],
  953. [:mrg, "MP Regen"],
  954. [:trg, "TP Regen"],
  955. [:rec, "Recovery"],
  956. [:grd, "Guard Rate"],
  957. [:pha, "Item Boost"],
  958. [:exr, "EXP Rate"],
  959. [:tcr, "TP Charge"],
  960. ] # Do not remove this.
  961.  
  962. # These are the properties that appear in column 4.
  963. PROPERTIES_COLUMN3 =[
  964. [:hcr, "HP Cost Rate"], # Requires YEA - Skill Cost Manager
  965. [:mcr, "MP Cost Rate"],
  966. [:tcr_y, "TP Cost Rate"], # Requires YEA - Skill Cost Manager
  967. [:cdr, "Cooldown Rate"], # Requires YEA - Skill Restrictions
  968. [:wur, "Warmup Rate"], # Requires YEA - Skill Restrictions
  969. [:pdr, "Physical Damage"],
  970. [:mdr, "Magical Damage"],
  971. [:fdr, "Floor Damage"],
  972. [:atkrt, "Attack Speed"],
  973. [:atktimes,"Attack Times"],
  974. [:atklvl, "Attack Level"], # Requires Dekita's - Perfect Skill Formula's
  975. [:deflvl, "Defence Level"], # Requires Dekita's - Perfect Skill Formula's
  976. ] # Do not remove this.
  977.  
  978. DRAW_ALL_COLUMNS = true # This option is for those who do not want all 4 columns
  979. # Simply set this to false to only draw 3 columns
  980. # e.g the param column, column1 and column2.
  981.  
  982. #===============================================================================#
  983. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  984. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  985. # #
  986. # PSPDS #
  987. # (Perfect Stat Point Distribution System) #
  988. # - CUSTOMISATION END - #
  989. # #
  990. # #
  991. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  992. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  993. #===============================================================================#
  994. # http://dekitarpg.wordpress.com/
  995. #===============================================================================#
  996. #################################################################################
  997. #===============================================================================#
  998. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  999. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  1000. # #
  1001. # ★ Perfect Elements Control ★
  1002. # and
  1003. # ★ Perfect Status Control ★
  1004. # ★ ADD-ON's ★
  1005. # - CUSTOMISATION BEGIN -
  1006. # #
  1007. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  1008. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  1009. #===============================================================================#
  1010. # IMPORTANT !!
  1011. #=============
  1012. # The following customisation options are for elements/status control add-on's
  1013. # If you are not using any of these add-on's,then DO NOT CHANGE THESE OPTIONS !!
  1014. #-------------------------------------------------------------------------------
  1015.  
  1016. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1017. # ☆ Gain Attribute Points?
  1018. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1019. # Here you can grant another type of points, ATTRIBUTE's <3
  1020. # If you set "USE_ATTRIBUTE_POINTS = true"
  1021. # Then you will gain attribute points on the levels stated in "ATTILEVZ"
  1022. # You can then use these points to spend on increasing the following...
  1023. # • Elemental Resistances - e.g fire, water, wind...
  1024. # • Attack Element Values - e.g dealing fire/water/wind damage as standard...
  1025. # • State Resistances - e.g Increased chance to resist "poison" ect...
  1026. # • State Attack Rate - e.g Attack with a 4% chance to inflict "poison" ect...
  1027. # Finnaly: "ATTIPTZ" is how many attribute points will be given when any
  1028. ########### character reaches level [x] (levels defined in - "ATTILEVZ")
  1029. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1030.  
  1031. USE_ATTRIBUTE_POINTS = true # If 'true' this will grant attribute points on
  1032. # levels listed in "ATTILEVZ".
  1033.  
  1034. ATTILEVZ = [5,10,20,30,40,50,60,70,80,90,91,92,93,94,95,96,97,98,99,100]
  1035. # If "USE_ATTRIBUTE_POINTS" is 'true' these will be the levels that actor(s)
  1036. # will gain attribute points on.
  1037.  
  1038. ATTIPTZ = 10 # Define here how many attribute points your actors gain
  1039. # when they reach a level listed in "ATTILEVZ"
  1040.  
  1041. ATTIPTZVOCAB = "Affinity"
  1042.  
  1043. ATTIPTZ_COST_VOCAB = "Affinity Cost:"
  1044. #NOTE: this is the vocab for elements and states whether you use affinity
  1045. #points or use regular level up points, change accordingly.
  1046.  
  1047. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  1048. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  1049. # #
  1050. # PSPDS #
  1051. # (Perfect Stat Point Distribution System) #
  1052. # - SCRIPT BEGIN - #
  1053. # #
  1054. # #
  1055. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  1056. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  1057. #===============================================================================#
  1058. # http://dekitarpg.wordpress.com/
  1059. #===============================================================================#
  1060. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  1061. # YES?\.\. #
  1062. # OMG, REALLY? #
  1063. # WELL SLAP MY FACE AND CALL ME A DRAGON.\..\.. #
  1064. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  1065. #===============================================================================#
  1066. POINTS_COLUMN =[
  1067. [:points, DPB::PSPDS::LVLUPPTSVOCAB],
  1068. [:affinity, DPB::PSPDS::ATTIPTZVOCAB],
  1069. [:yanflyjp, DPB::PSPDS::YANFLY_JP_VOCAB],
  1070. # [:spirit, "Spirit"],
  1071. ] # Do not remove this.
  1072. NEW_STATS_COLUMN =[
  1073. [:vit, DPB::PSPDS::COMMAND_NAME_1],
  1074. [:str, DPB::PSPDS::COMMAND_NAME_2],
  1075. [:dex, DPB::PSPDS::COMMAND_NAME_3],
  1076. [:mag, DPB::PSPDS::COMMAND_NAME_4],
  1077. ] # Do not remove this.
  1078.  
  1079. $pts = DPB::PSPDS::LVUPPTS
  1080. $bonuspts = DPB::PSPDS::BONUSPOINTS
  1081. $attiptz = DPB::PSPDS::ATTIPTZ
  1082. $spiritptz = 1
  1083.  
  1084. end # PSPDS
  1085. end # DPB
  1086.  
  1087. #==============================================================================
  1088. class Object
  1089. #==============================================================================
  1090. def dpbz_randy(min, max)
  1091. min + rand(max - min + 1)
  1092. end
  1093. end
  1094.  
  1095. module DPB
  1096. module REGEXP
  1097. module ENEMY
  1098.  
  1099. PTS_GAIN = /<(?:PTS_GAIN|pts gain):[ ](\d+)>/i
  1100. ATTI_GAIN = /<(?:ATTI_GAIN|atti gain):[ ](\d+)>/i
  1101. SPIRIT_GAIN = /<(?:SPIRIT_GAIN|spirit gain):[ ](\d+)>/i
  1102.  
  1103. end # ENEMY
  1104. end # REGEXP
  1105. end # DPB
  1106.  
  1107. #==============================================================================
  1108. module DataManager
  1109. #==============================================================================
  1110.  
  1111. class <<self; alias load_database_ptsandatti load_database; end
  1112. def self.load_database
  1113. load_database_ptsandatti
  1114. load_notetags_ptsandatti
  1115. end
  1116.  
  1117. def self.load_notetags_ptsandatti
  1118. groups = [$data_enemies]
  1119. for group in groups
  1120. for obj in group
  1121. next if obj.nil?
  1122. obj.load_notetags_ptsandatti
  1123. end
  1124. end
  1125. end
  1126.  
  1127. end # DataManager
  1128.  
  1129. #==============================================================================
  1130. class RPG::Enemy < RPG::BaseItem
  1131. #==============================================================================
  1132.  
  1133. attr_accessor :pts_gain
  1134. attr_accessor :atti_gain
  1135. attr_accessor :spirit_gain
  1136.  
  1137. def load_notetags_ptsandatti
  1138. @pts_gain = 0
  1139. @atti_gain = 0
  1140. @spirit_gain = 0
  1141. #---
  1142. self.note.split(/[\r\n]+/).each { |line|
  1143. case line
  1144. #---
  1145. when DPB::REGEXP::ENEMY::PTS_GAIN
  1146. @pts_gain = $1.to_i
  1147. when DPB::REGEXP::ENEMY::ATTI_GAIN
  1148. @atti_gain = $1.to_i
  1149. when DPB::REGEXP::ENEMY::SPIRIT_GAIN
  1150. @spirit_gain = $1.to_i
  1151. #---
  1152. end
  1153. } # self.note.split
  1154. #---
  1155. end
  1156.  
  1157. end # RPG::Enemy
  1158.  
  1159. #==============================================================================
  1160. module BattleManager
  1161. #==============================================================================
  1162. class <<self; alias battlemanager_display_exp_ptsandatti display_exp; end
  1163. def self.display_exp
  1164. battlemanager_display_exp_ptsandatti
  1165. gain_pts
  1166. gain_atti
  1167. gain_spirit
  1168. end
  1169.  
  1170. def self.gain_pts
  1171. amount = $game_troop.pts_total
  1172. fmt = DPB::PSPDS::GAINED_POINTS_MESSAGE
  1173. if $game_troop.pts_total >= 1
  1174. for member in $game_party.members
  1175. member.gain_lvl_pts(amount)
  1176. value = $game_troop.pts_total
  1177. $game_message.add('\.' + sprintf(fmt, member.name, value, DPB::PSPDS::LVLUPPTSVOCAB))
  1178. end
  1179. wait_for_message
  1180. end
  1181. end
  1182.  
  1183. def self.gain_atti
  1184. amount = $game_troop.atti_total
  1185. fmt = DPB::PSPDS::GAINED_ATTRIBUTE_MESSAGE
  1186. if $game_troop.atti_total >= 1
  1187. for member in $game_party.members
  1188. member.gain_atti_ptz(amount)
  1189. value = $game_troop.atti_total
  1190. $game_message.add('\.' + sprintf(fmt, member.name, value, DPB::PSPDS::ATTIPTZVOCAB))
  1191. end
  1192. wait_for_message
  1193. end
  1194. end
  1195.  
  1196. def self.gain_spirit
  1197. amount = $game_troop.spirit_total
  1198. fmt = DPB::PSPDS::GAINED_ATTRIBUTE_MESSAGE
  1199. if $game_troop.spirit_total >= 1
  1200. for member in $game_party.members
  1201. member.gain_spirit_ptz(amount)
  1202. value = $game_troop.spirit_total
  1203. $game_message.add('\.' + sprintf(fmt, member.name, value, "Gained spirit"))
  1204. end
  1205. wait_for_message
  1206. end
  1207. end
  1208.  
  1209. end # BattleManager
  1210.  
  1211. #==============================================================================
  1212. class Game_BattlerBase
  1213. #==============================================================================
  1214. alias dpb_pspds_init initialize
  1215. def initialize(*args, &block)
  1216. clear_xparam_plus
  1217. clear_sparam_plus
  1218. clear_dpbzparam_plus
  1219. dpb_pspds_init(*args, &block)
  1220. end
  1221.  
  1222. def vit; dpbzparam(0); end
  1223. def str; dpbzparam(1); end
  1224. def dex; dpbzparam(2); end
  1225. def mag; dpbzparam(3); end
  1226.  
  1227. def xparam(xparam_id)
  1228. (features_sum(FEATURE_XPARAM, xparam_id) + xparam_plus(xparam_id))
  1229. end
  1230.  
  1231. def xparam_plus(xparam_id)
  1232. @xparam_plus[xparam_id]
  1233. end
  1234.  
  1235. def clear_xparam_plus
  1236. @xparam_plus = [0] * 10
  1237. end
  1238.  
  1239. def add_xparam(xparam_id, value)
  1240. @xparam_plus[xparam_id] += value
  1241. refresh
  1242. end
  1243.  
  1244. def sparam(sparam_id)
  1245. (features_pi(FEATURE_SPARAM, sparam_id) + sparam_plus(sparam_id))
  1246. end
  1247.  
  1248. def sparam_plus(sparam_id)
  1249. @sparam_plus[sparam_id]
  1250. end
  1251.  
  1252. def clear_sparam_plus
  1253. @sparam_plus = [0] * 10
  1254. end
  1255.  
  1256. def add_sparam(sparam_id, value)
  1257. @sparam_plus[sparam_id] += value
  1258. refresh
  1259. end
  1260.  
  1261. def dpbzparam(dpbzparam_id)
  1262. (features_sum(FEATURE_PARAM, dpbzparam_id) + dpbzparam_plus(dpbzparam_id))
  1263. end
  1264.  
  1265. def dpbzparam_plus(dpbzparam_id)
  1266. @dpbzparam_plus[dpbzparam_id]
  1267. end
  1268.  
  1269. def clear_dpbzparam_plus
  1270. @dpbzparam_plus = [0] * 4
  1271. end
  1272.  
  1273. def add_dpbzparam(dpbzparam_id, value)
  1274. @dpbzparam_plus[dpbzparam_id] += value
  1275. refresh
  1276. end
  1277.  
  1278. end # Game_BattlerBase
  1279.  
  1280. #==============================================================================
  1281. class Scene_Level_Up < Scene_MenuBase
  1282. #==============================================================================
  1283. def msg
  1284. s = ["#{DPB::PSPDS::VIT_GAIN_VOCAB}
  1285. #{DPB::PSPDS::COST_VOCAB} #{@actor.cost_caract(0)}",
  1286. "#{DPB::PSPDS::STR_GAIN_VOCAB}
  1287. #{DPB::PSPDS::COST_VOCAB} #{@actor.cost_caract(1)}",
  1288. "#{DPB::PSPDS::DEX_GAIN_VOCAB}
  1289. #{DPB::PSPDS::COST_VOCAB} #{@actor.cost_caract(2)}",
  1290. "#{DPB::PSPDS::MAG_GAIN_VOCAB}
  1291. #{DPB::PSPDS::COST_VOCAB} #{@actor.cost_caract(3)}"]
  1292. return s
  1293. end
  1294.  
  1295. def start
  1296. super
  1297. if $game_temp.actor_level_up[0]
  1298. @actor = $game_temp.actor_level_up[0]
  1299. end
  1300. create_status_window
  1301. create_command_window
  1302. create_help_window
  1303. @help_window.set_text(msg[@command_window.index])
  1304. @help_window.y = (Graphics.height - 80)
  1305. @help_window.opacity = 0
  1306. $game_temp.actor_level_up.delete_at(0)
  1307. end
  1308.  
  1309. def create_command_window
  1310. @command_window = Window_Level_upCommand.new
  1311. @command_window.set_handler(:gain_vit, method(:command_gain_vit))
  1312. @command_window.set_handler(:cancel, method(:return_scene))
  1313. @command_window.set_handler(:gain_str, method(:command_gain_str))
  1314. @command_window.set_handler(:gain_dex, method(:command_gain_dex))
  1315. @command_window.set_handler(:gain_mag, method(:command_gain_mag))
  1316. @command_window.set_handler(:pagedown, method(:next_actor))
  1317. @command_window.set_handler(:pageup, method(:prev_actor))
  1318. @command_window.y = 0
  1319. end
  1320.  
  1321. def create_status_window
  1322. @status_window = Window_Status_Level_up.new(@actor)
  1323. @status_window.x = 0
  1324. @status_window.y = 0
  1325. end
  1326.  
  1327. def command_gain_vit
  1328. index = @command_window.index
  1329. @command_window.refresh
  1330. if @actor.level_up_pts >= @actor.cost_caract(index)
  1331. @actor.gain_lvl_pts(-@actor.cost_caract(index))
  1332. #reg's
  1333. @actor.add_param(0, DPB::PSPDS::OPTION_1_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxHP_RAND_MIN, DPB::PSPDS::OP_1_MaxHP_RAND_MAX))
  1334. @actor.add_param(1, DPB::PSPDS::OPTION_1_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxMP_RAND_MIN, DPB::PSPDS::OP_1_MaxMP_RAND_MAX))
  1335. @actor.add_param(2, DPB::PSPDS::OPTION_1_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_ATK_RAND_MIN, DPB::PSPDS::OP_1_ATK_RAND_MAX))
  1336. @actor.add_param(3, DPB::PSPDS::OPTION_1_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_DEF_RAND_MIN, DPB::PSPDS::OP_1_DEF_RAND_MAX))
  1337. @actor.add_param(4, DPB::PSPDS::OPTION_1_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MAT_RAND_MIN, DPB::PSPDS::OP_1_MAT_RAND_MAX))
  1338. @actor.add_param(5, DPB::PSPDS::OPTION_1_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MDF_RAND_MIN, DPB::PSPDS::OP_1_MDF_RAND_MAX))
  1339. @actor.add_param(6, DPB::PSPDS::OPTION_1_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_AGI_RAND_MIN, DPB::PSPDS::OP_1_AGI_RAND_MAX))
  1340. @actor.add_param(7, DPB::PSPDS::OPTION_1_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_LUK_RAND_MIN, DPB::PSPDS::OP_1_LUK_RAND_MAX))
  1341. #x's
  1342. @actor.add_xparam(0, DPB::PSPDS::OPTION_1_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HIT_RAND_MIN, DPB::PSPDS::OP_1_HIT_RAND_MAX))
  1343. @actor.add_xparam(1, DPB::PSPDS::OPTION_1_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_1_EVA_RAND_MIN, DPB::PSPDS::OP_1_EVA_RAND_MAX))
  1344. @actor.add_xparam(2, DPB::PSPDS::OPTION_1_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CRI_RAND_MIN, DPB::PSPDS::OP_1_CRI_RAND_MAX))
  1345. @actor.add_xparam(3, DPB::PSPDS::OPTION_1_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CEV_RAND_MIN, DPB::PSPDS::OP_1_CEV_RAND_MAX))
  1346. @actor.add_xparam(4, DPB::PSPDS::OPTION_1_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MEV_RAND_MIN, DPB::PSPDS::OP_1_MEV_RAND_MAX))
  1347. @actor.add_xparam(5, DPB::PSPDS::OPTION_1_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRF_RAND_MIN, DPB::PSPDS::OP_1_MRF_RAND_MAX))
  1348. @actor.add_xparam(6, DPB::PSPDS::OPTION_1_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CNT_RAND_MIN, DPB::PSPDS::OP_1_CNT_RAND_MAX))
  1349. @actor.add_xparam(7, DPB::PSPDS::OPTION_1_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HRG_RAND_MIN, DPB::PSPDS::OP_1_HRG_RAND_MAX))
  1350. @actor.add_xparam(8, DPB::PSPDS::OPTION_1_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRG_RAND_MIN, DPB::PSPDS::OP_1_MRG_RAND_MAX))
  1351. @actor.add_xparam(9, DPB::PSPDS::OPTION_1_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TRG_RAND_MIN, DPB::PSPDS::OP_1_TRG_RAND_MAX))
  1352. #s's
  1353. @actor.add_sparam(0, DPB::PSPDS::OPTION_1_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TGR_RAND_MIN, DPB::PSPDS::OP_1_TGR_RAND_MAX))
  1354. @actor.add_sparam(1, DPB::PSPDS::OPTION_1_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_1_GRD_RAND_MIN, DPB::PSPDS::OP_1_GRD_RAND_MAX))
  1355. @actor.add_sparam(2, DPB::PSPDS::OPTION_1_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_1_REC_RAND_MIN, DPB::PSPDS::OP_1_REC_RAND_MAX))
  1356. @actor.add_sparam(3, DPB::PSPDS::OPTION_1_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_1_PHA_RAND_MIN, DPB::PSPDS::OP_1_PHA_RAND_MAX))
  1357. @actor.add_sparam(4, DPB::PSPDS::OPTION_1_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MCR_RAND_MIN, DPB::PSPDS::OP_1_MCR_RAND_MAX))
  1358. @actor.add_sparam(5, DPB::PSPDS::OPTION_1_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TCR_RAND_MIN, DPB::PSPDS::OP_1_TCR_RAND_MAX))
  1359. @actor.add_sparam(6, DPB::PSPDS::OPTION_1_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_PDR_RAND_MIN, DPB::PSPDS::OP_1_PDR_RAND_MAX))
  1360. @actor.add_sparam(7, DPB::PSPDS::OPTION_1_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MDR_RAND_MIN, DPB::PSPDS::OP_1_MDR_RAND_MAX))
  1361. @actor.add_sparam(8, DPB::PSPDS::OPTION_1_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_FDR_RAND_MIN, DPB::PSPDS::OP_1_FDR_RAND_MAX))
  1362. @actor.add_sparam(9, DPB::PSPDS::OPTION_1_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_EXR_RAND_MIN, DPB::PSPDS::OP_1_EXR_RAND_MAX))
  1363. #dpbz'
  1364. @actor.add_dpbzparam(0, 1)
  1365. #end inc stat
  1366. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1367. else
  1368. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1369. end
  1370. @status_window.refresh
  1371. @command_window.refresh
  1372. wait(DPB::PSPDS::WAIT_TIME)
  1373. @command_window.activate
  1374. end
  1375.  
  1376. def command_gain_str
  1377. index = @command_window.index
  1378. @command_window.refresh
  1379. if @actor.level_up_pts >= @actor.cost_caract(index)
  1380. @actor.gain_lvl_pts(-@actor.cost_caract(index))
  1381. #reg's
  1382. @actor.add_param(0, DPB::PSPDS::OPTION_2_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxHP_RAND_MIN, DPB::PSPDS::OP_1_MaxHP_RAND_MAX))
  1383. @actor.add_param(1, DPB::PSPDS::OPTION_2_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxMP_RAND_MIN, DPB::PSPDS::OP_1_MaxMP_RAND_MAX))
  1384. @actor.add_param(2, DPB::PSPDS::OPTION_2_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_ATK_RAND_MIN, DPB::PSPDS::OP_1_ATK_RAND_MAX))
  1385. @actor.add_param(3, DPB::PSPDS::OPTION_2_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_DEF_RAND_MIN, DPB::PSPDS::OP_1_DEF_RAND_MAX))
  1386. @actor.add_param(4, DPB::PSPDS::OPTION_2_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MAT_RAND_MIN, DPB::PSPDS::OP_1_MAT_RAND_MAX))
  1387. @actor.add_param(5, DPB::PSPDS::OPTION_2_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MDF_RAND_MIN, DPB::PSPDS::OP_1_MDF_RAND_MAX))
  1388. @actor.add_param(6, DPB::PSPDS::OPTION_2_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_AGI_RAND_MIN, DPB::PSPDS::OP_1_AGI_RAND_MAX))
  1389. @actor.add_param(7, DPB::PSPDS::OPTION_2_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_LUK_RAND_MIN, DPB::PSPDS::OP_1_LUK_RAND_MAX))
  1390. #x's
  1391. @actor.add_xparam(0, DPB::PSPDS::OPTION_2_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HIT_RAND_MIN, DPB::PSPDS::OP_1_HIT_RAND_MAX))
  1392. @actor.add_xparam(1, DPB::PSPDS::OPTION_2_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_1_EVA_RAND_MIN, DPB::PSPDS::OP_1_EVA_RAND_MAX))
  1393. @actor.add_xparam(2, DPB::PSPDS::OPTION_2_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CRI_RAND_MIN, DPB::PSPDS::OP_1_CRI_RAND_MAX))
  1394. @actor.add_xparam(3, DPB::PSPDS::OPTION_2_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CEV_RAND_MIN, DPB::PSPDS::OP_1_CEV_RAND_MAX))
  1395. @actor.add_xparam(4, DPB::PSPDS::OPTION_2_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MEV_RAND_MIN, DPB::PSPDS::OP_1_MEV_RAND_MAX))
  1396. @actor.add_xparam(5, DPB::PSPDS::OPTION_2_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRF_RAND_MIN, DPB::PSPDS::OP_1_MRF_RAND_MAX))
  1397. @actor.add_xparam(6, DPB::PSPDS::OPTION_2_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CNT_RAND_MIN, DPB::PSPDS::OP_1_CNT_RAND_MAX))
  1398. @actor.add_xparam(7, DPB::PSPDS::OPTION_2_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HRG_RAND_MIN, DPB::PSPDS::OP_1_HRG_RAND_MAX))
  1399. @actor.add_xparam(8, DPB::PSPDS::OPTION_2_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRG_RAND_MIN, DPB::PSPDS::OP_1_MRG_RAND_MAX))
  1400. @actor.add_xparam(9, DPB::PSPDS::OPTION_2_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TRG_RAND_MIN, DPB::PSPDS::OP_1_TRG_RAND_MAX))
  1401. #s's
  1402. @actor.add_sparam(0, DPB::PSPDS::OPTION_2_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_TGR_RAND_MIN, DPB::PSPDS::OP_2_TGR_RAND_MAX))
  1403. @actor.add_sparam(1, DPB::PSPDS::OPTION_2_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_2_GRD_RAND_MIN, DPB::PSPDS::OP_2_GRD_RAND_MAX))
  1404. @actor.add_sparam(2, DPB::PSPDS::OPTION_2_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_2_REC_RAND_MIN, DPB::PSPDS::OP_2_REC_RAND_MAX))
  1405. @actor.add_sparam(3, DPB::PSPDS::OPTION_2_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_2_PHA_RAND_MIN, DPB::PSPDS::OP_2_PHA_RAND_MAX))
  1406. @actor.add_sparam(4, DPB::PSPDS::OPTION_2_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_MCR_RAND_MIN, DPB::PSPDS::OP_2_MCR_RAND_MAX))
  1407. @actor.add_sparam(5, DPB::PSPDS::OPTION_2_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_TCR_RAND_MIN, DPB::PSPDS::OP_2_TCR_RAND_MAX))
  1408. @actor.add_sparam(6, DPB::PSPDS::OPTION_2_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_PDR_RAND_MIN, DPB::PSPDS::OP_2_PDR_RAND_MAX))
  1409. @actor.add_sparam(7, DPB::PSPDS::OPTION_2_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_MDR_RAND_MIN, DPB::PSPDS::OP_2_MDR_RAND_MAX))
  1410. @actor.add_sparam(8, DPB::PSPDS::OPTION_2_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_FDR_RAND_MIN, DPB::PSPDS::OP_2_FDR_RAND_MAX))
  1411. @actor.add_sparam(9, DPB::PSPDS::OPTION_2_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_EXR_RAND_MIN, DPB::PSPDS::OP_2_EXR_RAND_MAX))
  1412. #dpbz'
  1413. @actor.add_dpbzparam(1, 1)
  1414. #end inc stat
  1415. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1416. else
  1417. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1418. end
  1419. @status_window.refresh
  1420. @command_window.refresh
  1421. wait(DPB::PSPDS::WAIT_TIME)
  1422. @command_window.activate
  1423. end
  1424.  
  1425. def command_gain_dex
  1426. index = @command_window.index
  1427. @command_window.refresh
  1428. if @actor.level_up_pts >= @actor.cost_caract(index)
  1429. @actor.gain_lvl_pts(-@actor.cost_caract(index))
  1430. #reg's
  1431. @actor.add_param(0, DPB::PSPDS::OPTION_3_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MaxHP_RAND_MIN, DPB::PSPDS::OP_1_MaxHP_RAND_MAX))
  1432. @actor.add_param(1, DPB::PSPDS::OPTION_3_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MaxMP_RAND_MIN, DPB::PSPDS::OP_1_MaxMP_RAND_MAX))
  1433. @actor.add_param(2, DPB::PSPDS::OPTION_3_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_3_ATK_RAND_MIN, DPB::PSPDS::OP_3_ATK_RAND_MAX))
  1434. @actor.add_param(3, DPB::PSPDS::OPTION_3_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_3_DEF_RAND_MIN, DPB::PSPDS::OP_3_DEF_RAND_MAX))
  1435. @actor.add_param(4, DPB::PSPDS::OPTION_3_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MAT_RAND_MIN, DPB::PSPDS::OP_3_MAT_RAND_MAX))
  1436. @actor.add_param(5, DPB::PSPDS::OPTION_3_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MDF_RAND_MIN, DPB::PSPDS::OP_3_MDF_RAND_MAX))
  1437. @actor.add_param(6, DPB::PSPDS::OPTION_3_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_3_AGI_RAND_MIN, DPB::PSPDS::OP_3_AGI_RAND_MAX))
  1438. @actor.add_param(7, DPB::PSPDS::OPTION_3_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_3_LUK_RAND_MIN, DPB::PSPDS::OP_3_LUK_RAND_MAX))
  1439. #x's
  1440. @actor.add_xparam(0, DPB::PSPDS::OPTION_3_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_3_HIT_RAND_MIN, DPB::PSPDS::OP_3_HIT_RAND_MAX))
  1441. @actor.add_xparam(1, DPB::PSPDS::OPTION_3_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_3_EVA_RAND_MIN, DPB::PSPDS::OP_3_EVA_RAND_MAX))
  1442. @actor.add_xparam(2, DPB::PSPDS::OPTION_3_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_3_CRI_RAND_MIN, DPB::PSPDS::OP_3_CRI_RAND_MAX))
  1443. @actor.add_xparam(3, DPB::PSPDS::OPTION_3_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_3_CEV_RAND_MIN, DPB::PSPDS::OP_3_CEV_RAND_MAX))
  1444. @actor.add_xparam(4, DPB::PSPDS::OPTION_3_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MEV_RAND_MIN, DPB::PSPDS::OP_3_MEV_RAND_MAX))
  1445. @actor.add_xparam(5, DPB::PSPDS::OPTION_3_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MRF_RAND_MIN, DPB::PSPDS::OP_3_MRF_RAND_MAX))
  1446. @actor.add_xparam(6, DPB::PSPDS::OPTION_3_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_3_CNT_RAND_MIN, DPB::PSPDS::OP_3_CNT_RAND_MAX))
  1447. @actor.add_xparam(7, DPB::PSPDS::OPTION_3_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_3_HRG_RAND_MIN, DPB::PSPDS::OP_3_HRG_RAND_MAX))
  1448. @actor.add_xparam(8, DPB::PSPDS::OPTION_3_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MRG_RAND_MIN, DPB::PSPDS::OP_3_MRG_RAND_MAX))
  1449. @actor.add_xparam(9, DPB::PSPDS::OPTION_3_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_3_TRG_RAND_MIN, DPB::PSPDS::OP_3_TRG_RAND_MAX))
  1450. #s's
  1451. @actor.add_sparam(0, DPB::PSPDS::OPTION_3_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_TGR_RAND_MIN, DPB::PSPDS::OP_3_TGR_RAND_MAX))
  1452. @actor.add_sparam(1, DPB::PSPDS::OPTION_3_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_3_GRD_RAND_MIN, DPB::PSPDS::OP_3_GRD_RAND_MAX))
  1453. @actor.add_sparam(2, DPB::PSPDS::OPTION_3_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_3_REC_RAND_MIN, DPB::PSPDS::OP_3_REC_RAND_MAX))
  1454. @actor.add_sparam(3, DPB::PSPDS::OPTION_3_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_3_PHA_RAND_MIN, DPB::PSPDS::OP_3_PHA_RAND_MAX))
  1455. @actor.add_sparam(4, DPB::PSPDS::OPTION_3_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MCR_RAND_MIN, DPB::PSPDS::OP_3_MCR_RAND_MAX))
  1456. @actor.add_sparam(5, DPB::PSPDS::OPTION_3_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_TCR_RAND_MIN, DPB::PSPDS::OP_3_TCR_RAND_MAX))
  1457. @actor.add_sparam(6, DPB::PSPDS::OPTION_3_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_PDR_RAND_MIN, DPB::PSPDS::OP_3_PDR_RAND_MAX))
  1458. @actor.add_sparam(7, DPB::PSPDS::OPTION_3_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MDR_RAND_MIN, DPB::PSPDS::OP_3_MDR_RAND_MAX))
  1459. @actor.add_sparam(8, DPB::PSPDS::OPTION_3_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_FDR_RAND_MIN, DPB::PSPDS::OP_3_FDR_RAND_MAX))
  1460. @actor.add_sparam(9, DPB::PSPDS::OPTION_3_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_EXR_RAND_MIN, DPB::PSPDS::OP_3_EXR_RAND_MAX))
  1461. #dpbz'
  1462. @actor.add_dpbzparam(2, 1)
  1463. #end inc stat
  1464. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1465. else
  1466. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1467. end
  1468. @status_window.refresh
  1469. @command_window.refresh
  1470. wait(DPB::PSPDS::WAIT_TIME)
  1471. @command_window.activate
  1472. end
  1473.  
  1474. def command_gain_mag
  1475. index = @command_window.index
  1476. @command_window.refresh
  1477. if @actor.level_up_pts >= @actor.cost_caract(index)
  1478. @actor.gain_lvl_pts(-@actor.cost_caract(index))
  1479. #reg's
  1480. @actor.add_param(0, DPB::PSPDS::OPTION_4_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MaxHP_RAND_MIN, DPB::PSPDS::OP_4_MaxHP_RAND_MAX))
  1481. @actor.add_param(1, DPB::PSPDS::OPTION_4_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MaxMP_RAND_MIN, DPB::PSPDS::OP_4_MaxMP_RAND_MAX))
  1482. @actor.add_param(2, DPB::PSPDS::OPTION_4_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_4_ATK_RAND_MIN, DPB::PSPDS::OP_4_ATK_RAND_MAX))
  1483. @actor.add_param(3, DPB::PSPDS::OPTION_4_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_4_DEF_RAND_MIN, DPB::PSPDS::OP_4_DEF_RAND_MAX))
  1484. @actor.add_param(4, DPB::PSPDS::OPTION_4_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MAT_RAND_MIN, DPB::PSPDS::OP_4_MAT_RAND_MAX))
  1485. @actor.add_param(5, DPB::PSPDS::OPTION_4_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MDF_RAND_MIN, DPB::PSPDS::OP_4_MDF_RAND_MAX))
  1486. @actor.add_param(6, DPB::PSPDS::OPTION_4_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_4_AGI_RAND_MIN, DPB::PSPDS::OP_4_AGI_RAND_MAX))
  1487. @actor.add_param(7, DPB::PSPDS::OPTION_4_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_4_LUK_RAND_MIN, DPB::PSPDS::OP_4_LUK_RAND_MAX))
  1488. #x's
  1489. @actor.add_xparam(0, DPB::PSPDS::OPTION_4_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_4_HIT_RAND_MIN, DPB::PSPDS::OP_4_HIT_RAND_MAX))
  1490. @actor.add_xparam(1, DPB::PSPDS::OPTION_4_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_4_EVA_RAND_MIN, DPB::PSPDS::OP_4_EVA_RAND_MAX))
  1491. @actor.add_xparam(2, DPB::PSPDS::OPTION_4_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_4_CRI_RAND_MIN, DPB::PSPDS::OP_4_CRI_RAND_MAX))
  1492. @actor.add_xparam(3, DPB::PSPDS::OPTION_4_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_4_CEV_RAND_MIN, DPB::PSPDS::OP_4_CEV_RAND_MAX))
  1493. @actor.add_xparam(4, DPB::PSPDS::OPTION_4_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MEV_RAND_MIN, DPB::PSPDS::OP_4_MEV_RAND_MAX))
  1494. @actor.add_xparam(5, DPB::PSPDS::OPTION_4_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MRF_RAND_MIN, DPB::PSPDS::OP_4_MRF_RAND_MAX))
  1495. @actor.add_xparam(6, DPB::PSPDS::OPTION_4_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_4_CNT_RAND_MIN, DPB::PSPDS::OP_4_CNT_RAND_MAX))
  1496. @actor.add_xparam(7, DPB::PSPDS::OPTION_4_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_HRG_RAND_MIN, DPB::PSPDS::OP_4_HRG_RAND_MAX))
  1497. @actor.add_xparam(8, DPB::PSPDS::OPTION_4_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MRG_RAND_MIN, DPB::PSPDS::OP_4_MRG_RAND_MAX))
  1498. @actor.add_xparam(9, DPB::PSPDS::OPTION_4_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_TRG_RAND_MIN, DPB::PSPDS::OP_4_TRG_RAND_MAX))
  1499. #s's
  1500. @actor.add_sparam(0, DPB::PSPDS::OPTION_4_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_TGR_RAND_MIN, DPB::PSPDS::OP_4_TGR_RAND_MAX))
  1501. @actor.add_sparam(1, DPB::PSPDS::OPTION_4_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_4_GRD_RAND_MIN, DPB::PSPDS::OP_4_GRD_RAND_MAX))
  1502. @actor.add_sparam(2, DPB::PSPDS::OPTION_4_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_4_REC_RAND_MIN, DPB::PSPDS::OP_4_REC_RAND_MAX))
  1503. @actor.add_sparam(3, DPB::PSPDS::OPTION_4_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_4_PHA_RAND_MIN, DPB::PSPDS::OP_4_PHA_RAND_MAX))
  1504. @actor.add_sparam(4, DPB::PSPDS::OPTION_4_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MCR_RAND_MIN, DPB::PSPDS::OP_4_MCR_RAND_MAX))
  1505. @actor.add_sparam(5, DPB::PSPDS::OPTION_4_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_TCR_RAND_MIN, DPB::PSPDS::OP_4_TCR_RAND_MAX))
  1506. @actor.add_sparam(6, DPB::PSPDS::OPTION_4_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_PDR_RAND_MIN, DPB::PSPDS::OP_4_PDR_RAND_MAX))
  1507. @actor.add_sparam(7, DPB::PSPDS::OPTION_4_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MDR_RAND_MIN, DPB::PSPDS::OP_4_MDR_RAND_MAX))
  1508. @actor.add_sparam(8, DPB::PSPDS::OPTION_4_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_FDR_RAND_MIN, DPB::PSPDS::OP_4_FDR_RAND_MAX))
  1509. @actor.add_sparam(9, DPB::PSPDS::OPTION_4_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_EXR_RAND_MIN, DPB::PSPDS::OP_4_EXR_RAND_MAX))
  1510. #dpbz'
  1511. @actor.add_dpbzparam(3, 1)
  1512. #end inc stat
  1513. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1514. else
  1515. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1516. end
  1517. @status_window.refresh
  1518. @command_window.refresh
  1519. wait(DPB::PSPDS::WAIT_TIME)
  1520. @command_window.activate
  1521. end
  1522.  
  1523. def wait(time)
  1524. t = 0
  1525. loop do
  1526. Graphics.update
  1527. if t == time
  1528. break
  1529. end
  1530. t += 1
  1531. end
  1532. end
  1533.  
  1534. def update
  1535. super
  1536. @help_window.set_text(msg[@command_window.index])
  1537. end
  1538.  
  1539. def on_actor_change
  1540. @status_window.actor = @actor
  1541. @status_window.refresh
  1542. @command_window.activate
  1543. end
  1544. end # class
  1545.  
  1546. if DPB::PSPDS::INBATTLE
  1547. #==============================================================================
  1548. class Scene_Battle < Scene_Base # < Default setting. Only used when "INBATTLE" is true
  1549. #==============================================================================
  1550. alias old_update update
  1551. def update
  1552. old_update
  1553. if $game_temp.actor_level_up[0]
  1554. SceneManager.call(Scene_Level_Up)
  1555. $game_temp.actor_level_up.delete_at(0)
  1556. end
  1557. end
  1558. end#class
  1559. end# if
  1560.  
  1561. if DPB::PSPDS::ONMAP
  1562. #==============================================================================
  1563. class Scene_Map < Scene_Base # < Only used if "ONMAP" is true
  1564. #==============================================================================
  1565. alias old_update update
  1566. def update
  1567. old_update
  1568. if $game_temp.actor_level_up[0]
  1569. SceneManager.call(Scene_Level_Up)
  1570. $game_temp.actor_level_up.delete_at(0)
  1571. end
  1572. end
  1573. end# class
  1574. end# if
  1575.  
  1576. #==============================================================================
  1577. class Game_Actor < Game_Battler
  1578. #==============================================================================
  1579. attr_reader :level_up_pts
  1580. attr_reader :atti_ptz
  1581. attr_reader :spirit_ptz
  1582. alias old_initialize initialize
  1583. def initialize(actor_id)
  1584. old_initialize(actor_id)
  1585. @level_up_pts = 0
  1586. @atti_ptz = 0
  1587. @spirit_ptz = 0
  1588. end
  1589.  
  1590. def cost_caract(param)
  1591. tbl = [DPB::PSPDS::OPTION_1_COST,
  1592. DPB::PSPDS::OPTION_2_COST,
  1593. DPB::PSPDS::OPTION_3_COST,
  1594. DPB::PSPDS::OPTION_4_COST]
  1595. return tbl[param]
  1596. end
  1597.  
  1598. def gain_lvl_pts(value)
  1599. @level_up_pts += value
  1600. if @level_up_pts < 0
  1601. @level_up_pts = 0
  1602. end
  1603. end
  1604.  
  1605. def gain_atti_ptz(value)
  1606. @atti_ptz += value
  1607. if @atti_ptz < 0
  1608. @atti_ptz = 0
  1609. end
  1610. end
  1611.  
  1612. def gain_spirit_ptz(value)
  1613. @spirit_ptz += value
  1614. if @spirit_ptz < 0
  1615. @spirit_ptz = 0
  1616. end
  1617. end
  1618.  
  1619. def param_base(param_id)
  1620. if DPB::PSPDS::USE_DEFAULT_PARAM_GAIN
  1621. return self.class.params[param_id, @level]
  1622. else
  1623. return self.class.params[param_id, 1]
  1624. end
  1625. end
  1626.  
  1627. if DPB::PSPDS::ONLY_GAIN_POINTS_ON_LEVELS
  1628. def level_up
  1629. @level += 1
  1630. $game_temp.actor_level_up.push(self) unless $game_temp.actor_level_up.include?(self)
  1631. self.class.learnings.each do |learning|
  1632. learn_skill(learning.skill_id) if learning.level == @level
  1633. end
  1634. if DPB::PSPDS::BONUS_POINTS_ON_LEVELS
  1635. return unless DPB::PSPDS::LEVELS.include?(@level)
  1636. gain_lvl_pts($bonuspts)
  1637. else
  1638. end
  1639. end
  1640. else
  1641. def level_up
  1642. @level += 1
  1643. $game_temp.actor_level_up.push(self) unless $game_temp.actor_level_up.include?(self)
  1644. self.class.learnings.each do |learning|
  1645. learn_skill(learning.skill_id) if learning.level == @level
  1646. end
  1647. gain_lvl_pts($pts)
  1648. if DPB::PSPDS::ATTILEVZ.include?(@level)
  1649. gain_atti_ptz($attiptz)
  1650. end
  1651. if DPB::PSPDS::BONUS_POINTS_ON_LEVELS
  1652. return unless DPB::PSPDS::LEVELS.include?(@level)
  1653. gain_lvl_pts($bonuspts)
  1654. else
  1655. end
  1656. end
  1657. end
  1658. end # Game_Actor
  1659.  
  1660. #==============================================================================
  1661. class Game_Enemy < Game_Battler
  1662. #==============================================================================
  1663.  
  1664. def pts
  1665. return enemy.pts_gain
  1666. end
  1667.  
  1668. def atti
  1669. return enemy.atti_gain
  1670. end
  1671.  
  1672. def spirit
  1673. return enemy.spirit_gain
  1674. end
  1675.  
  1676. end # Game_Enemy
  1677.  
  1678. #==============================================================================
  1679. class Game_Troop < Game_Unit
  1680. #==============================================================================
  1681.  
  1682. def pts_total
  1683. dead_members.inject(0) {|r, enemy| r += enemy.pts }
  1684. end
  1685.  
  1686. def atti_total
  1687. dead_members.inject(0) {|r, enemy| r += enemy.atti }
  1688. end
  1689.  
  1690. def spirit_total
  1691. dead_members.inject(0) {|r, enemy| r += enemy.spirit }
  1692. end
  1693.  
  1694. end # Game_Troop
  1695.  
  1696. #==============================================================================
  1697. class Game_Temp
  1698. #==============================================================================
  1699. attr_accessor :actor_level_up
  1700. alias pspds_initialize initialize
  1701. def initialize
  1702. pspds_initialize
  1703. @actor_level_up = []
  1704. end
  1705. end # class
  1706.  
  1707. #==============================================================================
  1708. class Game_Interpreter
  1709. #==============================================================================
  1710. def gain_pts(actor_id, value)
  1711. actor = $game_actors[actor_id]
  1712. return if actor == nil
  1713. actor.gain_lvl_pts(value)
  1714. end
  1715.  
  1716. def gain_atti(actor_id, value)
  1717. actor = $game_actors[actor_id]
  1718. return if actor == nil
  1719. actor.gain_atti_ptz(value)
  1720. end
  1721.  
  1722. def gain_spirit(actor_id, value)
  1723. actor = $game_actors[actor_id]
  1724. return if actor == nil
  1725. actor.gain_spirit_ptz(value)
  1726. end
  1727.  
  1728. def inc_vit(actor_id, value)
  1729. actor = $game_actors[actor_id]
  1730. return if actor == nil
  1731. t = 1
  1732. loop do
  1733. actor.add_param(0, DPB::PSPDS::OPTION_1_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxHP_RAND_MIN, DPB::PSPDS::OP_1_MaxHP_RAND_MAX))
  1734. actor.add_param(1, DPB::PSPDS::OPTION_1_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxMP_RAND_MIN, DPB::PSPDS::OP_1_MaxMP_RAND_MAX))
  1735. actor.add_param(2, DPB::PSPDS::OPTION_1_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_ATK_RAND_MIN, DPB::PSPDS::OP_1_ATK_RAND_MAX))
  1736. actor.add_param(3, DPB::PSPDS::OPTION_1_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_DEF_RAND_MIN, DPB::PSPDS::OP_1_DEF_RAND_MAX))
  1737. actor.add_param(4, DPB::PSPDS::OPTION_1_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MAT_RAND_MIN, DPB::PSPDS::OP_1_MAT_RAND_MAX))
  1738. actor.add_param(5, DPB::PSPDS::OPTION_1_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MDF_RAND_MIN, DPB::PSPDS::OP_1_MDF_RAND_MAX))
  1739. actor.add_param(6, DPB::PSPDS::OPTION_1_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_AGI_RAND_MIN, DPB::PSPDS::OP_1_AGI_RAND_MAX))
  1740. actor.add_param(7, DPB::PSPDS::OPTION_1_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_LUK_RAND_MIN, DPB::PSPDS::OP_1_LUK_RAND_MAX))
  1741. #x's
  1742. actor.add_xparam(0, DPB::PSPDS::OPTION_1_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HIT_RAND_MIN, DPB::PSPDS::OP_1_HIT_RAND_MAX))
  1743. actor.add_xparam(1, DPB::PSPDS::OPTION_1_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_1_EVA_RAND_MIN, DPB::PSPDS::OP_1_EVA_RAND_MAX))
  1744. actor.add_xparam(2, DPB::PSPDS::OPTION_1_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CRI_RAND_MIN, DPB::PSPDS::OP_1_CRI_RAND_MAX))
  1745. actor.add_xparam(3, DPB::PSPDS::OPTION_1_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CEV_RAND_MIN, DPB::PSPDS::OP_1_CEV_RAND_MAX))
  1746. actor.add_xparam(4, DPB::PSPDS::OPTION_1_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MEV_RAND_MIN, DPB::PSPDS::OP_1_MEV_RAND_MAX))
  1747. actor.add_xparam(5, DPB::PSPDS::OPTION_1_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRF_RAND_MIN, DPB::PSPDS::OP_1_MRF_RAND_MAX))
  1748. actor.add_xparam(6, DPB::PSPDS::OPTION_1_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CNT_RAND_MIN, DPB::PSPDS::OP_1_CNT_RAND_MAX))
  1749. actor.add_xparam(7, DPB::PSPDS::OPTION_1_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HRG_RAND_MIN, DPB::PSPDS::OP_1_HRG_RAND_MAX))
  1750. actor.add_xparam(8, DPB::PSPDS::OPTION_1_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRG_RAND_MIN, DPB::PSPDS::OP_1_MRG_RAND_MAX))
  1751. actor.add_xparam(9, DPB::PSPDS::OPTION_1_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TRG_RAND_MIN, DPB::PSPDS::OP_1_TRG_RAND_MAX))
  1752. #s's
  1753. actor.add_sparam(0, DPB::PSPDS::OPTION_1_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TGR_RAND_MIN, DPB::PSPDS::OP_1_TGR_RAND_MAX))
  1754. actor.add_sparam(1, DPB::PSPDS::OPTION_1_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_1_GRD_RAND_MIN, DPB::PSPDS::OP_1_GRD_RAND_MAX))
  1755. actor.add_sparam(2, DPB::PSPDS::OPTION_1_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_1_REC_RAND_MIN, DPB::PSPDS::OP_1_REC_RAND_MAX))
  1756. actor.add_sparam(3, DPB::PSPDS::OPTION_1_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_1_PHA_RAND_MIN, DPB::PSPDS::OP_1_PHA_RAND_MAX))
  1757. actor.add_sparam(4, DPB::PSPDS::OPTION_1_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MCR_RAND_MIN, DPB::PSPDS::OP_1_MCR_RAND_MAX))
  1758. actor.add_sparam(5, DPB::PSPDS::OPTION_1_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TCR_RAND_MIN, DPB::PSPDS::OP_1_TCR_RAND_MAX))
  1759. actor.add_sparam(6, DPB::PSPDS::OPTION_1_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_PDR_RAND_MIN, DPB::PSPDS::OP_1_PDR_RAND_MAX))
  1760. actor.add_sparam(7, DPB::PSPDS::OPTION_1_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MDR_RAND_MIN, DPB::PSPDS::OP_1_MDR_RAND_MAX))
  1761. actor.add_sparam(8, DPB::PSPDS::OPTION_1_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_FDR_RAND_MIN, DPB::PSPDS::OP_1_FDR_RAND_MAX))
  1762. actor.add_sparam(9, DPB::PSPDS::OPTION_1_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_1_EXR_RAND_MIN, DPB::PSPDS::OP_1_EXR_RAND_MAX))
  1763. #dpbz'
  1764. actor.add_dpbzparam(0, 1)
  1765. if t == value
  1766. break
  1767. end
  1768. t += 1
  1769. end
  1770. end
  1771.  
  1772. def inc_str(actor_id, value)
  1773. actor = $game_actors[actor_id]
  1774. return if actor == nil
  1775. t = 1
  1776. loop do
  1777. #reg's
  1778. actor.add_param(0, DPB::PSPDS::OPTION_2_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxHP_RAND_MIN, DPB::PSPDS::OP_1_MaxHP_RAND_MAX))
  1779. actor.add_param(1, DPB::PSPDS::OPTION_2_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MaxMP_RAND_MIN, DPB::PSPDS::OP_1_MaxMP_RAND_MAX))
  1780. actor.add_param(2, DPB::PSPDS::OPTION_2_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_ATK_RAND_MIN, DPB::PSPDS::OP_1_ATK_RAND_MAX))
  1781. actor.add_param(3, DPB::PSPDS::OPTION_2_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_DEF_RAND_MIN, DPB::PSPDS::OP_1_DEF_RAND_MAX))
  1782. actor.add_param(4, DPB::PSPDS::OPTION_2_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MAT_RAND_MIN, DPB::PSPDS::OP_1_MAT_RAND_MAX))
  1783. actor.add_param(5, DPB::PSPDS::OPTION_2_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MDF_RAND_MIN, DPB::PSPDS::OP_1_MDF_RAND_MAX))
  1784. actor.add_param(6, DPB::PSPDS::OPTION_2_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_AGI_RAND_MIN, DPB::PSPDS::OP_1_AGI_RAND_MAX))
  1785. actor.add_param(7, DPB::PSPDS::OPTION_2_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_1_LUK_RAND_MIN, DPB::PSPDS::OP_1_LUK_RAND_MAX))
  1786. #x's
  1787. actor.add_xparam(0, DPB::PSPDS::OPTION_2_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HIT_RAND_MIN, DPB::PSPDS::OP_1_HIT_RAND_MAX))
  1788. actor.add_xparam(1, DPB::PSPDS::OPTION_2_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_1_EVA_RAND_MIN, DPB::PSPDS::OP_1_EVA_RAND_MAX))
  1789. actor.add_xparam(2, DPB::PSPDS::OPTION_2_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CRI_RAND_MIN, DPB::PSPDS::OP_1_CRI_RAND_MAX))
  1790. actor.add_xparam(3, DPB::PSPDS::OPTION_2_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CEV_RAND_MIN, DPB::PSPDS::OP_1_CEV_RAND_MAX))
  1791. actor.add_xparam(4, DPB::PSPDS::OPTION_2_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MEV_RAND_MIN, DPB::PSPDS::OP_1_MEV_RAND_MAX))
  1792. actor.add_xparam(5, DPB::PSPDS::OPTION_2_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRF_RAND_MIN, DPB::PSPDS::OP_1_MRF_RAND_MAX))
  1793. actor.add_xparam(6, DPB::PSPDS::OPTION_2_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_1_CNT_RAND_MIN, DPB::PSPDS::OP_1_CNT_RAND_MAX))
  1794. actor.add_xparam(7, DPB::PSPDS::OPTION_2_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_HRG_RAND_MIN, DPB::PSPDS::OP_1_HRG_RAND_MAX))
  1795. actor.add_xparam(8, DPB::PSPDS::OPTION_2_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_MRG_RAND_MIN, DPB::PSPDS::OP_1_MRG_RAND_MAX))
  1796. actor.add_xparam(9, DPB::PSPDS::OPTION_2_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_1_TRG_RAND_MIN, DPB::PSPDS::OP_1_TRG_RAND_MAX))
  1797. #s's
  1798. actor.add_sparam(0, DPB::PSPDS::OPTION_2_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_TGR_RAND_MIN, DPB::PSPDS::OP_2_TGR_RAND_MAX))
  1799. actor.add_sparam(1, DPB::PSPDS::OPTION_2_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_2_GRD_RAND_MIN, DPB::PSPDS::OP_2_GRD_RAND_MAX))
  1800. actor.add_sparam(2, DPB::PSPDS::OPTION_2_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_2_REC_RAND_MIN, DPB::PSPDS::OP_2_REC_RAND_MAX))
  1801. actor.add_sparam(3, DPB::PSPDS::OPTION_2_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_2_PHA_RAND_MIN, DPB::PSPDS::OP_2_PHA_RAND_MAX))
  1802. actor.add_sparam(4, DPB::PSPDS::OPTION_2_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_MCR_RAND_MIN, DPB::PSPDS::OP_2_MCR_RAND_MAX))
  1803. actor.add_sparam(5, DPB::PSPDS::OPTION_2_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_TCR_RAND_MIN, DPB::PSPDS::OP_2_TCR_RAND_MAX))
  1804. actor.add_sparam(6, DPB::PSPDS::OPTION_2_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_PDR_RAND_MIN, DPB::PSPDS::OP_2_PDR_RAND_MAX))
  1805. actor.add_sparam(7, DPB::PSPDS::OPTION_2_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_MDR_RAND_MIN, DPB::PSPDS::OP_2_MDR_RAND_MAX))
  1806. actor.add_sparam(8, DPB::PSPDS::OPTION_2_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_FDR_RAND_MIN, DPB::PSPDS::OP_2_FDR_RAND_MAX))
  1807. actor.add_sparam(9, DPB::PSPDS::OPTION_2_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_2_EXR_RAND_MIN, DPB::PSPDS::OP_2_EXR_RAND_MAX))
  1808. #dpbz'
  1809. actor.add_dpbzparam(1, 1)
  1810. if t == value
  1811. break
  1812. end
  1813. t += 1
  1814. end
  1815. end
  1816.  
  1817. def inc_dex(actor_id, value)
  1818. actor = $game_actors[actor_id]
  1819. return if actor == nil
  1820. t = 1
  1821. loop do
  1822. #reg's
  1823. actor.add_param(0, DPB::PSPDS::OPTION_3_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MaxHP_RAND_MIN, DPB::PSPDS::OP_1_MaxHP_RAND_MAX))
  1824. actor.add_param(1, DPB::PSPDS::OPTION_3_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MaxMP_RAND_MIN, DPB::PSPDS::OP_1_MaxMP_RAND_MAX))
  1825. actor.add_param(2, DPB::PSPDS::OPTION_3_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_3_ATK_RAND_MIN, DPB::PSPDS::OP_3_ATK_RAND_MAX))
  1826. actor.add_param(3, DPB::PSPDS::OPTION_3_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_3_DEF_RAND_MIN, DPB::PSPDS::OP_3_DEF_RAND_MAX))
  1827. actor.add_param(4, DPB::PSPDS::OPTION_3_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MAT_RAND_MIN, DPB::PSPDS::OP_3_MAT_RAND_MAX))
  1828. actor.add_param(5, DPB::PSPDS::OPTION_3_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MDF_RAND_MIN, DPB::PSPDS::OP_3_MDF_RAND_MAX))
  1829. actor.add_param(6, DPB::PSPDS::OPTION_3_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_3_AGI_RAND_MIN, DPB::PSPDS::OP_3_AGI_RAND_MAX))
  1830. actor.add_param(7, DPB::PSPDS::OPTION_3_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_3_LUK_RAND_MIN, DPB::PSPDS::OP_3_LUK_RAND_MAX))
  1831. #x's
  1832. actor.add_xparam(0, DPB::PSPDS::OPTION_3_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_3_HIT_RAND_MIN, DPB::PSPDS::OP_3_HIT_RAND_MAX))
  1833. actor.add_xparam(1, DPB::PSPDS::OPTION_3_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_3_EVA_RAND_MIN, DPB::PSPDS::OP_3_EVA_RAND_MAX))
  1834. actor.add_xparam(2, DPB::PSPDS::OPTION_3_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_3_CRI_RAND_MIN, DPB::PSPDS::OP_3_CRI_RAND_MAX))
  1835. actor.add_xparam(3, DPB::PSPDS::OPTION_3_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_3_CEV_RAND_MIN, DPB::PSPDS::OP_3_CEV_RAND_MAX))
  1836. actor.add_xparam(4, DPB::PSPDS::OPTION_3_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MEV_RAND_MIN, DPB::PSPDS::OP_3_MEV_RAND_MAX))
  1837. actor.add_xparam(5, DPB::PSPDS::OPTION_3_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MRF_RAND_MIN, DPB::PSPDS::OP_3_MRF_RAND_MAX))
  1838. actor.add_xparam(6, DPB::PSPDS::OPTION_3_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_3_CNT_RAND_MIN, DPB::PSPDS::OP_3_CNT_RAND_MAX))
  1839. actor.add_xparam(7, DPB::PSPDS::OPTION_3_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_3_HRG_RAND_MIN, DPB::PSPDS::OP_3_HRG_RAND_MAX))
  1840. actor.add_xparam(8, DPB::PSPDS::OPTION_3_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MRG_RAND_MIN, DPB::PSPDS::OP_3_MRG_RAND_MAX))
  1841. actor.add_xparam(9, DPB::PSPDS::OPTION_3_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_3_TRG_RAND_MIN, DPB::PSPDS::OP_3_TRG_RAND_MAX))
  1842. #s's
  1843. actor.add_sparam(0, DPB::PSPDS::OPTION_3_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_TGR_RAND_MIN, DPB::PSPDS::OP_3_TGR_RAND_MAX))
  1844. actor.add_sparam(1, DPB::PSPDS::OPTION_3_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_3_GRD_RAND_MIN, DPB::PSPDS::OP_3_GRD_RAND_MAX))
  1845. actor.add_sparam(2, DPB::PSPDS::OPTION_3_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_3_REC_RAND_MIN, DPB::PSPDS::OP_3_REC_RAND_MAX))
  1846. actor.add_sparam(3, DPB::PSPDS::OPTION_3_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_3_PHA_RAND_MIN, DPB::PSPDS::OP_3_PHA_RAND_MAX))
  1847. actor.add_sparam(4, DPB::PSPDS::OPTION_3_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MCR_RAND_MIN, DPB::PSPDS::OP_3_MCR_RAND_MAX))
  1848. actor.add_sparam(5, DPB::PSPDS::OPTION_3_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_TCR_RAND_MIN, DPB::PSPDS::OP_3_TCR_RAND_MAX))
  1849. actor.add_sparam(6, DPB::PSPDS::OPTION_3_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_PDR_RAND_MIN, DPB::PSPDS::OP_3_PDR_RAND_MAX))
  1850. actor.add_sparam(7, DPB::PSPDS::OPTION_3_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_MDR_RAND_MIN, DPB::PSPDS::OP_3_MDR_RAND_MAX))
  1851. actor.add_sparam(8, DPB::PSPDS::OPTION_3_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_FDR_RAND_MIN, DPB::PSPDS::OP_3_FDR_RAND_MAX))
  1852. actor.add_sparam(9, DPB::PSPDS::OPTION_3_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_3_EXR_RAND_MIN, DPB::PSPDS::OP_3_EXR_RAND_MAX))
  1853. #dpbz'
  1854. actor.add_dpbzparam(2, 1)
  1855. if t == value
  1856. break
  1857. end
  1858. t += 1
  1859. end
  1860. end
  1861.  
  1862. def inc_mag(actor_id, value)
  1863. actor = $game_actors[actor_id]
  1864. return if actor == nil
  1865. t = 1
  1866. loop do
  1867. #reg's
  1868. actor.add_param(0, DPB::PSPDS::OPTION_4_MaxHP_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MaxHP_RAND_MIN, DPB::PSPDS::OP_4_MaxHP_RAND_MAX))
  1869. actor.add_param(1, DPB::PSPDS::OPTION_4_MaxMP_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MaxMP_RAND_MIN, DPB::PSPDS::OP_4_MaxMP_RAND_MAX))
  1870. actor.add_param(2, DPB::PSPDS::OPTION_4_ATK_GAIN + dpbz_randy(DPB::PSPDS::OP_4_ATK_RAND_MIN, DPB::PSPDS::OP_4_ATK_RAND_MAX))
  1871. actor.add_param(3, DPB::PSPDS::OPTION_4_DEF_GAIN + dpbz_randy(DPB::PSPDS::OP_4_DEF_RAND_MIN, DPB::PSPDS::OP_4_DEF_RAND_MAX))
  1872. actor.add_param(4, DPB::PSPDS::OPTION_4_MAT_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MAT_RAND_MIN, DPB::PSPDS::OP_4_MAT_RAND_MAX))
  1873. actor.add_param(5, DPB::PSPDS::OPTION_4_MDF_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MDF_RAND_MIN, DPB::PSPDS::OP_4_MDF_RAND_MAX))
  1874. actor.add_param(6, DPB::PSPDS::OPTION_4_AGI_GAIN + dpbz_randy(DPB::PSPDS::OP_4_AGI_RAND_MIN, DPB::PSPDS::OP_4_AGI_RAND_MAX))
  1875. actor.add_param(7, DPB::PSPDS::OPTION_4_LUK_GAIN + dpbz_randy(DPB::PSPDS::OP_4_LUK_RAND_MIN, DPB::PSPDS::OP_4_LUK_RAND_MAX))
  1876. #x's
  1877. actor.add_xparam(0, DPB::PSPDS::OPTION_4_HIT_GAIN + dpbz_randy(DPB::PSPDS::OP_4_HIT_RAND_MIN, DPB::PSPDS::OP_4_HIT_RAND_MAX))
  1878. actor.add_xparam(1, DPB::PSPDS::OPTION_4_EVA_GAIN + dpbz_randy(DPB::PSPDS::OP_4_EVA_RAND_MIN, DPB::PSPDS::OP_4_EVA_RAND_MAX))
  1879. actor.add_xparam(2, DPB::PSPDS::OPTION_4_CRI_GAIN + dpbz_randy(DPB::PSPDS::OP_4_CRI_RAND_MIN, DPB::PSPDS::OP_4_CRI_RAND_MAX))
  1880. actor.add_xparam(3, DPB::PSPDS::OPTION_4_CEV_GAIN + dpbz_randy(DPB::PSPDS::OP_4_CEV_RAND_MIN, DPB::PSPDS::OP_4_CEV_RAND_MAX))
  1881. actor.add_xparam(4, DPB::PSPDS::OPTION_4_MEV_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MEV_RAND_MIN, DPB::PSPDS::OP_4_MEV_RAND_MAX))
  1882. actor.add_xparam(5, DPB::PSPDS::OPTION_4_MRF_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MRF_RAND_MIN, DPB::PSPDS::OP_4_MRF_RAND_MAX))
  1883. actor.add_xparam(6, DPB::PSPDS::OPTION_4_CNT_GAIN + dpbz_randy(DPB::PSPDS::OP_4_CNT_RAND_MIN, DPB::PSPDS::OP_4_CNT_RAND_MAX))
  1884. actor.add_xparam(7, DPB::PSPDS::OPTION_4_HRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_HRG_RAND_MIN, DPB::PSPDS::OP_4_HRG_RAND_MAX))
  1885. actor.add_xparam(8, DPB::PSPDS::OPTION_4_MRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MRG_RAND_MIN, DPB::PSPDS::OP_4_MRG_RAND_MAX))
  1886. actor.add_xparam(9, DPB::PSPDS::OPTION_4_TRG_GAIN + dpbz_randy(DPB::PSPDS::OP_4_TRG_RAND_MIN, DPB::PSPDS::OP_4_TRG_RAND_MAX))
  1887. #s's
  1888. actor.add_sparam(0, DPB::PSPDS::OPTION_4_TGR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_TGR_RAND_MIN, DPB::PSPDS::OP_4_TGR_RAND_MAX))
  1889. actor.add_sparam(1, DPB::PSPDS::OPTION_4_GRD_GAIN + dpbz_randy(DPB::PSPDS::OP_4_GRD_RAND_MIN, DPB::PSPDS::OP_4_GRD_RAND_MAX))
  1890. actor.add_sparam(2, DPB::PSPDS::OPTION_4_REC_GAIN + dpbz_randy(DPB::PSPDS::OP_4_REC_RAND_MIN, DPB::PSPDS::OP_4_REC_RAND_MAX))
  1891. actor.add_sparam(3, DPB::PSPDS::OPTION_4_PHA_GAIN + dpbz_randy(DPB::PSPDS::OP_4_PHA_RAND_MIN, DPB::PSPDS::OP_4_PHA_RAND_MAX))
  1892. actor.add_sparam(4, DPB::PSPDS::OPTION_4_MCR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MCR_RAND_MIN, DPB::PSPDS::OP_4_MCR_RAND_MAX))
  1893. actor.add_sparam(5, DPB::PSPDS::OPTION_4_TCR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_TCR_RAND_MIN, DPB::PSPDS::OP_4_TCR_RAND_MAX))
  1894. actor.add_sparam(6, DPB::PSPDS::OPTION_4_PDR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_PDR_RAND_MIN, DPB::PSPDS::OP_4_PDR_RAND_MAX))
  1895. actor.add_sparam(7, DPB::PSPDS::OPTION_4_MDR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_MDR_RAND_MIN, DPB::PSPDS::OP_4_MDR_RAND_MAX))
  1896. actor.add_sparam(8, DPB::PSPDS::OPTION_4_FDR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_FDR_RAND_MIN, DPB::PSPDS::OP_4_FDR_RAND_MAX))
  1897. actor.add_sparam(9, DPB::PSPDS::OPTION_4_EXR_GAIN + dpbz_randy(DPB::PSPDS::OP_4_EXR_RAND_MIN, DPB::PSPDS::OP_4_EXR_RAND_MAX))
  1898. #dpbz'
  1899. actor.add_dpbzparam(3, 1)
  1900. if t == value
  1901. break
  1902. end
  1903. t += 1
  1904. end
  1905. end
  1906. end# class
  1907.  
  1908. #==============================================================================
  1909. class Window_Level_upCommand < Window_Command
  1910. #==============================================================================
  1911.  
  1912. def initialize
  1913. super(0, 300)
  1914. @actor = $game_temp.actor_level_up[0]
  1915. @@last_command_symbol = nil
  1916. select_last
  1917. self.opacity = 0
  1918. end
  1919.  
  1920. def window_width
  1921. return (Graphics.width - 24) / 4.15 + (DPB::PSPDS::COMMAND_COLUMN_EXTRA_WIDTH)
  1922. end
  1923.  
  1924.  
  1925. def window_height
  1926. return 344
  1927. end
  1928.  
  1929. def visible_line_number
  1930. item_max
  1931. end
  1932. def make_command_list
  1933. for command in DPB::PSPDS::COMMANDS
  1934. case command
  1935. when :Vitality
  1936. add_command("", :gain_vit, true)
  1937. when :Strength
  1938. add_command("", :gain_str, true)
  1939. when :Dexterity
  1940. add_command("", :gain_dex, true)
  1941. when :Magic
  1942. add_command("", :gain_mag, true)
  1943. end
  1944. end
  1945. end
  1946.  
  1947. def process_ok
  1948. @@last_command_symbol = current_symbol
  1949. super
  1950. end
  1951.  
  1952. def select_last
  1953. select_symbol(@@last_command_symbol)
  1954. end
  1955. end#class
  1956.  
  1957. #==============================================================================
  1958. class Window_Status_Level_up < Window_Selectable
  1959. #==============================================================================
  1960.  
  1961. def initialize(actor)
  1962. super(-50, -50, window_width, window_height)
  1963. contents.font.size = DPB::PSPDS::FONTSIZE
  1964. @actor = actor
  1965. refresh
  1966. activate
  1967. end
  1968.  
  1969. def window_width; return Graphics.width - 0; end
  1970.  
  1971. def window_height; return Graphics.height - 0; end
  1972.  
  1973. def actor=(actor)
  1974. return if @actor == actor
  1975. @actor = actor
  1976. refresh
  1977. end
  1978.  
  1979. def refresh
  1980. contents.clear
  1981. draw_block1(line_height * 1)
  1982. draw_block2(line_height * 1)
  1983. contents.font.size = DPB::PSPDS::FONTSIZE
  1984. end
  1985.  
  1986. def draw_block1(y)
  1987. draw_actor_face(@actor, (window_width - 24) / 2.5, 0)
  1988. if DPB::PSPDS::DRAW_ACTOR_GRAPHIC
  1989. draw_actor_graphic(@actor, DPB::PSPDS::DAG_X, DPB::PSPDS::DAG_Y)#, 50)
  1990. end
  1991. end
  1992.  
  1993. def draw_block2(y)
  1994. draw_basic_info(32, y)
  1995. end
  1996.  
  1997. def draw_horz_line(y)
  1998. line_y = y + line_height / 2 - 1
  1999. contents.fill_rect(0, line_y, contents_width, 2, line_color)
  2000. end
  2001.  
  2002. def line_color
  2003. color = normal_color
  2004. color.alpha = 48
  2005. color
  2006. end
  2007. end
  2008.  
  2009. def draw_parameters(x, y)
  2010. 6.times {|i| draw_actor_param(@actor, x, y + 7 + line_height * i, i + 2) }
  2011. end
  2012.  
  2013. if DPB::PSPDS::DRAW_ALL_COLUMNS
  2014. def draw_parameter_graph
  2015. dy = line_height * 3/2
  2016. maximum = 1
  2017. minimum = @actor.param_max(2)
  2018. for i in 2..7
  2019. maximum = [@actor.param(i), maximum].max
  2020. minimum = [@actor.param(i), minimum].min
  2021. end
  2022. maximum += minimum * 0.33 unless maximum == minimum
  2023. for i in 2..7
  2024. rate = calculate_rate(maximum, minimum, i)
  2025. dy = line_height * i - line_height/2
  2026. draw_param_gauge(i, dy, rate)
  2027. self.contents.font.size = DPB::PSPDS::PARAMFONTSIZE
  2028. change_color(system_color)
  2029. draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
  2030. dw = (contents.width - 48) * rate - 8
  2031. change_color(normal_color)
  2032. draw_text((window_width - 24) / 4 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
  2033. end
  2034. end
  2035. else
  2036. def draw_parameter_graph
  2037. dy = line_height * 3/2
  2038. maximum = 1
  2039. minimum = @actor.param_max(2)
  2040. for i in 2..7
  2041. maximum = [@actor.param(i), maximum].max
  2042. minimum = [@actor.param(i), minimum].min
  2043. end
  2044. maximum += minimum * 0.33 unless maximum == minimum
  2045. for i in 2..7
  2046. rate = calculate_rate(maximum, minimum, i)
  2047. dy = line_height * i - line_height/2
  2048. draw_param_gauge(i, dy, rate)
  2049. self.contents.font.size = DPB::PSPDS::PARAMFONTSIZE
  2050. change_color(system_color)
  2051. draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
  2052. dw = (contents.width - 48) * rate - 8
  2053. change_color(normal_color)
  2054. draw_text((window_width - 60) / 3 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
  2055. end
  2056. end
  2057. end#if
  2058.  
  2059. def calculate_rate(maximum, minimum, param_id)
  2060. return 1.0 if maximum == minimum
  2061. rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  2062. rate *= 0.67
  2063. rate += 0.33
  2064. return rate
  2065. end
  2066.  
  2067. if DPB::PSPDS::DRAW_ALL_COLUMNS
  2068. def draw_param_gauge(param_id, dy, rate)
  2069. dw = (window_width - 24) / 4 - 12
  2070. colour1 = param_gauge1(param_id)
  2071. colour2 = param_gauge2(param_id)
  2072. draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  2073. end
  2074. else
  2075. def draw_param_gauge(param_id, dy, rate)
  2076. dw = (window_width - 24) / 3 - 24
  2077. colour1 = param_gauge1(param_id)
  2078. colour2 = param_gauge2(param_id)
  2079. draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  2080. end
  2081. end
  2082.  
  2083. def param_gauge1(param_id)
  2084. return DPB::PSPDS::PARAM_COLOUR[param_id][1]
  2085. end
  2086.  
  2087. def param_gauge2(param_id)
  2088. return DPB::PSPDS::PARAM_COLOUR[param_id][2]
  2089. end
  2090.  
  2091. def draw_basic_info(x, y)
  2092. draw_actor_icons(@actor, (window_width - 24) / 2.5, y + line_height * 3)
  2093. contents.font.size = DPB::PSPDS::FONTSIZE
  2094. if DPB::PSPDS::DRAW_PARAM_GAUGES
  2095. draw_parameter_graph
  2096. if DPB::PSPDS::DRAW_ALL_COLUMNS
  2097. draw_actor_hp(@actor, 5, y+106 + line_height * 0,(window_width - 24) / 4 - 12)
  2098. draw_actor_mp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 4 - 12)
  2099. else
  2100. draw_actor_hp(@actor, 5, y+106 + line_height * 0,(window_width - 24) / 3 - 24)
  2101. draw_actor_mp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 3 - 24)
  2102. end
  2103. else
  2104. draw_properties_paramcolumn
  2105. end
  2106. contents.font.size = DPB::PSPDS::PROPFONTSIZE
  2107. draw_horz_line(line_height * 4)
  2108. draw_horz_line(Graphics.height - line_height * 4)
  2109. draw_new_stats_column
  2110. draw_properties_column1
  2111. draw_properties_column2
  2112. draw_points_column
  2113. if DPB::PSPDS::DRAW_ALL_COLUMNS
  2114. draw_properties_column3
  2115. end
  2116. reset_font_settings
  2117. end
  2118.  
  2119. def draw_points_column
  2120. dx = (window_width - 24) / 5 * 4
  2121. dw = (window_width - 24) / 5
  2122. dy = 0
  2123. for property in DPB::PSPDS::POINTS_COLUMN
  2124. dy = draw_property(property, dx, dy, dw)
  2125. end
  2126. end
  2127.  
  2128. def draw_new_stats_column
  2129. dx = 0
  2130. dw = (window_width - 24) / 5
  2131. dy = 0
  2132. for property in DPB::PSPDS::NEW_STATS_COLUMN
  2133. dy = draw_property(property, dx, dy, dw)
  2134. end
  2135. end
  2136.  
  2137. if DPB::PSPDS::DRAW_ALL_COLUMNS
  2138. def draw_properties_column1
  2139. dx = 5 + (window_width - 24) / 4
  2140. dw = (window_width - 24) / 3.6 - 24
  2141. dy = 130
  2142. for property in DPB::PSPDS::PROPERTIES_COLUMN1
  2143. dy = draw_property(property, dx, dy, dw)
  2144. end
  2145. end
  2146.  
  2147. def draw_properties_column2
  2148. dx = 5 + (window_width - 24) / 2
  2149. dw = (window_width - 24) / 3.6 - 24
  2150. dy = 130
  2151. for property in DPB::PSPDS::PROPERTIES_COLUMN2
  2152. dy = draw_property(property, dx, dy, dw)
  2153. end
  2154. end
  2155.  
  2156. def draw_properties_column3
  2157. dx = 5 + (window_width - 24) / 2 + (window_width / 4.15)
  2158. dw = (window_width - 24) / 3.6 - 24
  2159. dy = 130
  2160. for property in DPB::PSPDS::PROPERTIES_COLUMN3
  2161. dy = draw_property(property, dx, dy, dw)
  2162. end
  2163. end
  2164.  
  2165. def draw_properties_paramcolumn
  2166. dx = 5
  2167. dw = (window_width - 24) / 3.6 - 24
  2168. dy = 130
  2169. for property in DPB::PSPDS::PROPERTIES_PARAMCOLUMN
  2170. dy = draw_property(property, dx, dy, dw)
  2171. end
  2172. end
  2173. else # if
  2174. def draw_properties_column1
  2175. dx = 5 + (window_width - 24) / 3
  2176. dw = (window_width - 24) / 3 - 12
  2177. dy = 130
  2178. for property in DPB::PSPDS::PROPERTIES_COLUMN1
  2179. dy = draw_property(property, dx, dy, dw)
  2180. end
  2181. end
  2182.  
  2183. def draw_properties_column2
  2184. dx = 5 + (window_width - 24) / 3 * 2
  2185. dw = (window_width - 24) / 3 - 12
  2186. dy = 130
  2187. for property in DPB::PSPDS::PROPERTIES_COLUMN2
  2188. dy = draw_property(property, dx, dy, dw)
  2189. end
  2190. end
  2191.  
  2192. def draw_properties_paramcolumn
  2193. dx = 5
  2194. dw = (window_width - 24) / 3 - 12
  2195. dy = 130
  2196. for property in DPB::PSPDS::PROPERTIES_PARAMCOLUMN
  2197. dy = draw_property(property, dx, dy, dw)
  2198. end
  2199. end
  2200. end# if
  2201.  
  2202. def draw_property(property, dx, dy, dw)
  2203. fmt = "%1.2f%%"
  2204. dpb = "%1.0f"
  2205. case property[0]
  2206. when :vit
  2207. value = sprintf(dpb, @actor.vit)
  2208. when :str
  2209. value = sprintf(dpb, @actor.str)
  2210. when :dex
  2211. value = sprintf(dpb, @actor.dex)
  2212. when :mag
  2213. value = sprintf(dpb, @actor.mag)
  2214. when :points
  2215. value = @actor.level_up_pts
  2216. when :spirit
  2217. value = @actor.spirit_ptz
  2218. when :atklvl
  2219. return dy unless $imported["DPB-PSPDS-ATL-DFL"]
  2220. value = @actor.atl.to_i
  2221. when :deflvl
  2222. return dy unless $imported["DPB-PSPDS-ATL-DFL"]
  2223. value = @actor.dfl.to_i
  2224. when :affinity
  2225. return dy unless DPB::PSPDS::USE_ATTRIBUTE_POINTS
  2226. value = @actor.atti_ptz
  2227. when :yanflyjp
  2228. return dy unless $imported["YEA-JPManager"]
  2229. value = @actor.jp
  2230. when :mhp
  2231. value = sprintf(dpb, @actor.mhp)
  2232. when :mmp
  2233. value = sprintf(dpb, @actor.mmp)
  2234. when :atk
  2235. value = sprintf(dpb, @actor.atk)
  2236. when :def
  2237. value = sprintf(dpb, @actor.def)
  2238. when :mat
  2239. value = sprintf(dpb, @actor.mat)
  2240. when :mdf
  2241. value = sprintf(dpb, @actor.mdf)
  2242. when :agi
  2243. value = sprintf(dpb, @actor.agi)
  2244. when :luk
  2245. value = sprintf(dpb, @actor.luk)
  2246. when :atkrt
  2247. value = sprintf(dpb, @actor.atk_speed)
  2248. when :atktimes
  2249. value = sprintf(dpb, @actor.atk_times_add)
  2250. when :actiontimes
  2251. value = @actor.action_plus_set
  2252. when :hit
  2253. value = sprintf(fmt, @actor.hit * 100)
  2254. when :eva
  2255. value = sprintf(fmt, @actor.eva * 100)
  2256. when :cri
  2257. value = sprintf(fmt, @actor.cri * 100)
  2258. when :cev
  2259. value = sprintf(fmt, @actor.cev * 100)
  2260. when :mev
  2261. value = sprintf(fmt, @actor.mev * 100)
  2262. when :mrf
  2263. value = sprintf(fmt, @actor.mrf * 100)
  2264. when :cnt
  2265. value = sprintf(fmt, @actor.cnt * 100)
  2266. when :hrg
  2267. value = sprintf(fmt, @actor.hrg * 100)
  2268. when :mrg
  2269. value = sprintf(fmt, @actor.mrg * 100)
  2270. when :trg
  2271. value = sprintf(fmt, @actor.trg * 100)
  2272. when :tgr
  2273. value = sprintf(fmt, @actor.tgr * 100)
  2274. when :grd
  2275. value = sprintf(fmt, @actor.grd * 100)
  2276. when :rec
  2277. value = sprintf(fmt, @actor.rec * 100)
  2278. when :pha
  2279. value = sprintf(fmt, @actor.pha * 100)
  2280. when :mcr
  2281. value = sprintf(fmt, @actor.mcr * 100)
  2282. when :tcr
  2283. value = sprintf(fmt, @actor.tcr * 100)
  2284. when :pdr
  2285. value = sprintf(fmt, @actor.pdr * 100)
  2286. when :mdr
  2287. value = sprintf(fmt, @actor.mdr * 100)
  2288. when :fdr
  2289. value = sprintf(fmt, @actor.fdr * 100)
  2290. when :exr
  2291. value = sprintf(fmt, @actor.exr * 100)
  2292. when :hcr
  2293. return dy unless $imported["YEA-SkillCostManager"]
  2294. value = sprintf(fmt, @actor.hcr * 100)
  2295. when :tcr_y
  2296. return dy unless $imported["YEA-SkillCostManager"]
  2297. value = sprintf(fmt, @actor.tcr_y * 100)
  2298. when :gcr
  2299. return dy unless $imported["YEA-SkillCostManager"]
  2300. value = sprintf(fmt, @actor.gcr * 100)
  2301. when :cdr
  2302. return dy unless $imported["YEA-SkillRestrictions"]
  2303. value = sprintf(fmt, @actor.cdr * 100)
  2304. when :wur
  2305. return dy unless $imported["YEA-SkillRestrictions"]
  2306. value = sprintf(fmt, @actor.wur * 100)
  2307. else; return dy
  2308. end
  2309. colour = Color.new(0, 0, 0, translucent_alpha/2)
  2310. rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  2311. contents.fill_rect(rect, colour)
  2312. change_color(system_color)
  2313. draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  2314. change_color(normal_color)
  2315. draw_text(dx+4, dy, dw-8, line_height, value, 2)
  2316. return dy + line_height
  2317. end # END SCRIPT.
  2318.  
  2319. #===============================================================================#
  2320. # http://dekitarpg.wordpress.com/
  2321. #===============================================================================#
  2322.  
  2323. module DPB
  2324. module REGEXP
  2325. module EQUIPITEM
  2326.  
  2327. INC_VIT = /<vit: (.*)>/i
  2328. INC_STR = /<str: (.*)>/i
  2329. INC_DEX = /<dex: (.*)>/i
  2330. INC_MAG = /<mag: (.*)>/i
  2331.  
  2332. end # EQUIPITEM
  2333. end # REGEXP
  2334. end # DPB
  2335.  
  2336. #==============================================================================
  2337. module DataManager
  2338. #==============================================================================
  2339.  
  2340. class <<self; alias load_database_PSPDS load_database; end
  2341. def self.load_database
  2342. load_database_PSPDS
  2343. load_notetags_PSPDS
  2344. end
  2345.  
  2346. def self.load_notetags_PSPDS
  2347. groups = [$data_weapons, $data_armors, $data_enemies]
  2348. for group in groups
  2349. for obj in group
  2350. next if obj.nil?
  2351. obj.load_notetags_PSPDS
  2352. end
  2353. end
  2354. end
  2355.  
  2356. end # DataManager
  2357.  
  2358. #==============================================================================
  2359. class RPG::EquipItem < RPG::BaseItem
  2360. #==============================================================================
  2361.  
  2362. attr_accessor :dpbzparams
  2363. attr_accessor :xparams
  2364. attr_accessor :sparams
  2365.  
  2366. def load_notetags_PSPDS
  2367. @dpbzparams = [0] * 4
  2368. @xparams = [0] * 10
  2369. @sparams = [0] * 10
  2370. self.note.split(/[\r\n]+/).each { |line|
  2371. case line
  2372. when DPB::REGEXP::EQUIPITEM::INC_VIT
  2373. @dpbzparams[0] += $1.to_i
  2374. @params[0] += (DPB::PSPDS::OPTION_1_MaxHP_GAIN * $1.to_i)
  2375. @params[1] += (DPB::PSPDS::OPTION_1_MaxMP_GAIN * $1.to_i)
  2376. @params[2] += (DPB::PSPDS::OPTION_1_ATK_GAIN * $1.to_i)
  2377. @params[3] += (DPB::PSPDS::OPTION_1_DEF_GAIN * $1.to_i)
  2378. @params[4] += (DPB::PSPDS::OPTION_1_MAT_GAIN * $1.to_i)
  2379. @params[5] += (DPB::PSPDS::OPTION_1_MDF_GAIN * $1.to_i)
  2380. @params[6] += (DPB::PSPDS::OPTION_1_AGI_GAIN * $1.to_i)
  2381. @params[7] += (DPB::PSPDS::OPTION_1_LUK_GAIN * $1.to_i)
  2382. #x's
  2383. @xparams[0] += (DPB::PSPDS::OPTION_1_HIT_GAIN * $1.to_i)
  2384. @xparams[1] += (DPB::PSPDS::OPTION_1_EVA_GAIN * $1.to_i)
  2385. @xparams[2] += (DPB::PSPDS::OPTION_1_CRI_GAIN * $1.to_i)
  2386. @xparams[3] += (DPB::PSPDS::OPTION_1_CEV_GAIN * $1.to_i)
  2387. @xparams[4] += (DPB::PSPDS::OPTION_1_MEV_GAIN * $1.to_i)
  2388. @xparams[5] += (DPB::PSPDS::OPTION_1_MRF_GAIN * $1.to_i)
  2389. @xparams[6] += (DPB::PSPDS::OPTION_1_CNT_GAIN * $1.to_i)
  2390. @xparams[7] += (DPB::PSPDS::OPTION_1_HRG_GAIN * $1.to_i)
  2391. @xparams[8] += (DPB::PSPDS::OPTION_1_MRG_GAIN * $1.to_i)
  2392. @xparams[9] += (DPB::PSPDS::OPTION_1_TRG_GAIN * $1.to_i)
  2393. #s's
  2394. @sparams[0] += (DPB::PSPDS::OPTION_1_TGR_GAIN * $1.to_i)
  2395. @sparams[1] += (DPB::PSPDS::OPTION_1_GRD_GAIN * $1.to_i)
  2396. @sparams[2] += (DPB::PSPDS::OPTION_1_REC_GAIN * $1.to_i)
  2397. @sparams[3] += (DPB::PSPDS::OPTION_1_PHA_GAIN * $1.to_i)
  2398. @sparams[4] += (DPB::PSPDS::OPTION_1_MCR_GAIN * $1.to_i)
  2399. @sparams[5] += (DPB::PSPDS::OPTION_1_TCR_GAIN * $1.to_i)
  2400. @sparams[6] += (DPB::PSPDS::OPTION_1_PDR_GAIN * $1.to_i)
  2401. @sparams[7] += (DPB::PSPDS::OPTION_1_MDR_GAIN * $1.to_i)
  2402. @sparams[8] += (DPB::PSPDS::OPTION_1_FDR_GAIN * $1.to_i)
  2403. @sparams[9] += (DPB::PSPDS::OPTION_1_EXR_GAIN * $1.to_i)
  2404. when DPB::REGEXP::EQUIPITEM::INC_STR
  2405. @dpbzparams[1] += $1.to_i
  2406. @params[0] += (DPB::PSPDS::OPTION_2_MaxHP_GAIN * $1.to_i)
  2407. @params[1] += (DPB::PSPDS::OPTION_2_MaxMP_GAIN * $1.to_i)
  2408. @params[2] += (DPB::PSPDS::OPTION_2_ATK_GAIN * $1.to_i)
  2409. @params[3] += (DPB::PSPDS::OPTION_2_DEF_GAIN * $1.to_i)
  2410. @params[4] += (DPB::PSPDS::OPTION_2_MAT_GAIN * $1.to_i)
  2411. @params[5] += (DPB::PSPDS::OPTION_2_MDF_GAIN * $1.to_i)
  2412. @params[6] += (DPB::PSPDS::OPTION_2_AGI_GAIN * $1.to_i)
  2413. @params[7] += (DPB::PSPDS::OPTION_2_LUK_GAIN * $1.to_i)
  2414. #x's
  2415. @xparams[0] += (DPB::PSPDS::OPTION_2_HIT_GAIN * $1.to_i)
  2416. @xparams[1] += (DPB::PSPDS::OPTION_2_EVA_GAIN * $1.to_i)
  2417. @xparams[2] += (DPB::PSPDS::OPTION_2_CRI_GAIN * $1.to_i)
  2418. @xparams[3] += (DPB::PSPDS::OPTION_2_CEV_GAIN * $1.to_i)
  2419. @xparams[4] += (DPB::PSPDS::OPTION_2_MEV_GAIN * $1.to_i)
  2420. @xparams[5] += (DPB::PSPDS::OPTION_2_MRF_GAIN * $1.to_i)
  2421. @xparams[6] += (DPB::PSPDS::OPTION_2_CNT_GAIN * $1.to_i)
  2422. @xparams[7] += (DPB::PSPDS::OPTION_2_HRG_GAIN * $1.to_i)
  2423. @xparams[8] += (DPB::PSPDS::OPTION_2_MRG_GAIN * $1.to_i)
  2424. @xparams[9] += (DPB::PSPDS::OPTION_2_TRG_GAIN * $1.to_i)
  2425. #s's
  2426. @sparams[0] += (DPB::PSPDS::OPTION_2_TGR_GAIN * $1.to_i)
  2427. @sparams[1] += (DPB::PSPDS::OPTION_2_GRD_GAIN * $1.to_i)
  2428. @sparams[2] += (DPB::PSPDS::OPTION_2_REC_GAIN * $1.to_i)
  2429. @sparams[3] += (DPB::PSPDS::OPTION_2_PHA_GAIN * $1.to_i)
  2430. @sparams[4] += (DPB::PSPDS::OPTION_2_MCR_GAIN * $1.to_i)
  2431. @sparams[5] += (DPB::PSPDS::OPTION_2_TCR_GAIN * $1.to_i)
  2432. @sparams[6] += (DPB::PSPDS::OPTION_2_PDR_GAIN * $1.to_i)
  2433. @sparams[7] += (DPB::PSPDS::OPTION_2_MDR_GAIN * $1.to_i)
  2434. @sparams[8] += (DPB::PSPDS::OPTION_2_FDR_GAIN * $1.to_i)
  2435. @sparams[9] += (DPB::PSPDS::OPTION_2_EXR_GAIN * $1.to_i)
  2436. when DPB::REGEXP::EQUIPITEM::INC_DEX
  2437. @dpbzparams[2] += $1.to_i
  2438. @params[0] += (DPB::PSPDS::OPTION_3_MaxHP_GAIN * $1.to_i)
  2439. @params[1] += (DPB::PSPDS::OPTION_3_MaxMP_GAIN * $1.to_i)
  2440. @params[2] += (DPB::PSPDS::OPTION_3_ATK_GAIN * $1.to_i)
  2441. @params[3] += (DPB::PSPDS::OPTION_3_DEF_GAIN * $1.to_i)
  2442. @params[4] += (DPB::PSPDS::OPTION_3_MAT_GAIN * $1.to_i)
  2443. @params[5] += (DPB::PSPDS::OPTION_3_MDF_GAIN * $1.to_i)
  2444. @params[6] += (DPB::PSPDS::OPTION_3_AGI_GAIN * $1.to_i)
  2445. @params[7] += (DPB::PSPDS::OPTION_3_LUK_GAIN * $1.to_i)
  2446. #x's
  2447. @xparams[0] += (DPB::PSPDS::OPTION_3_HIT_GAIN * $1.to_i)
  2448. @xparams[1] += (DPB::PSPDS::OPTION_3_EVA_GAIN * $1.to_i)
  2449. @xparams[2] += (DPB::PSPDS::OPTION_3_CRI_GAIN * $1.to_i)
  2450. @xparams[3] += (DPB::PSPDS::OPTION_3_CEV_GAIN * $1.to_i)
  2451. @xparams[4] += (DPB::PSPDS::OPTION_3_MEV_GAIN * $1.to_i)
  2452. @xparams[5] += (DPB::PSPDS::OPTION_3_MRF_GAIN * $1.to_i)
  2453. @xparams[6] += (DPB::PSPDS::OPTION_3_CNT_GAIN * $1.to_i)
  2454. @xparams[7] += (DPB::PSPDS::OPTION_3_HRG_GAIN * $1.to_i)
  2455. @xparams[8] += (DPB::PSPDS::OPTION_3_MRG_GAIN * $1.to_i)
  2456. @xparams[9] += (DPB::PSPDS::OPTION_3_TRG_GAIN * $1.to_i)
  2457. #s's
  2458. @sparams[0] += (DPB::PSPDS::OPTION_3_TGR_GAIN * $1.to_i)
  2459. @sparams[1] += (DPB::PSPDS::OPTION_3_GRD_GAIN * $1.to_i)
  2460. @sparams[2] += (DPB::PSPDS::OPTION_3_REC_GAIN * $1.to_i)
  2461. @sparams[3] += (DPB::PSPDS::OPTION_3_PHA_GAIN * $1.to_i)
  2462. @sparams[4] += (DPB::PSPDS::OPTION_3_MCR_GAIN * $1.to_i)
  2463. @sparams[5] += (DPB::PSPDS::OPTION_3_TCR_GAIN * $1.to_i)
  2464. @sparams[6] += (DPB::PSPDS::OPTION_3_PDR_GAIN * $1.to_i)
  2465. @sparams[7] += (DPB::PSPDS::OPTION_3_MDR_GAIN * $1.to_i)
  2466. @sparams[8] += (DPB::PSPDS::OPTION_3_FDR_GAIN * $1.to_i)
  2467. @sparams[9] += (DPB::PSPDS::OPTION_3_EXR_GAIN * $1.to_i)
  2468. when DPB::REGEXP::EQUIPITEM::INC_MAG
  2469. @dpbzparams[3] += $1.to_i
  2470. @params[0] += (DPB::PSPDS::OPTION_4_MaxHP_GAIN * $1.to_i)
  2471. @params[1] += (DPB::PSPDS::OPTION_4_MaxMP_GAIN * $1.to_i)
  2472. @params[2] += (DPB::PSPDS::OPTION_4_ATK_GAIN * $1.to_i)
  2473. @params[3] += (DPB::PSPDS::OPTION_4_DEF_GAIN * $1.to_i)
  2474. @params[4] += (DPB::PSPDS::OPTION_4_MAT_GAIN * $1.to_i)
  2475. @params[5] += (DPB::PSPDS::OPTION_4_MDF_GAIN * $1.to_i)
  2476. @params[6] += (DPB::PSPDS::OPTION_4_AGI_GAIN * $1.to_i)
  2477. @params[7] += (DPB::PSPDS::OPTION_4_LUK_GAIN * $1.to_i)
  2478. #x's
  2479. @xparams[0] += (DPB::PSPDS::OPTION_4_HIT_GAIN * $1.to_i)
  2480. @xparams[1] += (DPB::PSPDS::OPTION_4_EVA_GAIN * $1.to_i)
  2481. @xparams[2] += (DPB::PSPDS::OPTION_4_CRI_GAIN * $1.to_i)
  2482. @xparams[3] += (DPB::PSPDS::OPTION_4_CEV_GAIN * $1.to_i)
  2483. @xparams[4] += (DPB::PSPDS::OPTION_4_MEV_GAIN * $1.to_i)
  2484. @xparams[5] += (DPB::PSPDS::OPTION_4_MRF_GAIN * $1.to_i)
  2485. @xparams[6] += (DPB::PSPDS::OPTION_4_CNT_GAIN * $1.to_i)
  2486. @xparams[7] += (DPB::PSPDS::OPTION_4_HRG_GAIN * $1.to_i)
  2487. @xparams[8] += (DPB::PSPDS::OPTION_4_MRG_GAIN * $1.to_i)
  2488. @xparams[9] += (DPB::PSPDS::OPTION_4_TRG_GAIN * $1.to_i)
  2489. #s's
  2490. @sparams[0] += (DPB::PSPDS::OPTION_4_TGR_GAIN * $1.to_i)
  2491. @sparams[1] += (DPB::PSPDS::OPTION_4_GRD_GAIN * $1.to_i)
  2492. @sparams[2] += (DPB::PSPDS::OPTION_4_REC_GAIN * $1.to_i)
  2493. @sparams[3] += (DPB::PSPDS::OPTION_4_PHA_GAIN * $1.to_i)
  2494. @sparams[4] += (DPB::PSPDS::OPTION_4_MCR_GAIN * $1.to_i)
  2495. @sparams[5] += (DPB::PSPDS::OPTION_4_TCR_GAIN * $1.to_i)
  2496. @sparams[6] += (DPB::PSPDS::OPTION_4_PDR_GAIN * $1.to_i)
  2497. @sparams[7] += (DPB::PSPDS::OPTION_4_MDR_GAIN * $1.to_i)
  2498. @sparams[8] += (DPB::PSPDS::OPTION_4_FDR_GAIN * $1.to_i)
  2499. @sparams[9] += (DPB::PSPDS::OPTION_4_EXR_GAIN * $1.to_i)
  2500. #---
  2501. end
  2502. } # self.note.split
  2503. #---
  2504. end
  2505.  
  2506. end # RPG::EquipItem
  2507. #==============================================================================
  2508. class RPG::Enemy < RPG::BaseItem
  2509. #==============================================================================
  2510.  
  2511. attr_accessor :dpbzparams
  2512. attr_accessor :xparams
  2513. attr_accessor :sparams
  2514.  
  2515. def load_notetags_PSPDS
  2516. @dpbzparams = [0] * 4
  2517. @xparams = [0] * 10
  2518. @sparams = [0] * 10
  2519. self.note.split(/[\r\n]+/).each { |line|
  2520. case line
  2521. when DPB::REGEXP::EQUIPITEM::INC_VIT
  2522. @dpbzparams[0] += $1.to_i
  2523. @params[0] += (DPB::PSPDS::OPTION_1_MaxHP_GAIN * $1.to_i)
  2524. @params[1] += (DPB::PSPDS::OPTION_1_MaxMP_GAIN * $1.to_i)
  2525. @params[2] += (DPB::PSPDS::OPTION_1_ATK_GAIN * $1.to_i)
  2526. @params[3] += (DPB::PSPDS::OPTION_1_DEF_GAIN * $1.to_i)
  2527. @params[4] += (DPB::PSPDS::OPTION_1_MAT_GAIN * $1.to_i)
  2528. @params[5] += (DPB::PSPDS::OPTION_1_MDF_GAIN * $1.to_i)
  2529. @params[6] += (DPB::PSPDS::OPTION_1_AGI_GAIN * $1.to_i)
  2530. @params[7] += (DPB::PSPDS::OPTION_1_LUK_GAIN * $1.to_i)
  2531. #x's
  2532. @xparams[0] += (DPB::PSPDS::OPTION_1_HIT_GAIN * $1.to_i)
  2533. @xparams[1] += (DPB::PSPDS::OPTION_1_EVA_GAIN * $1.to_i)
  2534. @xparams[2] += (DPB::PSPDS::OPTION_1_CRI_GAIN * $1.to_i)
  2535. @xparams[3] += (DPB::PSPDS::OPTION_1_CEV_GAIN * $1.to_i)
  2536. @xparams[4] += (DPB::PSPDS::OPTION_1_MEV_GAIN * $1.to_i)
  2537. @xparams[5] += (DPB::PSPDS::OPTION_1_MRF_GAIN * $1.to_i)
  2538. @xparams[6] += (DPB::PSPDS::OPTION_1_CNT_GAIN * $1.to_i)
  2539. @xparams[7] += (DPB::PSPDS::OPTION_1_HRG_GAIN * $1.to_i)
  2540. @xparams[8] += (DPB::PSPDS::OPTION_1_MRG_GAIN * $1.to_i)
  2541. @xparams[9] += (DPB::PSPDS::OPTION_1_TRG_GAIN * $1.to_i)
  2542. #s's
  2543. @sparams[0] += (DPB::PSPDS::OPTION_1_TGR_GAIN * $1.to_i)
  2544. @sparams[1] += (DPB::PSPDS::OPTION_1_GRD_GAIN * $1.to_i)
  2545. @sparams[2] += (DPB::PSPDS::OPTION_1_REC_GAIN * $1.to_i)
  2546. @sparams[3] += (DPB::PSPDS::OPTION_1_PHA_GAIN * $1.to_i)
  2547. @sparams[4] += (DPB::PSPDS::OPTION_1_MCR_GAIN * $1.to_i)
  2548. @sparams[5] += (DPB::PSPDS::OPTION_1_TCR_GAIN * $1.to_i)
  2549. @sparams[6] += (DPB::PSPDS::OPTION_1_PDR_GAIN * $1.to_i)
  2550. @sparams[7] += (DPB::PSPDS::OPTION_1_MDR_GAIN * $1.to_i)
  2551. @sparams[8] += (DPB::PSPDS::OPTION_1_FDR_GAIN * $1.to_i)
  2552. @sparams[9] += (DPB::PSPDS::OPTION_1_EXR_GAIN * $1.to_i)
  2553. when DPB::REGEXP::EQUIPITEM::INC_STR
  2554. @dpbzparams[1] += $1.to_i
  2555. @params[0] += (DPB::PSPDS::OPTION_2_MaxHP_GAIN * $1.to_i)
  2556. @params[1] += (DPB::PSPDS::OPTION_2_MaxMP_GAIN * $1.to_i)
  2557. @params[2] += (DPB::PSPDS::OPTION_2_ATK_GAIN * $1.to_i)
  2558. @params[3] += (DPB::PSPDS::OPTION_2_DEF_GAIN * $1.to_i)
  2559. @params[4] += (DPB::PSPDS::OPTION_2_MAT_GAIN * $1.to_i)
  2560. @params[5] += (DPB::PSPDS::OPTION_2_MDF_GAIN * $1.to_i)
  2561. @params[6] += (DPB::PSPDS::OPTION_2_AGI_GAIN * $1.to_i)
  2562. @params[7] += (DPB::PSPDS::OPTION_2_LUK_GAIN * $1.to_i)
  2563. #x's
  2564. @xparams[0] += (DPB::PSPDS::OPTION_2_HIT_GAIN * $1.to_i)
  2565. @xparams[1] += (DPB::PSPDS::OPTION_2_EVA_GAIN * $1.to_i)
  2566. @xparams[2] += (DPB::PSPDS::OPTION_2_CRI_GAIN * $1.to_i)
  2567. @xparams[3] += (DPB::PSPDS::OPTION_2_CEV_GAIN * $1.to_i)
  2568. @xparams[4] += (DPB::PSPDS::OPTION_2_MEV_GAIN * $1.to_i)
  2569. @xparams[5] += (DPB::PSPDS::OPTION_2_MRF_GAIN * $1.to_i)
  2570. @xparams[6] += (DPB::PSPDS::OPTION_2_CNT_GAIN * $1.to_i)
  2571. @xparams[7] += (DPB::PSPDS::OPTION_2_HRG_GAIN * $1.to_i)
  2572. @xparams[8] += (DPB::PSPDS::OPTION_2_MRG_GAIN * $1.to_i)
  2573. @xparams[9] += (DPB::PSPDS::OPTION_2_TRG_GAIN * $1.to_i)
  2574. #s's
  2575. @sparams[0] += (DPB::PSPDS::OPTION_2_TGR_GAIN * $1.to_i)
  2576. @sparams[1] += (DPB::PSPDS::OPTION_2_GRD_GAIN * $1.to_i)
  2577. @sparams[2] += (DPB::PSPDS::OPTION_2_REC_GAIN * $1.to_i)
  2578. @sparams[3] += (DPB::PSPDS::OPTION_2_PHA_GAIN * $1.to_i)
  2579. @sparams[4] += (DPB::PSPDS::OPTION_2_MCR_GAIN * $1.to_i)
  2580. @sparams[5] += (DPB::PSPDS::OPTION_2_TCR_GAIN * $1.to_i)
  2581. @sparams[6] += (DPB::PSPDS::OPTION_2_PDR_GAIN * $1.to_i)
  2582. @sparams[7] += (DPB::PSPDS::OPTION_2_MDR_GAIN * $1.to_i)
  2583. @sparams[8] += (DPB::PSPDS::OPTION_2_FDR_GAIN * $1.to_i)
  2584. @sparams[9] += (DPB::PSPDS::OPTION_2_EXR_GAIN * $1.to_i)
  2585. when DPB::REGEXP::EQUIPITEM::INC_DEX
  2586. @dpbzparams[2] += $1.to_i
  2587. @params[0] += (DPB::PSPDS::OPTION_3_MaxHP_GAIN * $1.to_i)
  2588. @params[1] += (DPB::PSPDS::OPTION_3_MaxMP_GAIN * $1.to_i)
  2589. @params[2] += (DPB::PSPDS::OPTION_3_ATK_GAIN * $1.to_i)
  2590. @params[3] += (DPB::PSPDS::OPTION_3_DEF_GAIN * $1.to_i)
  2591. @params[4] += (DPB::PSPDS::OPTION_3_MAT_GAIN * $1.to_i)
  2592. @params[5] += (DPB::PSPDS::OPTION_3_MDF_GAIN * $1.to_i)
  2593. @params[6] += (DPB::PSPDS::OPTION_3_AGI_GAIN * $1.to_i)
  2594. @params[7] += (DPB::PSPDS::OPTION_3_LUK_GAIN * $1.to_i)
  2595. #x's
  2596. @xparams[0] += (DPB::PSPDS::OPTION_3_HIT_GAIN * $1.to_i)
  2597. @xparams[1] += (DPB::PSPDS::OPTION_3_EVA_GAIN * $1.to_i)
  2598. @xparams[2] += (DPB::PSPDS::OPTION_3_CRI_GAIN * $1.to_i)
  2599. @xparams[3] += (DPB::PSPDS::OPTION_3_CEV_GAIN * $1.to_i)
  2600. @xparams[4] += (DPB::PSPDS::OPTION_3_MEV_GAIN * $1.to_i)
  2601. @xparams[5] += (DPB::PSPDS::OPTION_3_MRF_GAIN * $1.to_i)
  2602. @xparams[6] += (DPB::PSPDS::OPTION_3_CNT_GAIN * $1.to_i)
  2603. @xparams[7] += (DPB::PSPDS::OPTION_3_HRG_GAIN * $1.to_i)
  2604. @xparams[8] += (DPB::PSPDS::OPTION_3_MRG_GAIN * $1.to_i)
  2605. @xparams[9] += (DPB::PSPDS::OPTION_3_TRG_GAIN * $1.to_i)
  2606. #s's
  2607. @sparams[0] += (DPB::PSPDS::OPTION_3_TGR_GAIN * $1.to_i)
  2608. @sparams[1] += (DPB::PSPDS::OPTION_3_GRD_GAIN * $1.to_i)
  2609. @sparams[2] += (DPB::PSPDS::OPTION_3_REC_GAIN * $1.to_i)
  2610. @sparams[3] += (DPB::PSPDS::OPTION_3_PHA_GAIN * $1.to_i)
  2611. @sparams[4] += (DPB::PSPDS::OPTION_3_MCR_GAIN * $1.to_i)
  2612. @sparams[5] += (DPB::PSPDS::OPTION_3_TCR_GAIN * $1.to_i)
  2613. @sparams[6] += (DPB::PSPDS::OPTION_3_PDR_GAIN * $1.to_i)
  2614. @sparams[7] += (DPB::PSPDS::OPTION_3_MDR_GAIN * $1.to_i)
  2615. @sparams[8] += (DPB::PSPDS::OPTION_3_FDR_GAIN * $1.to_i)
  2616. @sparams[9] += (DPB::PSPDS::OPTION_3_EXR_GAIN * $1.to_i)
  2617. when DPB::REGEXP::EQUIPITEM::INC_MAG
  2618. @dpbzparams[3] += $1.to_i
  2619. @params[0] += (DPB::PSPDS::OPTION_4_MaxHP_GAIN * $1.to_i)
  2620. @params[1] += (DPB::PSPDS::OPTION_4_MaxMP_GAIN * $1.to_i)
  2621. @params[2] += (DPB::PSPDS::OPTION_4_ATK_GAIN * $1.to_i)
  2622. @params[3] += (DPB::PSPDS::OPTION_4_DEF_GAIN * $1.to_i)
  2623. @params[4] += (DPB::PSPDS::OPTION_4_MAT_GAIN * $1.to_i)
  2624. @params[5] += (DPB::PSPDS::OPTION_4_MDF_GAIN * $1.to_i)
  2625. @params[6] += (DPB::PSPDS::OPTION_4_AGI_GAIN * $1.to_i)
  2626. @params[7] += (DPB::PSPDS::OPTION_4_LUK_GAIN * $1.to_i)
  2627. #x's
  2628. @xparams[0] += (DPB::PSPDS::OPTION_4_HIT_GAIN * $1.to_i)
  2629. @xparams[1] += (DPB::PSPDS::OPTION_4_EVA_GAIN * $1.to_i)
  2630. @xparams[2] += (DPB::PSPDS::OPTION_4_CRI_GAIN * $1.to_i)
  2631. @xparams[3] += (DPB::PSPDS::OPTION_4_CEV_GAIN * $1.to_i)
  2632. @xparams[4] += (DPB::PSPDS::OPTION_4_MEV_GAIN * $1.to_i)
  2633. @xparams[5] += (DPB::PSPDS::OPTION_4_MRF_GAIN * $1.to_i)
  2634. @xparams[6] += (DPB::PSPDS::OPTION_4_CNT_GAIN * $1.to_i)
  2635. @xparams[7] += (DPB::PSPDS::OPTION_4_HRG_GAIN * $1.to_i)
  2636. @xparams[8] += (DPB::PSPDS::OPTION_4_MRG_GAIN * $1.to_i)
  2637. @xparams[9] += (DPB::PSPDS::OPTION_4_TRG_GAIN * $1.to_i)
  2638. #s's
  2639. @sparams[0] += (DPB::PSPDS::OPTION_4_TGR_GAIN * $1.to_i)
  2640. @sparams[1] += (DPB::PSPDS::OPTION_4_GRD_GAIN * $1.to_i)
  2641. @sparams[2] += (DPB::PSPDS::OPTION_4_REC_GAIN * $1.to_i)
  2642. @sparams[3] += (DPB::PSPDS::OPTION_4_PHA_GAIN * $1.to_i)
  2643. @sparams[4] += (DPB::PSPDS::OPTION_4_MCR_GAIN * $1.to_i)
  2644. @sparams[5] += (DPB::PSPDS::OPTION_4_TCR_GAIN * $1.to_i)
  2645. @sparams[6] += (DPB::PSPDS::OPTION_4_PDR_GAIN * $1.to_i)
  2646. @sparams[7] += (DPB::PSPDS::OPTION_4_MDR_GAIN * $1.to_i)
  2647. @sparams[8] += (DPB::PSPDS::OPTION_4_FDR_GAIN * $1.to_i)
  2648. @sparams[9] += (DPB::PSPDS::OPTION_4_EXR_GAIN * $1.to_i)
  2649. #---
  2650. end
  2651. } # self.note.split
  2652. #---
  2653. end
  2654.  
  2655. end # RPG::Enemy
  2656.  
  2657. #==============================================================================
  2658. class Game_Actor < Game_Battler
  2659. #==============================================================================
  2660.  
  2661. alias dpbzGAsetup setup
  2662. def setup(actor_id)
  2663. dpbzGAsetup(actor_id)
  2664. clear_dpbzparam_plus
  2665. clear_xparam_plus
  2666. clear_sparam_plus
  2667. end
  2668.  
  2669. alias game_actor_param_plus_PSPDS dpbzparam_plus
  2670. def dpbzparam_plus(dpbzparam_id)
  2671. n = game_actor_param_plus_PSPDS(dpbzparam_id)
  2672. n += dpbz_parameter_rate(dpbzparam_id)
  2673. return n
  2674. end
  2675.  
  2676. alias game_actor_xparam_plus_PSPDS xparam_plus
  2677. def xparam_plus(xparam_id)
  2678. n = game_actor_xparam_plus_PSPDS(xparam_id)
  2679. n += x_parameter_rate(xparam_id)
  2680. return n
  2681. end
  2682.  
  2683. alias game_actor_sparam_plus_PSPDS sparam_plus
  2684. def sparam_plus(sparam_id)
  2685. n = game_actor_sparam_plus_PSPDS(sparam_id)
  2686. n += s_parameter_rate(sparam_id)
  2687. return n
  2688. end
  2689.  
  2690. def dpbz_parameter_rate(dpbzparam_id)
  2691. rate = 0.0
  2692. rate += equips.compact.inject(0) {|r, i|
  2693. r += i.dpbzparams[dpbzparam_id] rescue 0 }
  2694. return rate
  2695. end
  2696.  
  2697. def x_parameter_rate(xparam_id)
  2698. rate = 0.0
  2699. rate += equips.compact.inject(0) {|r, i|
  2700. r += i.xparams[xparam_id] rescue 0 }
  2701. return rate
  2702. end
  2703.  
  2704. def s_parameter_rate(sparam_id)
  2705. rate = 0.0
  2706. rate += equips.compact.inject(0) {|r, i|
  2707. r += i.sparams[sparam_id] rescue 0 }
  2708. return rate
  2709. end
  2710.  
  2711. end # Game_Actor
  2712.  
  2713. #--------------------------------------------------------------------------
  2714. class Game_Enemy < Game_Battler
  2715. #--------------------------------------------------------------------------
  2716. alias game_enemy_param_plus_PSPDS dpbzparam_plus
  2717. def dpbzparam_plus(dpbzparam_id)
  2718. n = game_enemy_param_plus_PSPDS(dpbzparam_id)
  2719. n += enemy.dpbzparams[dpbzparam_id]
  2720. return n
  2721. end
  2722.  
  2723. alias game_enemy_xparam_plus_PSPDS xparam_plus
  2724. def xparam_plus(xparam_id)
  2725. n = game_enemy_xparam_plus_PSPDS(xparam_id)
  2726. n += enemy.xparams[xparam_id]
  2727. return n
  2728. end
  2729.  
  2730. alias game_enemy_sparam_plus_PSPDS sparam_plus
  2731. def sparam_plus(sparam_id)
  2732. n = game_enemy_sparam_plus_PSPDS(sparam_id)
  2733. n += enemy.sparams[sparam_id]
  2734. return n
  2735. end
  2736.  
  2737. end # game enemy
  2738. #===============================================================================#
  2739. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  2740. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  2741. # #
  2742. # PSPDS #
  2743. # (Perfect Stat Point Distribution System) #
  2744. # - SCRIPT END - #
  2745. # #
  2746. # #
  2747. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  2748. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  2749. #===============================================================================#
  2750. # http://dekitarpg.wordpress.com/
  2751. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement