Advertisement
Dekita

PSS-sa-v1.3

Aug 29th, 2012
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 73.56 KB | None | 0 0
  1. #Dekita's=======================================================================
  2. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  3. #===============================================================================
  4. #                                                                       v1.3-sa
  5. #                          ★ Perfect Status Screen ★
  6. #                               ☆ STAND-ALONE ☆  
  7. #
  8. #===============================================================================
  9. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  10. #===============================================================================
  11. #
  12. # -- Last updated: 11/08/2012 <-(D/M/Y)
  13. #
  14. # -- Difficulty: Plug'n'play - (Easy)
  15. #
  16. # -- Customisation: Better than a kick in the nuts! - (Medium)
  17. #
  18. # -- Requires: N/A
  19. #
  20. # -- Recommended: N/A
  21. #
  22. # -- Compatable:  RPG Maker VX Ace ONLY!
  23. #                 Yanfly Skills Cost Manager v1.03+
  24. #                 Yanfly Engine Ace - Skill Restrictions v1.02+
  25. #                
  26. #===============================================================================
  27. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  28. #===============================================================================
  29. #===============================================================================
  30. # ☆ Script Information:
  31. #=======================
  32. # This script will Display information regarding an actors stats,
  33. # parameters, elemental/state resistances and attack values.
  34. #
  35. # NOTE: PAGEFOUR reffers to the fourth page of information i added, i have set it
  36. # to display "PAGEFOUR" first, therefor PAGEFOUR = the first page you see on
  37. # opening the status screen.
  38. #===============================================================================
  39.  
  40. #===============================================================================
  41. # ☆ TERMS OF USE:
  42. #===============================================================================
  43. #
  44. # 1. You must give credit to Dekita.
  45. #
  46. # 2. This script is for NON-Commercial use ONLY!*
  47. #
  48. # 3. You CANNOT give credit to yourself for Re-posting this script
  49. #    or Posting a modified version.*
  50. #
  51. # 4. Do not Re-Distribute this script.
  52. #
  53. # 5. You are NOT allowed to convert this script to any other engine,
  54. #    E.G converting it from RGSS3 into RGSS2.*
  55. #
  56. # 6. ENJOY!
  57. #
  58. #-------------------------------------------------------------------------------
  59. # * = Unless permissions are given by Dekita. < e-mail DekitaRPG@gmail.com
  60. #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  61. #===============================================================================
  62.  
  63. #===============================================================================
  64. # ☆ History:
  65. #============
  66. # D - M - Y
  67. # 27/08/2o12 - Added controlable variable info.
  68. # 13/08/2o12 - released Script. (v1.1-sa)
  69. # 11/08/2o12 - Turned into seperate stand-alone version.
  70. #            - Spiced up some shit
  71. #            - Added "Page Three" (outbound element and status info)
  72. # 08/08/2o12 - Released Script. (v1.0)
  73. # 07/08/2o12 - started script.
  74. #-------------------------------------------------------------------------------
  75. #===============================================================================
  76. # ☆ Thanks to :
  77. #===============
  78. # N/A
  79. #
  80. #===============================================================================
  81.  
  82. #===============================================================================
  83. # ☆ Foresight Into The Future:
  84. #==============================
  85. # Nothing planned.
  86. #
  87. # If you have any ideas e-mail me at DekitaRPG@gmail.com
  88. #
  89. #===============================================================================
  90.  
  91. #===============================================================================
  92. # ☆ Known Bugs:
  93. #=================
  94. # N/A
  95. #
  96. #===============================================================================
  97.  
  98. #===============================================================================
  99. # ☆ INSTRUCTIONS:
  100. #=================
  101. # Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
  102. #
  103. #===============================================================================
  104. =begin
  105. #===============================================================================
  106. # ☆ Script Calls:
  107. #=================
  108. # Dont see why you would want to but you can use this script call to
  109. # call the status screen.
  110.  
  111. SceneManager.call(Scene_Status)
  112.  
  113. #
  114. # Use the script call below to change an actors "Perfect information"
  115. # change[x] for the information number, actor_id to actors database number
  116. # and inset your text between the inverted comma's > " "
  117.  
  118. pinfo[x](actor_id, " Text goes here ")
  119.  
  120. # e.g
  121. # pinfo1(1, "This is an example")
  122. # pinfo2(1, "This is an example")
  123. # pinfo3(1, "This is an example")
  124. # pinfo4(1, "This is an example")
  125. # pinfo5(1, "This is an example")
  126. #--------------------------------
  127. # use this script call to change an actors perfect variable, use these as you see
  128. # fit, youcould do all sorts of things with them, e.g set a common event to run on
  129. # an actors death, and use it as a death counter. whatever you want ^_^
  130.  
  131. pvari[x](actor_id, value)
  132.  
  133. # e.g
  134. # pvari1(1, 50)
  135. # pvari2(1, 50)
  136. # pvari3(1, 50)
  137. # pvari4(1, 50)
  138. #
  139. #===============================================================================
  140. #===============================================================================
  141. =end
  142. #===============================================================================
  143. # ☆ Import:
  144. #===========
  145. $imported = {} if $imported.nil?
  146. $imported["DPB-PSS-SA"] = true
  147. #
  148. #===============================================================================
  149.  
  150. #===============================================================================
  151. # ☆ Perfect Status Screen Begin:
  152. #================================
  153. module DPB
  154.   module PSS_SA
  155.    
  156.     COMMANDS =[
  157.     [:pagefour,  "IIII"],    
  158.     [:pageone,   "I"],
  159.     [:pagetwo,   "II"],
  160.     [:pagethree, "III"],
  161.     ]#DO NOT REMOVE
  162.  
  163. #===============================================================================#
  164. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  165. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  166. #                                                                               #
  167. #                                   PSS_SA                                      #
  168. #                           (Perfect Status Screen)                             #
  169. #                           - CUSTOMISATION BEGIN -                             #
  170. #                                                                               #
  171. #                                                                               #
  172. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  173. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  174. #===============================================================================#    
  175. #===============================================================================
  176. # ☆ Customisation = Tah-Dah
  177. #===========================
  178. # I have added as much customisation as i thought was needed.
  179. #
  180. # It is advised you take a moment to look through the cusomisation options
  181. # to see if any apply to your current project.
  182. #===============================================================================    
  183.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  184.     # ☆ Elements Row 1
  185.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  186.     # You can control from here which elements are viewable in row 1
  187.     # along with their icons.
  188.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  189.  
  190.     ELEMENT_VOCAB = "Elements: (defend)" # for incomming elemental damage
  191.    
  192.     ATK_ELE_VOCAB = "Elements: (attack)" # for outgoing elemental damage
  193.    
  194.     ELEMENTS_ROW1  = [3..10]  # Elements shown. Maximum of 8 can be shown per row.
  195.  
  196.     ELEMENT_ICONS_ROW1   ={         # Contains element icon information.
  197.     # Element ID => Icon,
  198.                3 =>  96, # Fire
  199.                4 =>  97, # Ice
  200.                5 =>  98, # Thunder
  201.                6 =>  99, # Water
  202.                7 => 100, # Earth
  203.                8 => 101, # Wind
  204.                9 => 102, # Holy
  205.               10 => 103, # Dark
  206.     } # Do not remove this.
  207.  
  208.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  209.     # ☆  Elements Row 2
  210.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  211.     # You can control from here whether you want to display a second row of
  212.     # elemental data along with their icons.
  213.     # Just set "SHOW_ELE_ROW_2" to "true" and change the Element ID and Icon
  214.     # to suit your needs.
  215.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  216.    
  217.     SHOW_ELE_ROW_2 = false # made for those who want more elements in their game :D
  218.    
  219.     ELEMENTS_ROW2  = [10, 9, 8, 7, 6, 5, 4, 3]  # Elements shown. Maximum of 8 can be shown per row.
  220.        
  221.     ELEMENT_ICONS_ROW2   ={         # Contains element icon information.
  222.     # Element ID => Icon,
  223.                3 =>  96, # Fire
  224.                4 =>  97, # Ice
  225.                5 =>  98, # Thunder
  226.                6 =>  99, # Water
  227.                7 => 100, # Earth
  228.                8 => 101, # Wind
  229.                9 => 102, # Holy
  230.               10 => 103, # Dark
  231.     } # Do not remove this.
  232.    
  233.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  234.     # ☆  States Row 1
  235.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  236.     # You can control from here what states are shown in row 1.
  237.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  238.    
  239.     STATUS_VOCAB = "Status: (defend)" # for imcomming status effects
  240.  
  241.     ATK_STATUS_VOCAB = "Status: (attack)"  # for outgoing status effects
  242.    
  243.     STATES_ROW_1 = [1..8]     # States shown. Maximum of 8 can be shown.
  244.    
  245.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  246.     # ☆  States Row 2
  247.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  248.     # You can control from here what states are shown in row 2.
  249.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  250.  
  251.     STATES_ROW_2 = [12,13,14,15,16,17,18,19]     # States shown. Maximum of 8 can be shown.
  252.    
  253.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  254.     # ☆ Font Settings
  255.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  256.    
  257.     PROPFONTSIZE = 16 # For Displayed Properties
  258.        
  259.     PARAMFONTSIZE = 20 # For Parameters in point selection window and JP if
  260.                        # Yanfly JP Manager is installed
  261.  
  262.     FONTSIZE = 20 # For Almost Everything Else.
  263.    
  264.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  265.     # ☆ Parameters Gauge Settings
  266.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  267.     # Set this to "true" if you wish to have Gauges for params e.g
  268.     # MaxHP, MaxMP, Atk, Def, Mat, Mdf, Agi, Luk
  269.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  270.    
  271.     DRAW_PARAM_GAUGES = true
  272.    
  273.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  274.     # ☆ Parameters Colour Settings
  275.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  276.     # These settings adjust the way the parameters window visually appears.
  277.     # Each of the stats have a non-window colour. Adjust them as you see fit.
  278.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  279.    
  280.     PARAM_COLOUR ={
  281.     # ParamID => [:stat,       Colour1,                   Colour2          ],
  282.             2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
  283.             3 => [ :def, Color.new(250, 150,  30), Color.new(250, 180, 100)],
  284.             4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
  285.             5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
  286.             6 => [ :agi, Color.new( 60, 180,  80), Color.new(120, 200, 120)],
  287.             7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
  288.     } # Do not remove this.
  289.    
  290.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  291.     # ☆ Draw Actor Graphic ?
  292.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=    
  293.        
  294.     DRAW_ACTOR_GRAPHIC = true
  295.     DAG_X = 332
  296.     DAG_Y = 90
  297.    
  298.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  299.     # ☆ Draw Actor Information Location
  300.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=    
  301.    
  302.     DRAW_INFO_IN_MIDDLE = false
  303.     # This option is to change the location of Actor's Name, Class, Lvl ect
  304.     # true = middle / false = left side of the screen.
  305.  
  306. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  307. # ☆ Properties Window Settings
  308. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  309. # These settings adjust the way the properties window visually appears.
  310. # The properties have abbreviations, but leaving them as such makes things
  311. # confusing (as it's sometimes hard to figure out what the abbreviations
  312. # mean). Change the way the appear, whether or not they appear, and what
  313. # order they will appear in.
  314. #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  315.    
  316.     #---------------------------------------------------------------------------
  317.     # ☆ Just for the hell of it:
  318.     #----------------------------
  319.     # This option is for those people who like to have large number values for
  320.     # their stats,
  321.     # e.g
  322.     # accuracy = 17,982.
  323.     # attack = 6021.
  324.     #
  325.     # Simply set "PROPERTIES_BIGGER_NUMBERS" to "true" to activate this option.
  326.     #
  327.     # NOTE:
  328.     # This doesnt acctually increase your stats to ridiculous values
  329.     # It just makes it appear that way :)
  330.     # your still not gonna be hitting monsters for 6,932,123,21.5 :D
  331.     #
  332.     # This is also very usefull if you want your game to have a more
  333.     # unique looking stat progression system
  334.     # e.g
  335.     # People cant calculate the stats as easy
  336.     #---------------------------------------------------------------------------
  337.     PROPERTIES_BIGGER_NUMBERS = false
  338.    
  339.     # This option is how much the parameters value will be multiplied by
  340.     # IF PROPERTIES_BIGGER_NUMBERS = true
  341.     # VISUAL PURPOSES ONLY!
  342.     PARAMS_BIGGER_NUMBER_VALUE = 8.5
  343.  
  344.     # This option is how much the properties value will be multiplied by
  345.     # IF PROPERTIES_BIGGER_NUMBERS = true
  346.     # VISUAL PURPOSES ONLY!  
  347.     # ONLY AFFECTS NON-% STATS e.g stats such as MP Cost Rate will remain a %.
  348.     PROPERTIES_BIGGER_NUMBER_VALUE = 850
  349.    
  350.     # These are the parameters that appear in column 1.
  351.     # This column's settings are only relevant if DRAW_PARAM_GAUGES = false (above)
  352.     PROPERTIES_PARAMCOLUMN =[
  353.       [:mhp, "Max HP"],       #-------------------------------------------------
  354.       [:mmp, "Max MP"],       # <- Rename these to whatever you want your
  355.       [:atk, "Attack"],       # <- origional parameters to be called :)
  356.       [:def, "Defence"],      # <-
  357.       [:mat, "M Attack"],     # <-
  358.       [:mdf, "M Defence"],    # <-
  359.       [:agi, "Speed"],        # <-
  360.       [:luk, "Luck"],         #-------------------------------------------------
  361.     ] # Do not remove this.
  362.  
  363.     # These are the properties that appear in column 2.
  364.     PROPERTIES_COLUMN1 =[
  365.       [:hit, "Hit Rate"],
  366.       [:eva, "Evasion"],
  367.       [:cri, "Critical Hit"],
  368.       [:cev, "Critical Evade"],
  369.       [:mev, "Magic Evasion"],
  370.       [:mrf, "Magic Reflect"],
  371.       [:cnt, "Counter Rate"],
  372.       [:tgr, "Target Rate"],
  373.     ] # Do not remove this.
  374.    
  375.     # These are the properties that appear in column 3.
  376.     PROPERTIES_COLUMN2 =[
  377.       [:hrg, "HP Regen"],
  378.       [:mrg, "MP Regen"],
  379.       [:trg, "TP Regen"],
  380.       [:rec, "Recovery"],
  381.       [:grd, "Guard Rate"],
  382.       [:pha, "Item Boost"],
  383.       [:exr, "EXP Rate"],
  384.       [:tcr, "TP Charge"],
  385.     ] # Do not remove this.
  386.    
  387.     # These are the properties that appear in column 4.
  388.     PROPERTIES_COLUMN3 =[
  389.       [:hcr, "HP Cost Rate"],    # Requires YEA - Skill Cost Manager
  390.       [:mcr, "MP Cost Rate"],
  391.       [:tcr_y, "TP Cost Rate"],    # Requires YEA - Skill Cost Manager
  392.       [:cdr, "Cooldown Rate"],   # Requires YEA - Skill Restrictions
  393.       [:wur, "Warmup Rate"],     # Requires YEA - Skill Restrictions
  394.       [:pdr, "Physical Damage"],
  395.       [:mdr, "Magical Damage"],
  396.       [:fdr, "Floor Damage"],
  397.     ] # Do not remove this.
  398.  
  399.     DRAW_ALL_COLUMNS = false # This option is for those who do not want all 4 columns
  400.                             # Simply set this to false to only draw 3 columns
  401.                             # e.g the param column, column1 and column2.
  402.                            
  403.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  404.     # ☆  Main Actor Info
  405.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  406.     # You can control from here what info is shown on the main page.
  407.     # You can rearrange these in any order you like :D
  408.     # as well as rename them to anything you want
  409.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  410.    
  411.     INFO1and2LH = 5.5 # line height for PAGEFOUR_INFO 1 and 2
  412.    
  413.     PAGEFOUR_INFO1 =[
  414.     [:pname,    "Name:"],    
  415.     [:pnickname,"Nickname:"],
  416. #    [:plvlupexp,"Next Lv Exp:"],
  417.     [:pvari1,"variable 1:"],
  418. #    [:pvari3,"variable 3:"],
  419.     ] # Do not remove this.
  420.    
  421.     PAGEFOUR_INFO2 =[
  422.     [:plevel,   "Level:"],
  423.     [:pclass,   "Class:"],    
  424.     [:pexp,     "Total Exp:"],    
  425. #    [:pvari2,"variable 2:"],
  426. #    [:pvari4,"variable 4:"],
  427.     ] # Do not remove this.
  428.    
  429.    
  430.     INFO3LH = 8.5 # line height for PAGEFOUR_INFO 3
  431.    
  432.     PAGEFOUR_INFO3 =[
  433.     [:pinfo1,   "Hometown:"],    
  434.     [:pinfo2,   "Personality:"],    
  435.     [:pinfo3,   "Favourate Food:"],    
  436.     [:pinfo4,   "Favourate Quote"],    
  437.     [:pinfo5,   "Relationship Status:"],    
  438.     ] # Do not remove this.
  439.                
  440. #===============================================================================#
  441. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  442. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  443. #                                                                               #
  444. #                                   PSS_SA                                      #
  445. #                           (Perfect Status Screen)                             #
  446. #                            - CUSTOMISATION END -                              #
  447. #                                                                               #
  448. #                                                                               #
  449. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  450. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  451. #===============================================================================#
  452. #                           - DekitaRPG@gmail.com -                             #
  453. #===============================================================================#
  454. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  455. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  456. #                                                                               #
  457. #                                   PSS_SA                                      #
  458. #                           (Perfect Status Screen)                             #
  459. #                               - SCRIPT BEGIN -                                #
  460. #                                                                               #
  461. #                                                                               #
  462. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  463. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  464. #===============================================================================#
  465.  
  466. #===============================================================================#
  467. # ARE YOU MODIFYING BEYOND THIS POINT? \.\.                                     #
  468. # YES?\.\.                                                                      #
  469. # OMG, REALLY?                                                                  #
  470. # WELL SLAP MY FACE AND CALL ME A DRAGON.\..\..                                 #
  471. # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\..                                #
  472. #===============================================================================#
  473.  
  474. module_function
  475.     #--------------------------------------------------------------------------
  476.     # convert_integer_array
  477.     #--------------------------------------------------------------------------
  478.     def convert_integer_array(array)
  479.       result = []
  480.       array.each { |i|
  481.         case i
  482.         when Range; result |= i.to_a
  483.         when Integer; result |= [i]
  484.         end }
  485.       return result
  486.     end
  487.     #--------------------------------------------------------------------------
  488.     # converted_contants
  489.     #--------------------------------------------------------------------------
  490.     ELEMENTS_ROW1 = convert_integer_array(ELEMENTS_ROW1)
  491.     ELEMENTS_ROW2 = convert_integer_array(ELEMENTS_ROW2)
  492.     STATES_ROW_1 = convert_integer_array(STATES_ROW_1)
  493.     STATES_ROW_2 = convert_integer_array(STATES_ROW_2)    
  494.   end # PSS_SA
  495. end #DPB
  496. #==============================================================================
  497. # Icon
  498. #==============================================================================
  499. module Icon
  500.   #--------------------------------------------------------------------------
  501.   # self.element
  502.   #--------------------------------------------------------------------------
  503.   def self.element(id)
  504.     return 0 unless DPB::PSS_SA::ELEMENT_ICONS_ROW1.include?(id)
  505.     return DPB::PSS_SA::ELEMENT_ICONS_ROW1[id]
  506.   end    
  507. end # Icon
  508.  
  509. #==============================================================================
  510. # Game_BattlerBase
  511. #==============================================================================
  512. class Game_BattlerBase
  513.   #--------------------------------------------------------------------------
  514.   # new method: Get Attack Element Rate
  515.   #--------------------------------------------------------------------------
  516.   def atk_element_rate(element_id)
  517.     features_sum(FEATURE_ATK_ELEMENT, element_id)
  518.   end  
  519. end # Game_BattlerBase
  520. #p-----------------------------------------------------------------------------
  521. class Game_Actor < Game_Battler
  522.   attr_reader :perfectinfo1
  523.   attr_reader :perfectinfo2
  524.   attr_reader :perfectinfo3
  525.   attr_reader :perfectinfo4
  526.   attr_reader :perfectinfo5
  527.   attr_reader :perfectvariable1
  528.   attr_reader :perfectvariable2
  529.   attr_reader :perfectvariable3
  530.   attr_reader :perfectvariable4
  531.  
  532.   alias change_pinfo initialize
  533.  def initialize(actor_id)
  534.         change_pinfo(actor_id)
  535.         @perfectinfo1 = "pinfo1"
  536.         @perfectinfo2 = "pinfo2"
  537.         @perfectinfo3 = "pinfo3"
  538.         @perfectinfo4 = "pinfo4"
  539.         @perfectinfo5 = "pinfo5"
  540.         @perfectvariable1 = 0
  541.         @perfectvariable2 = 0
  542.         @perfectvariable3 = 0
  543.         @perfectvariable4 = 0
  544.         end
  545.   def change_pinfo1(text)
  546.         @perfectinfo1 = text
  547.       end  
  548.   def change_pinfo2(text)
  549.         @perfectinfo2 = text
  550.       end  
  551.   def change_pinfo3(text)
  552.         @perfectinfo3 = text
  553.       end  
  554.   def change_pinfo4(text)
  555.         @perfectinfo4 = text
  556.       end  
  557.   def change_pinfo5(text)
  558.         @perfectinfo5 = text
  559.       end  
  560.   def change_pvar1(value)    
  561.         @perfectvariable1 += value
  562.       end  
  563.   def change_pvar2(value)
  564.         @perfectvariable2 += value
  565.       end  
  566.   def change_pvar3(value)
  567.         @perfectvariable3 += value
  568.       end  
  569.   def change_pvar4(value)
  570.         @perfectvariable4 += value
  571.       end  
  572.      
  573. end # Game_Actor
  574. #========================
  575. class Game_Interpreter
  576. #--------
  577.   def pinfo1(actor_id, text)
  578.     actor = $game_actors[actor_id]
  579.     return if actor == nil
  580.     actor.change_pinfo1(text)
  581.   end
  582.   def pinfo2(actor_id, text)
  583.     actor = $game_actors[actor_id]
  584.     return if actor == nil
  585.     actor.change_pinfo2(text)
  586.   end
  587.   def pinfo3(actor_id, text)
  588.     actor = $game_actors[actor_id]
  589.     return if actor == nil
  590.     actor.change_pinfo3(text)
  591.   end
  592.   def pinfo4(actor_id, text)
  593.     actor = $game_actors[actor_id]
  594.     return if actor == nil
  595.     actor.change_pinfo4(text)
  596.   end
  597.   def pinfo5(actor_id, text)
  598.     actor = $game_actors[actor_id]
  599.     return if actor == nil
  600.     actor.change_pinfo5(text)
  601.   end
  602.   def pvari1(actor_id, value)
  603.     actor = $game_actors[actor_id]
  604.     return if actor == nil
  605.     actor.change_pvar1(value)
  606.   end
  607.   def pvari2(actor_id, value)
  608.     actor = $game_actors[actor_id]
  609.     return if actor == nil
  610.     actor.change_pvar2(value)
  611.   end
  612.   def pvari3(actor_id, value)
  613.     actor = $game_actors[actor_id]
  614.     return if actor == nil
  615.     actor.change_pvar3(value)
  616.   end
  617.   def pvari4(actor_id, value)
  618.     actor = $game_actors[actor_id]
  619.     return if actor == nil
  620.     actor.change_pvar4(value)
  621.   end
  622. end
  623. #==============================================================================
  624. # Game_Temp
  625. #==============================================================================
  626. class Game_Temp
  627.   #--------------------------------------------------------------------------
  628.   # public instance variables
  629.   #--------------------------------------------------------------------------
  630.   attr_accessor :scene_status_index
  631.   attr_accessor :scene_status_oy
  632. end # Game_Temp
  633.  
  634. #==============================================================================
  635. # Window_StatusCommand
  636. #==============================================================================
  637. class Window_StatusCommand < Window_Command
  638.   #--------------------------------------------------------------------------
  639.   # public instance variables
  640.   #--------------------------------------------------------------------------
  641.   attr_accessor :item_window
  642.   #--------------------------------------------------------------------------
  643.   # initialize
  644.   #--------------------------------------------------------------------------
  645.   def initialize(dx, dy)
  646.     super(dx, dy)
  647.     @actor = nil
  648.         self.opacity = 0
  649.   end
  650.   #--------------------------------------------------------------------------
  651.   # window_width
  652.   #--------------------------------------------------------------------------
  653.   def window_width; return 0; end
  654.   #--------------------------------------------------------------------------
  655.   # actor=
  656.   #--------------------------------------------------------------------------
  657.   def actor=(actor)
  658.     return if @actor == actor
  659.     @actor = actor
  660.     refresh
  661.   end
  662.   #--------------------------------------------------------------------------
  663.   # visible_line_number
  664.   #--------------------------------------------------------------------------
  665.   def visible_line_number; return 4; end
  666.   #--------------------------------------------------------------------------
  667.   # ok_enabled?
  668.   #--------------------------------------------------------------------------
  669.   def ok_enabled?
  670.     return handle?(current_symbol)
  671.   end
  672.   #--------------------------------------------------------------------------
  673.   # make_command_list
  674.   #--------------------------------------------------------------------------
  675.   def make_command_list
  676.     return unless @actor
  677.     for command in DPB::PSS_SA::COMMANDS
  678.       case command[0]
  679.       #--- Default ---
  680.       when :pageone, :pagetwo, :pagethree, :pagefour
  681.         add_command(command[1], command[0])
  682.       else
  683.         end
  684.     end
  685.     if !$game_temp.scene_status_index.nil?
  686.       select($game_temp.scene_status_index)
  687.       self.oy = $game_temp.scene_status_oy
  688.     end
  689.     $game_temp.scene_status_index = nil
  690.     $game_temp.scene_status_oy = nil
  691.   end
  692.   #--------------------------------------------------------------------------
  693.   # process_ok
  694.   #--------------------------------------------------------------------------
  695.   def process_ok
  696.     $game_temp.scene_status_index = index
  697.     $game_temp.scene_status_oy = self.oy
  698.     super
  699.   end
  700.   #--------------------------------------------------------------------------
  701.   # update
  702.   #--------------------------------------------------------------------------
  703.   def update
  704.     super
  705.     update_item_window
  706.   end
  707.   #--------------------------------------------------------------------------
  708.   # update_item_window
  709.   #--------------------------------------------------------------------------
  710.   def update_item_window
  711.     return if @item_window.nil?
  712.     return if @current_index == current_symbol
  713.     @current_index = current_symbol
  714.     @item_window.refresh
  715.   end
  716.   #--------------------------------------------------------------------------
  717.   # item_window=
  718.   #--------------------------------------------------------------------------
  719.   def item_window=(window)
  720.     @item_window = window
  721.     update
  722.   end
  723.   #--------------------------------------------------------------------------
  724.   # update_help
  725.   #--------------------------------------------------------------------------
  726.   def update_help
  727.     return if @actor.nil?
  728.     @help_window.set_text(@actor.actor.description)
  729.   end
  730. end # Window_StatusCommand
  731.  
  732. #==============================================================================
  733. # Window_StatusItem
  734. #==============================================================================
  735. class Window_StatusItem < Window_Base
  736.   #--------------------------------------------------------------------------
  737.   # initialize
  738.   #--------------------------------------------------------------------------
  739.   def initialize(dx, dy, command_window)
  740.     super(dx, dy, Graphics.width, Graphics.height - dy)
  741.     @command_window = command_window
  742.     @actor = nil
  743.     refresh
  744.   end
  745.   #--------------------------------------------------------------------------
  746.   # actor=
  747.   #--------------------------------------------------------------------------
  748.   def actor=(actor)
  749.     return if @actor == actor
  750.     @actor = actor
  751.     refresh
  752.   end
  753.   #--------------------------------------------------------------------------
  754.   # refresh
  755.   #--------------------------------------------------------------------------
  756.   def refresh
  757.     contents.clear
  758.     reset_font_settings
  759.     return unless @actor
  760.     draw_window_contents
  761.   end
  762.   #--------------------------------------------------------------------------
  763.   # draw_window_contents
  764.   #--------------------------------------------------------------------------
  765.   def draw_window_contents
  766.     case @command_window.current_symbol
  767.     when :pageone
  768.         draw_block1(line_height * 1)
  769.         draw_block2(line_height * 1)
  770.         draw_block4(line_height * 14)        
  771.         draw_page_one(0, 0)
  772.     when :pagetwo
  773.         draw_block1(line_height * 1)
  774.         draw_block2(line_height * 1)
  775.         draw_block4(line_height * 14)        
  776.         draw_page_two(0, 0)
  777.     when :pagethree
  778.         draw_block1(line_height * 1)
  779.         draw_block2(line_height * 1)
  780.         draw_block4(line_height * 14)        
  781.         draw_page_three(0, 0)
  782.     when :pagefour
  783.         draw_block1(line_height * 1)
  784.         draw_block2(line_height * 1)
  785.         draw_block3(line_height * 7)
  786.         draw_block4(line_height * 14)        
  787.         draw_page_four(0, 0)              
  788.     else
  789.       end
  790.     end
  791.   #--------------------------------------------------------------------------
  792.   # * Draw Block 1
  793.   #--------------------------------------------------------------------------
  794.   def draw_block1(y)
  795.         draw_actor_face(@actor, (window_width - 24) / 2.5, 0)
  796.         contents.font.size = DPB::PSS_SA::FONTSIZE
  797.      if DPB::PSS_SA::DRAW_INFO_IN_MIDDLE
  798.         draw_actor_name(@actor,(window_width + 24) / 2, line_height * 0)
  799.         draw_actor_class(@actor, (window_width + 24) / 2, line_height * 2)      
  800.         draw_actor_level(@actor, (window_width + 24) / 2, line_height * 1)
  801.         draw_actor_nickname(@actor, (window_width + 24) / 2, line_height * 3)
  802.       else  
  803.         draw_actor_name(@actor,5 , line_height * 0)
  804.         draw_actor_class(@actor,5 , line_height * 2)
  805.         draw_actor_level(@actor,5 , line_height * 1)
  806.         draw_actor_nickname(@actor,5 , line_height * 3)
  807.       end
  808.       if DPB::PSS_SA::DRAW_ACTOR_GRAPHIC
  809.     draw_actor_graphic(@actor, DPB::PSS_SA::DAG_X, DPB::PSS_SA::DAG_Y)#, 50)
  810.   else
  811.   end
  812. end
  813.   #--------------------------------------------------------------------------
  814.   # * Draw Block 2
  815.   #--------------------------------------------------------------------------
  816.   def draw_block2(y)
  817.     draw_basic_info(136, y)
  818.     draw_exp_info(4, y+line_height * 7)
  819.   end
  820.   #--------------------------------------------------------------------------
  821.   # * Draw Block 3
  822.   #--------------------------------------------------------------------------
  823.   def draw_block3(y)
  824. #        draw_properties_paramcolumn
  825.     draw_equipments(288, y)
  826.   end
  827.   #--------------------------------------------------------------------------
  828.   # * Draw Block 4
  829.   #--------------------------------------------------------------------------
  830.   def draw_block4(y)
  831.     draw_description(4, y)
  832.   end
  833.   #--------------------------------------------------------------------------
  834.   # * Draw Horizontal Line
  835.   #--------------------------------------------------------------------------
  836.   def draw_horz_line(y)
  837.     line_y = y + line_height / 2 - 1
  838.     contents.fill_rect(0, line_y, contents_width, 2, line_color)
  839.   end
  840.   #--------------------------------------------------------------------------
  841.   # * Get Color of Horizontal Line
  842.   #--------------------------------------------------------------------------
  843.   def line_color
  844.     color = normal_color
  845.     color.alpha = 48
  846.     color
  847.   end
  848.   #--------------------------------------------------------------------------
  849.   # * Draw Basic Information
  850.   #--------------------------------------------------------------------------
  851.   def draw_basic_info(x, y)
  852.         draw_actor_icons(@actor, (window_width - 24) / 2.5, y + line_height * 3)
  853.         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  854.         if $imported["YEA-JPManager"]
  855.           contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
  856.         draw_actor_jp(@actor, (window_width + 24) / 3, line_height * 3.33)
  857.          contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  858.       else
  859.      end
  860.    end  
  861.   #--------------------------------------------------------------------------
  862.   # * Draw Page One
  863.   #--------------------------------------------------------------------------
  864.   def draw_page_one(x, y)
  865.         contents.font.size = DPB::PSS_SA::FONTSIZE          
  866.       if DPB::PSS_SA::DRAW_PARAM_GAUGES
  867.         draw_parameter_graph
  868.       if DPB::PSS_SA::DRAW_ALL_COLUMNS
  869.         draw_actor_hp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 4 - 12)
  870.         draw_actor_mp(@actor, 5, y+106 + line_height * 2,(window_width - 24) / 4 - 12)
  871.         else  
  872.         draw_actor_hp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 3 - 24)
  873.         draw_actor_mp(@actor, 5, y+106 + line_height * 2,(window_width - 24) / 3 - 24)
  874.         end
  875.       else
  876.         draw_properties_paramcolumn
  877.       end
  878.         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  879.         draw_horz_line(line_height * 4)
  880.         draw_horz_line(Graphics.height - line_height * 4)
  881.         draw_properties_column1
  882.         draw_properties_column2
  883.         if DPB::PSS_SA::DRAW_ALL_COLUMNS
  884.         draw_properties_column3
  885.       else
  886.       end
  887.         reset_font_settings        
  888.     end
  889.   #--------------------------------------------------------------------------
  890.   # * Draw Page two
  891.   #--------------------------------------------------------------------------
  892.   def draw_page_two(x, y)
  893.         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  894.         draw_horz_line(line_height * 4)
  895.         draw_elements
  896.       if DPB::PSS_SA::SHOW_ELE_ROW_2
  897.         draw_elements_row2
  898.       else
  899.         end
  900.       draw_states
  901.       draw_states_row_2
  902.       draw_horz_line(Graphics.height - line_height * 4)
  903.       reset_font_settings        
  904.     end
  905.   #--------------------------------------------------------------------------
  906.   # * Draw Page three
  907.   #--------------------------------------------------------------------------
  908.   def draw_page_three(x, y)
  909.         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  910.         draw_horz_line(line_height * 4)
  911.         draw_atk_elements
  912.       if DPB::PSS_SA::SHOW_ELE_ROW_2
  913.         draw_atk_elements_row2
  914.       else
  915.         end
  916.       draw_atk_states
  917.       draw_atk_states_row_2
  918.         draw_horz_line(Graphics.height - line_height * 4)
  919.         reset_font_settings        
  920.       end
  921.      
  922.   #--------------------------------------------------------------------------
  923.   # * Draw Page four
  924.   #--------------------------------------------------------------------------
  925.   def draw_page_four(x, y)
  926.         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  927.         draw_horz_line(line_height * 4)
  928.        draw_pagefour_info1
  929.        draw_pagefour_info2      
  930.        draw_pagefour_info3      
  931.         draw_horz_line(Graphics.height - line_height * 4)
  932.         reset_font_settings        
  933.       end
  934.  def draw_pagefour_info1
  935.     dx = 5
  936.     dw = (window_width - 24) / 4
  937.     dy = line_height * DPB::PSS_SA::INFO1and2LH
  938.     for info in DPB::PSS_SA::PAGEFOUR_INFO1
  939.       dy = draw_info(info, dx, dy, dw)
  940.     end
  941.   end
  942.  def draw_pagefour_info2
  943.     dx = 5 + (window_width - 24) / 4
  944.     dw = (window_width - 24) / 4
  945.     dy = line_height * DPB::PSS_SA::INFO1and2LH
  946.     for info in DPB::PSS_SA::PAGEFOUR_INFO2
  947.       dy = draw_info(info, dx, dy, dw)
  948.     end
  949.   end
  950.  def draw_pagefour_info3
  951.     dx = 5
  952.     dw = (window_width - 24) / 2
  953.     dy = line_height * DPB::PSS_SA::INFO3LH
  954.     for info in DPB::PSS_SA::PAGEFOUR_INFO3
  955.       dy = draw_info(info, dx, dy, dw)
  956.     end
  957.   end
  958.   #--------------------------------------------------------------------------
  959.   # draw_info
  960.   #--------------------------------------------------------------------------
  961.   def draw_info(info, dx, dy, dw)
  962.     case info[0]
  963.     #---
  964.     when :pname
  965.     text = @actor.name
  966.     when :pnickname
  967.     text = @actor.nickname
  968.     when :plevel
  969.     text = @actor.level        
  970.     when :pclass
  971.     text = @actor.class.name
  972.     when :pexp
  973.     text = @actor.exp
  974.     when :plvlupexp
  975.     text = @actor.max_level? ? "----" : @actor.next_level_exp - @actor.exp
  976.     when :pinfo1
  977.     text = @actor.perfectinfo1
  978.     when :pinfo2
  979.     text = @actor.perfectinfo2
  980.     when :pinfo3
  981.     text = @actor.perfectinfo3
  982.     when :pinfo4
  983.     text = @actor.perfectinfo4
  984.     when :pinfo5
  985.     text = @actor.perfectinfo5
  986.     when :pvari1
  987.       text = @actor.perfectvariable1
  988.     when :pvari2
  989.       text = @actor.perfectvariable2
  990.     when :pvari3
  991.       text = @actor.perfectvariable3
  992.     when :pvari4
  993.       text = @actor.perfectvariable4
  994.     #---
  995.     else; return dy
  996.     end
  997.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  998.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  999.     contents.fill_rect(rect, colour)
  1000.     change_color(system_color)
  1001.     draw_text(dx+4, dy, dw-8, line_height, info[1], 0)
  1002.     change_color(normal_color)
  1003.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1004.     return dy + line_height
  1005.   end        
  1006.   #--------------------------------------------------------------------------
  1007.   # * Draw Parameters
  1008.   #--------------------------------------------------------------------------
  1009.   def draw_parameters(x, y)
  1010.     6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
  1011.   end
  1012.   #--------------------------------------------------------------------------
  1013.   # * Draw Experience Information
  1014.   #--------------------------------------------------------------------------
  1015.   def draw_exp_info(x, y)
  1016.         contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1017.         s1 = @actor.max_level? ? "----" : @actor.exp
  1018.         s2 = @actor.max_level? ? "----" : @actor.next_level_exp - @actor.exp
  1019.         s_next = sprintf(Vocab::ExpNext, Vocab::level)
  1020.         change_color(system_color)
  1021.         draw_text((window_width - 24) / 4 * 3, y-140, 180, line_height, "Next Level")
  1022.         draw_text((window_width - 24) / 4 * 3, y-170, 180, line_height, "TOTAL Exp")
  1023.         change_color(normal_color)
  1024.         draw_text((window_width - 24) / 1.7, y-155, 180, line_height, s1, 2)
  1025.         draw_text((window_width - 24) / 1.7, y-120, 180, line_height, s2, 2)
  1026.       end
  1027.   #--------------------------------------------------------------------------
  1028.   # * Draw Equipment
  1029.   #--------------------------------------------------------------------------
  1030.   def draw_equipments(x, y)
  1031.     @actor.equips.each_with_index do |item, i|
  1032.       draw_item_name(item, x, y + line_height * i)
  1033.     end
  1034.   end
  1035.   #--------------------------------------------------------------------------
  1036.   # * Draw Description
  1037.   #--------------------------------------------------------------------------
  1038.   def draw_description(x, y)
  1039.     draw_text_ex(x, y, @actor.description)
  1040.   end
  1041.  
  1042.   if DPB::PSS_SA::SHOW_ELE_ROW_2
  1043.   #--------------------------------------------------------------------------
  1044.   # draw_elements
  1045.   #--------------------------------------------------------------------------
  1046.   def draw_elements
  1047.     dx = 0; dy = 130
  1048.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1049.     for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
  1050.       draw_element_info(ele_id, 12, dy)
  1051.       dx = dx == 1 ? contents.width / 4 : 0
  1052.       dy += dx == 0 ? line_height : 0
  1053.     end
  1054.   end
  1055.   #--------------------------------------------------------------------------
  1056.   # draw_elements_row2
  1057.   #--------------------------------------------------------------------------
  1058.   def draw_elements_row2
  1059.     dx = 0; dy = 130
  1060.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1061.     for ele_id in DPB::PSS_SA::ELEMENTS_ROW2
  1062.       draw_element_info(ele_id, (window_width - 0) / 4 * 1, dy)
  1063.       dx = dx == 1 ? contents.width / 4 : 0
  1064.       dy += dx == 0 ? line_height : 0
  1065.     end
  1066.   end
  1067.   #--------------------------------------------------------------------------
  1068.   # draw_atk_elements
  1069.   #--------------------------------------------------------------------------
  1070.   def draw_atk_elements
  1071.     dx = 0; dy = 130
  1072.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1073.     for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
  1074.       draw_atk_element_info(ele_id, 12, dy)
  1075.       dx = dx == 1 ? contents.width / 4 : 0
  1076.       dy += dx == 0 ? line_height : 0
  1077.     end
  1078.   end
  1079.   #--------------------------------------------------------------------------
  1080.   # draw_atk_elements_row2
  1081.   #--------------------------------------------------------------------------
  1082.   def draw_atk_elements_row2
  1083.     dx = 0; dy = 130
  1084.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1085.     for ele_id in DPB::PSS_SA::ELEMENTS_ROW2
  1086.       draw_atk_element_info(ele_id, (window_width - 0) / 4 * 1, dy)
  1087.       dx = dx == 1 ? contents.width / 4 : 0
  1088.       dy += dx == 0 ? line_height : 0
  1089.     end
  1090.   end
  1091.   #--------------------------------------------------------------------------
  1092.   # draw_states
  1093.   #--------------------------------------------------------------------------
  1094.   def draw_states
  1095.     dx = 0; dy = 130
  1096.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1097.     draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
  1098.     draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
  1099.     for state_id in DPB::PSS_SA::STATES_ROW_1
  1100.       draw_state_info(state_id, (window_width - 0) / 4 * 2, dy)
  1101.       dx = dx == 1 ? contents.width / 4 : 0
  1102.       dy += dx == 0 ? line_height : 0
  1103.     end
  1104.   end
  1105.   #--------------------------------------------------------------------------
  1106.   # draw_states_row_2
  1107.   #--------------------------------------------------------------------------
  1108.   def draw_states_row_2
  1109.     dx = 0; dy = 130
  1110.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1111.     for state_id in DPB::PSS_SA::STATES_ROW_2
  1112.       draw_state_info(state_id, (window_width - 12) / 4 * 3, dy)
  1113.       dx = dx == 1 ? contents.width / 4 : 0
  1114.       dy += dx == 0 ? line_height : 0
  1115.     end
  1116.   end
  1117.   #--------------------------------------------------------------------------
  1118.   # draw_atk_states
  1119.   #--------------------------------------------------------------------------
  1120.   def draw_atk_states
  1121.     dx = 0; dy = 130
  1122.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1123.     draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_ELE_VOCAB)
  1124.     draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_STATUS_VOCAB)
  1125.     for state_id in DPB::PSS_SA::STATES_ROW_1
  1126.       draw_atk_state_info(state_id, (window_width - 0) / 4 * 2, dy)
  1127.       dx = dx == 1 ? contents.width / 4 : 0
  1128.       dy += dx == 0 ? line_height : 0
  1129.     end
  1130.   end
  1131.   #--------------------------------------------------------------------------
  1132.   # draw_atk_states_row_2
  1133.   #--------------------------------------------------------------------------
  1134.   def draw_atk_states_row_2
  1135.     dx = 0; dy = 130
  1136.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1137.     for state_id in DPB::PSS_SA::STATES_ROW_2
  1138.       draw_atk_state_info(state_id, (window_width - 12) / 4 * 3, dy)
  1139.       dx = dx == 1 ? contents.width / 4 : 0
  1140.       dy += dx == 0 ? line_height : 0
  1141.     end
  1142.   end
  1143.   #--------------------------------------------------------------------------
  1144.   # draw_element_info
  1145.   #--------------------------------------------------------------------------
  1146.   def draw_element_info(ele_id, dx, dy)
  1147.     dw = (contents.width - 24) / 4.2
  1148.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1149.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1150.     contents.fill_rect(rect, colour)
  1151.     draw_icon(Icon.element(ele_id), dx, dy)
  1152.     change_color(system_color)
  1153.     draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
  1154.     change_color(normal_color)
  1155.     text = sprintf("%d%%", (@actor.element_rate(ele_id) * 100).to_i)
  1156.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1157.   end
  1158.   #--------------------------------------------------------------------------
  1159.   # draw_atk_element_info
  1160.   #--------------------------------------------------------------------------
  1161.   def draw_atk_element_info(ele_id, dx, dy)
  1162.     dw = (contents.width - 24) / 4.2
  1163.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1164.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1165.     contents.fill_rect(rect, colour)
  1166.     draw_icon(Icon.element(ele_id), dx, dy)
  1167.     change_color(system_color)
  1168.     draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
  1169.     change_color(normal_color)
  1170.     text = sprintf("%d%%", (@actor.atk_element_rate(ele_id) * 100).to_i)
  1171.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1172.   end
  1173.   #--------------------------------------------------------------------------
  1174.   # draw_state_info
  1175.   #--------------------------------------------------------------------------
  1176.   def draw_state_info(state_id, dx, dy)
  1177.     dw = (contents.width - 24) / 4.2
  1178.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1179.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1180.     contents.fill_rect(rect, colour)
  1181.     draw_icon($data_states[state_id].icon_index, dx, dy)
  1182.     change_color(system_color)
  1183.     draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
  1184.     change_color(normal_color)
  1185.     text = sprintf("%d%%", (@actor.state_rate(state_id) * 100).to_i)
  1186.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1187.   end
  1188.   #--------------------------------------------------------------------------
  1189.   # draw_atk_state_info
  1190.   #--------------------------------------------------------------------------
  1191.   def draw_atk_state_info(state_id, dx, dy)
  1192.     dw = (contents.width - 24) / 4.2
  1193.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1194.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1195.     contents.fill_rect(rect, colour)
  1196.     draw_icon($data_states[state_id].icon_index, dx, dy)
  1197.     change_color(system_color)
  1198.     draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
  1199.     change_color(normal_color)
  1200.     text = sprintf("%d%%", (@actor.atk_states_rate(state_id) * 100).to_i)
  1201.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1202.   end
  1203.  
  1204. else
  1205.   #--------------------------------------------------------------------------
  1206.   # draw_elements
  1207.   #--------------------------------------------------------------------------
  1208.   def draw_elements
  1209.     dx = 0; dy = 130
  1210.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1211.     for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
  1212.       draw_element_info(ele_id, 12, dy)
  1213.       dx = dx == 1 ? contents.width / 3 : 0
  1214.       dy += dx == 0 ? line_height : 0
  1215.     end
  1216.   end
  1217.   #--------------------------------------------------------------------------
  1218.   # draw_atk_elements
  1219.   #--------------------------------------------------------------------------
  1220.   def draw_atk_elements
  1221.     dx = 0; dy = 130
  1222.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1223.     for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
  1224.       draw_atk_element_info(ele_id, 12, dy)
  1225.       dx = dx == 1 ? contents.width / 3 : 0
  1226.       dy += dx == 0 ? line_height : 0
  1227.     end
  1228.   end
  1229.   #--------------------------------------------------------------------------
  1230.   # draw_states
  1231.   #--------------------------------------------------------------------------
  1232.   def draw_states
  1233.     dx = 0; dy = 130
  1234.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1235.     draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
  1236.     draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
  1237.     contents.font.size = 16
  1238.     for state_id in DPB::PSS_SA::STATES_ROW_1
  1239.       draw_state_info(state_id, (window_width - 0) / 3 * 1, dy)
  1240.       dx = dx == 1 ? contents.width / 3 : 0
  1241.       dy += dx == 0 ? line_height : 0
  1242.     end
  1243.   end
  1244.   #--------------------------------------------------------------------------
  1245.   # draw_states_row_2
  1246.   #--------------------------------------------------------------------------
  1247.   def draw_states_row_2
  1248.     dx = 0; dy = 130
  1249.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1250.     for state_id in DPB::PSS_SA::STATES_ROW_2
  1251.       draw_state_info(state_id, (window_width - 12) / 3 * 2, dy)
  1252.       dx = dx == 1 ? contents.width / 3 : 0
  1253.       dy += dx == 0 ? line_height : 0
  1254.     end
  1255.   end
  1256.   #--------------------------------------------------------------------------
  1257.   # draw_atk_states
  1258.   #--------------------------------------------------------------------------
  1259.   def draw_atk_states
  1260.     dx = 0; dy = 130
  1261.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1262.     draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_ELE_VOCAB)
  1263.     draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_STATUS_VOCAB)
  1264.     contents.font.size = 16
  1265.     for state_id in DPB::PSS_SA::STATES_ROW_1
  1266.       draw_atk_state_info(state_id, (window_width - 0) / 3 * 1, dy)
  1267.       dx = dx == 1 ? contents.width / 3 : 0
  1268.       dy += dx == 0 ? line_height : 0
  1269.     end
  1270.   end
  1271.   #--------------------------------------------------------------------------
  1272.   # draw_atk_states_row_2
  1273.   #--------------------------------------------------------------------------
  1274.   def draw_atk_states_row_2
  1275.     dx = 0; dy = 130
  1276.     contents.font.size = DPB::PSS_SA::PROPFONTSIZE
  1277.     for state_id in DPB::PSS_SA::STATES_ROW_2
  1278.       draw_atk_state_info(state_id, (window_width - 12) / 3 * 2, dy)
  1279.       dx = dx == 1 ? contents.width / 3 : 0
  1280.       dy += dx == 0 ? line_height : 0
  1281.     end
  1282.   end
  1283.   #--------------------------------------------------------------------------
  1284.   # draw_element_info
  1285.   #--------------------------------------------------------------------------
  1286.   def draw_element_info(ele_id, dx, dy)
  1287.     dw = (contents.width - 24) / 3.2
  1288.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1289.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1290.     contents.fill_rect(rect, colour)
  1291.     draw_icon(Icon.element(ele_id), dx, dy)
  1292.     change_color(system_color)
  1293.     draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
  1294.     change_color(normal_color)
  1295.     text = sprintf("%d%%", (@actor.element_rate(ele_id) * 100).to_i)
  1296.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1297.   end
  1298.   #--------------------------------------------------------------------------
  1299.   # draw_atk_element_info
  1300.   #--------------------------------------------------------------------------
  1301.   def draw_atk_element_info(ele_id, dx, dy)
  1302.     dw = (contents.width - 24) / 3.2
  1303.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1304.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1305.     contents.fill_rect(rect, colour)
  1306.     draw_icon(Icon.element(ele_id), dx, dy)
  1307.     change_color(system_color)
  1308.     draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
  1309.     change_color(normal_color)
  1310.     text = sprintf("%d%%", (@actor.atk_element_rate(ele_id) * 100).to_i)
  1311.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1312.   end
  1313.   #--------------------------------------------------------------------------
  1314.   # draw_state_info
  1315.   #--------------------------------------------------------------------------
  1316.   def draw_state_info(state_id, dx, dy)
  1317.     dw = (contents.width - 24) / 3.2
  1318.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1319.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1320.     contents.fill_rect(rect, colour)
  1321.     draw_icon($data_states[state_id].icon_index, dx, dy)
  1322.     change_color(system_color)
  1323.     draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
  1324.     change_color(normal_color)
  1325.     text = sprintf("%d%%", (@actor.state_rate(state_id) * 100).to_i)
  1326.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1327.   end
  1328.   #--------------------------------------------------------------------------
  1329.   # draw_atk_state_info
  1330.   #--------------------------------------------------------------------------
  1331.   def draw_atk_state_info(state_id, dx, dy)
  1332.     dw = (contents.width - 24) / 3.2
  1333.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1334.     rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
  1335.     contents.fill_rect(rect, colour)
  1336.     draw_icon($data_states[state_id].icon_index, dx, dy)
  1337.     change_color(system_color)
  1338.     draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
  1339.     change_color(normal_color)
  1340.     text = sprintf("%d%%", (@actor.atk_states_rate(state_id) * 100).to_i)
  1341.     draw_text(dx+4, dy, dw-8, line_height, text, 2)
  1342.   end
  1343. end
  1344.  
  1345.   #--------------------------------------------------------------------------
  1346.   # * Draw Parameters
  1347.   #--------------------------------------------------------------------------
  1348.   def draw_parameters(x, y)
  1349.         6.times {|i| draw_actor_param(@actor, x, y + 7 + line_height * i, i + 2) }
  1350.       end  
  1351. if DPB::PSS_SA::DRAW_ALL_COLUMNS      
  1352.   #--------------------------------------------------------------------------
  1353.   # draw_parameter_graph
  1354.   #--------------------------------------------------------------------------
  1355.   def draw_parameter_graph
  1356.     dy = line_height * 3/2
  1357.     maximum = 1
  1358.     minimum = @actor.param_max(2)
  1359.     for i in 2..7
  1360.       maximum = [@actor.param(i), maximum].max
  1361.       minimum = [@actor.param(i), minimum].min
  1362.     end
  1363.     maximum += minimum * 0.33 unless maximum == minimum
  1364.     for i in 2..7
  1365.       rate = calculate_rate(maximum, minimum, i)
  1366.       dy = line_height * i - line_height/2
  1367.       draw_param_gauge(i, dy, rate)
  1368.       self.contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
  1369.       change_color(system_color)
  1370.       draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
  1371.       dw = (contents.width - 48) * rate - 8
  1372.       change_color(normal_color)
  1373.       draw_text((window_width - 24) / 4 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
  1374.     end
  1375.   end
  1376. else
  1377.   #--------------------------------------------------------------------------
  1378.   # draw_parameter_graph
  1379.   #--------------------------------------------------------------------------
  1380.   def draw_parameter_graph
  1381.     dy = line_height * 3/2
  1382.     maximum = 1
  1383.     minimum = @actor.param_max(2)
  1384.     for i in 2..7
  1385.       maximum = [@actor.param(i), maximum].max
  1386.       minimum = [@actor.param(i), minimum].min
  1387.     end
  1388.     maximum += minimum * 0.33 unless maximum == minimum
  1389.     for i in 2..7
  1390.       rate = calculate_rate(maximum, minimum, i)
  1391.       dy = line_height * i - line_height/2
  1392.       draw_param_gauge(i, dy, rate)
  1393.       self.contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
  1394.       change_color(system_color)
  1395.       draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
  1396.       dw = (contents.width - 48) * rate - 8
  1397.       change_color(normal_color)
  1398.       draw_text((window_width - 60) / 3 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
  1399.     end
  1400.   end
  1401. end
  1402.   #--------------------------------------------------------------------------
  1403.   # calculate_rate
  1404.   #--------------------------------------------------------------------------
  1405.   def calculate_rate(maximum, minimum, param_id)
  1406.     return 1.0 if maximum == minimum
  1407.     rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
  1408.     rate *= 0.67
  1409.     rate += 0.33
  1410.     return rate
  1411.   end
  1412.  
  1413.   if DPB::PSS_SA::DRAW_ALL_COLUMNS
  1414.   #--------------------------------------------------------------------------
  1415.   # draw_param_gauge
  1416.   #--------------------------------------------------------------------------
  1417.   def draw_param_gauge(param_id, dy, rate)
  1418.     dw = (window_width - 24) / 4 - 12
  1419.     colour1 = param_gauge1(param_id)
  1420.     colour2 = param_gauge2(param_id)
  1421.     draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  1422.   end
  1423. else
  1424.   #--------------------------------------------------------------------------
  1425.   # draw_param_gauge
  1426.   #--------------------------------------------------------------------------
  1427.   def draw_param_gauge(param_id, dy, rate)
  1428.     dw = (window_width - 24) / 3 - 24
  1429.     colour1 = param_gauge1(param_id)
  1430.     colour2 = param_gauge2(param_id)
  1431.     draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
  1432.   end
  1433. end
  1434.   #--------------------------------------------------------------------------
  1435.   # param_gauge1
  1436.   #--------------------------------------------------------------------------
  1437.   def param_gauge1(param_id)
  1438.     return DPB::PSS_SA::PARAM_COLOUR[param_id][1]
  1439.   end
  1440.   #--------------------------------------------------------------------------
  1441.   # param_gauge2
  1442.   #--------------------------------------------------------------------------
  1443.   def param_gauge2(param_id)
  1444.     return DPB::PSS_SA::PARAM_COLOUR[param_id][2]
  1445.   end
  1446.  
  1447.     if DPB::PSS_SA::DRAW_ALL_COLUMNS
  1448.   #--------------------------------------------------------------------------
  1449.   # draw_properties_column1
  1450.   #--------------------------------------------------------------------------
  1451.   def draw_properties_column1
  1452.     dx = 5 + (window_width - 24) / 4
  1453.     dw = (window_width - 24) / 3.6 - 24
  1454.     dy = 130
  1455.     for property in DPB::PSS_SA::PROPERTIES_COLUMN1
  1456.       dy = draw_property(property, dx, dy, dw)
  1457.     end
  1458.   end
  1459.   #--------------------------------------------------------------------------
  1460.   # draw_properties_column2
  1461.   #--------------------------------------------------------------------------
  1462.   def draw_properties_column2
  1463.     dx = 5 + (window_width - 24) / 2
  1464.     dw = (window_width - 24) / 3.6 - 24
  1465.     dy = 130
  1466.     for property in DPB::PSS_SA::PROPERTIES_COLUMN2
  1467.       dy = draw_property(property, dx, dy, dw)
  1468.     end
  1469.   end
  1470.  
  1471.   #--------------------------------------------------------------------------
  1472.   # draw_properties_column3
  1473.   #--------------------------------------------------------------------------
  1474.   def draw_properties_column3
  1475.     dx = 5 + (window_width - 24) / 2 + (window_width / 4.15)    
  1476.     dw = (window_width - 24) / 3.6 - 24
  1477.     dy = 130
  1478.     for property in DPB::PSS_SA::PROPERTIES_COLUMN3
  1479.       dy = draw_property(property, dx, dy, dw)
  1480.     end
  1481.   end
  1482.   #--------------------------------------------------------------------------
  1483.   # draw_properties_column4
  1484.   #--------------------------------------------------------------------------
  1485.   def draw_properties_paramcolumn
  1486.     dx = 5
  1487.     dw = (window_width - 24) / 3.6 - 24
  1488.     dy = 130
  1489.     for property in DPB::PSS_SA::PROPERTIES_PARAMCOLUMN
  1490.       dy = draw_property(property, dx, dy, dw)
  1491.     end
  1492.   end
  1493. else
  1494.  
  1495.   #--------------------------------------------------------------------------
  1496.   # draw_properties_column1
  1497.   #--------------------------------------------------------------------------
  1498.   def draw_properties_column1
  1499.     dx = 5 + (window_width - 24) / 3
  1500.     dw = (window_width - 24) / 3 - 12
  1501.     dy = 130
  1502.     for property in DPB::PSS_SA::PROPERTIES_COLUMN1
  1503.       dy = draw_property(property, dx, dy, dw)
  1504.     end
  1505.   end
  1506.  
  1507.   #--------------------------------------------------------------------------
  1508.   # draw_properties_column2
  1509.   #--------------------------------------------------------------------------
  1510.   def draw_properties_column2
  1511.     dx = 5 + (window_width - 24) / 3 * 2
  1512.     dw = (window_width - 24) / 3 - 12
  1513.     dy = 130
  1514.     for property in DPB::PSS_SA::PROPERTIES_COLUMN2
  1515.       dy = draw_property(property, dx, dy, dw)
  1516.     end
  1517.   end
  1518.  
  1519.   #--------------------------------------------------------------------------
  1520.   # draw_properties_column4
  1521.   #--------------------------------------------------------------------------
  1522.   def draw_properties_paramcolumn
  1523.     dx = 5
  1524.     dw = (window_width - 24) / 3 - 12
  1525.     dy = 130
  1526.     for property in DPB::PSS_SA::PROPERTIES_PARAMCOLUMN
  1527.       dy = draw_property(property, dx, dy, dw)
  1528.     end
  1529.   end
  1530. end
  1531.  
  1532.   if DPB::PSS_SA::PROPERTIES_BIGGER_NUMBERS
  1533.   #--------------------------------------------------------------------------
  1534.   # draw_property
  1535.   #--------------------------------------------------------------------------
  1536.   def draw_property(property, dx, dy, dw)
  1537.     fmt = "%1.2f%%"
  1538.     dpb = "%1.0f"
  1539.     case property[0]
  1540.     #---
  1541.     when :mhp
  1542.        value = sprintf(dpb, @actor.mhp)
  1543.     when :mmp
  1544.        value = sprintf(dpb, @actor.mmp)
  1545.     when :atk
  1546.        value = sprintf(dpb, @actor.atk * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)  
  1547.     when :def
  1548.        value = sprintf(dpb, @actor.def * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
  1549.     when :mat
  1550.        value = sprintf(dpb, @actor.mat * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
  1551.     when :mdf
  1552.        value = sprintf(dpb, @actor.mdf * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
  1553.     when :agi
  1554.        value = sprintf(dpb, @actor.agi * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
  1555.     when :luk
  1556.        value = sprintf(dpb, @actor.luk * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
  1557.     when :vit_pts
  1558.       value = sprintf(dpb, @actor.vit_pts)
  1559.     when :str_pts
  1560.       value = sprintf(dpb, @actor.str_pts)
  1561.     when :dex_pts
  1562.       value = sprintf(dpb, @actor.dex_pts)
  1563.     when :mag_pts
  1564.       value = sprintf(dpb, @actor.mag_pts)
  1565.     when :hit
  1566.       value = sprintf(dpb, @actor.hit * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)    
  1567.     when :eva
  1568.       value = sprintf(dpb, @actor.eva * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
  1569.     when :cri
  1570.       value = sprintf(fmt, @actor.cri * 100)
  1571.     when :cev
  1572.       value = sprintf(dpb, @actor.cev * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
  1573.     when :mev
  1574.       value = sprintf(dpb, @actor.mev * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
  1575.     when :mrf
  1576.       value = sprintf(fmt, @actor.mrf * 100)
  1577.     when :cnt
  1578.       value = sprintf(fmt, @actor.cnt * 100)
  1579.     when :hrg
  1580.       value = sprintf(fmt, @actor.hrg * 100)
  1581.     when :mrg
  1582.       value = sprintf(fmt, @actor.mrg * 100)
  1583.     when :trg
  1584.       value = sprintf(fmt, @actor.trg * 100)
  1585.     when :tgr
  1586.       value = sprintf(fmt, @actor.tgr * 100)
  1587.     when :grd
  1588.       value = sprintf(fmt, @actor.grd * 100)
  1589.     when :rec
  1590.       value = sprintf(fmt, @actor.rec * 100)
  1591.     when :pha
  1592.       value = sprintf(fmt, @actor.pha * 100)
  1593.     when :mcr
  1594.       value = sprintf(fmt, @actor.mcr * 100)
  1595.     when :tcr
  1596.       value = sprintf(fmt, @actor.tcr * 100)
  1597.     when :pdr
  1598.       value = sprintf(fmt, @actor.pdr * 100)
  1599.     when :mdr
  1600.       value = sprintf(fmt, @actor.mdr * 100)
  1601.     when :fdr
  1602.       value = sprintf(fmt, @actor.fdr * 100)
  1603.     when :exr
  1604.       value = sprintf(fmt, @actor.exr * 100)
  1605.     when :hcr
  1606.       return dy unless $imported["YEA-SkillCostManager"]
  1607.       value = sprintf(fmt, @actor.hcr * 100)
  1608.     when :tcr_y
  1609.       return dy unless $imported["YEA-SkillCostManager"]
  1610.       value = sprintf(fmt, @actor.tcr_y * 100)
  1611.     when :gcr
  1612.       return dy unless $imported["YEA-SkillCostManager"]
  1613.       value = sprintf(fmt, @actor.gcr * 100)
  1614.     when :cdr
  1615.       return dy unless $imported["YEA-SkillRestrictions"]
  1616.       value = sprintf(fmt, @actor.cdr * 100)
  1617.     when :wur
  1618.       return dy unless $imported["YEA-SkillRestrictions"]
  1619.       value = sprintf(fmt, @actor.wur * 100)
  1620.     #---
  1621.     else; return dy
  1622.     end
  1623.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1624.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  1625.     contents.fill_rect(rect, colour)
  1626.     change_color(system_color)
  1627.     draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  1628.     change_color(normal_color)
  1629.     draw_text(dx+4, dy, dw-8, line_height, value, 2)
  1630.     return dy + line_height
  1631.   end
  1632. else
  1633.   #--------------------------------------------------------------------------
  1634.   # draw_property
  1635.   #--------------------------------------------------------------------------
  1636.   def draw_property(property, dx, dy, dw)
  1637.     fmt = "%1.2f%%"
  1638.     dpb = "%1.0f"
  1639.     case property[0]
  1640.     #---
  1641.     when :mhp
  1642.        value = sprintf(dpb, @actor.mhp)
  1643.     when :mmp
  1644.        value = sprintf(dpb, @actor.mmp)
  1645.     when :atk
  1646.        value = sprintf(dpb, @actor.atk)  
  1647.     when :def
  1648.        value = sprintf(dpb, @actor.def)
  1649.     when :mat
  1650.        value = sprintf(dpb, @actor.mat)
  1651.     when :mdf
  1652.        value = sprintf(dpb, @actor.mdf)
  1653.     when :agi
  1654.        value = sprintf(dpb, @actor.agi)
  1655.     when :luk
  1656.        value = sprintf(dpb, @actor.luk)
  1657.     when :vit_pts
  1658.       value = sprintf(dpb, @actor.vit_pts)
  1659.     when :str_pts
  1660.       value = sprintf(dpb, @actor.str_pts)
  1661.     when :dex_pts
  1662.       value = sprintf(dpb, @actor.dex_pts)
  1663.     when :mag_pts
  1664.       value = sprintf(dpb, @actor.mag_pts)      
  1665.     when :hit
  1666.       value = sprintf(fmt, @actor.hit * 100)
  1667.     when :eva
  1668.       value = sprintf(fmt, @actor.eva * 100)
  1669.     when :cri
  1670.       value = sprintf(fmt, @actor.cri * 100)
  1671.     when :cev
  1672.       value = sprintf(fmt, @actor.cev * 100)
  1673.     when :mev
  1674.       value = sprintf(fmt, @actor.mev * 100)
  1675.     when :mrf
  1676.       value = sprintf(fmt, @actor.mrf * 100)
  1677.     when :cnt
  1678.       value = sprintf(fmt, @actor.cnt * 100)
  1679.     when :hrg
  1680.       value = sprintf(fmt, @actor.hrg * 100)
  1681.     when :mrg
  1682.       value = sprintf(fmt, @actor.mrg * 100)
  1683.     when :trg
  1684.       value = sprintf(fmt, @actor.trg * 100)
  1685.     when :tgr
  1686.       value = sprintf(fmt, @actor.tgr * 100)
  1687.     when :grd
  1688.       value = sprintf(fmt, @actor.grd * 100)
  1689.     when :rec
  1690.       value = sprintf(fmt, @actor.rec * 100)
  1691.     when :pha
  1692.       value = sprintf(fmt, @actor.pha * 100)
  1693.     when :mcr
  1694.       value = sprintf(fmt, @actor.mcr * 100)
  1695.     when :tcr
  1696.       value = sprintf(fmt, @actor.tcr * 100)
  1697.     when :pdr
  1698.       value = sprintf(fmt, @actor.pdr * 100)
  1699.     when :mdr
  1700.       value = sprintf(fmt, @actor.mdr * 100)
  1701.     when :fdr
  1702.       value = sprintf(fmt, @actor.fdr * 100)
  1703.     when :exr
  1704.       value = sprintf(fmt, @actor.exr * 100)
  1705.     when :hcr
  1706.       return dy unless $imported["YEA-SkillCostManager"]
  1707.       value = sprintf(fmt, @actor.hcr * 100)
  1708.     when :tcr_y
  1709.       return dy unless $imported["YEA-SkillCostManager"]
  1710.       value = sprintf(fmt, @actor.tcr_y * 100)
  1711.     when :gcr
  1712.       return dy unless $imported["YEA-SkillCostManager"]
  1713.       value = sprintf(fmt, @actor.gcr * 100)
  1714.     when :cdr
  1715.       return dy unless $imported["YEA-SkillRestrictions"]
  1716.       value = sprintf(fmt, @actor.cdr * 100)
  1717.     when :wur
  1718.       return dy unless $imported["YEA-SkillRestrictions"]
  1719.       value = sprintf(fmt, @actor.wur * 100)
  1720.     #---
  1721.     else; return dy
  1722.     end
  1723.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1724.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  1725.     contents.fill_rect(rect, colour)
  1726.     change_color(system_color)
  1727.     draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
  1728.     change_color(normal_color)
  1729.     draw_text(dx+4, dy, dw-8, line_height, value, 2)
  1730.     return dy + line_height
  1731.   end
  1732. end
  1733.   #--------------------------------------------------------------------------
  1734.   # window width
  1735.   #--------------------------------------------------------------------------
  1736. def window_width
  1737.   Graphics.width - 0
  1738.  end
  1739.   #--------------------------------------------------------------------------
  1740.   # window height
  1741.   #--------------------------------------------------------------------------
  1742. def window_height
  1743.   Graphics.height - 0
  1744.  end
  1745. end #WindowStatusItem
  1746.  
  1747. #==============================================================================
  1748. # ** Scene_Status
  1749. #------------------------------------------------------------------------------
  1750. #  This class performs the status screen processing.
  1751. #==============================================================================
  1752. class Scene_Status < Scene_MenuBase
  1753.   #--------------------------------------------------------------------------
  1754.   # start
  1755.   #--------------------------------------------------------------------------
  1756.   def start
  1757.     super
  1758.     create_status_window
  1759.     create_command_window
  1760.     create_item_window
  1761.   end
  1762.   #--------------------------------------------------------------------------
  1763.   # create_command_window
  1764.   #--------------------------------------------------------------------------
  1765.   def create_command_window
  1766.     wy = 0
  1767.     @command_window = Window_StatusCommand.new(0, wy)
  1768.     @command_window.viewport = @viewport
  1769.     @command_window.actor = @actor
  1770.     @command_window.help_window = @help_window
  1771.     @command_window.x = -50
  1772.     @command_window.set_handler(:cancel,   method(:return_scene))
  1773.     @command_window.set_handler(:pagedown, method(:next_actor))
  1774.     @command_window.set_handler(:pageup,   method(:prev_actor))
  1775.   end
  1776.   #--------------------------------------------------------------------------
  1777.   # create_status_window
  1778.   #--------------------------------------------------------------------------
  1779.   def create_status_window
  1780.     wy = 0
  1781.   end
  1782.   #--------------------------------------------------------------------------
  1783.   # create_item_window
  1784.   #--------------------------------------------------------------------------
  1785.   def create_item_window
  1786.     dy = 0
  1787.     @item_window = Window_StatusItem.new(0, dy, @command_window)
  1788.     @item_window.viewport = @viewport
  1789.     @item_window.actor = @actor
  1790.     @command_window.item_window = @item_window
  1791.   end
  1792.   #--------------------------------------------------------------------------
  1793.   # on_actor_change
  1794.   #--------------------------------------------------------------------------
  1795.   def on_actor_change
  1796.     @command_window.actor = @actor
  1797.     @item_window.actor = @actor
  1798.     @command_window.activate
  1799.   end  
  1800. end # Scene_Status
  1801. #===============================================================================#
  1802. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  1803. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  1804. #                                                                               #
  1805. #                                   PSS_SA                                      #
  1806. #                           (Perfect Status Screen)                             #
  1807. #                                - SCRIPT END -                                 #
  1808. #                                                                               #
  1809. #                                                                               #
  1810. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
  1811. #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
  1812. #===============================================================================#
  1813. #                           - DekitaRPG@gmail.com -                             #
  1814. #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement