A. 51 Posted January 10, 2012 Steps window Version: 1.0 Author: Adrien. (A.) Usagage: Plug and Play Blog: Labs Note: First Ever script attempt..... Comptaibility: No issue FAQ: Seriously? See screen shot. #============================================================================== # Window Steps Script #------------------------------------------------------------------------------ # Allows you to show the current amount of steps in the status menu when you # open up the menu via esc on the keyboard. # # Author: Adam Balan (Adrien., A.) # Incomptaibility?: Nothing. # Notes: plug and play. # Version 1.1 #============================================================================== #============================================================================== # Module WindowVocab #------------------------------------------------------------------------------ # STEPS = name of the steps vocab. #============================================================================== module WindowVocab STEPS = "steps" #name of the steps end #============================================================================== # Window_Steps #------------------------------------------------------------------------------ #  Window Steps shows a steps window above the gold in the menu. #============================================================================== class Window_Steps < Window_Base #-------------------------------------------------------------------------- # Initialize the class. #-------------------------------------------------------------------------- def initialize super(0, 0, 160, fitting_height(1)) refresh end #-------------------------------------------------------------------------- # Refresh the box. #-------------------------------------------------------------------------- def refresh contents.clear draw_currency_value(value, currency_unit, 4, 0, contents.width - 8) end #-------------------------------------------------------------------------- # Get the value of the steps. #-------------------------------------------------------------------------- def value $game_party.steps end #-------------------------------------------------------------------------- # Define the Vocab. #-------------------------------------------------------------------------- def currency_unit WindowVocab::STEPS end end #============================================================================== # Scene_Menu #------------------------------------------------------------------------------ # Create the Menu - we are only editing one method and adding a new. # # Alias: start method to add the steps window. #============================================================================== class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # Alias: start method. #-------------------------------------------------------------------------- alias start_a start def start start_a create_steps_window end #-------------------------------------------------------------------------- # Create the window. #-------------------------------------------------------------------------- def create_steps_window @steps_window = Window_Steps.new @steps_window.x = 0 @steps_window.y = (Graphics.height - @steps_window.height) - 50 end end Share this post Link to post Share on other sites
Radscythe 72 Posted January 10, 2012 This is perfect for showing the steps for a step shop...want to buy these tea leaves? 1000 steps now! 1 Rosenblack reacted to this Share this post Link to post Share on other sites
Amy Pond 99 Posted January 10, 2012 That's weird, I wonder why they'd still count steps if they removed the window? Nice work reintegrating a removed feature. Share this post Link to post Share on other sites
Notsalony 12 Posted February 26, 2013 Does anyone know enough about this code or this author to add an icon option? I like this script and all but I'm also using a menu add on system and it lets me put icons for parts of the menu but not this. Share this post Link to post Share on other sites
Ruiran 3 Posted November 7, 2013 (edited) Does anyone know enough about this code or this author to add an icon option? I like this script and all but I'm also using a menu add on system and it lets me put icons for parts of the menu but not this. module Window_Steps USE_ICON = true ST = "Steps" ICON = 172 end class ST_Window < Window_Base def initialize super(0,0,160,fitting_height(1)) refresh end def refresh contents.clear draw_currency_value(steps, iconText, 0, 0, contents.width - 2) end def steps $game_party.steps end def iconText if Window_Steps::USE_ICON == true draw_icon(Window_Steps::ICON,0,0) else draw_text_ex(0,0,Window_Steps::ST) end end end class Scene_Menu < Scene_MenuBase alias start_original start def start start_original create_st_window end def create_st_window @st_window = ST_Window.new @st_window.x = 0 @st_window.y = (Graphics.height - @ST_window.height) - 98 end end Edited November 7, 2013 by Ruiran Share this post Link to post Share on other sites
Notsalony 12 Posted November 7, 2013 Does anyone know enough about this code or this author to add an icon option? I like this script and all but I'm also using a menu add on system and it lets me put icons for parts of the menu but not this. module Window_Steps USE_ICON = true ST = "Steps" ICON = 172 end class ST_Window < Window_Base def initialize super(0,0,160,fitting_height(1)) refresh end def refresh contents.clear draw_currency_value(steps, iconText, 0, 0, contents.width - 2) end def steps $game_party.steps end def iconText if Window_Steps::USE_ICON == true draw_icon(Window_Steps::ICON,0,0) else draw_text_ex(0,0,Window_Steps::ST) end end end class Scene_Menu < Scene_MenuBase alias start_original start def start start_original create_st_window end def create_st_window @st_window = ST_Window.new @st_window.x = 0 @st_window.y = (Graphics.height - @ST_window.height) - 98 end end I'm kind of new to scripting Egg, where would one go about putting that? Share this post Link to post Share on other sites