Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- #
- # ☆ $D13x - Status Scene
- # -- Author : Dekita
- # -- Version : 1.1
- # -- Level : Easy / Normal
- # -- Requires : $D13x Core v 1.3+
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Status_Scene]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # 27/o3/2o13 - Added Icons w/Hue,
- # 26/o3/2o13 - Started, Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script simply allows more control over the status screen, as well as
- # shows pretty colors for each equipment item / statistic :p
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ 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.
- # 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/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- # Place Under My $D13x - Core Script.
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # PARAMS : # XPARAMS : # SPARAMS : #
- # stat = id # stat = id # stat = id #
- # mhp = 0 # hit = 0 # tgr = 0 #
- # mmp = 1 # eva = 1 # grd = 1 #
- # atk = 2 # cri = 2 # rec = 2 #
- # def = 3 # cev = 3 # pha = 3 #
- # mat = 4 # mev = 4 # mcr = 4 #
- # mdf = 5 # mrf = 5 # tcr = 5 #
- # agi = 6 # cnt = 6 # pdr = 6 #
- # luk = 7 # hrg = 7 # mdr = 7 #
- # # mrg = 8 # fdr = 8 #
- # # trg = 9 # exr = 9 #
- #-------------------------------------------------------------------------------
- # Also, element id numbers can be found in the database.
- #===============================================================================
- module Status_Scene
- #===============================================================================
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Command Settings
- #--------------------------------------------------------------------------
- # This is where you would adjust how many pages you see.
- # If you wish to display less pages, simply put a # before the line
- Commands=[
- [:page_1, "I"],
- [:page_2, "II"],
- [:page_3, "III"],
- [:page_4, "IV"],
- [:page_5, "V"],
- ] # << Keep
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- # ☆ Page Settings
- #--------------------------------------------------------------------------
- # This is where you adjust what information is shown on each page
- # the options are :
- # [:header, "FOR DISPLAYING TEXT LIKE THIS" ],
- # [:param, param_id, Text_Color, icon, hue],
- # [:x_param, xparam_id, Text_Color, icon, hue],
- # [:s_param, sparam_id, Text_Color, icon, hue],
- # [:atk_ele, element_id, Text_Color, icon, hue],
- # [:def_ele, element_id, Text_Color, icon, hue],
- Values_Colored = true
- Use_Icons = true
- Info={
- :page_1=>[
- [:header, "Parameter Info :", Text_Color::White,0,0],
- [:param, 0, Text_Color::White, 10, 200],
- [:param, 1, Text_Color::White, 10, 0],
- [:param, 2, Text_Color::White, 116, 0],
- [:param, 3, Text_Color::White, 510,280],
- [:param, 4, Text_Color::White, 116,120],
- [:param, 5, Text_Color::White, 13, 120],
- [:param, 6, Text_Color::White, 12, 280],
- [:param, 7, Text_Color::White, 125, 0],
- ],
- :page_2=>[
- [:header, "xParameter Info :", Text_Color::White,0,0],
- [:x_param, 0, Text_Color::White, 11, 0],
- [:x_param, 1, Text_Color::White, 12, 0],
- [:x_param, 2, Text_Color::White, 113, 0],
- [:x_param, 3, Text_Color::White, 114, 0],
- [:x_param, 4, Text_Color::White, 15, 0],
- # [:x_param, 5, Text_Color::White, 14, 0],
- # [:x_param, 6, Text_Color::White,200, 0],
- [:x_param, 7, Text_Color::White, 10,200],
- [:x_param, 8, Text_Color::White, 10, 0],
- [:x_param, 9, Text_Color::White, 14, 0],
- ],
- :page_3=>[
- [:header, "sParameter Info :", Text_Color::White,0,0],
- [:s_param, 0, Text_Color::White, 9, 0],
- [:s_param, 1, Text_Color::White, 139, 0],
- [:s_param, 2, Text_Color::White, 112, 0],
- [:s_param, 3, Text_Color::White, 215,260],
- [:s_param, 4, Text_Color::White, 117, 0],
- [:s_param, 5, Text_Color::White, 119, 0],
- [:s_param, 6, Text_Color::White, 160, 0],
- [:s_param, 7, Text_Color::White, 160,120],
- # [:s_param, 8, Text_Color::White, 25, 0],
- # [:s_param, 9, Text_Color::White, 26, 0],
- ],
- :page_4=>[
- [:header, "Outbound Elemental Damage :", Text_Color::White,0,0],
- [:atk_ele, 3, Text_Color::Deep_Red, 104, 0],
- [:atk_ele, 4, Text_Color::Dark_Blue, 105, 0],
- [:atk_ele, 5, Text_Color::Yellow, 106, 0],
- [:atk_ele, 6, Text_Color::Sky_Blue, 107, 0],
- [:atk_ele, 7, Text_Color::Brown, 108, 0],
- [:atk_ele, 8, Text_Color::Candy_Green, 109, 0],
- [:atk_ele, 9, Text_Color::Pure_White, 110, 0],
- [:atk_ele, 10, Text_Color::Grey, 111, 0],
- ],
- :page_5=>[
- [:header, "Inbound Elemental Damage :", Text_Color::White,0,0],
- [:def_ele, 3, Text_Color::Deep_Red, 104, 0],
- [:def_ele, 4, Text_Color::Dark_Blue, 105, 0],
- [:def_ele, 5, Text_Color::Yellow, 106, 0],
- [:def_ele, 6, Text_Color::Sky_Blue, 107, 0],
- [:def_ele, 7, Text_Color::Brown, 108, 0],
- [:def_ele, 8, Text_Color::Candy_Green, 109, 0],
- [:def_ele, 9, Text_Color::Pure_White, 110, 0],
- [:def_ele, 10, Text_Color::Grey, 111, 0],
- ],
- } # << End Page's Settings
- end #####################
- # CUSTOMISATION END #
- #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- class Window_StatusCommand < Window_Command
- #===============================================================================
- #--------------------------------------------------------------------------
- # Get Window Width
- #--------------------------------------------------------------------------
- def window_width
- return Graphics.width / 4
- end
- #--------------------------------------------------------------------------
- # Get Number of Lines to Show
- #--------------------------------------------------------------------------
- def visible_line_number
- return 2
- end
- #--------------------------------------------------------------------------
- # Set/Get Alignment
- #--------------------------------------------------------------------------
- def alignment
- return 1
- end
- #--------------------------------------------------------------------------
- # Create Command List
- #--------------------------------------------------------------------------
- def make_command_list
- for command in Status_Scene::Commands
- add_command(command[1], command[0])
- end
- end
- #--------------------------------------------------------------------------
- # Draws Items
- #--------------------------------------------------------------------------
- def draw_item(index)
- self.contents.font.name = General::Fonts
- self.contents.font.size = General::Font_Size
- self.contents.font.bold = General::Font_Bold
- draw_text(item_rect_for_text(index), command_name(index), 1)
- end
- end
- #===============================================================================
- class Window_Status < Window_Selectable
- #===============================================================================
- #--------------------------------------------------------------------------
- # Object Initialization
- #--------------------------------------------------------------------------
- def initialize(actor, y)
- super(0, y, Graphics.width, 104)
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # Line Height
- #--------------------------------------------------------------------------
- def line_height
- return 22
- end
- #--------------------------------------------------------------------------
- # Window Padding
- #--------------------------------------------------------------------------
- def standard_padding
- return 8
- end
- #--------------------------------------------------------------------------
- # Do Refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- return unless @actor
- if !General::Fonts.include?(self.contents.font.name)
- self.contents.font.name = General::Fonts
- end
- if self.contents.font.size != General::Font_Size
- self.contents.font.size = General::Font_Size
- end
- if self.contents.font.bold != General::Font_Bold
- self.contents.font.bold = General::Font_Bold
- end
- draw_actor_face(@actor,0,-2,enabled = true)
- draw_names
- draw_de_hp(100, line_height * 1)
- draw_de_mp(100, line_height * 2)
- draw_de_tp(100, line_height * 3)
- draw_de_xp(0, line_height * 3)
- end
- #--------------------------------------------------------------------------
- # Draw Names ( and Lv )
- #--------------------------------------------------------------------------
- def draw_names
- x = self.width/2-(standard_padding)
- y = line_height
- nx = self.width/2 - (standard_padding*2)
- namtxt = "Name: #{@actor.name}"
- draw_text(100, 0, nx, line_height, namtxt)
- nictxt = "Nickname: #{@actor.nickname}"
- draw_text(x, 0, nx, line_height, nictxt)
- sttxt = "Status:"
- draw_text(x, y*1, nx, line_height, sttxt)
- draw_actor_icons(@actor, x+52, line_height * 1 - 2, nx-52)
- lvtxt = "Lv #{@actor.level} #{@actor.class.name}"
- draw_text(x, y*2, nx, line_height, lvtxt)
- end
- end
- #===============================================================================
- class Window_Status_II < Window_Selectable
- #===============================================================================
- #--------------------------------------------------------------------------
- # * Object Initialization
- #--------------------------------------------------------------------------
- def initialize(actor, y)
- super(0, y, Graphics.width, Graphics.height-y)
- @page = nil
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # Set Actor
- #--------------------------------------------------------------------------
- def actor=(actor)
- return if @actor == actor
- @actor = actor
- refresh
- end
- #--------------------------------------------------------------------------
- # Set Page
- #--------------------------------------------------------------------------
- def page=(page)
- return if @page == page
- @page = page
- refresh
- end
- #--------------------------------------------------------------------------
- # Refresh
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- freshen
- draw_status_inf if @page
- end
- #--------------------------------------------------------------------------
- # Draw Status Page Info
- #--------------------------------------------------------------------------
- def draw_status_inf
- draw_equipments(4, 0)
- x = self.width/2 - (standard_padding)
- y = 0
- for info in Status_Scene::Info[@page]
- case info[0]
- when :header then y = draw_header(x,y,info[1],info[2],info[3],info[4])
- when :param then y = draw_parameters(x,y,info[1],info[2],info[3],info[4])
- when :x_param then y = draw_xparameters(x,y,info[1],info[2],info[3],info[4])
- when :s_param then y = draw_sparameters(x,y,info[1],info[2],info[3],info[4])
- when :atk_ele
- next unless $D13x[:Elems_Control]
- y = draw_atk_eles(x,y,info[1],info[2],info[3],info[4])
- when :def_ele
- next unless $D13x[:Elems_Control]
- y = draw_def_eles(x,y,info[1],info[2],info[3],info[4])
- end
- end
- end
- #--------------------------------------------------------------------------
- # Refresh Fonts
- #--------------------------------------------------------------------------
- def freshen
- if !General::Fonts.include?(self.contents.font.name)
- self.contents.font.name = General::Fonts
- end
- if self.contents.font.size != General::Font_Size
- self.contents.font.size = General::Font_Size
- end
- if self.contents.font.bold != General::Font_Bold
- self.contents.font.bold = General::Font_Bold
- end
- end
- def draw_stat_icons(icon, x, y, hue, enabled = true)
- return x unless Status_Scene::Use_Icons
- return x unless icon != 0
- draw_de_icon(icon, x, y, hue, enabled)
- return x += 26
- end
- #--------------------------------------------------------------------------
- # Draw Parameters
- #--------------------------------------------------------------------------
- def draw_parameters(x,y,i,col,icon,hue)
- x = draw_stat_icons(icon, x, y, hue, all_icons_enable?)
- text = "#{Vocab::param(i)}"
- change_color(col)
- draw_text(x, y, wid, line_height, text)
- change_color(Text_Color::White) unless Status_Scene::Values_Colored
- val = sprintf("%s", @actor.param(i))
- draw_text(x+110, y, wid, line_height, val)
- return y += line_height
- end
- #--------------------------------------------------------------------------
- # Draw Header
- #--------------------------------------------------------------------------
- def draw_header(x,y,i,col,icon,hue)
- x = draw_stat_icons(icon, x, y, hue, all_icons_enable?)
- change_color(col)
- draw_text(x, y, wid, line_height, i.to_s)
- return y += line_height
- end
- #--------------------------------------------------------------------------
- # Draw x Parameters
- #--------------------------------------------------------------------------
- def draw_xparameters(x,y,i,col,icon,hue)
- x = draw_stat_icons(icon, x, y, hue, all_icons_enable?)
- text = "#{Vocab::x_param(i)}"
- change_color(col)
- draw_text(x, y, wid, line_height, text)
- change_color(Text_Color::White) unless Status_Scene::Values_Colored
- val = sprintf("%1.2f%%", @actor.xparam(i)*100)
- draw_text(x+110, y, wid, line_height, val)
- return y += line_height
- end
- #--------------------------------------------------------------------------
- # Draw sParameters
- #--------------------------------------------------------------------------
- def draw_sparameters(x,y,i,col,icon,hue)
- x = draw_stat_icons(icon, x, y, hue, all_icons_enable?)
- text = "#{Vocab::s_param(i)}"
- change_color(col)
- draw_text(x, y, wid, line_height, text)
- val = sprintf("%1.2f%%", @actor.sparam(i)*100)
- change_color(Text_Color::White) unless Status_Scene::Values_Colored
- draw_text(x+110, y, wid, line_height, val)
- return y += line_height
- end
- #--------------------------------------------------------------------------
- # Draw Attack Elements
- #--------------------------------------------------------------------------
- def draw_atk_eles(x,y,i,col,icon,hue)
- x = draw_stat_icons(icon, x, y, hue, all_icons_enable?)
- text = "#{$data_system.elements[i]}"
- change_color(col)
- draw_text(x, y, wid, line_height, text)
- val = sprintf("%1.2f%%", @actor.atk_element_rate(i)*100)
- change_color(Text_Color::White) unless Status_Scene::Values_Colored
- draw_text(x+110, y, wid, line_height, val)
- return y += line_height
- end
- #--------------------------------------------------------------------------
- # Draw Defence Elements
- #--------------------------------------------------------------------------
- def draw_def_eles(x,y,i,col,icon,hue)
- x = draw_stat_icons(icon, x, y, hue,all_icons_enable?)
- text = "#{$data_system.elements[i]}"
- change_color(col)
- draw_text(x, y, wid, line_height, text)
- val = sprintf("%1.2f%%", @actor.element_rate(i)*100)
- change_color(Text_Color::White) unless Status_Scene::Values_Colored
- draw_text(x+110, y, wid, line_height, val)
- return y += line_height
- end
- #--------------------------------------------------------------------------
- # Define wid
- #--------------------------------------------------------------------------
- def wid
- self.width/2-(standard_padding)
- end
- #--------------------------------------------------------------------------
- # Draw Equipment
- #--------------------------------------------------------------------------
- def draw_equipments(x, y)
- @actor.equips.each_with_index do |item, i|
- change_color(Text_Color::White)
- text = "#{Vocab::etype(@actor.equip_slots[i])}"
- draw_text(x, y + (line_height * i), wid, line_height, text)
- change_color(item.item_disp_color)
- draw_de_icon(item.icon_index,x+56,y+(line_height*i),0,true)
- draw_text(x+80, y + (line_height * i), wid, line_height, item.name)
- end
- end
- def all_icons_enable?
- return true
- end
- end
- #===============================================================================
- class Scene_Status < Scene_MenuBase
- #===============================================================================
- #--------------------------------------------------------------------------
- # Start Processing
- #--------------------------------------------------------------------------
- def start
- super
- create_help_window
- create_command_window
- create_status_window
- update_windows
- end
- #--------------------------------------------------------------------------
- # Create Halp Window
- #--------------------------------------------------------------------------
- def create_help_window
- @help_window = Deki_Help.new
- @help_window.viewport = @viewport
- @help_window.x = Graphics.width / 4
- end
- #--------------------------------------------------------------------------
- # Create Status Window
- #--------------------------------------------------------------------------
- def create_status_window
- y = @help_window.height
- @status_window = Window_Status.new(@actor, y)
- y = @status_window.y + @status_window.height
- @status_window_II = Window_Status_II.new(@actor, y)
- end
- #--------------------------------------------------------------------------
- # Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_StatusCommand.new(0,0)
- @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.activate
- end
- #--------------------------------------------------------------------------
- # Change Actors
- #--------------------------------------------------------------------------
- def on_actor_change
- @status_window.actor = @actor
- @status_window_II.actor = @actor
- @command_window.activate
- end
- #--------------------------------------------------------------------------
- # Update
- #--------------------------------------------------------------------------
- def update
- super
- update_windows
- end
- #--------------------------------------------------------------------------
- # Update windows
- #--------------------------------------------------------------------------
- def update_windows
- @status_window_II.page = @command_window.current_symbol
- @help_window.set_text(@actor.description) if @actor
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement