I have deleted my other script in Bigace's topic, since I wanted mine to appear all by itself :3
This script replaces the Steps window in the menu. Instructions are in the beginning of the script.
the script
CODE
#=============================================================================== # Window_GameCompletion #------------------------------------------------------------------------------- # Shows how much percentage of the game is completed by calling how much a # variable is. #=============================================================================== # Originally made by Leon Blade, edited from Redd's version by Night_Runner #=============================================================================== # Edited by Redd with the following features: # ¤ Shows percentage with a variable # ¤ Replaces the Steps window # ¤ Fully compatible with Redd's Icons #=============================================================================== # Instructions #=============================================================================== # Configuration #------------------------------------------------------------------------------- # # After adding this script above Main, find the script Scene_Menu and find the # following code (it's around 45 somewhere) # # # Make steps window # @percent_window = Window_Steps.new # @percent_window.x = 0 # @percent_window.y = 320 # # And replace it with this: # # # Make Game Completion window # @percent_window = Window_GameCompletion.new # @percent_window.x = 0 # @percent_window.y = 320 #------------------------------------------------------------------------------- # Displaying Percentage #------------------------------------------------------------------------------- # To display the percentage in the menu, you will have to change Variable 1 # to how much percentage you want your menu to have. For instance, if I set # Variable 1 to 33, it would change the percent to 33% in the menu. #=============================================================================== class Window_GameCompletion < Window_Base #-------------------------------------------------------------------------- # Set up #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = "Arial" self.contents.font.size = 22 refresh end #-------------------------------------------------------------------------- # Draws percentage #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, -14, 120, 50, "Progress") self.contents.font.color = normal_color #Everything below is Changeable game_percent = ("0%") if $game_variables[1].between?(1, 100) game_percent = $game_variables[1].to_s + "%" end #Everything Above is Changeable self.contents.draw_text(50, 0, 120, 80, game_percent) end end
Please credit Redd, Leon Blade, and Night_Runner if you use.
Group: +Gold Member
Posts: 1,529
Type: Scripter
RM Skill: Undisclosed
I still argue that it can be coded much more efficiently...
example
CODE
#=============================================================================== # Window_GameCompletion #------------------------------------------------------------------------------- # Shows how much percentage of the game is completed by calling how much a # variable is. #=============================================================================== # Edited by Redd with the following features: # ¤ Shows percentage with a variable # ¤ Replaces the Steps window # ¤ Fully compatible with Redd's Icons #=============================================================================== # Instructions #------------------------------------------------------------------------------- # Displaying Percentage #------------------------------------------------------------------------------- # To display the percentage in the menu, you will have to change Variable 1 # to how much percentage you want your menu to have. For instance, if I set # Variable 1 to 33, it would change the percent to 33% in the menu. #=============================================================================== class Window_Steps < Window_Base #-------------------------------------------------------------------------- # Draws percentage #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, -14, 120, 50, "Progress") self.contents.font.color = normal_color #Everything below is Changeable game_percent = ("0%") if $game_variables[1].between?(1, 100) game_percent = $game_variables[1].to_s + "%" end #Everything Above is Changeable self.contents.draw_text(50, 0, 120, 80, game_percent) end end
I've been googling a bit, based on here and here I'm guessing that Leon Blade originally made this script for his custom menu system...
Otherwise, it's a good script that will definitely be used
__________________________
K.I.S.S. Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.