Advertisement
Dekita

PSPDSv1.2

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