Advertisement
Dekita

PSPDSv1.5

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