ÿþ#==============================================================================# # æ% Style Menu Advanced æ% # #------------------------------------------------------------------------------# # æ% By Mesiah A.K.A. MakoInfused # # æ% Exclusively for http://www.cetrastudios.com/ # # originally for darrk blades of http://www.rpgmakervx.net # # æ% Released on: 02/11/2010 # # æ% Last Update: 02/12/2010 # # æ% Website: http://www.cetrastudios.com/ # # æ% Version: 1.3 # # æ% Summary: This is a sleek looking custom menu which has limited options at # # æ% the moment, but provides some nice eye-candy to your game. I plan to add # # æ% a lot more customization options soon. In addition I will add many more # # æ% completely different styles for the menu that the player can choose from. # # # # æ% Credit: Credit me (MakoInfused) IF you want, you don't need to. # # æ% Terms: # # 1. This script is free to use, BUT please don't claim you created it. # # 2. PLEASE post a comment on the VX forums letting me know, I like to see # # my work in action. # # # # æ% Call in script command: # # æ% $game_party.battle_count # # æ% $game_party.steps # # # # æ% Examples: # # æ% $game_party.battle_count += 100 # # æ% This example sets the battle count to whatever it is now + 100 # # æ% $game_party.steps += 100 # # æ% This example sets the steps count to whatever it is now + 100 # #==============================================================================# module MESI module MENU ITEM = [] #Do not touch! ITEM[1] = ["Items", "Scene_Item", false] # The name of the items menu. ITEM[2] = ["Skills", "Scene_Skill", true] # The name of the skills menu. ITEM[3] = ["Equip", "Scene_Equip", true] # The name of the equip menu. ITEM[4] = ["Status", "Scene_Status", true] # The name of the status menu. ITEM[5] = ["Formation", "Scene_Row", false]# The name of the formation menu. ITEM[6] = ["Quit", "Scene_End", false] # The name of the quit menu. ITEM[7] = ["", "Scene_File", false] # The name of the save menu. ITEM[8] = ["", "", false] # The name of an extra menu option. ITEM[9] = ["", "", false] # The name of an extra menu option. ITEM[10] = ["", "", false] # The name of an extra menu option. ITEM[11] = ["", "", false] # The name of an extra menu option. ITEM[12] = ["", "", false] # The name of an extra menu option. # There is NO Limit to how many Menu Options you can have. However above # 12 will make the menu look pretty cramped, depending on your font and # the length of your option names. # # You add more options by copy/pasting then changing the appropriate info. # Or you can delete options by leaving the name blank, or deleting it. # # The format is as follows: # ITEM[OptionPosition] = [Name, SceneName, SelectActor] # # OptionPosition = The position on the menu list. Top-Left to Bottom-Right. # Name = Custom name you can use for the option. # SceneName = The name of the scene you intend to call. See below. # SelectActor = If true this prompts the player to select an actor first. #--------------------------------------------------------------------------- # To find what you should put in the Scene Name area look for instructions # on how you would normally call this script. The directions should usually # be in the script. However, if they're not you can always ask for help. # # Or optionally you can find it yourself simply by looking for: # # class Scene_WhatEverTheNameIs # # This can be found inside of the script you're trying to use. #--------------------------------------------------------------------------- # This allows you to use a custom party formation script inside your menu. # # NOTE: this means that you MUST have that script placed along with this # script. # # Example: "Scene_Row" would call OriginalWij's Row Changer script. # # Currently I do NOT provide my own party formation, so I figured to just # allow the user to decide which one they would like to use. # # YOU MUST PLACE THAT SCRIPT IN YOUR SCRIPT EDITOR FIRST! #--------------------------------------------------------------------------- EXP_NOW = "Exp" # The term used to define the users Current Experience on this Menu only. #--------------------------------------------------------------------------- EXP_NEXT = "Next" # The term used to define the users Next Level Experience on this Menu only. #--------------------------------------------------------------------------- BACK_TYPE = 0 # BACK_TYPE determines whether the type of background to use: # 0 = Black Background (Nothing displayed) # 1 = Default Background (The map is drawn / blurred, etc.) # 2 = Picture based, setup the picture and additional stuff below. BG_LOCATION = "Background" # BG_LOCATION is the name of the picture, located in the Pictures Folder. MENU_OPACITY = 255 # Default opacity of the Menu. # From 0-255. Lower number = More Transparent. #--------------------------------------------------------------------------- USE_FACE = false # Adds a face graphic of the actors in the menu. FACE_TYPE = 0 # 0 = Default Face # 1 = Striped Face FACE_POSI = 6 # Allows you to adjust the face position. # From 1-6. Lower number = Lower Position. USE_CHAR = true # Adds a walking graphic of the actors in the menu. #--------------------------------------------------------------------------- NO_CURRENCY = false # If set to true, the currency window isn't used. #--------------------------------------------------------------------------- NO_TIME = false # If set to true, the time window isn't used. DRAW_TIME = 1 # Determines what the time window displays: # 0 = Display Hours. # 1 = Display Hours, Minutes. # 2 = Display Hours, Minutes, Seconds. #--------------------------------------------------------------------------- NO_VAR = false # If set to true, the variables window isn't used. VAR_TYPE = 1 # 0 = An actual variable, which is defined below. # 1 = Displays Encounters # 2 = Displays Steps Taken # 3 = Displays Last Save Time # More to come! SAVE_TIME = 1 # If VAR_TYPE = 3, then this allows you to change when the game stores # the last save time. # 0 = Never Reset Save Time (Always display the last save time). # 1 = Reset Save Time When Game is Loaded. SAVE_EMPTY = "Never" # This is the text that is displayed when the player has not saved. # This applies for all of the SAVE_TIME settings. SAVE_COLOR = true # This activates a change of color (RED) for the text when the difference # between the current time and the last save time goes past a certain point. COLOR_TIME = 1 # If SAVE_COLOR = true # Determines how long, in minutes, before the color changes. VAR_NUMB = 1 # If VAR_TYPE = 0, then this is the game variable that is displayed. VAR_MAXI = 2 # If VAR_TYPE = 0, then this is the game variable that will display the # max amount of whatever you are displaying. # VAR_MAXI = 0 then this is ignored. VAR_NAME = "Custom" # If VAR_TYPE = 0, then this is the name of game variable to be displayed. #--------------------------------------------------------------------------- NO_LOC = false # If set to true, the location window isn't used. #--------------------------------------------------------------------------- ACTOR_WINDOW = true # This adds separate windows for each characters status on the menu. #--------------------------------------------------------------------------- SELECT_LIGHT = true # Selection lights up when an actor is selected and dims rest. #--------------------------------------------------------------------------- NON_SELECTED = false # Selection dims non-selected actors when nothing is selected. #--------------------------------------------------------------------------- DONT_USE_SWITCHES = false # If this is set to true, then switches will not affect the options in the # menu. #--------------------------------------------------------------------------- SWITCHES = 1 # This is the first switch that is used to determine if a menu option is # available. # Example: SWITCHES = 1 # The game switches 1 through 6 (Max Menu Options) will be responsible for # turning off the menu options in order from 1 to however many options # you have. # # So... # if switch 1 was on, then Items would be prohibited. # if switch 2 was on, then Skills would be prohibited. # if switch 3 was on, then Equip would be prohibited. # etc... #--------------------------------------------------------------------------- end end #============================================================================== # ** Game_Temp #------------------------------------------------------------------------------ # This class handles temporary data that is not included with save data. # The instance of this class is referenced by $game_temp. #============================================================================== class Game_Temp #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :menu_index # last menu position. #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias mesi_menu_initialize initialize unless $@ def initialize mesi_menu_initialize @menu_index = 0 end end #============================================================================== # ** Game_Party #------------------------------------------------------------------------------ # This class handles the party. It includes information on amount of gold # and items. The instance of this class is referenced by $game_party. #============================================================================== class Game_Party < Game_Unit #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :battle_count # battles encountered so far. attr_accessor :last_save # last time the person saved. attr_accessor :last_minute # last time the person saved. #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias mesi_initialize initialize unless $@ def initialize mesi_initialize @battle_count = 0 @last_minute = 0 @last_save = MESI::MENU::SAVE_EMPTY @menu_index = 0 end end #============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs the menu screen processing. #============================================================================== class Scene_Menu < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background unless MESI::MENU::BACK_TYPE == 0 if MESI::MENU::BACK_TYPE == 2 @menuback_sprite.bitmap = Cache.picture(MESI::MENU::BG_LOCATION) end create_command_window @status_window = Window_CustomStatus.new(0, 80) @currency_window = Window_Currency.new(416, 80) unless MESI::MENU::NO_CURRENCY @time = Window_Time.new(416, 160) unless MESI::MENU::NO_TIME @window_variables = Window_Variables.new(416, 264) unless MESI::MENU::NO_VAR @window_location = Window_Location.new(416, 336) unless MESI::MENU::NO_LOC end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background unless MESI::MENU::BACK_TYPE == 0 @menuback_sprite.dispose if MESI::MENU::BACK_TYPE == 2 @command_window.dispose @status_window.dispose @window_location.dispose unless MESI::MENU::NO_LOC @time.dispose unless MESI::MENU::NO_TIME @currency_window.dispose unless MESI::MENU::NO_CURRENCY @window_variables.dispose unless MESI::MENU::NO_VAR end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background unless MESI::MENU::BACK_TYPE == 0 @menuback_sprite.update if MESI::MENU::BACK_TYPE == 2 @command_window.update @status_window.update @currency_window.update unless MESI::MENU::NO_CURRENCY @window_location.update unless MESI::MENU::NO_LOC @time.update unless MESI::MENU::NO_TIME @window_variables.update unless MESI::MENU::NO_VAR if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window options = [] for i in 1...MESI::MENU::ITEM.size options.insert(i, MESI::MENU::ITEM[i][0]) end options.delete(""){1...MESI::MENU::ITEM.size} options.compact! columns = (((options.size + 0.1) / 2).round).truncate @command_window = Window_Command.new(544, options,columns) @command_window.index = @menu_index @command_window.opacity = MESI::MENU::MENU_OPACITY if $game_party.members.size == 0 @command_window.draw_item(0, false) @command_window.draw_item(1, false) @command_window.draw_item(2, false) @command_window.draw_item(3, false) end for i in 1...MESI::MENU::ITEM.size + 1 if $game_switches[MESI::MENU::SWITCHES + i - 1] @command_window.draw_item(i - 1, false) end end end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_switches[MESI::MENU::SWITCHES + @command_window.index] Sound.play_buzzer return end Sound.play_decision if @command_window.commands[@command_window.index] = MESI::MENU::ITEM[@command_window.index + 1][0] if !MESI::MENU::ITEM[@command_window.index + 1][2] args = nil if MESI::MENU::ITEM[@command_window.index + 1][1] == "Scene_File" args = [true, false, false] if args != 0 end $game_temp.menu_index = @command_window.index if args == nil $scene = eval(MESI::MENU::ITEM[@command_window.index + 1][1]).new elsif args.size == 3 $scene = eval(MESI::MENU::ITEM[@command_window.index + 1][1]).new(args[0], args[1], args[2]) elsif args.size == 2 $scene = eval(MESI::MENU::ITEM[@command_window.index + 1][1]).new(args[0], args[1]) elsif args.size == 1 $scene = eval(MESI::MENU::ITEM[@command_window.index + 1][1]).new(args[0]) end else start_actor_selection end end end end #-------------------------------------------------------------------------- # * Start Actor Selection #-------------------------------------------------------------------------- def start_actor_selection @command_window.active = false @status_window.active = true if $game_party.last_actor_index < @status_window.item_max @status_window.index = $game_party.last_actor_index else @status_window.index = 0 end end #-------------------------------------------------------------------------- # * End Actor Selection #-------------------------------------------------------------------------- def end_actor_selection @command_window.active = true @status_window.active = false @status_window.index = -1 end #-------------------------------------------------------------------------- # * Update Actor Selection #-------------------------------------------------------------------------- def update_actor_selection if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index $game_temp.menu_index = @command_window.index Sound.play_decision $scene = eval(MESI::MENU::ITEM[@command_window.index + 1][1]).new(@status_window.index) end end end #============================================================================== # ** Window_CustomStatus #------------------------------------------------------------------------------ # This window displays party member status on the menu screen. #============================================================================== class Window_CustomStatus < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, 416, 336) if MESI::MENU::ACTOR_WINDOW self.opacity = 0 self.z = 150 @actor_windows = [] else self.opacity = MESI::MENU::MENU_OPACITY end # refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.members.size @column_max = 4 for actor in $game_party.members x = (actor.index * 196 / 2) + 2 y = 102 if MESI::MENU::ACTOR_WINDOW @actor_windows[actor.index] = Window_Actor.new(x + 12, y - 11) end pm = -1 if MESI::MENU::USE_FACE pm = 4 + MESI::MENU::FACE_POSI size = 86 pm = 4 if pm < 4 pm = 10 if pm > 10 if MESI::MENU::FACE_TYPE == 1 pm = 4 size = 20 end pa = (pm + 1) * (pm + 1) - (pm + 1) if MESI::MENU::FACE_TYPE == 1 draw_striped(actor.face_name, actor.face_index, x + 2, y - (WLH * pm) + pa, size) else draw_face(actor.face_name, actor.face_index, x + 2, y - (WLH * pm) + pa, size) end pm = 0 end draw_actor_name(actor, x + 1, y - 108) if MESI::MENU::USE_CHAR draw_character(actor.character_name, actor.character_index, x + 48, y + (WLH * pm)) end draw_actor_level(actor, x, y + WLH * 0 + 8) draw_hp(actor, x, y + WLH * 1 + 8) draw_mp(actor, x, y + WLH * 3 + 8) draw_current_exp(actor, x, y + WLH * 5 + 8) draw_next_exp(actor, x, y + WLH * 6 + 16) end end #-------------------------------------------------------------------------- # * Draw Face Striped Graphic # face_name : Face graphic filename # face_index : Face graphic index # x : draw spot x-coordinate # y : draw spot y-coordinate # size : Display size #-------------------------------------------------------------------------- def draw_striped(face_name, face_index, x, y, size = 96) bitmap = Cache.face(face_name) rect = Rect.new(0, 0, 0, 0) rect.x = face_index % 4 * 96 rect.y = face_index / 4 * 96 + (96 - size) / 2 rect.width = 86 rect.height = size self.contents.blt(x, y, bitmap, rect) bitmap.dispose end #-------------------------------------------------------------------------- # * Draw HP #-------------------------------------------------------------------------- def draw_hp(actor, x, y, width = 120) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH / 2 * 1, 30, WLH, Vocab::hp_a) self.contents.font.color = normal_color last_font_size = self.contents.font.size xr = x + width yr = y if width < 120 self.contents.draw_text(xr - 34, yr + WLH / 2 * 0, 44, WLH, actor.hp, 0) else self.contents.draw_text(xr - 84, yr + WLH / 2 * 0, 44, WLH, actor.hp, 1) self.contents.draw_text(xr - 84, yr + WLH / 2 * 1, 44, WLH, "-------", 1) self.contents.draw_text(xr - 84, yr + WLH / 2 * 2, 44, WLH, actor.maxhp, 1) end end #-------------------------------------------------------------------------- # * Draw MP #-------------------------------------------------------------------------- def draw_mp(actor, x, y, width = 120) self.contents.font.color = system_color self.contents.draw_text(x, y, 30, WLH, Vocab::mp_a) self.contents.font.color = normal_color last_font_size = self.contents.font.size xr = x + width yr = y if width < 120 self.contents.draw_text(xr - 44, yr + WLH / 2 * 0, 44, WLH, actor.mp, 0) else self.contents.draw_text(xr - 84, yr + WLH / 2 * 0, 44, WLH, actor.mp, 1) self.contents.draw_text(xr - 84, yr + WLH / 2 * 1, 44, WLH, "-------", 1) self.contents.draw_text(xr - 84, yr + WLH / 2 * 2, 44, WLH, actor.maxmp, 1) end end #-------------------------------------------------------------------------- # * Draw Current EXP #-------------------------------------------------------------------------- def draw_current_exp(actor, x, y, width = 100) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH / 2 * 0, 80, WLH, MESI::MENU::EXP_NOW) self.contents.font.color = normal_color if actor.exp_s != 0 exp = actor.exp_s else exp = 0 end xr = x + width yr = y self.contents.draw_text(xr - 100, yr + WLH / 2 * 1 + 4, 80, WLH, actor.exp_s, 2) end #-------------------------------------------------------------------------- # * Draw Next EXP #-------------------------------------------------------------------------- def draw_next_exp(actor, x, y, width = 100) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH / 2 * 0, 80, WLH, MESI::MENU::EXP_NEXT) self.contents.font.color = normal_color if actor.next_rest_exp_s != 0 exp = actor.next_rest_exp_s else exp = 0 end xr = x + width yr = y self.contents.draw_text(xr - 100, yr + WLH / 2 * 1 + 4, 80, WLH, actor.next_rest_exp_s, 2) end #-------------------------------------------------------------------------- # * Update cursor #-------------------------------------------------------------------------- def update_cursor opacity = MESI::MENU::MENU_OPACITY if MESI::MENU::ACTOR_WINDOW #Default for actor in $game_party.members @actor_windows[actor.index].z = 101 if @index == actor.index @actor_windows[actor.index].opacity = opacity if @index < 0 #Non-Selected Light @actor_windows[actor.index].z = 101 if MESI::MENU::NON_SELECTED if MESI::MENU::MENU_OPACITY >= 75 and MESI::MENU::NON_SELECTED @actor_windows[actor.index].opacity -= 75 else @actor_windows[actor.index].opacity += 75 end elsif @index != actor.index and @index >= 0 #Selected Light @actor_windows[actor.index].z = 100 if MESI::MENU::SELECT_LIGHT if MESI::MENU::MENU_OPACITY >= 75 and MESI::MENU::SELECT_LIGHT @actor_windows[actor.index].opacity -= 75 else @actor_windows[actor.index].opacity += 75 end end end end if @index < 0 # No cursor self.cursor_rect.empty elsif @index < @item_max # Normal self.cursor_rect.set(@index * 98, 0, 94, contents.height) elsif @index >= 3 # Self self.cursor_rect.set((@index - 3) * 98, 94, contents.height) else # All self.cursor_rect.set(0, 0, @item_max * 94, contents.height) end end #-------------------------------------------------------------------------- # * Dispose #-------------------------------------------------------------------------- alias mesi_dispose dispose unless $@ def dispose if MESI::MENU::ACTOR_WINDOW for actor in $game_party.members @actor_windows[actor.index].dispose end end mesi_dispose end end #============================================================================== # ** Window_Actor #------------------------------------------------------------------------------ # This window displays actor information in seperate windows. #============================================================================== class Window_Actor < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, 98, 312) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear end end #============================================================================== # ** Window_Currency #------------------------------------------------------------------------------ # This window displays the amount of currency. #============================================================================== class Window_Currency < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y) super(x, y, 128, WLH * 2 + 32) self.opacity = MESI::MENU::MENU_OPACITY refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_currency($game_party.gold, 0, 0, 80) end #-------------------------------------------------------------------------- # * Draw number with currency unit #-------------------------------------------------------------------------- def draw_currency(value, x, y, width) cx = contents.text_size(Vocab::gold).width self.contents.font.color = normal_color self.contents.draw_text(x + 16, y + WLH, width, WLH, value, 2) self.contents.draw_text(x, y, width, WLH, Vocab::gold, 0) end end #============================================================================== # ** Window_Time #------------------------------------------------------------------------------ # This window displays the length of the save file. #============================================================================== class Window_Time < Window_Base def initialize(x, y) super(x, y, 128, WLH * 3 + 32) self.opacity = MESI::MENU::MENU_OPACITY refresh end def refresh draw_time(0, 0, 90) end def draw_time(x, y, width) self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(x, y -6, width, 32, "Time", 0) @total = Graphics.frame_count / Graphics.frame_rate hour = @total / 60 / 60 min = @total / 60 % 60 sec = @total % 60 amount = "%02d" if hour > 9 else amount = "%2d" amount += ":%02d" if MESI::MENU::DRAW_TIME >= 1 amount += ":%02d" if MESI::MENU::DRAW_TIME >= 2 text = sprintf(amount, hour, min, sec) self.contents.draw_text(x + 6, y + WLH * 2 - 6, width, WLH, text, 2) self.contents.font.color = system_color text = sprintf("o oo") self.contents.draw_text(x + 6, y + WLH * 1 - 6, width, WLH, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end #============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- alias mesi_start start unless $@ def start mesi_start $game_party.battle_count += 1 unless $game_party.battle_count > 999998 end end #============================================================================== # ** Scene_File #------------------------------------------------------------------------------ # This class performs the save and load screen processing. #============================================================================== class Scene_File < Scene_Base #-------------------------------------------------------------------------- # * Execute Save #-------------------------------------------------------------------------- alias mesi_do_save do_save def do_save mesi_do_save if MESI::MENU::SAVE_TIME == 0 @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 $game_party.last_save = sprintf("%02d:%02d:%02d", hour, min, sec) $game_party.last_minute = @total_sec / 60 mesi_do_save if MESI::MENU::SAVE_TIME == 1 end end #============================================================================== # ** Window_Variables #------------------------------------------------------------------------------ # This window displays the total amount of variables the player has faced. #============================================================================== class Window_Variables < Window_Base def initialize(x, y) super(x, y, 128, WLH * 2 + 24) self.opacity = MESI::MENU::MENU_OPACITY @colored = false refresh end def refresh text = $game_variables[MESI::MENU::VAR_NUMB].to_s text = $game_party.battle_count.to_s if MESI::MENU::VAR_TYPE == 1 text = $game_party.steps.to_s if MESI::MENU::VAR_TYPE == 2 text = $game_party.last_save.to_s if MESI::MENU::VAR_TYPE == 3 vari = $game_variables[MESI::MENU::VAR_MAXI].to_s text += " / #{vari}" if MESI::MENU::VAR_NAME != 0 and MESI::MENU::VAR_TYPE == 0 draw_variables(text, 0, 0, 80) end def draw_variables(value, x, y, width) text = MESI::MENU::VAR_NAME text = "Encounters" if MESI::MENU::VAR_TYPE == 1 text = "Steps" if MESI::MENU::VAR_TYPE == 2 text = "Last Save" if MESI::MENU::VAR_TYPE == 3 self.contents.clear self.contents.font.color = normal_color self.contents.font.color.set (255,0,0) if @colored self.contents.draw_text(x, y + WLH - 6, width + 16, WLH, value, 2) self.contents.font.color = normal_color self.contents.draw_text(x, y - 4, width + 16, WLH, text, 0) end def update if MESI::MENU::SAVE_COLOR and MESI::MENU::VAR_TYPE == 3 @total = Graphics.frame_count / Graphics.frame_rate total_min = @total / 60 if total_min >= $game_party.last_minute + MESI::MENU::COLOR_TIME @colored = true refresh end end end end #============================================================================== # ** Game_Map #------------------------------------------------------------------------------ # This class handles maps. It includes scrolling and passage determination # functions. The instance of this class is referenced by $game_map. #============================================================================== class Game_Map #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_reader :map_id #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def map_name @name_map = load_data("Data/MapInfos.rvdata") @name_map[@map_id].name end end #============================================================================== # ** Window_Location #------------------------------------------------------------------------------ # This window displays the current area. #============================================================================== class Window_Location < Window_Base def initialize(x, y) super(x, y, 128, WLH * 2 + 32) self.opacity = MESI::MENU::MENU_OPACITY refresh end def refresh draw_location($game_map.map_name.to_s, 0, 0, 80) end def draw_location(value, x, y, width) self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH, width + 16, WLH, value, 2) self.contents.draw_text(x, y, width, WLH, "Location", 0) end end #============================================================================== # ** Scene_Fixes #------------------------------------------------------------------------------ # This fixes all of the different scenes to recognize the menu option changes. #============================================================================== class Scene_Item < Scene_Base alias mesi_menu_return_scene return_scene def return_scene mesi_menu_return_scene $scene = Scene_Menu.new($game_temp.menu_index) end end class Scene_Status < Scene_Base alias mesi_menu_return_scene return_scene def return_scene mesi_menu_return_scene $scene = Scene_Menu.new($game_temp.menu_index) end end class Scene_Equip < Scene_Base alias mesi_menu_return_scene return_scene def return_scene mesi_menu_return_scene $scene = Scene_Menu.new($game_temp.menu_index) end end class Scene_File < Scene_Base alias mesi_menu_return_scene return_scene def return_scene mesi_menu_return_scene if @from_title $scene = Scene_Title.new elsif @from_event $scene = Scene_Map.new else $scene = Scene_Menu.new($game_temp.menu_index) end end end class Scene_Skill < Scene_Base alias mesi_menu_return_scene return_scene def return_scene mesi_menu_return_scene $scene = Scene_Menu.new($game_temp.menu_index) end end class Scene_End < Scene_Base alias mesi_menu_return_scene return_scene def return_scene mesi_menu_return_scene $scene = Scene_Menu.new($game_temp.menu_index) end end #------------------------------------------------------------------------------- # ** End Script #===============================================================================