Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Dekita's=======================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- # v1.1-sa
- # ★ Perfect Status Screen ★
- # ☆ STAND-ALONE ☆
- #
- #===============================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- #
- # -- Last updated: 11/08/2012 <-(D/M/Y)
- #
- # -- Difficulty: Plug'n'play - (Easy)
- #
- # -- Customisation: Better than a kick in the nuts! - (Medium)
- #
- # -- Requires: N/A
- #
- # -- Recommended: N/A
- #
- # -- Compatable: RPG Maker VX Ace ONLY!
- # Yanfly Skills Cost Manager v1.03+
- # Yanfly Engine Ace - Skill Restrictions v1.02+
- #
- #===============================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- #===============================================================================
- # ☆ Script Information:
- #=======================
- # This script will Display information regarding an actors stats,
- # parameters, elemental/state resistances and attack values.
- # Equipment information will not be visable.
- #
- #===============================================================================
- #===============================================================================
- # ☆ TERMS OF USE:
- #===============================================================================
- #
- # 1. You must give credit to Dekita.
- #
- # 2. This script is for NON-Commercial use ONLY!*
- #
- # 3. You CANNOT give credit to yourself for Re-posting this script
- # or Posting a modified version.*
- #
- # 4. Do not Re-Distribute this script.
- #
- # 5. You are NOT allowed to convert this script to any other engine,
- # E.G converting it from RGSS3 into RGSS2.*
- #
- # 6. ENJOY!
- #
- #-------------------------------------------------------------------------------
- # * = Unless permissions are given by Dekita. < e-mail DekitaRPG@gmail.com
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- #===============================================================================
- #===============================================================================
- # ☆ History:
- #============
- # D - M - Y
- # 13/08/2o12 - released Script. (v1.1-sa)
- # 11/08/2o12 - Turned into seperate stand-alone version.
- # - Spiced up some shit
- # - Added "Page Three" (outbound element and status info)
- # 08/08/2o12 - Released Script. (v1.0)
- # 07/08/2o12 - started script.
- #-------------------------------------------------------------------------------
- #===============================================================================
- # ☆ Thanks to :
- #===============
- # N/A
- #
- #===============================================================================
- #===============================================================================
- # ☆ Foresight Into The Future:
- #==============================
- # Nothing planned.
- #
- # If you have any ideas e-mail me at DekitaRPG@gmail.com
- #
- #===============================================================================
- #===============================================================================
- # ☆ Known Bugs:
- #=================
- # N/A
- #
- #===============================================================================
- #===============================================================================
- # ☆ INSTRUCTIONS:
- #=================
- # Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
- #
- #===============================================================================
- =begin
- #===============================================================================
- # ☆ Script Calls:
- #=================
- # Dont see why you would want to but you can use this script call to
- # call the status screen.
- SceneManager.call(Scene_Status)
- #
- #===============================================================================
- =end
- #===============================================================================
- # ☆ Import:
- #===========
- $imported = {} if $imported.nil?
- $imported["DPB-PSS-SA"] = true
- #
- #===============================================================================
- #===============================================================================
- # ☆ Perfect Status Screen Begin:
- #================================
- module DPB
- module PSS_SA
- COMMANDS =[
- [:pageone, "I"],
- [:pagetwo, "II"],
- [:pagethree, "III"],
- ]#DO NOT REMOVE
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS_SA #
- # (Perfect Status Screen) #
- # - CUSTOMISATION BEGIN - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- #===============================================================================
- # ☆ Customisation = Tah-Dah
- #===========================
- # I have added as much customisation as i thought was needed.
- #
- # It is advised you take a moment to look through the cusomisation options
- # to see if any apply to your current project.
- #===============================================================================
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Elements Row 1
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # You can control from here which elements are viewable in row 1
- # along with their icons.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- ELEMENT_VOCAB = "Elements: (defend)" # for incomming elemental damage
- ATK_ELE_VOCAB = "Elements: (attack)" # for outgoing elemental damage
- ELEMENTS_ROW1 = [3..10] # Elements shown. Maximum of 8 can be shown per row.
- ELEMENT_ICONS_ROW1 ={ # Contains element icon information.
- # Element ID => Icon,
- 3 => 96, # Fire
- 4 => 97, # Ice
- 5 => 98, # Thunder
- 6 => 99, # Water
- 7 => 100, # Earth
- 8 => 101, # Wind
- 9 => 102, # Holy
- 10 => 103, # Dark
- } # Do not remove this.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Elements Row 2
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # You can control from here whether you want to display a second row of
- # elemental data along with their icons.
- # Just set "SHOW_ELE_ROW_2" to "true" and change the Element ID and Icon
- # to suit your needs.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- SHOW_ELE_ROW_2 = false # made for those who want more elements in their game :D
- ELEMENTS_ROW2 = [10, 9, 8, 7, 6, 5, 4, 3] # Elements shown. Maximum of 8 can be shown per row.
- ELEMENT_ICONS_ROW2 ={ # Contains element icon information.
- # Element ID => Icon,
- 3 => 96, # Fire
- 4 => 97, # Ice
- 5 => 98, # Thunder
- 6 => 99, # Water
- 7 => 100, # Earth
- 8 => 101, # Wind
- 9 => 102, # Holy
- 10 => 103, # Dark
- } # Do not remove this.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ States Row 1
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # You can control from here what states are shown in row 1.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- STATUS_VOCAB = "Status: (defend)" # for imcomming status effects
- ATK_STATUS_VOCAB = "Status: (attack)" # for outgoing status effects
- STATES_ROW_1 = [1..8] # States shown. Maximum of 8 can be shown.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ States Row 2
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # You can control from here what states are shown in row 2.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- STATES_ROW_2 = [12,13,14,15,16,17,18,19] # States shown. Maximum of 8 can be shown.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Font Settings
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- PROPFONTSIZE = 16 # For Displayed Properties
- PARAMFONTSIZE = 20 # For Parameters in point selection window and JP if
- # Yanfly JP Manager is installed
- FONTSIZE = 24 # For Almost Everything Else.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Parameters Gauge Settings
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Set this to "true" if you wish to have Gauges for params e.g
- # MaxHP, MaxMP, Atk, Def, Mat, Mdf, Agi, Luk
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- DRAW_PARAM_GAUGES = true
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Parameters Colour Settings
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # These settings adjust the way the parameters window visually appears.
- # Each of the stats have a non-window colour. Adjust them as you see fit.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- PARAM_COLOUR ={
- # ParamID => [:stat, Colour1, Colour2 ],
- 2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
- 3 => [ :def, Color.new(250, 150, 30), Color.new(250, 180, 100)],
- 4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
- 5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
- 6 => [ :agi, Color.new( 60, 180, 80), Color.new(120, 200, 120)],
- 7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
- } # Do not remove this.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Draw Actor Graphic ?
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- DRAW_ACTOR_GRAPHIC = true
- DAG_X = 332
- DAG_Y = 90
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Draw Actor Information Location
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- DRAW_INFO_IN_MIDDLE = false
- # This option is to change the location of Actor's Name, Class, Lvl ect
- # true = middle / false = left side of the screen.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Properties Window Settings
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # These settings adjust the way the properties window visually appears.
- # The properties have abbreviations, but leaving them as such makes things
- # confusing (as it's sometimes hard to figure out what the abbreviations
- # mean). Change the way the appear, whether or not they appear, and what
- # order they will appear in.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- #---------------------------------------------------------------------------
- # ☆ Just for the hell of it:
- #----------------------------
- # This option is for those people who like to have large number values for
- # their stats,
- # e.g
- # accuracy = 17,982.
- # attack = 6021.
- #
- # Simply set "PROPERTIES_BIGGER_NUMBERS" to "true" to activate this option.
- #
- # NOTE:
- # This doesnt acctually increase your stats to ridiculous values
- # It just makes it appear that way :)
- # your still not gonna be hitting monsters for 6,932,123,21.5 :D
- #
- # This is also very usefull if you want your game to have a more
- # unique looking stat progression system
- # e.g
- # People cant calculate the stats as easy
- #---------------------------------------------------------------------------
- PROPERTIES_BIGGER_NUMBERS = false
- # This option is how much the parameters value will be multiplied by
- # IF PROPERTIES_BIGGER_NUMBERS = true
- # VISUAL PURPOSES ONLY!
- PARAMS_BIGGER_NUMBER_VALUE = 8.5
- # This option is how much the properties value will be multiplied by
- # IF PROPERTIES_BIGGER_NUMBERS = true
- # VISUAL PURPOSES ONLY!
- # ONLY AFFECTS NON-% STATS e.g stats such as MP Cost Rate will remain a %.
- PROPERTIES_BIGGER_NUMBER_VALUE = 850
- # These are the parameters that appear in column 1.
- # This column's settings are only relevant if DRAW_PARAM_GAUGES = false (above)
- PROPERTIES_PARAMCOLUMN =[
- [:mhp, "Max HP"], #-------------------------------------------------
- [:mmp, "Max MP"], # <- Rename these to whatever you want your
- [:atk, "Attack"], # <- origional parameters to be called :)
- [:def, "Defence"], # <-
- [:mat, "M Attack"], # <-
- [:mdf, "M Defence"], # <-
- [:agi, "Speed"], # <-
- [:luk, "Luck"], #-------------------------------------------------
- ] # Do not remove this.
- # These are the properties that appear in column 2.
- PROPERTIES_COLUMN1 =[
- [:hit, "Hit Rate"],
- [:eva, "Evasion"],
- [:cri, "Critical Hit"],
- [:cev, "Critical Evade"],
- [:mev, "Magic Evasion"],
- [:mrf, "Magic Reflect"],
- [:cnt, "Counter Rate"],
- [:tgr, "Target Rate"],
- ] # Do not remove this.
- # These are the properties that appear in column 3.
- PROPERTIES_COLUMN2 =[
- [:hrg, "HP Regen"],
- [:mrg, "MP Regen"],
- [:trg, "TP Regen"],
- [:rec, "Recovery"],
- [:grd, "Guard Rate"],
- [:pha, "Item Boost"],
- [:exr, "EXP Rate"],
- [:tcr, "TP Charge"],
- ] # Do not remove this.
- # These are the properties that appear in column 4.
- PROPERTIES_COLUMN3 =[
- [:hcr, "HP Cost Rate"], # Requires YEA - Skill Cost Manager
- [:mcr, "MP Cost Rate"],
- [:tcr_y, "TP Cost Rate"], # Requires YEA - Skill Cost Manager
- [:cdr, "Cooldown Rate"], # Requires YEA - Skill Restrictions
- [:wur, "Warmup Rate"], # Requires YEA - Skill Restrictions
- [:pdr, "Physical Damage"],
- [:mdr, "Magical Damage"],
- [:fdr, "Floor Damage"],
- ] # Do not remove this.
- DRAW_ALL_COLUMNS = false # This option is for those who do not want all 4 columns
- # Simply set this to false to only draw 3 columns
- # e.g the param column, column1 and column2.
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS_SA #
- # (Perfect Status Screen) #
- # - CUSTOMISATION END - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- # - DekitaRPG@gmail.com - #
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS_SA #
- # (Perfect Status Screen) #
- # - SCRIPT BEGIN - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? #
- # WELL SLAP MY FACE AND CALL ME A DRAGON.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- module_function
- #--------------------------------------------------------------------------
- # convert_integer_array
- #--------------------------------------------------------------------------
- def convert_integer_array(array)
- result = []
- array.each { |i|
- case i
- when Range; result |= i.to_a
- when Integer; result |= [i]
- end }
- return result
- end
- #--------------------------------------------------------------------------
- # converted_contants
- #--------------------------------------------------------------------------
- ELEMENTS_ROW1 = convert_integer_array(ELEMENTS_ROW1)
- ELEMENTS_ROW2 = convert_integer_array(ELEMENTS_ROW2)
- STATES_ROW_1 = convert_integer_array(STATES_ROW_1)
- STATES_ROW_2 = convert_integer_array(STATES_ROW_2)
- end # PSS_SA
- end #DPB
- #==============================================================================
- # Icon
- #==============================================================================
- module Icon
- #--------------------------------------------------------------------------
- # self.element
- #--------------------------------------------------------------------------
- def self.element(id)
- return 0 unless DPB::PSS_SA::ELEMENT_ICONS_ROW1.include?(id)
- return DPB::PSS_SA::ELEMENT_ICONS_ROW1[id]
- end
- end # Icon
- #==============================================================================
- # Game_BattlerBase
- #==============================================================================
- class Game_BattlerBase
- #--------------------------------------------------------------------------
- # new method: Get Attack Element Rate
- #--------------------------------------------------------------------------
- def atk_element_rate(element_id)
- features_sum(FEATURE_ATK_ELEMENT, element_id)
- end
- end # Game_BattlerBase
- #==============================================================================
- # Game_Temp
- #==============================================================================
- class Game_Temp
- #--------------------------------------------------------------------------
- # public instance variables
- #--------------------------------------------------------------------------
- attr_accessor :scene_status_index
- attr_accessor :scene_status_oy
- end # Game_Temp
- #==============================================================================
- # Window_StatusCommand
- #==============================================================================
- class Window_StatusCommand < Window_Command
- #--------------------------------------------------------------------------
- # public instance variables
- #--------------------------------------------------------------------------
- attr_accessor :item_window
- #--------------------------------------------------------------------------
- # initialize
- #--------------------------------------------------------------------------
- def initialize(dx, dy)
- super(dx, dy)
- @actor = nil
- self.opacity = 0
- end
- #--------------------------------------------------------------------------
- # window_width
- #--------------------------------------------------------------------------
- def window_width; return 0; end
- #--------------------------------------------------------------------------
- # actor=
- #--------------------------------------------------------------------------
- def actor=(actor)
- return if @actor == actor
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # visible_line_number
- #--------------------------------------------------------------------------
- def visible_line_number; return 4; end
- #--------------------------------------------------------------------------
- # ok_enabled?
- #--------------------------------------------------------------------------
- def ok_enabled?
- return handle?(current_symbol)
- end
- #--------------------------------------------------------------------------
- # make_command_list
- #--------------------------------------------------------------------------
- def make_command_list
- return unless @actor
- for command in DPB::PSS_SA::COMMANDS
- case command[0]
- #--- Default ---
- when :pageone, :pagetwo, :pagethree
- add_command(command[1], command[0])
- else
- end
- end
- if !$game_temp.scene_status_index.nil?
- select($game_temp.scene_status_index)
- self.oy = $game_temp.scene_status_oy
- end
- $game_temp.scene_status_index = nil
- $game_temp.scene_status_oy = nil
- end
- #--------------------------------------------------------------------------
- # process_ok
- #--------------------------------------------------------------------------
- def process_ok
- $game_temp.scene_status_index = index
- $game_temp.scene_status_oy = self.oy
- super
- end
- #--------------------------------------------------------------------------
- # update
- #--------------------------------------------------------------------------
- def update
- super
- update_item_window
- end
- #--------------------------------------------------------------------------
- # update_item_window
- #--------------------------------------------------------------------------
- def update_item_window
- return if @item_window.nil?
- return if @current_index == current_symbol
- @current_index = current_symbol
- @item_window.refresh
- end
- #--------------------------------------------------------------------------
- # item_window=
- #--------------------------------------------------------------------------
- def item_window=(window)
- @item_window = window
- update
- end
- #--------------------------------------------------------------------------
- # update_help
- #--------------------------------------------------------------------------
- def update_help
- return if @actor.nil?
- @help_window.set_text(@actor.actor.description)
- end
- end # Window_StatusCommand
- #==============================================================================
- # Window_StatusItem
- #==============================================================================
- class Window_StatusItem < Window_Base
- #--------------------------------------------------------------------------
- # initialize
- #--------------------------------------------------------------------------
- def initialize(dx, dy, command_window)
- super(dx, dy, Graphics.width, Graphics.height - dy)
- @command_window = command_window
- @actor = nil
- refresh
- end
- #--------------------------------------------------------------------------
- # actor=
- #--------------------------------------------------------------------------
- def actor=(actor)
- return if @actor == actor
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- reset_font_settings
- return unless @actor
- draw_window_contents
- end
- #--------------------------------------------------------------------------
- # draw_window_contents
- #--------------------------------------------------------------------------
- def draw_window_contents
- case @command_window.current_symbol
- when :pageone
- draw_block1(line_height * 1)
- draw_block2(line_height * 1)
- draw_block4(line_height * 14)
- draw_page_one(0, 0)
- when :pagetwo
- draw_block1(line_height * 1)
- draw_block2(line_height * 1)
- draw_block4(line_height * 14)
- draw_page_two(0, 0)
- when :pagethree
- draw_block1(line_height * 1)
- draw_block2(line_height * 1)
- draw_block4(line_height * 14)
- # draw_block3(line_height * 1)
- draw_page_three(0, 0)
- else
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Block 1
- #--------------------------------------------------------------------------
- def draw_block1(y)
- draw_actor_face(@actor, (window_width - 24) / 2.5, 0)
- contents.font.size = DPB::PSS_SA::FONTSIZE
- if DPB::PSS_SA::DRAW_INFO_IN_MIDDLE
- draw_actor_name(@actor,(window_width + 24) / 2, line_height * 0)
- draw_actor_class(@actor, (window_width + 24) / 2, line_height * 2)
- draw_actor_level(@actor, (window_width + 24) / 2, line_height * 1)
- draw_actor_nickname(@actor, (window_width + 24) / 2, line_height * 3)
- else
- draw_actor_name(@actor,5 , line_height * 0)
- draw_actor_class(@actor,5 , line_height * 2)
- draw_actor_level(@actor,5 , line_height * 1)
- draw_actor_nickname(@actor,5 , line_height * 3)
- end
- if DPB::PSS_SA::DRAW_ACTOR_GRAPHIC
- draw_actor_graphic(@actor, DPB::PSS_SA::DAG_X, DPB::PSS_SA::DAG_Y)#, 50)
- else
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Block 2
- #--------------------------------------------------------------------------
- def draw_block2(y)
- draw_basic_info(136, y)
- draw_exp_info(4, y+line_height * 7)
- end
- #--------------------------------------------------------------------------
- # * Draw Block 3
- #--------------------------------------------------------------------------
- def draw_block3(y)
- # draw_properties_paramcolumn
- draw_equipments(288, y)
- end
- #--------------------------------------------------------------------------
- # * Draw Block 4
- #--------------------------------------------------------------------------
- def draw_block4(y)
- draw_description(4, y)
- end
- #--------------------------------------------------------------------------
- # * Draw Horizontal Line
- #--------------------------------------------------------------------------
- def draw_horz_line(y)
- line_y = y + line_height / 2 - 1
- contents.fill_rect(0, line_y, contents_width, 2, line_color)
- end
- #--------------------------------------------------------------------------
- # * Get Color of Horizontal Line
- #--------------------------------------------------------------------------
- def line_color
- color = normal_color
- color.alpha = 48
- color
- end
- #--------------------------------------------------------------------------
- # * Draw Basic Information
- #--------------------------------------------------------------------------
- def draw_basic_info(x, y)
- draw_actor_icons(@actor, (window_width - 24) / 2.5, y + line_height * 3)
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- if $imported["YEA-JPManager"]
- contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
- draw_actor_jp(@actor, (window_width + 24) / 3, line_height * 3.33)
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- else
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Page One
- #--------------------------------------------------------------------------
- def draw_page_one(x, y)
- contents.font.size = DPB::PSS_SA::FONTSIZE
- if DPB::PSS_SA::DRAW_PARAM_GAUGES
- draw_parameter_graph
- if DPB::PSS_SA::DRAW_ALL_COLUMNS
- draw_actor_hp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 4 - 12)
- draw_actor_mp(@actor, 5, y+106 + line_height * 2,(window_width - 24) / 4 - 12)
- else
- draw_actor_hp(@actor, 5, y+106 + line_height * 1,(window_width - 24) / 3 - 24)
- draw_actor_mp(@actor, 5, y+106 + line_height * 2,(window_width - 24) / 3 - 24)
- end
- else
- draw_properties_paramcolumn
- end
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_horz_line(Graphics.height - line_height * 4)
- draw_properties_column1
- draw_properties_column2
- if DPB::PSS_SA::DRAW_ALL_COLUMNS
- draw_properties_column3
- else
- end
- reset_font_settings
- end
- #--------------------------------------------------------------------------
- # * Draw Page two
- #--------------------------------------------------------------------------
- def draw_page_two(x, y)
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_elements
- if DPB::PSS_SA::SHOW_ELE_ROW_2
- draw_elements_row2
- else
- end
- draw_states
- draw_states_row_2
- draw_horz_line(Graphics.height - line_height * 4)
- reset_font_settings
- end
- #--------------------------------------------------------------------------
- # * Draw Page three
- #--------------------------------------------------------------------------
- def draw_page_three(x, y)
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_atk_elements
- if DPB::PSS_SA::SHOW_ELE_ROW_2
- draw_atk_elements_row2
- else
- end
- draw_atk_states
- draw_atk_states_row_2
- draw_horz_line(Graphics.height - line_height * 4)
- reset_font_settings
- end
- #--------------------------------------------------------------------------
- # * Draw Parameters
- #--------------------------------------------------------------------------
- def draw_parameters(x, y)
- 6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
- end
- #--------------------------------------------------------------------------
- # * Draw Experience Information
- #--------------------------------------------------------------------------
- def draw_exp_info(x, y)
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- s1 = @actor.max_level? ? "----" : @actor.exp
- s2 = @actor.max_level? ? "----" : @actor.next_level_exp - @actor.exp
- s_next = sprintf(Vocab::ExpNext, Vocab::level)
- change_color(system_color)
- draw_text((window_width - 24) / 4 * 3, y-140, 180, line_height, "Next Level")
- draw_text((window_width - 24) / 4 * 3, y-170, 180, line_height, "TOTAL Exp")
- change_color(normal_color)
- draw_text((window_width - 24) / 1.7, y-155, 180, line_height, s1, 2)
- draw_text((window_width - 24) / 1.7, y-120, 180, line_height, s2, 2)
- end
- #--------------------------------------------------------------------------
- # * Draw Equipment
- #--------------------------------------------------------------------------
- def draw_equipments(x, y)
- @actor.equips.each_with_index do |item, i|
- draw_item_name(item, x, y + line_height * i)
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Description
- #--------------------------------------------------------------------------
- def draw_description(x, y)
- draw_text_ex(x, y, @actor.description)
- end
- if DPB::PSS_SA::SHOW_ELE_ROW_2
- #--------------------------------------------------------------------------
- # draw_elements
- #--------------------------------------------------------------------------
- def draw_elements
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
- draw_element_info(ele_id, 12, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_elements_row2
- #--------------------------------------------------------------------------
- def draw_elements_row2
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for ele_id in DPB::PSS_SA::ELEMENTS_ROW2
- draw_element_info(ele_id, (window_width - 0) / 4 * 1, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_elements
- #--------------------------------------------------------------------------
- def draw_atk_elements
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
- draw_atk_element_info(ele_id, 12, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_elements_row2
- #--------------------------------------------------------------------------
- def draw_atk_elements_row2
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for ele_id in DPB::PSS_SA::ELEMENTS_ROW2
- draw_atk_element_info(ele_id, (window_width - 0) / 4 * 1, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_states
- #--------------------------------------------------------------------------
- def draw_states
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
- draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
- for state_id in DPB::PSS_SA::STATES_ROW_1
- draw_state_info(state_id, (window_width - 0) / 4 * 2, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_states_row_2
- #--------------------------------------------------------------------------
- def draw_states_row_2
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for state_id in DPB::PSS_SA::STATES_ROW_2
- draw_state_info(state_id, (window_width - 12) / 4 * 3, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_states
- #--------------------------------------------------------------------------
- def draw_atk_states
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_ELE_VOCAB)
- draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_STATUS_VOCAB)
- for state_id in DPB::PSS_SA::STATES_ROW_1
- draw_atk_state_info(state_id, (window_width - 0) / 4 * 2, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_states_row_2
- #--------------------------------------------------------------------------
- def draw_atk_states_row_2
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for state_id in DPB::PSS_SA::STATES_ROW_2
- draw_atk_state_info(state_id, (window_width - 12) / 4 * 3, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_element_info
- #--------------------------------------------------------------------------
- def draw_element_info(ele_id, dx, dy)
- dw = (contents.width - 24) / 4.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon(Icon.element(ele_id), dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.element_rate(ele_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- #--------------------------------------------------------------------------
- # draw_atk_element_info
- #--------------------------------------------------------------------------
- def draw_atk_element_info(ele_id, dx, dy)
- dw = (contents.width - 24) / 4.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon(Icon.element(ele_id), dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.atk_element_rate(ele_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- #--------------------------------------------------------------------------
- # draw_state_info
- #--------------------------------------------------------------------------
- def draw_state_info(state_id, dx, dy)
- dw = (contents.width - 24) / 4.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon($data_states[state_id].icon_index, dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.state_rate(state_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- #--------------------------------------------------------------------------
- # draw_atk_state_info
- #--------------------------------------------------------------------------
- def draw_atk_state_info(state_id, dx, dy)
- dw = (contents.width - 24) / 4.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon($data_states[state_id].icon_index, dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.atk_states_rate(state_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- else
- #--------------------------------------------------------------------------
- # draw_elements
- #--------------------------------------------------------------------------
- def draw_elements
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
- draw_element_info(ele_id, 12, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_elements
- #--------------------------------------------------------------------------
- def draw_atk_elements
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for ele_id in DPB::PSS_SA::ELEMENTS_ROW1
- draw_atk_element_info(ele_id, 12, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_states
- #--------------------------------------------------------------------------
- def draw_states
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ELEMENT_VOCAB)
- draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::STATUS_VOCAB)
- contents.font.size = 16
- for state_id in DPB::PSS_SA::STATES_ROW_1
- draw_state_info(state_id, (window_width - 0) / 3 * 1, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_states_row_2
- #--------------------------------------------------------------------------
- def draw_states_row_2
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for state_id in DPB::PSS_SA::STATES_ROW_2
- draw_state_info(state_id, (window_width - 12) / 3 * 2, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_states
- #--------------------------------------------------------------------------
- def draw_atk_states
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_ELE_VOCAB)
- draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS_SA::ATK_STATUS_VOCAB)
- contents.font.size = 16
- for state_id in DPB::PSS_SA::STATES_ROW_1
- draw_atk_state_info(state_id, (window_width - 0) / 3 * 1, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_atk_states_row_2
- #--------------------------------------------------------------------------
- def draw_atk_states_row_2
- dx = 0; dy = 130
- contents.font.size = DPB::PSS_SA::PROPFONTSIZE
- for state_id in DPB::PSS_SA::STATES_ROW_2
- draw_atk_state_info(state_id, (window_width - 12) / 3 * 2, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- dy += dx == 0 ? line_height : 0
- end
- end
- #--------------------------------------------------------------------------
- # draw_element_info
- #--------------------------------------------------------------------------
- def draw_element_info(ele_id, dx, dy)
- dw = (contents.width - 24) / 3.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon(Icon.element(ele_id), dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.element_rate(ele_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- #--------------------------------------------------------------------------
- # draw_atk_element_info
- #--------------------------------------------------------------------------
- def draw_atk_element_info(ele_id, dx, dy)
- dw = (contents.width - 24) / 3.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon(Icon.element(ele_id), dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_system.elements[ele_id] + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.atk_element_rate(ele_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- #--------------------------------------------------------------------------
- # draw_state_info
- #--------------------------------------------------------------------------
- def draw_state_info(state_id, dx, dy)
- dw = (contents.width - 24) / 3.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon($data_states[state_id].icon_index, dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.state_rate(state_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- #--------------------------------------------------------------------------
- # draw_atk_state_info
- #--------------------------------------------------------------------------
- def draw_atk_state_info(state_id, dx, dy)
- dw = (contents.width - 24) / 3.2
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
- contents.fill_rect(rect, colour)
- draw_icon($data_states[state_id].icon_index, dx, dy)
- change_color(system_color)
- draw_text(dx+24, dy, dw-24, line_height, $data_states[state_id].name + "")
- change_color(normal_color)
- text = sprintf("%d%%", (@actor.atk_states_rate(state_id) * 100).to_i)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Parameters
- #--------------------------------------------------------------------------
- def draw_parameters(x, y)
- 6.times {|i| draw_actor_param(@actor, x, y + 7 + line_height * i, i + 2) }
- end
- if DPB::PSS_SA::DRAW_ALL_COLUMNS
- #--------------------------------------------------------------------------
- # draw_parameter_graph
- #--------------------------------------------------------------------------
- def draw_parameter_graph
- dy = line_height * 3/2
- maximum = 1
- minimum = @actor.param_max(2)
- for i in 2..7
- maximum = [@actor.param(i), maximum].max
- minimum = [@actor.param(i), minimum].min
- end
- maximum += minimum * 0.33 unless maximum == minimum
- for i in 2..7
- rate = calculate_rate(maximum, minimum, i)
- dy = line_height * i - line_height/2
- draw_param_gauge(i, dy, rate)
- self.contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
- change_color(system_color)
- draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
- dw = (contents.width - 48) * rate - 8
- change_color(normal_color)
- draw_text((window_width - 24) / 4 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
- end
- end
- else
- #--------------------------------------------------------------------------
- # draw_parameter_graph
- #--------------------------------------------------------------------------
- def draw_parameter_graph
- dy = line_height * 3/2
- maximum = 1
- minimum = @actor.param_max(2)
- for i in 2..7
- maximum = [@actor.param(i), maximum].max
- minimum = [@actor.param(i), minimum].min
- end
- maximum += minimum * 0.33 unless maximum == minimum
- for i in 2..7
- rate = calculate_rate(maximum, minimum, i)
- dy = line_height * i - line_height/2
- draw_param_gauge(i, dy, rate)
- self.contents.font.size = DPB::PSS_SA::PARAMFONTSIZE
- change_color(system_color)
- draw_text(5, dy + 140, contents.width - 56, line_height, Vocab::param(i))
- dw = (contents.width - 48) * rate - 8
- change_color(normal_color)
- draw_text((window_width - 60) / 3 - 24, dy + 140, dw-8, line_height, @actor.param(i))#.group, 2)
- end
- end
- end
- #--------------------------------------------------------------------------
- # calculate_rate
- #--------------------------------------------------------------------------
- def calculate_rate(maximum, minimum, param_id)
- return 1.0 if maximum == minimum
- rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
- rate *= 0.67
- rate += 0.33
- return rate
- end
- if DPB::PSS_SA::DRAW_ALL_COLUMNS
- #--------------------------------------------------------------------------
- # draw_param_gauge
- #--------------------------------------------------------------------------
- def draw_param_gauge(param_id, dy, rate)
- dw = (window_width - 24) / 4 - 12
- colour1 = param_gauge1(param_id)
- colour2 = param_gauge2(param_id)
- draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
- end
- else
- #--------------------------------------------------------------------------
- # draw_param_gauge
- #--------------------------------------------------------------------------
- def draw_param_gauge(param_id, dy, rate)
- dw = (window_width - 24) / 3 - 24
- colour1 = param_gauge1(param_id)
- colour2 = param_gauge2(param_id)
- draw_gauge(5, dy + 140, dw, rate, colour1, colour2)
- end
- end
- #--------------------------------------------------------------------------
- # param_gauge1
- #--------------------------------------------------------------------------
- def param_gauge1(param_id)
- return DPB::PSS_SA::PARAM_COLOUR[param_id][1]
- end
- #--------------------------------------------------------------------------
- # param_gauge2
- #--------------------------------------------------------------------------
- def param_gauge2(param_id)
- return DPB::PSS_SA::PARAM_COLOUR[param_id][2]
- end
- if DPB::PSS_SA::DRAW_ALL_COLUMNS
- #--------------------------------------------------------------------------
- # draw_properties_column1
- #--------------------------------------------------------------------------
- def draw_properties_column1
- dx = 5 + (window_width - 24) / 4
- dw = (window_width - 24) / 3.6 - 24
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_COLUMN1
- dy = draw_property(property, dx, dy, dw)
- end
- end
- #--------------------------------------------------------------------------
- # draw_properties_column2
- #--------------------------------------------------------------------------
- def draw_properties_column2
- dx = 5 + (window_width - 24) / 2
- dw = (window_width - 24) / 3.6 - 24
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_COLUMN2
- dy = draw_property(property, dx, dy, dw)
- end
- end
- #--------------------------------------------------------------------------
- # draw_properties_column3
- #--------------------------------------------------------------------------
- def draw_properties_column3
- dx = 5 + (window_width - 24) / 2 + (window_width / 4.15)
- dw = (window_width - 24) / 3.6 - 24
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_COLUMN3
- dy = draw_property(property, dx, dy, dw)
- end
- end
- #--------------------------------------------------------------------------
- # draw_properties_column4
- #--------------------------------------------------------------------------
- def draw_properties_paramcolumn
- dx = 5
- dw = (window_width - 24) / 3.6 - 24
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_PARAMCOLUMN
- dy = draw_property(property, dx, dy, dw)
- end
- end
- else
- #--------------------------------------------------------------------------
- # draw_properties_column1
- #--------------------------------------------------------------------------
- def draw_properties_column1
- dx = 5 + (window_width - 24) / 3
- dw = (window_width - 24) / 3 - 12
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_COLUMN1
- dy = draw_property(property, dx, dy, dw)
- end
- end
- #--------------------------------------------------------------------------
- # draw_properties_column2
- #--------------------------------------------------------------------------
- def draw_properties_column2
- dx = 5 + (window_width - 24) / 3 * 2
- dw = (window_width - 24) / 3 - 12
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_COLUMN2
- dy = draw_property(property, dx, dy, dw)
- end
- end
- #--------------------------------------------------------------------------
- # draw_properties_column4
- #--------------------------------------------------------------------------
- def draw_properties_paramcolumn
- dx = 5
- dw = (window_width - 24) / 3 - 12
- dy = 130
- for property in DPB::PSS_SA::PROPERTIES_PARAMCOLUMN
- dy = draw_property(property, dx, dy, dw)
- end
- end
- end
- if DPB::PSS_SA::PROPERTIES_BIGGER_NUMBERS
- #--------------------------------------------------------------------------
- # draw_property
- #--------------------------------------------------------------------------
- def draw_property(property, dx, dy, dw)
- fmt = "%1.2f%%"
- dpb = "%1.0f"
- case property[0]
- #---
- when :mhp
- value = sprintf(dpb, @actor.mhp)
- when :mmp
- value = sprintf(dpb, @actor.mmp)
- when :atk
- value = sprintf(dpb, @actor.atk * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
- when :def
- value = sprintf(dpb, @actor.def * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
- when :mat
- value = sprintf(dpb, @actor.mat * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
- when :mdf
- value = sprintf(dpb, @actor.mdf * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
- when :agi
- value = sprintf(dpb, @actor.agi * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
- when :luk
- value = sprintf(dpb, @actor.luk * DPB::PSS_SA::PARAMS_BIGGER_NUMBER_VALUE)
- when :vit_pts
- value = sprintf(dpb, @actor.vit_pts)
- when :str_pts
- value = sprintf(dpb, @actor.str_pts)
- when :dex_pts
- value = sprintf(dpb, @actor.dex_pts)
- when :mag_pts
- value = sprintf(dpb, @actor.mag_pts)
- when :hit
- value = sprintf(dpb, @actor.hit * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
- when :eva
- value = sprintf(dpb, @actor.eva * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
- when :cri
- value = sprintf(fmt, @actor.cri * 100)
- when :cev
- value = sprintf(dpb, @actor.cev * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
- when :mev
- value = sprintf(dpb, @actor.mev * DPB::PSS_SA::PROPERTIES_BIGGER_NUMBER_VALUE)
- when :mrf
- value = sprintf(fmt, @actor.mrf * 100)
- when :cnt
- value = sprintf(fmt, @actor.cnt * 100)
- when :hrg
- value = sprintf(fmt, @actor.hrg * 100)
- when :mrg
- value = sprintf(fmt, @actor.mrg * 100)
- when :trg
- value = sprintf(fmt, @actor.trg * 100)
- when :tgr
- value = sprintf(fmt, @actor.tgr * 100)
- when :grd
- value = sprintf(fmt, @actor.grd * 100)
- when :rec
- value = sprintf(fmt, @actor.rec * 100)
- when :pha
- value = sprintf(fmt, @actor.pha * 100)
- when :mcr
- value = sprintf(fmt, @actor.mcr * 100)
- when :tcr
- value = sprintf(fmt, @actor.tcr * 100)
- when :pdr
- value = sprintf(fmt, @actor.pdr * 100)
- when :mdr
- value = sprintf(fmt, @actor.mdr * 100)
- when :fdr
- value = sprintf(fmt, @actor.fdr * 100)
- when :exr
- value = sprintf(fmt, @actor.exr * 100)
- when :hcr
- return dy unless $imported["YEA-SkillCostManager"]
- value = sprintf(fmt, @actor.hcr * 100)
- when :tcr_y
- return dy unless $imported["YEA-SkillCostManager"]
- value = sprintf(fmt, @actor.tcr_y * 100)
- when :gcr
- return dy unless $imported["YEA-SkillCostManager"]
- value = sprintf(fmt, @actor.gcr * 100)
- when :cdr
- return dy unless $imported["YEA-SkillRestrictions"]
- value = sprintf(fmt, @actor.cdr * 100)
- when :wur
- return dy unless $imported["YEA-SkillRestrictions"]
- value = sprintf(fmt, @actor.wur * 100)
- #---
- else; return dy
- end
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
- contents.fill_rect(rect, colour)
- change_color(system_color)
- draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
- change_color(normal_color)
- draw_text(dx+4, dy, dw-8, line_height, value, 2)
- return dy + line_height
- end
- else
- #--------------------------------------------------------------------------
- # draw_property
- #--------------------------------------------------------------------------
- def draw_property(property, dx, dy, dw)
- fmt = "%1.2f%%"
- dpb = "%1.0f"
- case property[0]
- #---
- when :mhp
- value = sprintf(dpb, @actor.mhp)
- when :mmp
- value = sprintf(dpb, @actor.mmp)
- when :atk
- value = sprintf(dpb, @actor.atk)
- when :def
- value = sprintf(dpb, @actor.def)
- when :mat
- value = sprintf(dpb, @actor.mat)
- when :mdf
- value = sprintf(dpb, @actor.mdf)
- when :agi
- value = sprintf(dpb, @actor.agi)
- when :luk
- value = sprintf(dpb, @actor.luk)
- when :vit_pts
- value = sprintf(dpb, @actor.vit_pts)
- when :str_pts
- value = sprintf(dpb, @actor.str_pts)
- when :dex_pts
- value = sprintf(dpb, @actor.dex_pts)
- when :mag_pts
- value = sprintf(dpb, @actor.mag_pts)
- when :hit
- value = sprintf(fmt, @actor.hit * 100)
- when :eva
- value = sprintf(fmt, @actor.eva * 100)
- when :cri
- value = sprintf(fmt, @actor.cri * 100)
- when :cev
- value = sprintf(fmt, @actor.cev * 100)
- when :mev
- value = sprintf(fmt, @actor.mev * 100)
- when :mrf
- value = sprintf(fmt, @actor.mrf * 100)
- when :cnt
- value = sprintf(fmt, @actor.cnt * 100)
- when :hrg
- value = sprintf(fmt, @actor.hrg * 100)
- when :mrg
- value = sprintf(fmt, @actor.mrg * 100)
- when :trg
- value = sprintf(fmt, @actor.trg * 100)
- when :tgr
- value = sprintf(fmt, @actor.tgr * 100)
- when :grd
- value = sprintf(fmt, @actor.grd * 100)
- when :rec
- value = sprintf(fmt, @actor.rec * 100)
- when :pha
- value = sprintf(fmt, @actor.pha * 100)
- when :mcr
- value = sprintf(fmt, @actor.mcr * 100)
- when :tcr
- value = sprintf(fmt, @actor.tcr * 100)
- when :pdr
- value = sprintf(fmt, @actor.pdr * 100)
- when :mdr
- value = sprintf(fmt, @actor.mdr * 100)
- when :fdr
- value = sprintf(fmt, @actor.fdr * 100)
- when :exr
- value = sprintf(fmt, @actor.exr * 100)
- when :hcr
- return dy unless $imported["YEA-SkillCostManager"]
- value = sprintf(fmt, @actor.hcr * 100)
- when :tcr_y
- return dy unless $imported["YEA-SkillCostManager"]
- value = sprintf(fmt, @actor.tcr_y * 100)
- when :gcr
- return dy unless $imported["YEA-SkillCostManager"]
- value = sprintf(fmt, @actor.gcr * 100)
- when :cdr
- return dy unless $imported["YEA-SkillRestrictions"]
- value = sprintf(fmt, @actor.cdr * 100)
- when :wur
- return dy unless $imported["YEA-SkillRestrictions"]
- value = sprintf(fmt, @actor.wur * 100)
- #---
- else; return dy
- end
- colour = Color.new(0, 0, 0, translucent_alpha/2)
- rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
- contents.fill_rect(rect, colour)
- change_color(system_color)
- draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
- change_color(normal_color)
- draw_text(dx+4, dy, dw-8, line_height, value, 2)
- return dy + line_height
- end
- end
- #--------------------------------------------------------------------------
- # window width
- #--------------------------------------------------------------------------
- def window_width
- Graphics.width - 0
- end
- #--------------------------------------------------------------------------
- # window height
- #--------------------------------------------------------------------------
- def window_height
- Graphics.height - 0
- end
- end #WindowStatusItem
- #==============================================================================
- # ** Scene_Status
- #------------------------------------------------------------------------------
- # This class performs the status screen processing.
- #==============================================================================
- class Scene_Status < Scene_MenuBase
- #--------------------------------------------------------------------------
- # start
- #--------------------------------------------------------------------------
- def start
- super
- create_status_window
- create_command_window
- create_item_window
- end
- #--------------------------------------------------------------------------
- # create_command_window
- #--------------------------------------------------------------------------
- def create_command_window
- wy = 0
- @command_window = Window_StatusCommand.new(0, wy)
- @command_window.viewport = @viewport
- @command_window.actor = @actor
- @command_window.help_window = @help_window
- @command_window.set_handler(:cancel, method(:return_scene))
- @command_window.set_handler(:pagedown, method(:next_actor))
- @command_window.set_handler(:pageup, method(:prev_actor))
- end
- #--------------------------------------------------------------------------
- # create_status_window
- #--------------------------------------------------------------------------
- def create_status_window
- wy = 0
- end
- #--------------------------------------------------------------------------
- # create_item_window
- #--------------------------------------------------------------------------
- def create_item_window
- dy = 0
- @item_window = Window_StatusItem.new(0, dy, @command_window)
- @item_window.viewport = @viewport
- @item_window.actor = @actor
- @command_window.item_window = @item_window
- end
- #--------------------------------------------------------------------------
- # on_actor_change
- #--------------------------------------------------------------------------
- def on_actor_change
- @command_window.actor = @actor
- @item_window.actor = @actor
- @command_window.activate
- end
- end # Scene_Status
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS_SA #
- # (Perfect Status Screen) #
- # - SCRIPT END - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- # - DekitaRPG@gmail.com - #
- #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement