Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Dekita's=======================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- # v1.3
- # ★ Perfect Status Screen™ ★
- #
- #===============================================================================
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
- #===============================================================================
- #
- # -- Last updated: 21/08/2o12 <-(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.
- #
- # NOTE: PAGEFOUR reffers to the fourth page of information i added, i have set it
- # to display "PAGEFOUR" first, therefor PAGEFOUR = the first page you see on
- # opening the status screen.
- #===============================================================================
- #===============================================================================
- # ☆ 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
- # 27/08/2o12 - Added controlable variable info.
- # 21/08/2o12 - Finished.(v1.2)
- # 14/08/2o12 - Started modification for Dekita - Elements and states distribution.
- # 11/08/2o12 - released Script. (v1.01)
- # - 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:
- #==============================
- # Hmmm....
- #
- #-------------------------------------------------------------------------------
- # 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)
- #
- # Use the script call below to change an actors "Perfect information"
- # change[x] for the information number, actor_id toactors database number
- # and inset your text between the inverted comma's > " "
- pinfo[x](actor_id, " Text goes here ")
- # e.g
- # pinfo1(1, "This is an example")
- # pinfo2(1, "This is an example")
- # pinfo3(1, "This is an example")
- # pinfo4(1, "This is an example")
- # pinfo5(1, "This is an example")
- # use this script call to change an actors perfect variable, use these as you see
- # fit, youcould do all sorts of things with them, e.g set a common event to run on
- # an actors death, and use it as a death counter. whatever you want ^_^
- pvari[x](actor_id, value)
- # e.g
- # pvari1(1, 50)
- # pvari2(1, 50)
- # pvari3(1, 50)
- # pvari4(1, 50)
- #
- #===============================================================================
- =end
- #===============================================================================
- # ☆ Import:
- #===========
- $imported = {} if $imported.nil?
- $imported["DPB-PSS"] = true
- #
- #===============================================================================
- #===============================================================================
- # ☆ Perfect Status Screen Begin:
- #================================
- module DPB
- module PSS
- COMMANDS =[
- [:pagefour, "IIII"],
- [:pageone, "I"],
- [:pagetwo, "II"],
- [:pagethree, "III"],
- ]#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: (Inbound DMG)" # for incomming elemental damage
- ATK_ELE_VOCAB = "(Attack DMG)" # 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 = true # 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: (Inbound hit rate)" # for imcomming status effects
- ATK_STATUS_VOCAB = "(Attack hit rate)" # 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.
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ Main Actor Info
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # You can control from here what info is shown on the main page.
- # You can rearrange these in any order you like :D
- # as well as rename them to anything you want
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- INFO1and2LH = 5.5 # line height for PAGEFOUR_INFO 1 and 2
- PAGEFOUR_INFO1 =[
- [:pname, "Name:"],
- [:pnickname,"Nickname:"],
- [:plvlupexp,"Next Lv Exp:"],
- # [:pvari1, "variable1:"],
- # [:pvari3, "variable3:"],
- ] # Do not remove this.
- PAGEFOUR_INFO2 =[
- [:plevel, "Level:"],
- [:pclass, "Class:"],
- [:pexp, "Total Exp:"],
- # [:pvari2, "variable2:"],
- # [:pvari4, "variable4:"],
- ] # Do not remove this.
- INFO3LH = 8.5 # line height for PAGEFOUR_INFO 3
- PAGEFOUR_INFO3 =[
- [:pinfo1, "Hometown:"],
- [:pinfo2, "Personality:"],
- [:pinfo3, "Favourate Food:"],
- [:pinfo4, "Favourate Quote"],
- [:pinfo5, "Relationship Status:"],
- ] # Do not remove this.
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # 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
- ################################################################################
- class Game_Actor < Game_Battler
- attr_reader :perfectinfo1
- attr_reader :perfectinfo2
- attr_reader :perfectinfo3
- attr_reader :perfectinfo4
- attr_reader :perfectinfo5
- alias change_pinfo initialize
- def initialize(actor_id)
- change_pinfo(actor_id)
- @perfectinfo1 = "pinfo1"
- @perfectinfo2 = "pinfo2"
- @perfectinfo3 = "pinfo3"
- @perfectinfo4 = "pinfo4"
- @perfectinfo5 = "pinfo5"
- end
- def change_pinfo1(text)
- @perfectinfo1 = text
- end
- def change_pinfo2(text)
- @perfectinfo2 = text
- end
- def change_pinfo3(text)
- @perfectinfo3 = text
- end
- def change_pinfo4(text)
- @perfectinfo4 = text
- end
- def change_pinfo5(text)
- @perfectinfo5 = text
- end
- end # Game_Actor
- #========================
- class Game_Interpreter
- #--------
- def pinfo1(actor_id, text)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pinfo1(text)
- end
- def pinfo2(actor_id, text)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pinfo2(text)
- end
- def pinfo3(actor_id, text)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pinfo3(text)
- end
- def pinfo4(actor_id, text)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pinfo4(text)
- end
- def pinfo5(actor_id, text)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pinfo5(text)
- end
- end
- #==============================================================================
- # 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, :pagefour
- 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_page_three(0, 0)
- when :pagefour
- draw_block1(line_height * 1)
- draw_block2(line_height * 1)
- draw_block3(line_height * 7)
- draw_block4(line_height * 14)
- draw_page_four(0, 0)
- else
- end
- end
- #--------------------------------------------------------------------------
- # * Draw Block 1
- #--------------------------------------------------------------------------
- def draw_block1(y)
- draw_actor_face(@actor, (window_width - 24) / 2.5, 0)
- 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)
- end
- #--------------------------------------------------------------------------
- # * Draw Block 3
- #--------------------------------------------------------------------------
- def draw_block3(y)
- draw_equipments((window_width + 24) / 2 * 1, line_height * 6)
- 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::PSPDS::PROPFONTSIZE
- draw_new_stats_column
- draw_points_column
- 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
- draw_atk_elements
- if DPB::PSS::SHOW_ELE_ROW_2
- draw_elements_row2
- draw_atk_elements_row2
- else
- end
- 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_states
- draw_states_row_2
- draw_atk_states
- draw_atk_states_row_2
- draw_horz_line(Graphics.height - line_height * 4)
- reset_font_settings
- end
- #--------------------------------------------------------------------------
- # * Draw Page four
- #--------------------------------------------------------------------------
- def draw_page_four(x, y)
- contents.font.size = DPB::PSPDS::PROPFONTSIZE
- draw_horz_line(line_height * 4)
- draw_pagefour_info1
- draw_pagefour_info2
- draw_pagefour_info3
- draw_horz_line(Graphics.height - line_height * 4)
- reset_font_settings
- end
- def draw_pagefour_info1
- dx = 5
- dw = (window_width - 24) / 4
- dy = line_height * DPB::PSS::INFO1and2LH
- for info in DPB::PSS::PAGEFOUR_INFO1
- dy = draw_info(info, dx, dy, dw)
- end
- end
- def draw_pagefour_info2
- dx = 5 + (window_width - 24) / 4
- dw = (window_width - 24) / 4
- dy = line_height * DPB::PSS::INFO1and2LH
- for info in DPB::PSS::PAGEFOUR_INFO2
- dy = draw_info(info, dx, dy, dw)
- end
- end
- def draw_pagefour_info3
- dx = 5
- dw = (window_width - 24) / 2
- dy = line_height * DPB::PSS::INFO3LH
- for info in DPB::PSS::PAGEFOUR_INFO3
- dy = draw_info(info, dx, dy, dw)
- end
- end
- #--------------------------------------------------------------------------
- # draw_info
- #--------------------------------------------------------------------------
- def draw_info(info, dx, dy, dw)
- case info[0]
- #---
- when :pname
- text = @actor.name
- when :pnickname
- text = @actor.nickname
- when :plevel
- text = @actor.level
- when :pclass
- text = @actor.class.name
- when :pexp
- text = @actor.exp
- when :plvlupexp
- text = @actor.max_level? ? "----" : @actor.next_level_exp - @actor.exp
- when :pinfo1
- text = @actor.perfectinfo1
- when :pinfo2
- text = @actor.perfectinfo2
- when :pinfo3
- text = @actor.perfectinfo3
- when :pinfo4
- text = @actor.perfectinfo4
- when :pinfo5
- text = @actor.perfectinfo5
- #---
- 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, info[1], 0)
- change_color(normal_color)
- draw_text(dx+4, dy, dw-8, line_height, text, 2)
- return dy + line_height
- end
- #--------------------------------------------------------------------------
- # * Draw Parameters
- #--------------------------------------------------------------------------
- def draw_parameters(x, y)
- 6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 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
- draw_text((window_width - 24) / 3 * 0, line_height * 4.6, contents.width, line_height, DPB::PSS::ELEMENT_VOCAB)
- for ele_id in DPB::PSS::ELEMENTS_ROW1
- draw_element_info(ele_id, (window_width - 0) / 4 * 0, 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 - 12) / 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
- draw_text((window_width - 24) / 4 * 2, line_height * 4.6, contents.width, line_height, DPB::PSS::ATK_ELE_VOCAB)
- for ele_id in DPB::PSS::ELEMENTS_ROW1
- draw_atk_element_info(ele_id, (window_width - 12) / 4 * 2, 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 - 8) / 4 * 3, 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) / 4 * 0 , 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) / 4 * 0 , 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) / 4 * 1 , 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) / 4 * 2 + 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 - 12) / 4 * 2 , 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 - 8) / 4 * 3 , 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) / 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
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ELEMENT_VOCAB)
- for ele_id in DPB::PSS::ELEMENTS_ROW1
- draw_element_info(ele_id, (window_width- 24) / 6 * 1, 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
- draw_text((window_width - 24) / 4 * 2, line_height * 4.6, contents.width, line_height, DPB::PSS::ATK_ELE_VOCAB)
- for ele_id in DPB::PSS::ELEMENTS_ROW1
- draw_atk_element_info(ele_id, (window_width - 24) / 6 * 3, 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) / 4 * 0 , 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) / 4 * 0 , 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) / 4 * 1 , 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) / 4 * 2 + 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 - 12) / 4 * 2 , 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 - 8) / 4 * 3 , 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
- 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
- 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
- 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
- $game_temp.actor_level_up.delete_at(0)
- 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(:pageone, method(:command_pageone))
- @command_window.set_handler(:pagetwo, method(:command_pagetwo))
- @command_window.set_handler(:pagethree, method(:command_pagethree))
- 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_pageone
- SceneManager.call(Scene_Level_Up)
- end
- #--------------------------------------------------------------------------
- # new method: command_escdef
- #--------------------------------------------------------------------------
- def command_pagetwo
- unless $imported["DPB-ADDESC"]
- @command_window.activate
- return
- end
- SceneManager.call(Scene_Element_Up)
- end
- #--------------------------------------------------------------------------
- # new method: command_stcdef
- #--------------------------------------------------------------------------
- def command_pagethree
- unless $imported["DPB-ADDSTC"]
- @command_window.activate
- return
- end
- SceneManager.call(Scene_State_Up)
- end
- end # Scene_Status
- #===============================================================================#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- # #
- # PSS #
- # (Perfect Status Screen) #
- # - SCRIPT END - #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- #===============================================================================#
- # - DekitaRPG@gmail.com - #
- #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement