Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================#
- # ■■■■■■■■■■■■■■■■■■■■■■■■■■■■ EXTRA MENU WINDOW ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ #
- # ---=== Version: 1.1 ===--- #
- #==============================================================================#
- # Script written by: Rikifive #
- #==============================================================================#
- # ▼ INTRODUCTION ▼ #
- #==============================================================================#
- # This script creates a simple window with custom information in main menu. #
- # Variations, playtime, location etc. can now be displayed in menu. #
- #==============================================================================#
- # ▼ COMPATIBILITY ▼ #
- #==============================================================================#
- # this script is written in the most simplest possible way, but it may #
- # be incompatible with scripts that changes your menu. #
- #==============================================================================#
- # ▼ TERMS OF USE ▼ #
- #==============================================================================#
- # ---=== For both COMMERCIAL and NON-COMMERCIAL projects. ===--- #
- # Crediting me (Rikifive) in your game would be appreciated. #
- #==============================================================================#
- # ▼ VERSION HISTORY ▼ #
- #==============================================================================#
- # Version 1.0: Initial Release #
- # Version 1.1: - Changed refresh rate of playtime. (thanks to DigiDeity) #
- #==============================================================================#
- # ▼ INSTRUCTIONS ▼ #
- #==============================================================================#
- # I know this script is kinda messy, but it's pretty easy to configure. #
- # The options ale all over the place, but they are labeled with info. #
- # Simply follow these options and set them to your needs. #
- # #
- # Configuring things displayed in window starts in line #84. #
- # Each thing starts with "[ ● Item Setup ]" and ends with second wall of "###" #
- # To configure things simply follow the examples. #
- # Do not edit anything between walls of "##############", unless you know what #
- # you're doing. #
- # You can add as many lines as you want. (the screen resolution is the border) #
- # To add a new line (thing), copy everything from "[ ● Item Setup ]" to #
- # second wall of "###" and paste that below the other things. #
- # You can put text into value or a value into text or you can even put two #
- # texts in the one thing, that doesn't matter. #
- # You can use things like "$game_party.gold" or use a variable. #
- # To add variable into the window put $game_variables[ID] in the text/value. #
- #==============================================================================#
- #-------------------------------------------------------------------------------
- # ► Main Settings
- #-------------------------------------------------------------------------------
- # ● Set amount of items displayed in the window.
- WINDOW_LINES = 4
- # ● Set the window position.
- WINDOW_POSITION_X = 0
- WINDOW_POSITION_Y = 304
- #-------------------------------------------------------------------------------
- # ► Initialize
- #-------------------------------------------------------------------------------
- class Window_ExtraInfo < Window_Base
- def initialize(x, y)
- super(x, y, 160, 32 * WINDOW_LINES)
- # ● You can set the font settings here:
- self.contents.font.bold = true # enable BOLD?
- self.contents.font.size = 20 # set the font SIZE
- self.contents.font.outline = true # enable OUTLINE?
- self.contents.font.shadow = true # enable SHADOW?
- # ● End of font settings
- self.contents.font.color = normal_color
- @playtime = 0
- refresh
- end
- #-----------------------------------------------------------------------------
- # ► Setup (Do not touch anything here)
- #-----------------------------------------------------------------------------
- def refresh
- self.contents.clear
- # ● Width & Height
- wid = contents.width - 24
- hei = contents.height
- #-----------------------------------------------------------------------------
- # ► Draw Stuff (Here you can setup displayed stuff)
- #-----------------------------------------------------------------------------
- #===========================[ ● Item 1 Setup ]===============================#
- enable = true # Enable this item? (Playtime by default)
- if enable # DO NOT TOUCH
- position = 4 # Sets the position of this item
- text = "Time" # Sets the displayed text, leave "" to disable text
- t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right)
- t_red = 150 # Set the color of text displayed
- t_grn = 175 # ~
- t_blu = 255 # ~
- value = $game_system.playtime_s # Sets the value displayed
- v_align = 2 # Sets the value alignment (0 - left; 1 - center; 2 - right)
- v_red = 255 # Set the color of value displayed
- v_grn = 255 # ~
- v_blu = 255 # ~
- icon = 1260 # ID of the displayed icon.
- iconpos = 0 # Sets the position of icon (0 - left; 1 - right)
- ##############################################################################
- self.contents.font.color = Color.new(t_red,t_grn,t_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, text, t_align)
- self.contents.font.color = Color.new(v_red,v_grn,v_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, "#{value}", v_align)
- self.contents.font.color = normal_color
- draw_icon(icon, 0 + 112 * iconpos, -24 + 24 * position)
- else
- end
- ##############################################################################
- #===========================[ ● Item 2 Setup ]===============================#
- enable = true # Enable this item? (Location by default)
- if enable # DO NOT TOUCH
- position = 3 # Sets the position of this item
- text = "" # Sets the displayed text, leave "" to disable text
- t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right)
- t_red = 35 # Set the color of text displayed
- t_grn = 160 # ~
- t_blu = 220 # ~
- value = $data_mapinfos[$game_map.map_id].name # Sets the value displayed
- v_align = 1 # Sets the value alignment (0 - left; 1 - center; 2 - right)
- v_red = 255 # Set the color of value displayed
- v_grn = 210 # ~
- v_blu = 170 # ~
- icon = 1270 # ID of the displayed icon.
- iconpos = 0 # Sets the position of icon (0 - left; 1 - right)
- ##############################################################################
- self.contents.font.color = Color.new(t_red,t_grn,t_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, text, t_align)
- self.contents.font.color = Color.new(v_red,v_grn,v_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, "#{value}", v_align)
- self.contents.font.color = normal_color
- draw_icon(icon, 0 + 112 * iconpos, -24 + 24 * position)
- else
- end
- ##############################################################################
- #===========================[ ● Item 3 Setup ]===============================#
- enable = true # Enable this item? (Gold by default)
- if enable # DO NOT TOUCH
- position = 1 # Sets the position of this item
- text = "Gold" # Sets the displayed text, leave "" to disable text
- t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right)
- t_red = 150 # Set the color of text displayed
- t_grn = 175 # ~
- t_blu = 255 # ~
- value = $game_party.gold # Sets the value displayed
- v_align = 2 # Sets the value alignment (0 - left; 1 - center; 2 - right)
- v_red = 255 # Set the color of value displayed
- v_grn = 255 # ~
- v_blu = 150 # ~
- icon = 361 # ID of the displayed icon.
- iconpos = 1 # Sets the position of icon (0 - left; 1 - right)
- ##############################################################################
- self.contents.font.color = Color.new(t_red,t_grn,t_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, text, t_align)
- self.contents.font.color = Color.new(v_red,v_grn,v_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, " #{value}", v_align)
- self.contents.font.color = normal_color
- draw_icon(icon, 0 + 112 * iconpos, -24 + 24 * position)
- else
- end
- ##############################################################################
- #===========================[ ● Item 4 Setup ]===============================#
- enable = true # Enable this item? (Variable 18 by default)
- if enable # DO NOT TOUCH
- position = 2 # Sets the position of this item
- text = "Var 18" # Sets the displayed text, leave "" to disable text
- t_align = 0 # Sets the text alignment (0 - left; 1 - center; 2 - right)
- t_red = 150 # Set the color of text displayed
- t_grn = 175 # ~
- t_blu = 255 # ~
- value = $game_variables[18] # Sets the value displayed
- v_align = 2 # Sets the value alignment (0 - left; 1 - center; 2 - right)
- v_red = 50 # Set the color of value displayed
- v_grn = 255 # ~
- v_blu = 255 # ~
- icon = 347 # ID of the displayed icon.
- iconpos = 1 # Sets the position of icon (0 - left; 1 - right)
- ##############################################################################
- self.contents.font.color = Color.new(t_red,t_grn,t_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, text, t_align)
- self.contents.font.color = Color.new(v_red,v_grn,v_blu)
- self.contents.draw_text(24 - 23 * iconpos, -48 + 24 * position, wid, 72, " #{value}", v_align)
- self.contents.font.color = normal_color
- draw_icon(icon, 0 + 112 * iconpos, -24 + 24 * position)
- else
- end
- ##############################################################################
- ################################################################################
- # END OF CUSTOMIZATION, Do not edit anything below, unless you know,
- # what you're doing!
- ################################################################################
- @playtime = $game_system.playtime
- end # Refresh
- #-----------------------------------------------------------------------------
- # ► Update
- #-----------------------------------------------------------------------------
- def update
- super
- refresh if $game_system.playtime - @playtime >= 1
- end
- end
- #-------------------------------------------------------------------------------
- # ► Create Window
- #-------------------------------------------------------------------------------
- class Scene_Menu < Scene_MenuBase
- #-----------------------------------------------------------------------------
- # ► Start
- #-----------------------------------------------------------------------------
- alias extra_info_start start
- def start
- extra_info_start
- create_extrainfo_window
- end
- #-----------------------------------------------------------------------------
- # ► create Extra Info Window
- #-----------------------------------------------------------------------------
- def create_extrainfo_window
- @extrainfo_window = Window_ExtraInfo.new(WINDOW_POSITION_X, WINDOW_POSITION_Y)
- end
- end
RAW Paste Data