Advertisement
Dekita

PSPDSv1.3

Aug 14th, 2012
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.96 KB | None | 0 0
  1. #Dekita's=======================================================================
  2. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  3. #===============================================================================
  4. # v1.3
  5. # ★ Perfect Stat Point Distribution System ★
  6. #
  7. #===============================================================================
  8. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  9. #===============================================================================
  10. #
  11. # -- Last updated: 12/08/2012 <-(D/M/Y)
  12. #
  13. # -- Difficulty: Plug'n'play - (Easy)
  14. #
  15. # -- Customisation: Holy crap on a cracker Batman! - (Very High)
  16. #
  17. # -- Requires: N/A
  18. #
  19. # -- Recommended: N/A
  20. #
  21. # -- Compatable: RPG Maker VX Ace ONLY!
  22. #
  23. #===============================================================================
  24. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  25. #===============================================================================
  26. #===============================================================================
  27. # ☆ Script Information:
  28. #=======================
  29. # This script will Nullify the traditional RPG-Maker "Level up -> increases
  30. # parameters" feature. Instead when you level you will be presented with a stat
  31. # point distribution screen. you can then increase each parameter using the
  32. # points you gain.
  33. #
  34. # This script will give you COMPLETE control over all aspects of how your
  35. # characters stats increase during gameplay.
  36. #
  37. # The control and customisation for this "System" has been designed to be
  38. # as dynamic as possible.
  39. #===============================================================================
  40.  
  41. #===============================================================================
  42. # ☆ TERMS OF USE:
  43. #===============================================================================
  44. #
  45. # 1. You must give credit to Dekita.
  46. #
  47. # 2. This script is for NON-Commercial use ONLY!*
  48. #
  49. # 3. You CANNOT give credit to yourself for Re-posting this script
  50. # or Posting a modified version.*
  51. #
  52. # 4. Do not Re-Distribute this script.
  53. #
  54. # 5. You are NOT allowed to convert this script to any other engine,
  55. # E.G converting it from RGSS3 into RGSS2.*
  56. #
  57. # 6. ENJOY!
  58. #
  59. #-------------------------------------------------------------------------------
  60. # * = Unless permissions are given by Dekita. < e-mail [email protected]
  61. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  62. #===============================================================================
  63.  
  64. #===============================================================================
  65. # ☆ History:
  66. #============
  67. # D - M - Y
  68. # 14/08/2o12 - Released Script.(v1.3)
  69. # 13/08/2o12 - Added bonus level points.
  70. # - Released Script.(v1.2)
  71. # 12/08/2o12 - Added ability to continue using parameter curves growth.
  72. # - Fixed bug where using "SceneManager.call(Scene_Level_Up)" gave an
  73. # error message(if no actor had leveled).
  74. # - Added main menu command, Added switch to show/enable menu command.
  75. # - Removed a useless script call.(lose_pts)
  76. # - General tidying of the script.
  77. # 11/08/2o12 - Added script calls to increase vit,str,dex and mag counters.
  78. # - Removed "Perfect Stat Point Control Mode"
  79. # - Changed name of script to Perfect Stat Point Distribution System.
  80. # - Updated script to give ALOT more control over how
  81. # x-params/s-params increase/decrease via command options.
  82. # - Removed formula's method for increasing x/s-params.
  83. # 08/08/2o12 - Released Script. (v1.1)
  84. # - Compatability update -> (Perfect Status Screen).
  85. # 07/08/2o12 - Fixed PROPERTIES_BIGGER_NUMBERS < Customisation module.
  86. # - Added Gain/Lose points script calls as requested by "The Attendee"
  87. # @ http://www.rpgmakervxace.net
  88. # - Released Script. (v1.0)
  89. # 06/08/2o12 - Added TP cost, HP Cost and GOLD Cost formula's.
  90. # - Improved layout again.
  91. # 05/08/2O12 - Added visual Vit,Str,Mag,Dex counters.
  92. # 02/08/2012 - Added Ability to convert from "PSPDS" into "PSPCS"
  93. # - Added more customisation.
  94. # 01/08/2o12 - Added MASS Customisation.
  95. # - Finished Script Base.
  96. # 31/07/2o12 - Improved layout.
  97. # - Added customisation options for when the SPD Screen triggers.
  98. # 30/07/2o12 - Script now displays actors JP if Yanfly's JP manager is installed.
  99. # - Added minor customisation.
  100. # - Improved Layout.
  101. # 21/07/2o12 - Started script.
  102. #
  103. #===============================================================================
  104. # ☆ Credit and Thanks to :
  105. #==========================
  106. # "Adrian Meza" for showing me how to add bonus level points.
  107. # "Niclas" for showing me how to properly define add_xparam.
  108. # "De Mack" for showing me how to write a basic distribute parameters script.
  109. # "Yanfly" for making me want to script to start with.
  110. #===============================================================================
  111.  
  112. #===============================================================================
  113. # ☆ Foresight Into The Future:
  114. #==============================
  115. # EVEN MORE OPTIONS !!
  116. #
  117. # Options to increase/decrease HCR/GCR + WUR/CDR
  118. # ^Yanfly's Skills Cost Manager and Skill restrictions.
  119. #
  120. #-------------------------------------------------------------------------------
  121. # If you have any ideas e-mail me at [email protected]
  122. #===============================================================================
  123.  
  124. #===============================================================================
  125. # ☆ Known Bugs:
  126. #=================
  127. # Guardian/Summon Scripts usually override the SPD Screen process if
  128. # "INBATTLE = true" < Customisation module
  129. # If you encounter this problem simply set
  130. # "ONMAP" to "true" and "INBATTLE" to "false" < Customisation module
  131. #
  132. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  133. # If a new bug is found please e-mail me at [email protected]
  134. #===============================================================================
  135.  
  136. #===============================================================================
  137. # ☆ INSTRUCTIONS:
  138. #=================
  139. # Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  140. #
  141. #===============================================================================
  142. =begin
  143.  
  144. #===============================================================================
  145. # ☆ Script Calls:
  146. #=================
  147. #
  148. # Use the following script call in game (an event) to change the amount of
  149. # points you gain each time you level up
  150.  
  151. $pts = x
  152.  
  153. # e.g
  154. # $pts = 7 <- this will change the points gained per level to 7
  155. #
  156. #-------------------------------------------------------------------------------
  157. #
  158. # Use the following script call to give an actor x amount of points
  159.  
  160. gain_pts(actor_id, value)
  161.  
  162. # e.g
  163. # gain_pts(1, 10) < This will give actor 1, 10 points to distribute.
  164. #
  165. # NOTE:
  166. # value can be negative e.g
  167. # gain_pts(1, -10) < This will remove 10 points from actor 1.
  168. #
  169. # NOTE_2: if an actor does not have the points you try to remove it wont work!
  170. #
  171. #-------------------------------------------------------------------------------
  172. #
  173. # Use the following script calls to add vit, str, dex or mag counters to an actor.
  174.  
  175. inc_vit(actor_id, value)
  176.  
  177. inc_str(actor_id, value)
  178.  
  179. inc_dex(actor_id, value)
  180.  
  181. inc_mag(actor_id, value)
  182.  
  183. # NOTE: vit, str, dex and mag does not affect other param's x-params or s-params
  184. # They are just counters for how many times you have selected that command,
  185. # I have added these for actors that join the party above level 1, to make it seem
  186. # like they have already spent x amount of points in vit/str/dex or mag.
  187. #
  188. # NOTE_2: as with gain_pts value can be negative.
  189. #
  190. #-------------------------------------------------------------------------------
  191. #
  192. # Use the following script call in game (an event) to trigger the SPD Screen
  193.  
  194. SceneManager.call(Scene_Level_Up)
  195.  
  196. # NOTE: If no actor has leveled when you call this scene it will display the first
  197. # actor in the party. If an actor has leveled it will show the SPDS for them.
  198. #
  199. #===============================================================================
  200. =end
  201.  
  202. #===============================================================================
  203. # ☆ Import:
  204. #===========
  205. $imported = {} if $imported.nil?
  206. $imported["DPB-PSPDS"] = true
  207. #
  208. #===============================================================================
  209.  
  210. #===============================================================================
  211. # ☆ Perfect Stat Point Distribution System Begin:
  212. #=================================================
  213.  
  214. module DPB
  215. module PSPDS
  216.  
  217. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  218. # ☆ Command's (selectable) DO NOT CHANGE OR REMOVE ANY OF THESE!
  219. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  220.  
  221. COMMANDS =[
  222. :Vitality, # < DO NOT REMOVE OR
  223. :Strength, # < CHANGE ANY OF THESE
  224. :Dexterity,# < COMMANDS
  225. :Magic, # < DO NOT REMOVE !
  226. :Finish, # < DO NOT REMOVE !
  227. ] # Do not remove this.
  228.  
  229. #===============================================================================#
  230. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  231. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  232. # #
  233. # PSPDS #
  234. # (Perfect Stat Point Distribution System) #
  235. # - CUSTOMISATION BEGIN - #
  236. # #
  237. # #
  238. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  239. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  240. #===============================================================================#
  241. #===============================================================================
  242. # ☆ Customisation = Tah-Dah
  243. #===========================
  244. # I have added as much customisation as i thought was needed.
  245. # Probably a little too much, :o , if there is such a thing.\..\..
  246. #
  247. # It is advised you take a moment to look through the cusomisation options
  248. # to see if any apply to your current project.
  249. #
  250. #===============================================================================
  251.  
  252. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  253. # ☆ Vocab Settings
  254. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  255.  
  256. LVLUPPTSVOCAB = "Points :" # Help info used for the name of your level up points
  257.  
  258. ADDSTATTEXT = "Stat Added !" # Help info for when points are added
  259.  
  260. NOPOINTSTEXT = "No Points Left To Add !!" # Help info for when no points are remaining
  261.  
  262. VIT_GAIN_VOCAB = "Increases overall Survivability" # Help info for command option 1
  263.  
  264. STR_GAIN_VOCAB = "Increases overall Strength" # Help info for command option 2
  265.  
  266. DEX_GAIN_VOCAB = "Increases overall Dexterity" # Help info for command option 3
  267.  
  268. MAG_GAIN_VOCAB = "Increases overall Magic Power" # Help info for command option 4
  269.  
  270. EXIT_VOCAB = "Finish distribution process" # Help info for leaving the SPDS Screen
  271.  
  272. MENU_COMMAND_NAME = "PSPDS"
  273.  
  274. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  275. # ☆ Display SPD (Stat Point Distribution) Screen
  276. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  277. # By default the SPD Screen will be displayed at the end of battle (if you
  278. # level up). Some scripts may interfere with this one e.g summoning scripts,
  279. # when you level after your summon kills a monster in battle, the De-Summon
  280. # process usually overrides this one :(
  281. #
  282. # NOTE: if your party has more than 1 member that levels at the same time
  283. # then i recommend having both these options = true
  284. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  285.  
  286. INBATTLE = false #IF "true" screen triggers at end of battle (if an actor levels up)
  287.  
  288. ONMAP = true # IF "true" screen triggers on map screen after an actor levels up.
  289.  
  290. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  291. # ☆ Draw Actor Graphic ?
  292. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  293.  
  294. DRAW_ACTOR_GRAPHIC = false
  295. DAG_X = 432 # x location for actor graphic
  296. DAG_Y = 90 # y location for actor graphic
  297.  
  298. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  299. # ☆ Font Settings
  300. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  301.  
  302. PROPFONTSIZE = 14 # For Displayed Properties
  303.  
  304. PARAMFONTSIZE = 20 # For Parameters in point selection window and JP if
  305. # Yanfly JP Manager is installed
  306.  
  307. FONTSIZE = 16 # For Almost Everything Else and information in PSS*
  308. # (PSS = Perfect Status Screen) * = If imported.
  309.  
  310. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  311. # ☆ Points gained after each level up
  312. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  313. # This is where you define the amount of distribution points each character
  314. # gains after each level up.
  315. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  316.  
  317. LVUPPTS = 5 # Recommended to be under 10
  318.  
  319. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  320. # ☆ Default parameter growth
  321. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  322. # This is where you define whether you still gain parameters via
  323. # the parameter curves in the database.
  324. # set this to true if you wish to use that method (as well as SPD method).
  325. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  326.  
  327. USE_DEFAULT_PARAM_GAIN = false
  328.  
  329. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  330. # ☆ Bonus Point Gains
  331. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  332. # Here you can grant bonus points on specific levels e.g reach level 10
  333. # gain 5 bonus spendable points as a reward .
  334. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  335.  
  336. BONUS_POINTS_ON_LEVELS = true # If "true" this will grant bonus points on
  337. # levels listed in LEVELS.
  338.  
  339. LEVELS = [10, 20, 30, 40, 50, 75, 100] # If BONUS_POINTS_ON_LEVELS is 'true'
  340. # these will be the levels that the
  341. # actor(s) will gain bonus points on.
  342.  
  343. ONLY_GAIN_POINTS_ON_LEVELS = false # Make this option "true" if you only want
  344. # to gains points on the levels stated
  345. # in LEVELS.
  346. # NOTE: BONUS_POINTS_ON_LEVELS "MUST!" be
  347. # "true" for this option to work.
  348.  
  349. BONUSPOINTS = 10 # Define here how many bonus points your actors
  350. # gain on their bonus point levels.
  351.  
  352. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  353. # Make this "true" if you want to be able to exit the SPD screen before
  354. # all points are spent/used.
  355. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  356.  
  357. EXIT_BEFORE_POINTS_SPENT = true
  358.  
  359. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  360. # - Switch Settings -
  361. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  362. # These are the switches that govern whether or not certain menu items will
  363. # appear and/or will be enabled. By binding them to a Switch, you can just
  364. # set the Switch ON/OFF to show/hide or enable/disable a menu command. If
  365. # you do not wish to use this feature, set these commands to 0.
  366. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  367.  
  368. SWITCH_SHOW_PSPDS = 0 # Switch that shows pspds in Main Menu.
  369.  
  370. SWITCH_ENABLE_PSPDS = 0 # Switch that enables pspds in Main Menu.
  371.  
  372. COMPLETELY_DISABLE_MENU_OPTION = false # set this to true if you want ^_^
  373.  
  374.  
  375. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  376. # ☆ Parameter gain settings
  377. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  378. # These settings adjust the points gained for each point spent
  379. # in each command option as well as each command options name.
  380. # You can also put negative values for each parameter.
  381. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  382. # !! IMPORTANT !!
  383. #-----------------
  384. # It is important to note that Actor Ex-Parameters and Sp-Parameters deal
  385. # with percentage chance values. This means that their gain/reduce values
  386. # should be values that represent rates. What this means is:
  387. # 0.001 = 0.1%
  388. # 0.01 = 1%
  389. # 0.1 = 10%
  390. # 1.0 = 100%
  391. #
  392. # Be *very* careful with Ex/Sp-Parameters when defining their gain/reduce values.
  393. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  394.  
  395. COMMAND_COLUMN_WIDTH = 128
  396.  
  397. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  398. # Option 1 settings (command option 1)
  399. #-------------------------------------
  400. # Adjust these to your liking. you can set it to decrease by using "-" before
  401. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  402. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  403.  
  404. COMMAND_NAME_1 = "Vitality" # Name of command option
  405.  
  406. #Regular-Parameters
  407. OPTION_1_MaxHP_GAIN = 9.5 # Maximum HP Stat.
  408.  
  409. OPTION_1_MaxMP_GAIN = 0 # Maximum MP Stat.
  410.  
  411. OPTION_1_ATK_GAIN = 0 # Attack Stat.
  412.  
  413. OPTION_1_DEF_GAIN = 0.4 # Defence Stat.
  414.  
  415. OPTION_1_MAT_GAIN = 0 # Magic Attack Stat.
  416.  
  417. OPTION_1_MDF_GAIN = 0.4 # Magic Defence Stat.
  418.  
  419. OPTION_1_AGI_GAIN = 0 # Agility Stat.
  420.  
  421. OPTION_1_LUK_GAIN = 0 # Luck Stat.
  422.  
  423. #The following are % gains, 0.01 = 1%
  424. #X-Parameters
  425. OPTION_1_HIT_GAIN = 0.00 # Hit Rate.
  426.  
  427. OPTION_1_EVA_GAIN = 0.00 # Evasion Rate.
  428.  
  429. OPTION_1_CRI_GAIN = 0.00 # Critical Hit Rate.
  430.  
  431. OPTION_1_CEV_GAIN = 0.001 # Critical Evasion Rate.
  432.  
  433. OPTION_1_MEV_GAIN = 0.00 # Magic Evasion Rate.
  434.  
  435. OPTION_1_MRF_GAIN = 0.00 # Magic Reflect Rate.
  436.  
  437. OPTION_1_CNT_GAIN = 0.00 # Counter Rate.
  438.  
  439. OPTION_1_HRG_GAIN = 0.0005 # HP Regeneration Rate.
  440.  
  441. OPTION_1_MRG_GAIN = 0.00 # MP Regeneration Rate.
  442.  
  443. OPTION_1_TRG_GAIN = 0.00 # TP Regeneration Rate.
  444.  
  445. #S-Parameters
  446. OPTION_1_TGR_GAIN = 0.013 # Target Rate. (monsters targeting you)
  447.  
  448. OPTION_1_GRD_GAIN = 0.013 # Guard Effect Rate
  449.  
  450. OPTION_1_REC_GAIN = 0.00 # Recovery Effect Rate.
  451.  
  452. OPTION_1_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  453.  
  454. OPTION_1_MCR_GAIN = -0.00 # MP Cost Rate
  455.  
  456. OPTION_1_TCR_GAIN = -0.00 # TP Charge Rate.
  457.  
  458. OPTION_1_PDR_GAIN = -0.00025 # Physical Damage Rate.(incomming)
  459.  
  460. OPTION_1_MDR_GAIN = -0.00025 # Magical Damage Rate.(incomming)
  461.  
  462. OPTION_1_FDR_GAIN = -0.00 # Floor Damage Rate.
  463.  
  464. OPTION_1_EXR_GAIN = 0 # EXP Gain Rate.
  465.  
  466.  
  467. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  468. # Option 2 settings (command option 2)
  469. #-------------------------------------
  470. # Adjust these to your liking. you can set it to decrease by using "-" before
  471. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  472. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  473.  
  474. COMMAND_NAME_2 = "Strength"
  475.  
  476. #Regular-Parameters
  477. OPTION_2_MaxHP_GAIN = 0 # Maximum HP Stat.
  478.  
  479. OPTION_2_MaxMP_GAIN = 0 # Maximum MP Stat.
  480.  
  481. OPTION_2_ATK_GAIN = 1.2 # Attack Stat.
  482.  
  483. OPTION_2_DEF_GAIN = 0.6 # Defence Stat.
  484.  
  485. OPTION_2_MAT_GAIN = -0.01 # Magic Attack Stat.
  486.  
  487. OPTION_2_MDF_GAIN = -0.01 # Magic Defence Stat.
  488.  
  489. OPTION_2_AGI_GAIN = 0 # Agility Stat.
  490.  
  491. OPTION_2_LUK_GAIN = 0.1 # Luck Stat.
  492.  
  493. #The following are % gains, 0.01 = 1%
  494. #X-Parameters
  495. OPTION_2_HIT_GAIN = 0.00 # Hit Rate.
  496.  
  497. OPTION_2_EVA_GAIN = 0.00 # Evasion Rate.
  498.  
  499. OPTION_2_CRI_GAIN = 0.00 # Critical Hit Rate.
  500.  
  501. OPTION_2_CEV_GAIN = 0.00 # Critical Evasion Rate.
  502.  
  503. OPTION_2_MEV_GAIN = 0.00 # Magic Evasion Rate.
  504.  
  505. OPTION_2_MRF_GAIN = 0.00 # Magic Reflect Rate.
  506.  
  507. OPTION_2_CNT_GAIN = 0.0005 # Counter Rate.
  508.  
  509. OPTION_2_HRG_GAIN = 0.00 # HP Regeneration Rate.
  510.  
  511. OPTION_2_MRG_GAIN = 0.00 # MP Regeneration Rate.
  512.  
  513. OPTION_2_TRG_GAIN = 0.00 # TP Regeneration Rate.
  514.  
  515. #S-Parameters
  516. OPTION_2_TGR_GAIN = 0.0009 # Target Rate. (monsters targeting you)
  517.  
  518. OPTION_2_GRD_GAIN = 0.005 # Guard Effect Rate
  519.  
  520. OPTION_2_REC_GAIN = 0.00 # Recovery Effect Rate.
  521.  
  522. OPTION_2_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  523.  
  524. OPTION_2_MCR_GAIN = -0.00 # MP Cost Rate
  525.  
  526. OPTION_2_TCR_GAIN = -0.00 # TP Charge Rate.
  527.  
  528. OPTION_2_PDR_GAIN = -0.0020 # Physical Damage Rate.(incomming)
  529.  
  530. OPTION_2_MDR_GAIN = -0.00 # Magical Damage Rate.(incomming)
  531.  
  532. OPTION_2_FDR_GAIN = -0.00 # Floor Damage Rate.
  533.  
  534. OPTION_2_EXR_GAIN = 0 # EXP Gain Rate.
  535.  
  536. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  537. # Option 3 settings (command option 3)
  538. #-------------------------------------
  539. # Adjust these to your liking. you can set it to decrease by using "-" before
  540. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  541. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  542.  
  543. COMMAND_NAME_3 = "Dexterity"
  544.  
  545. #Regular-Parameters
  546. OPTION_3_MaxHP_GAIN = 0 # Maximum HP Stat.
  547.  
  548. OPTION_3_MaxMP_GAIN = 0 # Maximum MP Stat.
  549.  
  550. OPTION_3_ATK_GAIN = 0 # Attack Stat.
  551.  
  552. OPTION_3_DEF_GAIN = 0 # Defence Stat.
  553.  
  554. OPTION_3_MAT_GAIN = 0 # Magic Attack Stat.
  555.  
  556. OPTION_3_MDF_GAIN = 0 # Magic Defence Stat.
  557.  
  558. OPTION_3_AGI_GAIN = 1.2 # Agility Stat.
  559.  
  560. OPTION_3_LUK_GAIN = 0.6 # Luck Stat.
  561.  
  562. #The following are % gains, 0.01 = 1%
  563. #X-Parameters
  564. OPTION_3_HIT_GAIN = 0.005 # Hit Rate.
  565.  
  566. OPTION_3_EVA_GAIN = 0.0005 # Evasion Rate.
  567.  
  568. OPTION_3_CRI_GAIN = 0.001 # Critical Hit Rate.
  569.  
  570. OPTION_3_CEV_GAIN = 0.0005 # Critical Evasion Rate.
  571.  
  572. OPTION_3_MEV_GAIN = 0.00025 # Magic Evasion Rate.
  573.  
  574. OPTION_3_MRF_GAIN = 0.00 # Magic Reflect Rate.
  575.  
  576. OPTION_3_CNT_GAIN = 0.0002 # Counter Rate.
  577.  
  578. OPTION_3_HRG_GAIN = 0.00 # HP Regeneration Rate.
  579.  
  580. OPTION_3_MRG_GAIN = 0.00 # MP Regeneration Rate.
  581.  
  582. OPTION_3_TRG_GAIN = 0.0005 # TP Regeneration Rate.
  583.  
  584. #S-Parameters
  585. OPTION_3_TGR_GAIN = 0.00 # Target Rate. (monsters targeting you)
  586.  
  587. OPTION_3_GRD_GAIN = 0.00 # Guard Effect Rate
  588.  
  589. OPTION_3_REC_GAIN = 0.00 # Recovery Effect Rate.
  590.  
  591. OPTION_3_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  592.  
  593. OPTION_3_MCR_GAIN = -0.00 # MP Cost Rate
  594.  
  595. OPTION_3_TCR_GAIN = -0.0025 # TP Charge Rate.
  596.  
  597. OPTION_3_PDR_GAIN = -0.00 # Physical Damage Rate.(incomming)
  598.  
  599. OPTION_3_MDR_GAIN = -0.00 # Magical Damage Rate.(incomming)
  600.  
  601. OPTION_3_FDR_GAIN = -0.00 # Floor Damage Rate.
  602.  
  603. OPTION_3_EXR_GAIN = 0 # EXP Gain Rate.
  604.  
  605. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  606. # Option 4 settings (command option 4)
  607. #-------------------------------------
  608. # Adjust these to your liking. you can set it to decrease by using "-" before
  609. # your value. e.g OPTION_1_MaxHP_GAIN = -9.5 will reduce MHP by 9.5
  610. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  611.  
  612. COMMAND_NAME_4 = "Magic"
  613.  
  614. #Regular-Parameters
  615. OPTION_4_MaxHP_GAIN = 0 # Maximum HP Stat.
  616.  
  617. OPTION_4_MaxMP_GAIN = 9.5 # Maximum MP Stat.
  618.  
  619. OPTION_4_ATK_GAIN = -0.01 # Attack Stat.
  620.  
  621. OPTION_4_DEF_GAIN = -0.01 # Defence Stat.
  622.  
  623. OPTION_4_MAT_GAIN = 1.2 # Magic Attack Stat.
  624.  
  625. OPTION_4_MDF_GAIN = 0.6 # Magic Defence Stat.
  626.  
  627. OPTION_4_AGI_GAIN = 0 # Agility Stat.
  628.  
  629. OPTION_4_LUK_GAIN = 0.1 # Luck Stat.
  630.  
  631. #The following are % gains, 0.01 = 1%
  632. #X-Parameters
  633. OPTION_4_HIT_GAIN = 0.00 # Hit Rate.
  634.  
  635. OPTION_4_EVA_GAIN = 0.00 # Evasion Rate.
  636.  
  637. OPTION_4_CRI_GAIN = 0.00 # Critical Hit Rate.
  638.  
  639. OPTION_4_CEV_GAIN = 0.00 # Critical Evasion Rate.
  640.  
  641. OPTION_4_MEV_GAIN = 0.001 # Magic Evasion Rate.
  642.  
  643. OPTION_4_MRF_GAIN = 0.00 # Magic Reflect Rate.
  644.  
  645. OPTION_4_CNT_GAIN = 0.00 # Counter Rate.
  646.  
  647. OPTION_4_HRG_GAIN = 0.00 # HP Regeneration Rate.
  648.  
  649. OPTION_4_MRG_GAIN = 0.0005 # MP Regeneration Rate.
  650.  
  651. OPTION_4_TRG_GAIN = 0.00 # TP Regeneration Rate.
  652.  
  653. #S-Parameters
  654. OPTION_4_TGR_GAIN = 0.00 # Target Rate. (monsters targeting you)
  655.  
  656. OPTION_4_GRD_GAIN = 0.004 # Guard Effect Rate
  657.  
  658. OPTION_4_REC_GAIN = 0.00 # Recovery Effect Rate.
  659.  
  660. OPTION_4_PHA_GAIN = 0.00 # Pharmacology Effect Rate.
  661.  
  662. OPTION_4_MCR_GAIN = -0.0025 # MP Cost Rate
  663.  
  664. OPTION_4_TCR_GAIN = -0.00 # TP Charge Rate.
  665.  
  666. OPTION_4_PDR_GAIN = -0.00 # Physical Damage Rate.(incomming)
  667.  
  668. OPTION_4_MDR_GAIN = -0.0020 # Magical Damage Rate.(incomming)
  669.  
  670. OPTION_4_FDR_GAIN = -0.00 # Floor Damage Rate.
  671.  
  672. OPTION_4_EXR_GAIN = 0 # EXP Gain Rate.
  673.  
  674. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  675. # Option 5 settings (this is the leave screen command).
  676. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  677.  
  678. FINISHVOCAB = "Done" # Command name for leaving the SPDS Screen
  679.  
  680. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  681. # ☆ Option cost settings
  682. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  683. # These settings adjust the amount of points it costs to gain an increase
  684. # in that particular command option.
  685. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  686.  
  687. OPTION_1_COST = 1 # Default = 1
  688.  
  689. OPTION_2_COST = 1 # Default = 1
  690.  
  691. OPTION_3_COST = 1 # Default = 1
  692.  
  693. OPTION_4_COST = 1 # Default = 1
  694.  
  695. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  696. # ☆ Parameters Gauge Settings
  697. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  698. # Set this to "true" if you wish to have Gauges for params e.g
  699. # MaxHP, MaxMP, Atk, Def, Mat, Mdf, Agi, Luk.
  700. # Set it to "false" to draw params in boxes.
  701. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  702.  
  703. DRAW_PARAM_GAUGES = true
  704.  
  705. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  706. # ☆ Parameters Colour Settings
  707. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  708. # These settings adjust the way the parameters window visually appears.
  709. # Each of the stats have a non-window colour. Adjust them as you see fit.
  710. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  711.  
  712. PARAM_COLOUR ={
  713. # ParamID => [:stat, Colour1, Colour2 ],
  714. 2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
  715. 3 => [ :def, Color.new(250, 150, 30), Color.new(250, 180, 100)],
  716. 4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
  717. 5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
  718. 6 => [ :agi, Color.new( 60, 180, 80), Color.new(120, 200, 120)],
  719. 7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
  720. } # Do not remove this.
  721.  
  722. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  723. # ☆ Properties Window Settings
  724. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  725. # These settings adjust the way the properties window visually appears.
  726. # The properties have abbreviations, but leaving them as such makes things
  727. # confusing (as it's sometimes hard to figure out what the abbreviations
  728. # mean). Change the way the appear, whether or not they appear, and what
  729. # order they will appear in.
  730. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  731.  
  732. #---------------------------------------------------------------------------
  733. # ☆ Just for the hell of it:
  734. #----------------------------
  735. # This option is for those people who like to have large number values for
  736. # their stats,
  737. # e.g
  738. # accuracy = 17,982.
  739. # attack = 6021.
  740. #
  741. # Simply set "PROPERTIES_BIGGER_NUMBERS" to "true" to activate this option.
  742. #
  743. # NOTE:
  744. # This doesnt acctually increase your stats to ridiculous values
  745. # It just makes it appear that way :)
  746. # your still not gonna be hitting monsters for 6,932,123,21.5 :D
  747. #
  748. # This is also very usefull if you want your game to have a more
  749. # unique looking stat progression system
  750. # e.g
  751. # People cant calculate the stats as easy
  752. #---------------------------------------------------------------------------
  753. PROPERTIES_BIGGER_NUMBERS = false
  754.  
  755. # This option is how much the parameters value will be multiplied by
  756. # IF PROPERTIES_BIGGER_NUMBERS = true
  757. # VISUAL PURPOSES ONLY!
  758. PARAMS_BIGGER_NUMBER_VALUE = 8.5
  759.  
  760. # This option is how much the properties value will be multiplied by
  761. # IF PROPERTIES_BIGGER_NUMBERS = true
  762. # VISUAL PURPOSES ONLY!
  763. # ONLY AFFECTS NON-% STATS e.g stats such as MP Cost Rate will remain a %.
  764. PROPERTIES_BIGGER_NUMBER_VALUE = 850
  765.  
  766. # These are the parameters that appear in column 1.
  767. # This column's settings are only relevant if DRAW_PARAM_GAUGES = false (above)
  768. PROPERTIES_PARAMCOLUMN =[
  769. [:mhp, "Max HP"], #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  770. [:mmp, "Max MP"], # <- Rename these to whatever you want your
  771. [:atk, "Attack"], # <- origional parameters to be called :)
  772. [:def, "Defence"], # <-
  773. [:mat, "M Attack"], # <-
  774. [:mdf, "M Defence"], # <-
  775. [:agi, "Speed"], # <-
  776. [:luk, "Luck"], #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  777. ] # Do not remove this.
  778.  
  779. # These are the properties that appear in column 2.
  780. PROPERTIES_COLUMN1 =[
  781. [:hit, "Hit Rate"],
  782. [:eva, "Evasion"],
  783. [:cri, "Critical Hit"],
  784. [:cev, "Critical Evade"],
  785. [:mev, "Magic Evasion"],
  786. [:mrf, "Magic Reflect"],
  787. [:cnt, "Counter Rate"],
  788. [:tgr, "Target Rate"],
  789. ] # Do not remove this.
  790.  
  791. # These are the properties that appear in column 3.
  792. PROPERTIES_COLUMN2 =[
  793. [:hrg, "HP Regen"],
  794. [:mrg, "MP Regen"],
  795. [:trg, "TP Regen"],
  796. [:rec, "Recovery"],
  797. [:grd, "Guard Rate"],
  798. [:pha, "Item Boost"],
  799. [:exr, "EXP Rate"],
  800. [:tcr, "TP Charge"],
  801. ] # Do not remove this.
  802.  
  803. # These are the properties that appear in column 4.
  804. PROPERTIES_COLUMN3 =[
  805. [:hcr, "HP Cost Rate"], # Requires YEA - Skill Cost Manager
  806. [:mcr, "MP Cost Rate"],
  807. [:tcr_y, "TP Cost Rate"], # Requires YEA - Skill Cost Manager
  808. [:cdr, "Cooldown Rate"], # Requires YEA - Skill Restrictions
  809. [:wur, "Warmup Rate"], # Requires YEA - Skill Restrictions
  810. [:pdr, "Physical Damage"],
  811. [:mdr, "Magical Damage"],
  812. [:fdr, "Floor Damage"],
  813. ] # Do not remove this.
  814.  
  815. DRAW_ALL_COLUMNS = true # This option is for those who do not want all 4 columns
  816. # Simply set this to false to only draw 3 columns
  817. # e.g the param column, column1 and column2.
  818.  
  819. #===============================================================================#
  820. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  821. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  822. # #
  823. # PSPDS #
  824. # (Perfect Stat Point Distribution System) #
  825. # - CUSTOMISATION END - #
  826. # #
  827. # #
  828. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  829. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  830. #===============================================================================#
  831. #===============================================================================#
  832. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  833. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  834. # #
  835. # PSPDS #
  836. # (Perfect Stat Point Distribution System) #
  837. # - SCRIPT BEGIN - #
  838. # #
  839. # #
  840. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  841. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  842. #===============================================================================#
  843. #===============================================================================#
  844. # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
  845. # YES?\.\. #
  846. # OMG, REALLY? #
  847. # WELL SLAP MY FACE AND CALL ME A DRAGON.\..\.. #
  848. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
  849. #===============================================================================#
  850.  
  851. NEW_STATS_COLUMN =[
  852. [:vit_pts, DPB::PSPDS::COMMAND_NAME_1],
  853. [:str_pts, DPB::PSPDS::COMMAND_NAME_2],
  854. [:dex_pts, DPB::PSPDS::COMMAND_NAME_3],
  855. [:mag_pts, DPB::PSPDS::COMMAND_NAME_4],
  856. ] # Do not remove this.
  857.  
  858. end # PSPDS
  859. end # DPB
  860.  
  861. #===============================================================================
  862. # Switch
  863. #===============================================================================
  864.  
  865. module Switch
  866.  
  867. #-----------------------------------------------------------------------------
  868. # self.pspds_show
  869. #-----------------------------------------------------------------------------
  870. def self.pspds_show
  871. return true if DPB::PSPDS::SWITCH_SHOW_PSPDS <= 0
  872. return $game_switches[DPB::PSPDS::SWITCH_SHOW_PSPDS]
  873. end
  874.  
  875. #-----------------------------------------------------------------------------
  876. # self.pspds_enable
  877. #-----------------------------------------------------------------------------
  878. def self.pspds_enable
  879. return true if DPB::PSPDS::SWITCH_ENABLE_PSPDS <= 0
  880. return $game_switches[DPB::PSPDS::SWITCH_ENABLE_PSPDS]
  881. end
  882.  
  883. end # Switch
  884.  
  885. #------------------------------------------------------------------------------#
  886. #==============================================================================#
  887. # ** Game_BattlerBase
  888. #==============================================================================#
  889. class Game_BattlerBase
  890.  
  891. alias dpb_pspds_init initialize
  892. def initialize(*args, &block)
  893. clear_xparam_plus
  894. clear_sparam_plus
  895. dpb_pspds_init(*args, &block)
  896. end
  897. #--------
  898. def xparam(xparam_id)
  899. (features_sum(FEATURE_XPARAM, xparam_id) + xparam_plus(xparam_id))
  900. end
  901.  
  902. def xparam_plus(xparam_id)
  903. @xparam_plus[xparam_id]
  904. end
  905.  
  906. def clear_xparam_plus
  907. @xparam_plus = [0] * 10
  908. end
  909.  
  910. def add_xparam(xparam_id, value)
  911. @xparam_plus[xparam_id] += value
  912. refresh
  913. end
  914. #--------
  915. def sparam(sparam_id)
  916. (features_pi(FEATURE_SPARAM, sparam_id) + sparam_plus(sparam_id))
  917. end
  918.  
  919. def sparam_plus(sparam_id)
  920. @sparam_plus[sparam_id]
  921. end
  922.  
  923. def clear_sparam_plus
  924. @sparam_plus = [0] * 10
  925. end
  926.  
  927. def add_sparam(sparam_id, value)
  928. @sparam_plus[sparam_id] += value
  929. refresh
  930. end
  931. #--------
  932. end # Game_BattlerBase
  933.  
  934. $pts = DPB::PSPDS::LVUPPTS
  935. $bonuspts = DPB::PSPDS::BONUSPOINTS
  936. $vitpts = 1 # < DO NOT CHANGE!
  937. $strpts = 1 # < DO NOT CHANGE!
  938. $dexpts = 1 # < DO NOT CHANGE!
  939. $magpts = 1 # < DO NOT CHANGE!
  940.  
  941. class Scene_Level_Up < Scene_MenuBase
  942. def msg
  943. s = ["#{DPB::PSPDS::VIT_GAIN_VOCAB}
  944. Points Cost : #{@actor.cost_caract(0)}",
  945. "#{DPB::PSPDS::STR_GAIN_VOCAB}
  946. Points Cost : #{@actor.cost_caract(1)}",
  947. "#{DPB::PSPDS::DEX_GAIN_VOCAB}
  948. Points Cost : #{@actor.cost_caract(2)}",
  949. "#{DPB::PSPDS::MAG_GAIN_VOCAB}
  950. Points Cost : #{@actor.cost_caract(3)}",
  951. "#{DPB::PSPDS::EXIT_VOCAB} "]
  952. return s
  953. end
  954. #-----------------------------------------------------------------------------
  955. # * Start Processing
  956. #-----------------------------------------------------------------------------
  957. def start
  958. super
  959. if $game_temp.actor_level_up[0]
  960. @actor = $game_temp.actor_level_up[0] # For menu screen access.
  961. else
  962. end
  963. create_status_window
  964. create_command_window
  965. create_help_window
  966. @help_window.set_text(msg[@command_window.index])
  967. @help_window.y = (Graphics.height - 80)
  968. @help_window.opacity = 0
  969. $game_temp.actor_level_up.delete_at(0)
  970. end
  971.  
  972. def create_command_window
  973. @command_window = Window_Level_upCommand.new
  974. @command_window.set_handler(:gain_vit, method(:command_gain_vit))
  975. @command_window.set_handler(:gain_str, method(:command_gain_str))
  976. @command_window.set_handler(:gain_dex, method(:command_gain_dex))
  977. @command_window.set_handler(:gain_mag, method(:command_gain_mag))
  978. @command_window.set_handler(:retour, method(:command_return))
  979. @command_window.set_handler(:pagedown, method(:next_actor))
  980. @command_window.set_handler(:pageup, method(:prev_actor))
  981. @command_window.y = 0
  982. end
  983. #--------
  984. def command_return
  985. if @actor.level_up_pts < 0
  986. @help_window.set_text(" ")
  987. wait(0)
  988. @command_window.activate
  989. else
  990. return_scene
  991. end
  992. end
  993. #--------
  994. def create_status_window
  995. @status_window = Window_Status_Level_up.new(@actor)
  996. @status_window.x = 0
  997. @status_window.y = 0
  998. end
  999. #--------
  1000. def command_gain_vit
  1001. index = @command_window.index
  1002. # actor = $game_actors[@actor.actor_id]
  1003. @command_window.refresh
  1004. if @actor.level_up_pts >= @actor.cost_caract(index)
  1005. @actor.gain_lvl_pts([email protected]_caract(index))
  1006. @actor.gain_vit_pts($vitpts)
  1007. #reg's
  1008. @actor.add_param(0, DPB::PSPDS::OPTION_1_MaxHP_GAIN)
  1009. @actor.add_param(1, DPB::PSPDS::OPTION_1_MaxMP_GAIN)
  1010. @actor.add_param(2, DPB::PSPDS::OPTION_1_ATK_GAIN)
  1011. @actor.add_param(3, DPB::PSPDS::OPTION_1_DEF_GAIN)
  1012. @actor.add_param(4, DPB::PSPDS::OPTION_1_MAT_GAIN)
  1013. @actor.add_param(5, DPB::PSPDS::OPTION_1_MDF_GAIN)
  1014. @actor.add_param(6, DPB::PSPDS::OPTION_1_AGI_GAIN)
  1015. @actor.add_param(7, DPB::PSPDS::OPTION_1_LUK_GAIN)
  1016. #x's
  1017. @actor.add_xparam(0, DPB::PSPDS::OPTION_1_HIT_GAIN)
  1018. @actor.add_xparam(1, DPB::PSPDS::OPTION_1_EVA_GAIN)
  1019. @actor.add_xparam(2, DPB::PSPDS::OPTION_1_CRI_GAIN)
  1020. @actor.add_xparam(3, DPB::PSPDS::OPTION_1_CEV_GAIN)
  1021. @actor.add_xparam(4, DPB::PSPDS::OPTION_1_MEV_GAIN)
  1022. @actor.add_xparam(5, DPB::PSPDS::OPTION_1_MRF_GAIN)
  1023. @actor.add_xparam(6, DPB::PSPDS::OPTION_1_CNT_GAIN)
  1024. @actor.add_xparam(7, DPB::PSPDS::OPTION_1_HRG_GAIN)
  1025. @actor.add_xparam(8, DPB::PSPDS::OPTION_1_MRG_GAIN)
  1026. @actor.add_xparam(9, DPB::PSPDS::OPTION_1_TRG_GAIN)
  1027. #s's
  1028. @actor.add_sparam(0, DPB::PSPDS::OPTION_1_TGR_GAIN)
  1029. @actor.add_sparam(1, DPB::PSPDS::OPTION_1_GRD_GAIN)
  1030. @actor.add_sparam(2, DPB::PSPDS::OPTION_1_REC_GAIN)
  1031. @actor.add_sparam(3, DPB::PSPDS::OPTION_1_PHA_GAIN)
  1032. @actor.add_sparam(4, DPB::PSPDS::OPTION_1_MCR_GAIN)
  1033. @actor.add_sparam(5, DPB::PSPDS::OPTION_1_TCR_GAIN)
  1034. @actor.add_sparam(6, DPB::PSPDS::OPTION_1_PDR_GAIN)
  1035. @actor.add_sparam(7, DPB::PSPDS::OPTION_1_MDR_GAIN)
  1036. @actor.add_sparam(8, DPB::PSPDS::OPTION_1_FDR_GAIN)
  1037. @actor.add_sparam(9, DPB::PSPDS::OPTION_1_EXR_GAIN)
  1038. #end inc stat
  1039. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1040. else
  1041. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1042. end
  1043. @status_window.refresh
  1044. @command_window.refresh
  1045. wait(25)
  1046. @command_window.activate
  1047. end
  1048. #--------
  1049. def command_gain_str
  1050. index = @command_window.index
  1051. @command_window.refresh
  1052. if @actor.level_up_pts >= @actor.cost_caract(index)
  1053. @actor.gain_lvl_pts([email protected]_caract(index))
  1054. @actor.gain_str_pts($strpts)
  1055. #reg's
  1056. @actor.add_param(0, DPB::PSPDS::OPTION_2_MaxHP_GAIN)
  1057. @actor.add_param(1, DPB::PSPDS::OPTION_2_MaxMP_GAIN)
  1058. @actor.add_param(2, DPB::PSPDS::OPTION_2_ATK_GAIN)
  1059. @actor.add_param(3, DPB::PSPDS::OPTION_2_DEF_GAIN)
  1060. @actor.add_param(4, DPB::PSPDS::OPTION_2_MAT_GAIN)
  1061. @actor.add_param(5, DPB::PSPDS::OPTION_2_MDF_GAIN)
  1062. @actor.add_param(6, DPB::PSPDS::OPTION_2_AGI_GAIN)
  1063. @actor.add_param(7, DPB::PSPDS::OPTION_2_LUK_GAIN)
  1064. #x's
  1065. @actor.add_xparam(0, DPB::PSPDS::OPTION_2_HIT_GAIN)
  1066. @actor.add_xparam(1, DPB::PSPDS::OPTION_2_EVA_GAIN)
  1067. @actor.add_xparam(2, DPB::PSPDS::OPTION_2_CRI_GAIN)
  1068. @actor.add_xparam(3, DPB::PSPDS::OPTION_2_CEV_GAIN)
  1069. @actor.add_xparam(4, DPB::PSPDS::OPTION_2_MEV_GAIN)
  1070. @actor.add_xparam(5, DPB::PSPDS::OPTION_2_MRF_GAIN)
  1071. @actor.add_xparam(6, DPB::PSPDS::OPTION_2_CNT_GAIN)
  1072. @actor.add_xparam(7, DPB::PSPDS::OPTION_2_HRG_GAIN)
  1073. @actor.add_xparam(8, DPB::PSPDS::OPTION_2_MRG_GAIN)
  1074. @actor.add_xparam(9, DPB::PSPDS::OPTION_2_TRG_GAIN)
  1075. #s's
  1076. @actor.add_sparam(0, DPB::PSPDS::OPTION_2_TGR_GAIN)
  1077. @actor.add_sparam(1, DPB::PSPDS::OPTION_2_GRD_GAIN)
  1078. @actor.add_sparam(2, DPB::PSPDS::OPTION_2_REC_GAIN)
  1079. @actor.add_sparam(3, DPB::PSPDS::OPTION_2_PHA_GAIN)
  1080. @actor.add_sparam(4, DPB::PSPDS::OPTION_2_MCR_GAIN)
  1081. @actor.add_sparam(5, DPB::PSPDS::OPTION_2_TCR_GAIN)
  1082. @actor.add_sparam(6, DPB::PSPDS::OPTION_2_PDR_GAIN)
  1083. @actor.add_sparam(7, DPB::PSPDS::OPTION_2_MDR_GAIN)
  1084. @actor.add_sparam(8, DPB::PSPDS::OPTION_2_FDR_GAIN)
  1085. @actor.add_sparam(9, DPB::PSPDS::OPTION_2_EXR_GAIN)
  1086. #end inc stat
  1087. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1088. else
  1089. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1090. end
  1091. @status_window.refresh
  1092. @command_window.refresh
  1093. wait(25)
  1094. @command_window.activate
  1095. end
  1096. #--------
  1097. def command_gain_dex
  1098. index = @command_window.index
  1099. @command_window.refresh
  1100. if @actor.level_up_pts >= @actor.cost_caract(index)
  1101. @actor.gain_lvl_pts([email protected]_caract(index))
  1102. @actor.gain_dex_pts($dexpts)
  1103. #reg's
  1104. @actor.add_param(0, DPB::PSPDS::OPTION_3_MaxHP_GAIN)
  1105. @actor.add_param(1, DPB::PSPDS::OPTION_3_MaxMP_GAIN)
  1106. @actor.add_param(2, DPB::PSPDS::OPTION_3_ATK_GAIN)
  1107. @actor.add_param(3, DPB::PSPDS::OPTION_3_DEF_GAIN)
  1108. @actor.add_param(4, DPB::PSPDS::OPTION_3_MAT_GAIN)
  1109. @actor.add_param(5, DPB::PSPDS::OPTION_3_MDF_GAIN)
  1110. @actor.add_param(6, DPB::PSPDS::OPTION_3_AGI_GAIN)
  1111. @actor.add_param(7, DPB::PSPDS::OPTION_3_LUK_GAIN)
  1112. #x's
  1113. @actor.add_xparam(0, DPB::PSPDS::OPTION_3_HIT_GAIN)
  1114. @actor.add_xparam(1, DPB::PSPDS::OPTION_3_EVA_GAIN)
  1115. @actor.add_xparam(2, DPB::PSPDS::OPTION_3_CRI_GAIN)
  1116. @actor.add_xparam(3, DPB::PSPDS::OPTION_3_CEV_GAIN)
  1117. @actor.add_xparam(4, DPB::PSPDS::OPTION_3_MEV_GAIN)
  1118. @actor.add_xparam(5, DPB::PSPDS::OPTION_3_MRF_GAIN)
  1119. @actor.add_xparam(6, DPB::PSPDS::OPTION_3_CNT_GAIN)
  1120. @actor.add_xparam(7, DPB::PSPDS::OPTION_3_HRG_GAIN)
  1121. @actor.add_xparam(8, DPB::PSPDS::OPTION_3_MRG_GAIN)
  1122. @actor.add_xparam(9, DPB::PSPDS::OPTION_3_TRG_GAIN)
  1123. #s's
  1124. @actor.add_sparam(0, DPB::PSPDS::OPTION_3_TGR_GAIN)
  1125. @actor.add_sparam(1, DPB::PSPDS::OPTION_3_GRD_GAIN)
  1126. @actor.add_sparam(2, DPB::PSPDS::OPTION_3_REC_GAIN)
  1127. @actor.add_sparam(3, DPB::PSPDS::OPTION_3_PHA_GAIN)
  1128. @actor.add_sparam(4, DPB::PSPDS::OPTION_3_MCR_GAIN)
  1129. @actor.add_sparam(5, DPB::PSPDS::OPTION_3_TCR_GAIN)
  1130. @actor.add_sparam(6, DPB::PSPDS::OPTION_3_PDR_GAIN)
  1131. @actor.add_sparam(7, DPB::PSPDS::OPTION_3_MDR_GAIN)
  1132. @actor.add_sparam(8, DPB::PSPDS::OPTION_3_FDR_GAIN)
  1133. @actor.add_sparam(9, DPB::PSPDS::OPTION_3_EXR_GAIN)
  1134. #end inc stat
  1135. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1136. else
  1137. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1138. end
  1139. @status_window.refresh
  1140. @command_window.refresh
  1141. wait(25)
  1142. @command_window.activate
  1143. end
  1144. #--------
  1145. def command_gain_mag
  1146. index = @command_window.index
  1147. @command_window.refresh
  1148. if @actor.level_up_pts >= @actor.cost_caract(index)
  1149. @actor.gain_lvl_pts([email protected]_caract(index))
  1150. @actor.gain_mag_pts($magpts)
  1151. #reg's
  1152. @actor.add_param(0, DPB::PSPDS::OPTION_4_MaxHP_GAIN)
  1153. @actor.add_param(1, DPB::PSPDS::OPTION_4_MaxMP_GAIN)
  1154. @actor.add_param(2, DPB::PSPDS::OPTION_4_ATK_GAIN)
  1155. @actor.add_param(3, DPB::PSPDS::OPTION_4_DEF_GAIN)
  1156. @actor.add_param(4, DPB::PSPDS::OPTION_4_MAT_GAIN)
  1157. @actor.add_param(5, DPB::PSPDS::OPTION_4_MDF_GAIN)
  1158. @actor.add_param(6, DPB::PSPDS::OPTION_4_AGI_GAIN)
  1159. @actor.add_param(7, DPB::PSPDS::OPTION_4_LUK_GAIN)
  1160. #x's
  1161. @actor.add_xparam(0, DPB::PSPDS::OPTION_4_HIT_GAIN)
  1162. @actor.add_xparam(1, DPB::PSPDS::OPTION_4_EVA_GAIN)
  1163. @actor.add_xparam(2, DPB::PSPDS::OPTION_4_CRI_GAIN)
  1164. @actor.add_xparam(3, DPB::PSPDS::OPTION_4_CEV_GAIN)
  1165. @actor.add_xparam(4, DPB::PSPDS::OPTION_4_MEV_GAIN)
  1166. @actor.add_xparam(5, DPB::PSPDS::OPTION_4_MRF_GAIN)
  1167. @actor.add_xparam(6, DPB::PSPDS::OPTION_4_CNT_GAIN)
  1168. @actor.add_xparam(7, DPB::PSPDS::OPTION_4_HRG_GAIN)
  1169. @actor.add_xparam(8, DPB::PSPDS::OPTION_4_MRG_GAIN)
  1170. @actor.add_xparam(9, DPB::PSPDS::OPTION_4_TRG_GAIN)
  1171. #s's
  1172. @actor.add_sparam(0, DPB::PSPDS::OPTION_4_TGR_GAIN)
  1173. @actor.add_sparam(1, DPB::PSPDS::OPTION_4_GRD_GAIN)
  1174. @actor.add_sparam(2, DPB::PSPDS::OPTION_4_REC_GAIN)
  1175. @actor.add_sparam(3, DPB::PSPDS::OPTION_4_PHA_GAIN)
  1176. @actor.add_sparam(4, DPB::PSPDS::OPTION_4_MCR_GAIN)
  1177. @actor.add_sparam(5, DPB::PSPDS::OPTION_4_TCR_GAIN)
  1178. @actor.add_sparam(6, DPB::PSPDS::OPTION_4_PDR_GAIN)
  1179. @actor.add_sparam(7, DPB::PSPDS::OPTION_4_MDR_GAIN)
  1180. @actor.add_sparam(8, DPB::PSPDS::OPTION_4_FDR_GAIN)
  1181. @actor.add_sparam(9, DPB::PSPDS::OPTION_4_EXR_GAIN)
  1182. #end inc stat
  1183. @help_window.set_text(DPB::PSPDS::ADDSTATTEXT)
  1184. else
  1185. @help_window.set_text(DPB::PSPDS::NOPOINTSTEXT)
  1186. end
  1187. @status_window.refresh
  1188. @command_window.refresh
  1189. wait(25)
  1190. @command_window.activate
  1191. end
  1192. #--------
  1193. def wait(time)
  1194. t = 0
  1195. loop do
  1196. Graphics.update
  1197. if t == time
  1198. break
  1199. end
  1200. t += 1
  1201. end
  1202. end
  1203. #--------
  1204. def update
  1205. super
  1206. @help_window.set_text(msg[@command_window.index])
  1207. end
  1208. #--------
  1209. def on_actor_change
  1210. @status_window.actor = @actor
  1211. @status_window.refresh
  1212. @command_window.activate
  1213. end
  1214. end
  1215. #--------
  1216. if DPB::PSPDS::INBATTLE
  1217. class Scene_Battle < Scene_Base # < Default setting. Only used when "INBATTLE" is true
  1218. alias old_update update
  1219. def update
  1220. old_update
  1221. if $game_temp.actor_level_up[0]
  1222. SceneManager.call(Scene_Level_Up)
  1223. end
  1224. end
  1225. end
  1226. end
  1227. #--------
  1228. if DPB::PSPDS::ONMAP
  1229. class Scene_Map < Scene_Base # < Only used if "ONMAP" is true
  1230. alias old_update update
  1231. def update
  1232. old_update
  1233. if $game_temp.actor_level_up[0]
  1234. SceneManager.call(Scene_Level_Up)
  1235. end
  1236. end
  1237. end
  1238. end
  1239. #--------
  1240. class Game_Actor < Game_Battler
  1241. attr_reader :level_up_pts
  1242. attr_reader :vit_pts
  1243. attr_reader :str_pts
  1244. attr_reader :dex_pts
  1245. attr_reader :mag_pts
  1246. alias old_initialize initialize
  1247. def initialize(actor_id)
  1248. old_initialize(actor_id)
  1249. @level_up_pts = 0
  1250. @vit_pts = 0
  1251. @str_pts = 0
  1252. @dex_pts = 0
  1253. @mag_pts = 0
  1254. end
  1255. #--------
  1256. def cost_caract(param)
  1257. tbl = [DPB::PSPDS::OPTION_1_COST,
  1258. DPB::PSPDS::OPTION_2_COST,
  1259. DPB::PSPDS::OPTION_3_COST,
  1260. DPB::PSPDS::OPTION_4_COST,
  1261. 0,
  1262. 0,
  1263. 0,
  1264. 0] # DO NOT MODIFY THIS
  1265. note = $data_classes[@class_id].note
  1266. note.each_line do |line|
  1267. if line.include?("<cost_caract>")
  1268. line2 = line.gsub!("<cost_caract> ","")
  1269. tbl = eval(line2)
  1270. end
  1271. end
  1272. return tbl[param]
  1273. end
  1274. #========================
  1275. def gain_lvl_pts(value)
  1276. @level_up_pts += value
  1277. if @level_up_pts < 0
  1278. @level_up_pts = 0
  1279. end
  1280. end
  1281. #=======================
  1282. def gain_vit_pts(value)
  1283. @vit_pts += value
  1284. if @vit_pts < 0
  1285. @vit_pts = 0
  1286. end
  1287. end
  1288. #--------
  1289. def gain_str_pts(value)
  1290. @str_pts += value
  1291. if @str_pts < 0
  1292. @str_pts = 0
  1293. end
  1294. end
  1295. #--------
  1296. def gain_dex_pts(value)
  1297. @dex_pts += value
  1298. if @dex_pts < 0
  1299. @dex_pts = 0
  1300. end
  1301. end
  1302. #--------
  1303. def gain_mag_pts(value)
  1304. @mag_pts += value
  1305. if @mag_pts < 0
  1306. @mag_pts = 0
  1307. end
  1308. end
  1309. #========================
  1310. def param_base(param_id)
  1311. if DPB::PSPDS::USE_DEFAULT_PARAM_GAIN
  1312. return self.class.params[param_id, @level]
  1313. else
  1314. return self.class.params[param_id, 1]
  1315. end
  1316. end
  1317. #========================
  1318. if DPB::PSPDS::ONLY_GAIN_POINTS_ON_LEVELS
  1319. def level_up
  1320. @level += 1
  1321. $game_temp.actor_level_up.push(self) unless $game_temp.actor_level_up.include?(self)
  1322. self.class.learnings.each do |learning|
  1323. learn_skill(learning.skill_id) if learning.level == @level
  1324. end
  1325. if DPB::PSPDS::BONUS_POINTS_ON_LEVELS
  1326. return unless DPB::PSPDS::LEVELS.include?(@level)
  1327. gain_lvl_pts($bonuspts)
  1328. else
  1329. end
  1330. end
  1331. else
  1332. def level_up
  1333. @level += 1
  1334. $game_temp.actor_level_up.push(self) unless $game_temp.actor_level_up.include?(self)
  1335. self.class.learnings.each do |learning|
  1336. learn_skill(learning.skill_id) if learning.level == @level
  1337. end
  1338. gain_lvl_pts($pts)
  1339. if DPB::PSPDS::BONUS_POINTS_ON_LEVELS
  1340. return unless DPB::PSPDS::LEVELS.include?(@level)
  1341. gain_lvl_pts($bonuspts)
  1342. else
  1343. end
  1344. end
  1345. end
  1346. end # Game_Actor
  1347. #========================
  1348. class Game_Temp
  1349. attr_accessor :actor_level_up
  1350. alias old_initialize initialize
  1351. def initialize
  1352. old_initialize
  1353. @actor_level_up = []
  1354. end
  1355. end
  1356. #========================
  1357. class Game_Interpreter
  1358. def gain_pts(actor_id, value)
  1359. actor = $game_actors[actor_id]
  1360. return if actor == nil
  1361. actor.gain_lvl_pts(value)
  1362. end
  1363. #--------
  1364. def inc_vit(actor_id, value)
  1365. actor = $game_actors[actor_id]
  1366. return if actor == nil
  1367. actor.gain_vit_pts(value)
  1368. end
  1369. #--------
  1370. def inc_str(actor_id, value)
  1371. actor = $game_actors[actor_id]
  1372. return if actor == nil
  1373. actor.gain_str_pts(value)
  1374. end
  1375. #--------
  1376. def inc_dex(actor_id, value)
  1377. actor = $game_actors[actor_id]
  1378. return if actor == nil
  1379. actor.gain_dex_pts(value)
  1380. end
  1381. #--------
  1382. def inc_mag(actor_id, value)
  1383. actor = $game_actors[actor_id]
  1384. return if actor == nil
  1385. actor.gain_mag_pts(value)
  1386. end
  1387. end
  1388. #========================
  1389. if DPB::PSPDS::COMPLETELY_DISABLE_MENU_OPTION
  1390. else
  1391. #==============================================================================
  1392. # Window_MenuCommand
  1393. #==============================================================================
  1394. class Window_MenuCommand < Window_Command
  1395. #--------------------------------------------------------------------------
  1396. # alias method: add_formation_command
  1397. #--------------------------------------------------------------------------
  1398. alias window_menucommand_add_formation_command_pspds add_formation_command
  1399. def add_formation_command
  1400. add_pspds_command unless $imported["DPB-PMS"]
  1401. window_menucommand_add_formation_command_pspds
  1402. end
  1403. #--------------------------------------------------------------------------
  1404. # new method: add_class_command
  1405. #--------------------------------------------------------------------------
  1406. def add_pspds_command
  1407. return unless Switch.pspds_show
  1408. text = DPB::PSPDS::MENU_COMMAND_NAME
  1409. add_command(text, :pspds, Switch.pspds_enable)
  1410. end
  1411. end # Window_MenuCommand
  1412. #==============================================================================
  1413. # Scene_Menu
  1414. #==============================================================================
  1415. class Scene_Menu < Scene_MenuBase
  1416. #--------------------------------------------------------------------------
  1417. # alias method: create_command_window
  1418. #--------------------------------------------------------------------------
  1419. alias scene_menu_create_command_window_pspds create_command_window
  1420. def create_command_window
  1421. scene_menu_create_command_window_pspds
  1422. @command_window.set_handler(:pspds, method(:command_personal))
  1423. end
  1424. #--------------------------------------------------------------------------
  1425. # alias method: on_personal_ok
  1426. #--------------------------------------------------------------------------
  1427. alias scene_menu_on_personal_ok_pspds on_personal_ok
  1428. def on_personal_ok
  1429. case @command_window.current_symbol
  1430. when :pspds
  1431. SceneManager.call(Scene_Level_Up)
  1432. else
  1433. scene_menu_on_personal_ok_pspds
  1434. end
  1435. end
  1436.  
  1437. end # Scene_Menu
  1438. end
  1439. #==============================================================================
  1440. # Window_Level_UpCommand
  1441. #==============================================================================
  1442. class Window_Level_upCommand < Window_Command
  1443. #--------------------------------------------------------------------------
  1444. # * Object Initialization
  1445. #--------------------------------------------------------------------------
  1446. def initialize
  1447. @actor = $game_temp.actor_level_up[0]
  1448. super(0, 300)
  1449. @@last_command_symbol = nil
  1450. select_last
  1451. self.opacity = 0
  1452. end
  1453. #--------------------------------------------------------------------------
  1454. # * Get Window Width
  1455. #--------------------------------------------------------------------------
  1456. def window_width
  1457. return DPB::PSPDS::COMMAND_COLUMN_WIDTH
  1458. end
  1459. #--------------------------------------------------------------------------
  1460. # * Get Window Height
  1461. #--------------------------------------------------------------------------
  1462. def window_height
  1463. return 344
  1464. end
  1465. #--------------------------------------------------------------------------
  1466. # * Get Number of Lines to Show
  1467. #--------------------------------------------------------------------------
  1468. def visible_line_number
  1469. item_max
  1470. end
  1471. #--------------------------------------------------------------------------
  1472. # * Create Command Window
  1473. #--------------------------------------------------------------------------
  1474. def make_command_list
  1475. for command in DPB::PSPDS::COMMANDS
  1476. case command
  1477. when :Vitality
  1478. add_command("", :gain_vit, true)
  1479. when :Strength
  1480. add_command("", :gain_str, true)
  1481. when :Dexterity
  1482. add_command("", :gain_dex, true)
  1483. when :Magic
  1484. add_command("", :gain_mag, true)
  1485. if DPB::PSPDS::EXIT_BEFORE_POINTS_SPENT
  1486. :Finish
  1487. add_command(DPB::PSPDS::FINISHVOCAB, :retour, true)
  1488. else
  1489. :Finish
  1490. add_command(DPB::PSPDS::FINISHVOCAB, :retour, @actor.level_up_pts <= 0)
  1491. end
  1492. end
  1493. end
  1494. end
  1495. #--------------------------------------------------------------------------
  1496. # * Processing When OK Button Is Pressed
  1497. #--------------------------------------------------------------------------
  1498. def process_ok
  1499. @@last_command_symbol = current_symbol
  1500. super
  1501. end
  1502. def select_last
  1503. select_symbol(@@last_command_symbol)
  1504. end
  1505. end
  1506. #==============================================================================
  1507. # ** Window_Status
  1508. #------------------------------------------------------------------------------
  1509. # This window displays full status specs on the status screen.
  1510. #==============================================================================
  1511. class Window_Status_Level_up < Window_Selectable
  1512. #--------------------------------------------------------------------------
  1513. # * Object Initialization
  1514. #--------------------------------------------------------------------------
  1515. def initialize(actor)
  1516. super(-50, -50, window_width, window_height)
  1517. contents.font.size = DPB::PSPDS::FONTSIZE
  1518. @actor = actor
  1519. refresh
  1520. activate
  1521. end
  1522. #--------------------------------------------------------------------------
  1523. # window_width
  1524. #--------------------------------------------------------------------------
  1525. def window_width; return Graphics.width - 0; end
  1526. #--------------------------------------------------------------------------
  1527. # window_height
  1528. #--------------------------------------------------------------------------
  1529. def window_height; return Graphics.height - 0; end
  1530. #--------------------------------------------------------------------------
  1531. # * Set Actor
  1532. #--------------------------------------------------------------------------
  1533. def actor=(actor)
  1534. return if @actor == actor
  1535. @actor = actor
  1536. refresh
  1537. end
  1538. #--------------------------------------------------------------------------
  1539. # * Refresh
  1540. #--------------------------------------------------------------------------
  1541. def refresh
  1542. contents.clear
  1543. draw_block1(line_height * 1)
  1544. draw_block2(line_height * 1)
  1545. draw_block3(line_height * 3)
  1546. contents.font.size = 24
  1547. contents.font.size = DPB::PSPDS::FONTSIZE
  1548. end
  1549. #--------------------------------------------------------------------------
  1550. # * Draw Block 1
  1551. #--------------------------------------------------------------------------
  1552. def draw_block1(y)
  1553. draw_actor_face(@actor, (window_width - 24) / 2.5, 0)
  1554. contents.font.size = 22
  1555. draw_actor_name(@actor,(window_width + 24) / 2, line_height * 0)
  1556. contents.font.size = DPB::PSPDS::FONTSIZE
  1557. draw_actor_class(@actor, (window_width + 24) / 2, line_height * 1.6)
  1558. if DPB::PSPDS::DRAW_ACTOR_GRAPHIC
  1559. draw_actor_graphic(@actor, DPB::PSPDS::DAG_X, DPB::PSPDS::DAG_Y)#, 50)
  1560. else
  1561. end
  1562. end
  1563. #--------------------------------------------------------------------------
  1564. # * Draw Block 2
  1565. #--------------------------------------------------------------------------
  1566. def draw_block2(y)
  1567. draw_basic_info(32, y)
  1568. draw_exp_info(4, y+line_height * 7)
  1569. end
  1570. #--------------------------------------------------------------------------
  1571. # * Draw Block 3
  1572. #--------------------------------------------------------------------------
  1573. def draw_block3(y)
  1574. # draw_parameter_graph
  1575. end
  1576. #--------------------------------------------------------------------------
  1577. # * Draw Horizontal Line
  1578. #--------------------------------------------------------------------------
  1579. def draw_horz_line(y)
  1580. line_y = y + line_height / 2 - 1
  1581. contents.fill_rect(0, line_y, contents_width, 2, line_color)
  1582. end
  1583. #--------------------------------------------------------------------------
  1584. # * Get Color of Horizontal Line
  1585. #--------------------------------------------------------------------------
  1586. def line_color
  1587. color = normal_color
  1588. color.alpha = 48
  1589. color
  1590. end
  1591. #--------------------------------------------------------------------------
  1592. # * Draw Experience Information
  1593. #--------------------------------------------------------------------------
  1594. def draw_exp_info(x, y)
  1595. contents.font.size = DPB::PSPDS::FONTSIZE
  1596. s1 = @actor.max_level? ? "----" : @actor.exp
  1597. s2 = @actor.max_level? ? "----" : @actor.next_level_exp - @actor.exp
  1598. s_next = sprintf(Vocab::ExpNext, Vocab::level)
  1599. change_color(system_color)
  1600. draw_text((window_width - 24) / 4 * 3, y-140, 180, line_height, "Next Level")
  1601. draw_text((window_width - 24) / 4 * 3, y-170, 180, line_height, "TOTAL Exp")
  1602. change_color(normal_color)
  1603. draw_text((window_width - 24) / 1.7, y-155, 180, line_height, s1, 2)
  1604. draw_text((window_width - 24) / 1.7, y-120, 180, line_height, s2, 2)
  1605. end
  1606. end
  1607. #--------------------------------------------------------------------------
  1608. # * Draw Parameters
  1609. #--------------------------------------------------------------------------
  1610. def draw_parameters(x, y)
  1611. 6.times {|i| draw_actor_param(@actor, x, y + 7 + line_height * i, i + 2) }
  1612. end
  1613. if DPB::PSPDS::DRAW_ALL_COLUMNS
  1614. #--------------------------------------------------------------------------
  1615. # draw_parameter_graph
  1616. #--------------------------------------------------------------------------
  1617. def draw_parameter_graph
  1618. dy = line_height * 3/2
  1619. maximum = 1
  1620. minimum = @actor.param_max(2)
  1621. for i in 2..7
  1622. maximum = [@actor.param(i), maximum].max
  1623. minimum = [@actor.param(i), minimum].min
  1624. end
  1625. maximum += minimum * 0.33 unless maximum == minimum
  1626. for i in 2..7
  1627. rate = calculate_rate(maximum, minimum, i)
  1628. dy = line_height * i - line_height/2
  1629. draw_param_gauge(i, dy, rate)
  1630. self.contents.font.size = DPB::PSPDS::PARAMFONTSIZE
  1631. change_color(system_color)
  1632. draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
  1633. dw = (contents.width - 48) * rate - 8
  1634. change_color(normal_color)
  1635. draw_text((window_width - 24) / 4 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
  1636. end
  1637. end
  1638. else
  1639. #--------------------------------------------------------------------------
  1640. # draw_parameter_graph
  1641. #--------------------------------------------------------------------------
  1642. def draw_parameter_graph
  1643. dy = line_height * 3/2
  1644. maximum = 1
  1645. minimum = @actor.param_max(2)
  1646. for i in 2..7
  1647. maximum = [@actor.param(i), maximum].max
  1648. minimum = [@actor.param(i), minimum].min
  1649. end
  1650. maximum += minimum * 0.33 unless maximum == minimum
  1651. for i in 2..7
  1652. rate = calculate_rate(maximum, minimum, i)
  1653. dy = line_height * i - line_height/2
  1654. draw_param_gauge(i, dy, rate)
  1655. self.contents.font.size = DPB::PSPDS::PARAMFONTSIZE
  1656. change_color(system_color)
  1657. draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
  1658. dw = (contents.width - 48) * rate - 8
  1659. change_color(normal_color)
  1660. draw_text((window_width - 60) / 3 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
  1661. end
  1662. end
  1663. end
  1664. #--------------------------------------------------------------------------
  1665. # calculate_rate
  1666. #--------------------------------------------------------------------------
  1667. def calculate_rate(maximum, minimum, param_id)
  1668. return 1.0 if maximum == minimum
  1669. rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  1670. rate *= 0.67
  1671. rate += 0.33
  1672. return rate
  1673. end
  1674.  
  1675. if DPB::PSPDS::DRAW_ALL_COLUMNS
  1676. #--------------------------------------------------------------------------
  1677. # draw_param_gauge
  1678. #--------------------------------------------------------------------------
  1679. def draw_param_gauge(param_id, dy, rate)
  1680. dw = (window_width - 24) / 4 - 12
  1681. colour1 = param_gauge1(param_id)
  1682. colour2 = param_gauge2(param_id)
  1683. draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  1684. end
  1685. else
  1686. #--------------------------------------------------------------------------
  1687. # draw_param_gauge
  1688. #--------------------------------------------------------------------------
  1689. def draw_param_gauge(param_id, dy, rate)
  1690. dw = (window_width - 24) / 3 - 24
  1691. colour1 = param_gauge1(param_id)
  1692. colour2 = param_gauge2(param_id)
  1693. draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  1694. end
  1695. end
  1696.  
  1697. #--------------------------------------------------------------------------
  1698. # param_gauge1
  1699. #--------------------------------------------------------------------------
  1700. def param_gauge1(param_id)
  1701. return DPB::PSPDS::PARAM_COLOUR[param_id][1]
  1702. end
  1703.  
  1704. #--------------------------------------------------------------------------
  1705. # param_gauge2
  1706. #--------------------------------------------------------------------------
  1707. def param_gauge2(param_id)
  1708. return DPB::PSPDS::PARAM_COLOUR[param_id][2]
  1709. end
  1710.  
  1711. #--------------------------------------------------------------------------
  1712. # * Draw Basic Information
  1713. #--------------------------------------------------------------------------
  1714. def draw_basic_info(x, y)
  1715. draw_actor_level(@actor, (window_width + 24) / 2, line_height * 0.8)
  1716. draw_level_up_pts(x+200, y + line_height * 7)
  1717. draw_actor_icons(@actor, (window_width - 24) / 2.5, y + line_height * 3)
  1718. contents.font.size = DPB::PSPDS::FONTSIZE
  1719. if DPB::PSPDS::DRAW_PARAM_GAUGES
  1720. draw_parameter_graph
  1721. if DPB::PSPDS::DRAW_ALL_COLUMNS
  1722. draw_actor_hp(@actor, 5, y+106 + line_height * 0,(window_width - 24) / 4 - 12)
  1723. draw_actor_mp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 4 - 12)
  1724. else
  1725. draw_actor_hp(@actor, 5, y+106 + line_height * 0,(window_width - 24) / 3 - 24)
  1726. draw_actor_mp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 3 - 24)
  1727. end
  1728. else
  1729. draw_properties_paramcolumn
  1730. end
  1731. contents.font.size = DPB::PSPDS::PROPFONTSIZE
  1732. draw_horz_line(line_height * 4.6)
  1733. draw_horz_line(Graphics.height - line_height * 4)
  1734. draw_new_stats_column
  1735. draw_properties_column1
  1736. draw_properties_column2
  1737. if DPB::PSPDS::DRAW_ALL_COLUMNS
  1738. draw_properties_column3
  1739. else
  1740. end
  1741. reset_font_settings
  1742. if $imported["YEA-JPManager"]
  1743. contents.font.size = DPB::PSPDS::PARAMFONTSIZE
  1744. draw_actor_jp(@actor, (window_width + 24) / 3, line_height * 3.33)
  1745. contents.font.size = DPB::PSPDS::PROPFONTSIZE
  1746. else
  1747. end
  1748. end
  1749. def draw_level_up_pts(x,y)
  1750. contents.font.size = DPB::PSPDS::FONTSIZE + 4
  1751. draw_text((window_width) / 2.5, 4 + line_height * 4,180,line_height,DPB::PSPDS::LVLUPPTSVOCAB + @actor.level_up_pts.to_s)
  1752. end
  1753. #========================
  1754. if DPB::PSPDS::DRAW_ALL_COLUMNS
  1755. #--------------------------------------------------------------------------
  1756. # draw__new_stats_column
  1757. #--------------------------------------------------------------------------
  1758. def draw_new_stats_column
  1759. dx = 0
  1760. dw = (window_width - 24) / 5
  1761. dy = 0
  1762. for property in DPB::PSPDS::NEW_STATS_COLUMN
  1763. dy = draw_property(property, dx, dy, dw)
  1764. end
  1765. end
  1766. #--------------------------------------------------------------------------
  1767. # draw_properties_column1
  1768. #--------------------------------------------------------------------------
  1769. def draw_properties_column1
  1770. dx = 5 + (window_width - 24) / 4
  1771. dw = (window_width - 24) / 3.6 - 24
  1772. dy = 130
  1773. for property in DPB::PSPDS::PROPERTIES_COLUMN1
  1774. dy = draw_property(property, dx, dy, dw)
  1775. end
  1776. end
  1777. #--------------------------------------------------------------------------
  1778. # draw_properties_column2
  1779. #--------------------------------------------------------------------------
  1780. def draw_properties_column2
  1781. dx = 5 + (window_width - 24) / 2
  1782. dw = (window_width - 24) / 3.6 - 24
  1783. dy = 130
  1784. for property in DPB::PSPDS::PROPERTIES_COLUMN2
  1785. dy = draw_property(property, dx, dy, dw)
  1786. end
  1787. end
  1788. #--------------------------------------------------------------------------
  1789. # draw_properties_column3
  1790. #--------------------------------------------------------------------------
  1791. def draw_properties_column3
  1792. dx = 5 + (window_width - 24) / 2 + (window_width / 4.15)
  1793. dw = (window_width - 24) / 3.6 - 24
  1794. dy = 130
  1795. for property in DPB::PSPDS::PROPERTIES_COLUMN3
  1796. dy = draw_property(property, dx, dy, dw)
  1797. end
  1798. end
  1799. #--------------------------------------------------------------------------
  1800. # draw_properties_column4
  1801. #--------------------------------------------------------------------------
  1802. def draw_properties_paramcolumn
  1803. dx = 5
  1804. dw = (window_width - 24) / 3.6 - 24
  1805. dy = 130
  1806. for property in DPB::PSPDS::PROPERTIES_PARAMCOLUMN
  1807. dy = draw_property(property, dx, dy, dw)
  1808. end
  1809. end
  1810. else
  1811. #--------------------------------------------------------------------------
  1812. # draw__new_stats_column
  1813. #--------------------------------------------------------------------------
  1814. def draw_new_stats_column
  1815. dx = 0
  1816. dw = (window_width - 24) / 5
  1817. dy = 0
  1818. for property in DPB::PSPDS::NEW_STATS_COLUMN
  1819. dy = draw_property(property, dx, dy, dw)
  1820. end
  1821. end
  1822. #--------------------------------------------------------------------------
  1823. # draw_properties_column1
  1824. #--------------------------------------------------------------------------
  1825. def draw_properties_column1
  1826. dx = 5 + (window_width - 24) / 3
  1827. dw = (window_width - 24) / 3 - 12
  1828. dy = 130
  1829. for property in DPB::PSPDS::PROPERTIES_COLUMN1
  1830. dy = draw_property(property, dx, dy, dw)
  1831. end
  1832. end
  1833. #--------------------------------------------------------------------------
  1834. # draw_properties_column2
  1835. #--------------------------------------------------------------------------
  1836. def draw_properties_column2
  1837. dx = 5 + (window_width - 24) / 3 * 2
  1838. dw = (window_width - 24) / 3 - 12
  1839. dy = 130
  1840. for property in DPB::PSPDS::PROPERTIES_COLUMN2
  1841. dy = draw_property(property, dx, dy, dw)
  1842. end
  1843. end
  1844. #--------------------------------------------------------------------------
  1845. # draw_properties_column4
  1846. #--------------------------------------------------------------------------
  1847. def draw_properties_paramcolumn
  1848. dx = 5
  1849. dw = (window_width - 24) / 3 - 12
  1850. dy = 130
  1851. for property in DPB::PSPDS::PROPERTIES_PARAMCOLUMN
  1852. dy = draw_property(property, dx, dy, dw)
  1853. end
  1854. end
  1855. end
  1856. if DPB::PSPDS::PROPERTIES_BIGGER_NUMBERS
  1857. #--------------------------------------------------------------------------
  1858. # draw_property
  1859. #--------------------------------------------------------------------------
  1860. def draw_property(property, dx, dy, dw)
  1861. fmt = "%1.2f%%"
  1862. dpb = "%1.0f"
  1863. case property[0]
  1864. #---
  1865. when :mhp
  1866. value = sprintf(dpb, @actor.mhp)
  1867. when :mmp
  1868. value = sprintf(dpb, @actor.mmp)
  1869. when :atk
  1870. value = sprintf(dpb, @actor.atk * DPB::PSPDS::PARAMS_BIGGER_NUMBER_VALUE)
  1871. when :def
  1872. value = sprintf(dpb, @actor.def * DPB::PSPDS::PARAMS_BIGGER_NUMBER_VALUE)
  1873. when :mat
  1874. value = sprintf(dpb, @actor.mat * DPB::PSPDS::PARAMS_BIGGER_NUMBER_VALUE)
  1875. when :mdf
  1876. value = sprintf(dpb, @actor.mdf * DPB::PSPDS::PARAMS_BIGGER_NUMBER_VALUE)
  1877. when :agi
  1878. value = sprintf(dpb, @actor.agi * DPB::PSPDS::PARAMS_BIGGER_NUMBER_VALUE)
  1879. when :luk
  1880. value = sprintf(dpb, @actor.luk * DPB::PSPDS::PARAMS_BIGGER_NUMBER_VALUE)
  1881. when :vit_pts
  1882. value = sprintf(dpb, @actor.vit_pts)
  1883. when :str_pts
  1884. value = sprintf(dpb, @actor.str_pts)
  1885. when :dex_pts
  1886. value = sprintf(dpb, @actor.dex_pts)
  1887. when :mag_pts
  1888. value = sprintf(dpb, @actor.mag_pts)
  1889. when :hit
  1890. value = sprintf(dpb, @actor.hit * DPB::PSPDS::PROPERTIES_BIGGER_NUMBER_VALUE)
  1891. when :eva
  1892. value = sprintf(dpb, @actor.eva * DPB::PSPDS::PROPERTIES_BIGGER_NUMBER_VALUE)
  1893. when :cri
  1894. value = sprintf(fmt, @actor.cri * 100)
  1895. when :cev
  1896. value = sprintf(dpb, @actor.cev * DPB::PSPDS::PROPERTIES_BIGGER_NUMBER_VALUE)
  1897. when :mev
  1898. value = sprintf(dpb, @actor.mev * DPB::PSPDS::PROPERTIES_BIGGER_NUMBER_VALUE)
  1899. when :mrf
  1900. value = sprintf(fmt, @actor.mrf * 100)
  1901. when :cnt
  1902. value = sprintf(fmt, @actor.cnt * 100)
  1903. when :hrg
  1904. value = sprintf(fmt, @actor.hrg * 100)
  1905. when :mrg
  1906. value = sprintf(fmt, @actor.mrg * 100)
  1907. when :trg
  1908. value = sprintf(fmt, @actor.trg * 100)
  1909. when :tgr
  1910. value = sprintf(fmt, @actor.tgr * 100)
  1911. when :grd
  1912. value = sprintf(fmt, @actor.grd * 100)
  1913. when :rec
  1914. value = sprintf(fmt, @actor.rec * 100)
  1915. when :pha
  1916. value = sprintf(fmt, @actor.pha * 100)
  1917. when :mcr
  1918. value = sprintf(fmt, @actor.mcr * 100)
  1919. when :tcr
  1920. value = sprintf(fmt, @actor.tcr * 100)
  1921. when :pdr
  1922. value = sprintf(fmt, @actor.pdr * 100)
  1923. when :mdr
  1924. value = sprintf(fmt, @actor.mdr * 100)
  1925. when :fdr
  1926. value = sprintf(fmt, @actor.fdr * 100)
  1927. when :exr
  1928. value = sprintf(fmt, @actor.exr * 100)
  1929. when :hcr
  1930. return dy unless $imported["YEA-SkillCostManager"]
  1931. value = sprintf(fmt, @actor.hcr * 100)
  1932. when :tcr_y
  1933. return dy unless $imported["YEA-SkillCostManager"]
  1934. value = sprintf(fmt, @actor.tcr_y * 100)
  1935. when :gcr
  1936. return dy unless $imported["YEA-SkillCostManager"]
  1937. value = sprintf(fmt, @actor.gcr * 100)
  1938. when :cdr
  1939. return dy unless $imported["YEA-SkillRestrictions"]
  1940. value = sprintf(fmt, @actor.cdr * 100)
  1941. when :wur
  1942. return dy unless $imported["YEA-SkillRestrictions"]
  1943. value = sprintf(fmt, @actor.wur * 100)
  1944. #---
  1945. else; return dy
  1946. end
  1947. colour = Color.new(0, 0, 0, translucent_alpha/2)
  1948. rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  1949. contents.fill_rect(rect, colour)
  1950. change_color(system_color)
  1951. draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  1952. change_color(normal_color)
  1953. draw_text(dx+4, dy, dw-8, line_height, value, 2)
  1954. return dy + line_height
  1955. end
  1956. else
  1957. #--------------------------------------------------------------------------
  1958. # draw_property
  1959. #--------------------------------------------------------------------------
  1960. def draw_property(property, dx, dy, dw)
  1961. fmt = "%1.2f%%"
  1962. dpb = "%1.0f"
  1963. case property[0]
  1964. #---
  1965. when :mhp
  1966. value = sprintf(dpb, @actor.mhp)
  1967. when :mmp
  1968. value = sprintf(dpb, @actor.mmp)
  1969. when :atk
  1970. value = sprintf(dpb, @actor.atk)
  1971. when :def
  1972. value = sprintf(dpb, @actor.def)
  1973. when :mat
  1974. value = sprintf(dpb, @actor.mat)
  1975. when :mdf
  1976. value = sprintf(dpb, @actor.mdf)
  1977. when :agi
  1978. value = sprintf(dpb, @actor.agi)
  1979. when :luk
  1980. value = sprintf(dpb, @actor.luk)
  1981. when :vit_pts
  1982. value = sprintf(dpb, @actor.vit_pts)
  1983. when :str_pts
  1984. value = sprintf(dpb, @actor.str_pts)
  1985. when :dex_pts
  1986. value = sprintf(dpb, @actor.dex_pts)
  1987. when :mag_pts
  1988. value = sprintf(dpb, @actor.mag_pts)
  1989. when :hit
  1990. value = sprintf(fmt, @actor.hit * 100)
  1991. when :eva
  1992. value = sprintf(fmt, @actor.eva * 100)
  1993. when :cri
  1994. value = sprintf(fmt, @actor.cri * 100)
  1995. when :cev
  1996. value = sprintf(fmt, @actor.cev * 100)
  1997. when :mev
  1998. value = sprintf(fmt, @actor.mev * 100)
  1999. when :mrf
  2000. value = sprintf(fmt, @actor.mrf * 100)
  2001. when :cnt
  2002. value = sprintf(fmt, @actor.cnt * 100)
  2003. when :hrg
  2004. value = sprintf(fmt, @actor.hrg * 100)
  2005. when :mrg
  2006. value = sprintf(fmt, @actor.mrg * 100)
  2007. when :trg
  2008. value = sprintf(fmt, @actor.trg * 100)
  2009. when :tgr
  2010. value = sprintf(fmt, @actor.tgr * 100)
  2011. when :grd
  2012. value = sprintf(fmt, @actor.grd * 100)
  2013. when :rec
  2014. value = sprintf(fmt, @actor.rec * 100)
  2015. when :pha
  2016. value = sprintf(fmt, @actor.pha * 100)
  2017. when :mcr
  2018. value = sprintf(fmt, @actor.mcr * 100)
  2019. when :tcr
  2020. value = sprintf(fmt, @actor.tcr * 100)
  2021. when :pdr
  2022. value = sprintf(fmt, @actor.pdr * 100)
  2023. when :mdr
  2024. value = sprintf(fmt, @actor.mdr * 100)
  2025. when :fdr
  2026. value = sprintf(fmt, @actor.fdr * 100)
  2027. when :exr
  2028. value = sprintf(fmt, @actor.exr * 100)
  2029. when :hcr
  2030. return dy unless $imported["YEA-SkillCostManager"]
  2031. value = sprintf(fmt, @actor.hcr * 100)
  2032. when :tcr_y
  2033. return dy unless $imported["YEA-SkillCostManager"]
  2034. value = sprintf(fmt, @actor.tcr_y * 100)
  2035. when :gcr
  2036. return dy unless $imported["YEA-SkillCostManager"]
  2037. value = sprintf(fmt, @actor.gcr * 100)
  2038. when :cdr
  2039. return dy unless $imported["YEA-SkillRestrictions"]
  2040. value = sprintf(fmt, @actor.cdr * 100)
  2041. when :wur
  2042. return dy unless $imported["YEA-SkillRestrictions"]
  2043. value = sprintf(fmt, @actor.wur * 100)
  2044. #---
  2045. else; return dy
  2046. end
  2047. colour = Color.new(0, 0, 0, translucent_alpha/2)
  2048. rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  2049. contents.fill_rect(rect, colour)
  2050. change_color(system_color)
  2051. draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  2052. change_color(normal_color)
  2053. draw_text(dx+4, dy, dw-8, line_height, value, 2)
  2054. return dy + line_height
  2055. end
  2056. end
  2057.  
  2058. #===============================================================================#
  2059. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  2060. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  2061. # #
  2062. # PSPDS #
  2063. # (Perfect Stat Point Distribution System) #
  2064. # - SCRIPT END - #
  2065. # #
  2066. # #
  2067. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  2068. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  2069. #===============================================================================#
  2070. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement