Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Status Scene
- # -- Author : Dekita
- # -- Version : 1.5
- # -- 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
- # 28/o3/2o14 - Small update,
- # 2o/o5/2o13 - Compatability, ($D13x Atk & Def Lvs)
- # o5/o5/2o13 - Compatibility, (Equip Sets)
- # 27/o3/2o13 - Added Icons w/Hue,
- # - Bugfix, (crash when no equip)
- # 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_sD13x
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Command Settings
- #-----------------------------------------------------------------------------
- Commands=[
- [:equip, "Equip"],
- [:distr, "Distribute"],
- [:skill, "Skills"],
- [:sklup, "Skill Tree"],
- ]
- #-----------------------------------------------------------------------------
- # Begin Info Hash.
- #-----------------------------------------------------------------------------
- # [:header, "FOR DISPLAYING TEXT LIKE THIS" , icon, hue],
- # [:param, param_id],
- # [:x_param, xparam_id],
- # [:s_param, sparam_id],
- # [:atk_ele, element_id],
- # [:def_ele, element_id],
- # [:atk_lev],
- # [:def_lev],
- # [:tp_info],
- # [:spds_stat, 0],
- #-----------------------------------------------------------------------------
- Info={
- 0=>[
- [:param, 0],
- [:param, 1],
- [:tp_info],
- [:spds_stat, 0],
- [:spds_stat, 1],
- [:spds_stat, 2],
- [:spds_stat, 3],
- [:x_param, 7],
- [:x_param, 8],
- [:atk_lev],
- [:def_lev],
- ],
- 1=>[
- [:atk_lev],
- [:def_lev],
- [:param, 2],
- [:param, 3],
- [:s_param, 6],
- [:param, 4],
- [:param, 5],
- [:s_param, 7],
- [:s_param, 1],
- ],
- 2=>[
- [:x_param, 0],
- [:x_param, 2],
- [:x_param, 1],
- [:x_param, 3],
- [:x_param, 4],
- [:x_param, 5],
- [:x_param, 6],
- [:s_param, 2],
- [:s_param, 3],
- ],
- 3=>[
- [:atk_ele, 1],
- [:atk_ele, 3],
- [:atk_ele, 4],
- [:atk_ele, 5],
- [:atk_ele, 6],
- [:atk_ele, 7],
- [:atk_ele, 8],
- [:atk_ele, 9],
- [:atk_ele, 10],
- ],
- 4=>[
- [:def_ele, 1],
- [:def_ele, 3],
- [:def_ele, 4],
- [:def_ele, 5],
- [:def_ele, 6],
- [:def_ele, 7],
- [:def_ele, 8],
- [:def_ele, 9],
- [:def_ele, 10],
- ],
- 5=>[
- [:header, "Extra Stats", Text_Color::White,0,0,1],
- ],
- } # << End Page's Settings
- #-----------------------------------------------------------------------------
- # Max Pages To Show, Never Have Below 1.
- #-----------------------------------------------------------------------------
- Max_Pages = 5
- 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
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def initialize
- super(0,0)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def window_width
- return Graphics.width/4
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def visible_line_number
- return 2
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_command_list
- Status_sD13x::Commands.each do |command|
- case command[0]
- when :distr then next unless $D13x[:ISPDS]
- when :sklup then next unless $D13x[:SUG]
- end
- add_command(command[1], command[0])
- end
- end
- #-----------------------------------------------------------------------------
- # Set Windowskin (overwrite from super)
- #-----------------------------------------------------------------------------
- def set_the_skin
- @skin = WindowSkins::Skins[:status_command]
- end
- end
- #===============================================================================
- class Window_StatusStatus < Window_StatusDekita
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Set Windowskin (overwrite from super)
- #-----------------------------------------------------------------------------
- def set_the_skin
- @skin = WindowSkins::Skins[:window_status]
- end
- end
- #===============================================================================
- class Window_StatusStatusMain < Dekita_Core_Status
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Initialization
- #-----------------------------------------------------------------------------
- def initialize(actor,y)
- x = Graphics.width/2
- w = Graphics.width/2
- h = Graphics.height-y
- super(x, y, w, h, actor)
- self.opacity = 255
- end
- #-----------------------------------------------------------------------------
- # Get Setup Info
- #-----------------------------------------------------------------------------
- def setup_info
- return Status_sD13x::Info[@page]
- end
- #-----------------------------------------------------------------------------
- # Set Windowskin (overwrite from super)
- #-----------------------------------------------------------------------------
- def set_the_skin
- @skin = WindowSkins::Skins[:window_status_II]
- end
- end
- #===============================================================================
- class Window_StatusEquipSlot < Window_EquipSlot
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Draw Box
- #-----------------------------------------------------------------------------
- def draw_box(x,y,w)
- contents.fill_rect(x,y+1,w,line_height-2,General::Box_Color)
- end
- #--------------------------------------------------------------------------
- # * Draw Item
- #--------------------------------------------------------------------------
- def draw_item(index)
- return unless @actor
- rect = item_rect_for_text(index)
- item = @actor.equips[index]
- draw_box(rect.x-2,rect.y,42)
- draw_box(rect.x+42,rect.y,rect.width-40)
- change_color(Text_Color::White, enable?(index))
- draw_text(rect.x+2, rect.y, 92, line_height, slot_name(index) + ':')
- draw_item_name(item, rect.x + 44, rect.y, enable?(index))
- draw_item_number(rect, item)
- end
- #--------------------------------------------------------------------------
- # * Draw Item Name
- # enabled : Enabled flag. When false, draw semi-transparently.
- #--------------------------------------------------------------------------
- def draw_item_name(item, x, y, enabled = true, width = 172)
- return unless item
- change_color(item.item_disp_color, enabled)
- draw_de_icon(item.icon_index, x, y, item.icon_hue, enabled)
- draw_text(x + 26, y, width, line_height, item.name)
- end
- #--------------------------------------------------------------------------
- # * Draw Number of Items
- #--------------------------------------------------------------------------
- def draw_item_number(rect, item)
- return unless item
- if $D13x[:Equip_Levels]
- level = Equip_Exp::Level_Names[item.level]
- draw_text(rect, sprintf("%s", level), 2)
- end
- end
- #-----------------------------------------------------------------------------
- # Set Windowskin (overwrite from super)
- #-----------------------------------------------------------------------------
- def set_the_skin
- @skin = WindowSkins::Skins[:window_status_II]
- end
- end
- #===============================================================================
- class Window_StatusBlank < Window_Selectable
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def initialize(y)
- super(0, y, Graphics.width/2, Graphics.height-y)
- refresh
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def refresh
- contents.clear
- end
- #-----------------------------------------------------------------------------
- # Set Windowskin (overwrite from super)
- #-----------------------------------------------------------------------------
- def set_the_skin
- @skin = WindowSkins::Skins[:window_status_II]
- end
- end
- #===============================================================================
- class Scene_Status < Scene_MenuBase
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def start
- super
- make_command_window
- make_help_window
- make_status_window
- make_equip_window
- make_main_window
- make_extra_window
- update_help
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_command_window
- @command_window = Window_StatusCommand.new
- @command_window.viewport = @viewport
- @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(:equip, method(:goto_equip))
- @command_window.set_handler(:skill, method(:goto_skill))
- @command_window.set_handler(:distr, method(:goto_distr))
- @command_window.set_handler(:sklup, method(:goto_sklup))
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_help_window
- @help_window = Deki_Help.new
- @help_window.viewport = @viewport
- @help_window.x = Graphics.width / 4
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_status_window
- y = @help_window.height
- @status_window = Window_StatusStatus.new(@actor,y)
- @status_window.viewport = @viewport
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_equip_window
- wy = @status_window.y + @status_window.height
- ww = Graphics.width / 2
- @slot_window = Window_StatusEquipSlot.new(0, wy, ww)
- @slot_window.viewport = @viewport
- @slot_window.actor = @actor
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_main_window
- y = @status_window.y + @status_window.height
- @main_window = Window_StatusStatusMain.new(@actor,y)
- @main_window.viewport = @viewport
- @main_window.page = 0
- @old_main_page = 0
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def make_extra_window
- y = @slot_window.y + @slot_window.height
- @extra_window = Window_StatusBlank.new(y)
- @extra_window.viewport = @viewport
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def goto_equip
- SceneManager.call(Scene_Equip)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def goto_skill
- SceneManager.call(Scene_Skill)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def goto_distr
- SceneManager.call(Scene_SPDS)
- SceneManager.scene.prepare(@actor)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def goto_sklup
- SceneManager.call(SUG_Scene)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def on_actor_change
- @status_window.actor = @actor
- @slot_window.actor = @actor
- @main_window.actor = @actor
- @command_window.activate
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def update
- super
- update_pages
- update_help
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def update_pages
- lift = Keys.trigger?(:LSHIFT)
- rift = Keys.trigger?(:RSHIFT)
- return unless lift || rift
- return if lift && rift
- if lift
- @old_main_page -= 1
- if @old_main_page < 0
- @old_main_page = Status_sD13x::Max_Pages
- end
- end
- if rift
- @old_main_page += 1
- if @old_main_page > Status_sD13x::Max_Pages
- @old_main_page = 0
- end
- end
- @main_window.page = @old_main_page
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def update_help
- return unless @actor
- @help_window.set_text(@actor.description)
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement