Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Dekita's=======================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- # v1.1
- # ★ Perfect Status Screen ★
- #
- #===============================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- #
- # -- Last updated: 11/08/2012 <-(D/M/Y)
- #
- # -- Difficulty: Plug'n'play - (Easy)
- #
- # -- Customisation: Like a pimped out ride! - (Very Low)
- #
- # -- Requires: Dekita's - Perfect Stat Point Distribution System v1.1+
- #
- # -- 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 necessary information regarding an actors stats,
- # parameters, "Vitality", "Strength", "Dexterity" and "Magic".
- # Also displays 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.01)
- # 11/08/2o12 - 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 "Major" 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.
- # Place this script UNDER "Dekita - Perfect Stat Point Distribution System".
- #
- #===============================================================================
- =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"] = true
- #
- #===============================================================================
- #===============================================================================
- # ☆ Perfect Status Screen Begin:
- #================================
- module DPB
- module PSS
- COMMANDS =[
- [:pageone, "I"],
- [:pagetwo, "II"],
- [:pagethree, "III"],
- # [:pspds, "PSPDS"] < for future updates
- ]#DO NOT REMOVE
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS #
- # (Perfect Status Screen) #
- # - CUSTOMISATION BEGIN - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- #===============================================================================
- # ☆ Customisation = Tah-Dah
- #===========================
- # I have added as much customisation as i thought was needed.
- # Which wasnt very much as most of the data e.g font sizes and param column data
- # is taken from the PSPDS Customisation module.
- #
- # 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..19] # States shown. Maximum of 8 can be shown.
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS #
- # (Perfect Status Screen) #
- # - CUSTOMISATION END - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- # - DekitaRPG@gmail.com - #
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS #
- # (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.\..\.. #
- #===============================================================================#
- #==============================================================================#
- # Error Message
- #==============================================================================#
- unless $imported["DPB-PSPDS"]
- msg = "The script ''%s'' requires ''Dekita - Perfect Stat Point Distribution System'' in order to function properly. It must also be placed below it!"
- script = "Dekita - Perfect Status Screen"
- msgbox(sprintf(msg, script))
- exit
- end
- 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
- end #DPB
- #==============================================================================
- # Icon
- #==============================================================================
- module Icon
- #--------------------------------------------------------------------------
- # self.element
- #--------------------------------------------------------------------------
- def self.element(id)
- return 0 unless DPB::PSS::ELEMENT_ICONS_ROW1.include?(id)
- return DPB::PSS::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::COMMANDS
- case command[0]
- #--- Default ---
- when :pageone, :pagetwo, :pagethree, :pspds
- 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 = 22
- draw_actor_name(@actor,(window_width + 24) / 2, line_height * 0)
- contents.font.size = DPB::PSPDS::FONTSIZE
- draw_actor_class(@actor, (window_width + 24) / 2, line_height * 1.6)
- if DPB::PSPDS::DRAW_ACTOR_GRAPHIC
- draw_actor_graphic(@actor, DPB::PSPDS::DAG_X, DPB::PSPDS::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_level(@actor, (window_width + 24) / 2, line_height * 0.8)
- if DPB::PSPDS::EXIT_BEFORE_POINTS_SPENT
- draw_level_up_points(x+20, 0)
- else
- end
- draw_actor_icons(@actor, (window_width - 24) / 2.5, y + line_height * 3)
- contents.font.size = DPB::PSPDS::PROPFONTSIZE
- draw_new_stats_column
- if $imported["YEA-JPManager"]
- contents.font.size = DPB::PSPDS::PARAMFONTSIZE
- draw_actor_jp(@actor, (window_width + 24) / 3, line_height * 3.33)
- contents.font.size = DPB::PSPDS::PROPFONTSIZE
- else
- end
- end
- def draw_level_up_points(x,y)
- contents.font.size = DPB::PSPDS::FONTSIZE + 4
- draw_text((window_width - 24) / 4, 4 + line_height * 0,180,line_height,DPB::PSPDS::LVLUPPTSVOCAB + @actor.level_up_pts.to_s)
- end
- #--------------------------------------------------------------------------
- # * Draw Page One
- #--------------------------------------------------------------------------
- def draw_page_one(x, y)
- contents.font.size = DPB::PSPDS::FONTSIZE
- if DPB::PSPDS::DRAW_PARAM_GAUGES
- draw_parameter_graph
- if DPB::PSPDS::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::PSPDS::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_horz_line(Graphics.height - line_height * 4)
- draw_properties_column1
- draw_properties_column2
- if DPB::PSPDS::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::PSPDS::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_elements
- if DPB::PSS::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::PSPDS::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_atk_elements
- if DPB::PSS::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::PSPDS::FONTSIZE
- 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::SHOW_ELE_ROW_2
- #--------------------------------------------------------------------------
- # draw_elements
- #--------------------------------------------------------------------------
- def draw_elements
- dx = 0; dy = 130
- contents.font.size = DPB::PSPDS::FONTSIZE
- for ele_id in DPB::PSS::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::PSPDS::FONTSIZE
- for ele_id in DPB::PSS::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::PSPDS::FONTSIZE
- for ele_id in DPB::PSS::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::PSPDS::FONTSIZE
- for ele_id in DPB::PSS::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::PSPDS::FONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ELEMENT_VOCAB)
- draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::STATUS_VOCAB)
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ATK_ELE_VOCAB)
- draw_text((window_width - 24) / 4 * 2 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ATK_STATUS_VOCAB)
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- for ele_id in DPB::PSS::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::PSPDS::FONTSIZE
- for ele_id in DPB::PSS::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::PSPDS::FONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ELEMENT_VOCAB)
- draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS::STATUS_VOCAB)
- contents.font.size = 16
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ATK_ELE_VOCAB)
- draw_text((window_width - 24) / 3 * 1 + 8, line_height * 4.6, contents.width, line_height, DPB::PSS::ATK_STATUS_VOCAB)
- contents.font.size = 16
- for state_id in DPB::PSS::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::PSPDS::FONTSIZE
- for state_id in DPB::PSS::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
- #--------------------------------------------------------------------------
- # 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))
- @command_window.set_handler(:pspds, method(:command_pspds))
- 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
- #--------------------------------------------------------------------------
- # new method: command_pspds
- #--------------------------------------------------------------------------
- def command_pspds
- SceneManager.call(Scene_Level_Up)
- end
- end # Scene_Status
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS #
- # (Perfect Status Screen) #
- # - SCRIPT END - #
- # #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- # - DekitaRPG@gmail.com - #
- #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement