Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Closed TopicStart new topic
> Redd's Game Progress Script, MY VERSION
Redd
post Jul 21 2011, 02:38 PM
Post #1


:<
Group Icon

Group: Revolutionary
Posts: 2,329
Type: Developer
RM Skill: Advanced




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.


__________________________
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Jul 23 2011, 06:41 AM
Post #2


Level 50
Group Icon

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 smile.gif


__________________________
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.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Redd
post Jul 23 2011, 01:14 PM
Post #3


:<
Group Icon

Group: Revolutionary
Posts: 2,329
Type: Developer
RM Skill: Advanced




Thanks I was going to use it but it kept giving me an error for some reason, then I figured out that I still needed a few other lines of code in there smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 09:38 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker