Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin =========================================================================
- Dekita's v1.4
- ★ Perfect Status Screen™ ★
- ===============================================================================
- ☆ 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.
- NOTE: THIS SCRIPT REQUIRES "Dekita's - Perfect Stat Point Distribution System"
- ================================================================================
- ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- ================================================================================
- 1. You must give credit to "Dekita"
- 2. You are NOT allowed to repost this script.(or modified versions)
- 3. You are NOT allowed to convert this script.(into other game engines e.g RGSS2)
- 4. You are NOT allowed to use this script for Commercial games.
- 5. ENJOY!
- "FINE PRINT"
- By using this script you hereby agree to the above terms and conditions,
- if any violation of the above terms occurs "legal action" may be taken.
- Not understanding the above terms and conditions does NOT mean that
- they do not apply to you.
- If you wish to discuss the terms and conditions in further detail you can
- contact me at http://dekitarpg.wordpress.com/ or DekitaRPG@gmail.com
- ===============================================================================
- ☆ History:
- ============
- D - M - Y
- 20/09/2o12 - Updated script,(v1.4)
- Optimized coding,
- fixed pvari script calls,
- 27/08/2o12 - Added controlable variable info.v1.3
- 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.
- ================================================================================
- ☆ INSTRUCTIONS:
- =================
- Place this script UNDER "▼ Materials" and ABOVE "▼ Main" in your script editor.
- Place this script UNDER "Dekita - Perfect Stat Point Distribution System".
- ===============================================================================
- ☆ 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 to actors 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
- $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 #######################
- # CUSTOMISATION BEGIN #
- #######################
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # ☆ 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 = 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: (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. #####################
- # CUSTOMISATION END #
- #####################
- #===============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #===============================================================================#
- # 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.\..\.. #
- #===============================================================================#
- # - SCRIPT BEGIN - #
- #===============================================================================#
- 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
- 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
- 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
- #==============================================================================
- module Icon
- #==============================================================================
- def self.element(id)
- return 0 unless DPB::PSS::ELEMENT_ICONS_ROW1.include?(id)
- return DPB::PSS::ELEMENT_ICONS_ROW1[id]
- end
- end # Icon
- #==============================================================================
- class Game_BattlerBase
- #==============================================================================
- 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
- attr_reader :perfectvari1
- attr_reader :perfectvari2
- attr_reader :perfectvari3
- attr_reader :perfectvari4
- alias change_pinfo initialize
- def initialize(actor_id)
- change_pinfo(actor_id)
- @perfectinfo1 = "pinfo1"
- @perfectinfo2 = "pinfo2"
- @perfectinfo3 = "pinfo3"
- @perfectinfo4 = "pinfo4"
- @perfectinfo5 = "pinfo5"
- @perfectvari1 = 0
- @perfectvari2 = 0
- @perfectvari3 = 0
- @perfectvari4 = 0
- 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
- def change_pvari1(value)
- @perfectvari1 = value
- end
- def change_pvari2(value)
- @perfectvari2 = value
- end
- def change_pvari3(value)
- @perfectvari3 = value
- end
- def change_pvari4(value)
- @perfectvari4 = value
- 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
- def pvari1(actor_id, value)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pvari1(value)
- end
- def pvari2(actor_id, value)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pvari2(value)
- end
- def pvari3(actor_id, value)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pvari3(value)
- end
- def pvari4(actor_id, value)
- actor = $game_actors[actor_id]
- return if actor == nil
- actor.change_pvari4(value)
- end
- end # class Game_Inperpreter
- #==============================================================================
- class Game_Temp
- #==============================================================================
- attr_accessor :scene_status_index
- attr_accessor :scene_status_oy
- end # Game_Temp
- #==============================================================================
- class Window_StatusCommand < Window_Command
- #==============================================================================
- attr_accessor :item_window
- def initialize(dx, dy)
- super(dx, dy)
- @actor = nil
- self.opacity = 0
- end
- def window_width; return 0; end
- def actor=(actor)
- return if @actor == actor
- @actor = actor
- refresh
- end
- def visible_line_number; return 4; end
- def ok_enabled?
- return handle?(current_symbol)
- end
- def make_command_list
- return unless @actor
- for command in DPB::PSS::COMMANDS
- case command[0]
- 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
- def process_ok
- $game_temp.scene_status_index = index
- $game_temp.scene_status_oy = self.oy
- super
- end
- def update
- super
- update_item_window
- end
- def update_item_window
- return if @item_window.nil?
- return if @current_index == current_symbol
- @current_index = current_symbol
- @item_window.refresh
- end
- def item_window=(window)
- @item_window = window
- update
- end
- def update_help
- return if @actor.nil?
- @help_window.set_text(@actor.actor.description)
- end
- end # Window_StatusCommand
- #==============================================================================
- class Window_StatusItem < Window_Base
- #==============================================================================
- def initialize(dx, dy, command_window)
- super(dx, dy, Graphics.width, Graphics.height - dy)
- @command_window = command_window
- @actor = nil
- refresh
- end
- def actor=(actor)
- return if @actor == actor
- @actor = actor
- refresh
- end
- def refresh
- contents.clear
- reset_font_settings
- return unless @actor
- draw_window_contents
- end
- 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
- 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
- def draw_block2(y)
- draw_basic_info(136, y)
- end
- def draw_block3(y)
- draw_equipments((window_width + 24) / 2 * 1, line_height * 6)
- end
- def draw_block4(y)
- draw_description(4, y)
- end
- def draw_horz_line(y)
- line_y = y + line_height / 2 - 1
- contents.fill_rect(0, line_y, contents_width, 2, line_color)
- end
- def line_color
- color = normal_color
- color.alpha = 48
- color
- end
- 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
- 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
- end
- reset_font_settings
- end
- 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
- end
- draw_horz_line(Graphics.height - line_height * 4)
- reset_font_settings
- end
- 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
- 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
- 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
- when :pvari1
- text = @actor.perfectvari1
- when :pvari2
- text = @actor.perfectvari2
- when :pvari3
- text = @actor.perfectvari3
- when :pvari4
- text = @actor.perfectvari4
- 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
- def draw_parameters(x, y)
- 6.times {|i| draw_actor_param(@actor, x, y + line_height * i, i + 2) }
- end
- def draw_equipments(x, y)
- @actor.equips.each_with_index do |item, i|
- draw_item_name(item, x, y + line_height * i)
- end
- end
- def draw_description(x, y)
- draw_text_ex(x, y, @actor.description)
- end
- def draw_elements
- dx = 0
- dy = 130
- contents.font.size = DPB::PSPDS::FONTSIZE
- if DPB::PSS::SHOW_ELE_ROW_2
- draw_text((window_width - 24) / 3 * 0, line_height * 4.6, contents.width, line_height, DPB::PSS::ELEMENT_VOCAB)
- else
- draw_text((window_width - 24) / 3 * 0 + 12, line_height * 4.6, contents.width, line_height, DPB::PSS::ELEMENT_VOCAB)
- end
- for ele_id in DPB::PSS::ELEMENTS_ROW1
- if DPB::PSS::SHOW_ELE_ROW_2
- draw_element_info(ele_id, (window_width - 0) / 4 * 0, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- else
- draw_element_info(ele_id, (window_width- 24) / 6 * 1, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- end
- dy += dx == 0 ? line_height : 0
- end
- end
- 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
- 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
- if DPB::PSS::SHOW_ELE_ROW_2
- draw_atk_element_info(ele_id, (window_width - 12) / 4 * 2, dy)
- dx = dx == 1 ? contents.width / 4 : 0
- else
- draw_atk_element_info(ele_id, (window_width - 24) / 6 * 3, dy)
- dx = dx == 1 ? contents.width / 3 : 0
- end
- dy += dx == 0 ? line_height : 0
- end
- end
- 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
- 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
- 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
- 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
- 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
- def draw_element_info(ele_id, dx, dy)
- if DPB::PSS::SHOW_ELE_ROW_2
- dw = (contents.width - 24) / 4.2
- else
- dw = (contents.width - 24) / 3
- 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)
- 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
- def draw_atk_element_info(ele_id, dx, dy)
- if DPB::PSS::SHOW_ELE_ROW_2
- dw = (contents.width - 24) / 4.2
- else
- dw = (contents.width - 24) / 3
- 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)
- 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
- 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
- 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
- def window_width
- Graphics.width - 0
- end
- def window_height
- Graphics.height - 0
- end
- end #WindowStatusItem
- #==============================================================================
- class Scene_Status < Scene_MenuBase
- #==============================================================================
- def start
- super
- create_status_window
- create_command_window
- create_item_window
- end
- 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))
- @command_window.set_handler(:pagefour, method(:command_pagefour))
- end
- def create_status_window
- wy = 0
- end
- 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
- def on_actor_change
- @command_window.actor = @actor
- @item_window.actor = @actor
- @command_window.activate
- end
- def command_pageone
- SceneManager.call(Scene_Level_Up)
- end
- def command_pagetwo
- unless $imported["DPB-ADDESC"]
- @command_window.activate
- return
- end
- SceneManager.call(Scene_Element_Up)
- end
- def command_pagethree
- unless $imported["DPB-ADDSTC"]
- @command_window.activate
- return
- end
- SceneManager.call(Scene_State_Up)
- end
- def command_pagefour
- SceneManager.call(Scene_Equip)
- end
- end # Scene_Status
- #===============================================================================#
- # - SCRIPT END - #
- #===============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #===============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement