[RESOLVED] Need help with 3 things please

Started by mattertatter, July 06, 2012, 02:29:43 pm

Previous topic - Next topic

mattertatter

July 06, 2012, 02:29:43 pm Last Edit: July 09, 2012, 12:19:38 am by mattertatter
The first thing I need help with is regarding removing the "Steps Counter" on the basic menu.

Second thing is changing the "Play Time" to the in game date/time. I am using ForeverZer0's script for climate/date/time


The third and final thing is changing the position of the HUD to the top left corner of the screen. It is currently centered at the bottom of the screen. This is the HUD script I am using.


Thanks in advance for your help.

KK20

No Steps Window (simple fix): ShowHide
#==============================================================================
# ** Window_Steps
#------------------------------------------------------------------------------
#  This window displays step count on the menu screen.
#==============================================================================

class Window_Steps < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
  end
end

HUD at Top: ShowHide
#==============================================================================
# ** Hud Menu
#==============================================================================
# Raziel
# Version 2.0
# 2007-08-18
#
# Modified by KK20
#   - Moves the HUD to the top of the screen
#------------------------------------------------------------------------------
#===============================================================================

# * Module Raz_Hud
#===============================================================================


module Raz_Hud
#switch to show/hide the hud
SWITCH_ID = 1
#set it to true to center the hud if there are less than four party members
Center_hud = true
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================

class Scene_Map
#----------------------------------------------------------------------------
# * Alias Listings
#----------------------------------------------------------------------------
alias raz_hud_main main
alias raz_hud_update update
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
   @hud_dummy = []
   for i in 0...$game_party.actors.size
@hud_dummy[i] = Window_Dummy.new(i)
   end
   @hud_window = Window_HUD.new
   raz_hud_main
   @hud_window.dispose
   @hud_dummy.each { |hud| hud.dispose }
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
   @hud_dummy.each {|hud| hud.visible = $game_switches[Raz_Hud::SWITCH_ID]}
   if @hud_dummy[$game_party.actors.size] != nil
@hud_dummy.each{|hud| hud.dispose}
@hud_dummy = []
for i in 0...$game_party.actors.size
   @hud_dummy[i] = Window_Dummy.new(i)
end
   end
   @hud_window.update
   raz_hud_update
end
end
#===============================================================================

# * Window_HUD
#===============================================================================


class Window_HUD < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
   super(0, 0, 800, 600)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.opacity = 0
   self.visible = $game_switches[Raz_Hud::SWITCH_ID]
   refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
   self.contents.clear
   @old_hp, @old_sp, @old_exp, @old_size = [],[],[],$game_party.actors.size
   for actor in $game_party.actors
@old_hp << actor.hp; @old_sp << actor.sp; @old_exp << actor.exp
a = $game_party.actors.size - 1
center = Raz_Hud::Center_hud == true ? (240 - (a * 80)) : 0
x = ($game_party.actors.index(actor) * 160 + 25) + center
     self.contents.font.size = 21
draw_actor_graphic(actor, x - 15, 445-372)
self.contents.font.color = normal_color
self.contents.draw_text(x - 25, -9, 100, 32, actor.name)
draw_slant_bar(x + 8, 396-372, actor.hp, actor.maxhp, 100, 6)
     draw_slant_bar(x + 8, 416-372, actor.sp, actor.maxsp, 100, 6, Color.new(0, 0, 150), Color.new(60, 155, 155))
now_exp = actor.level == 99 ? 1 : actor.now_exp
next_exp = actor.level == 99 ? 1 : actor.next_exp
draw_slant_bar(x + 8, 436-372, now_exp, next_exp, 100, 6, Color.new(0, 150, 0), Color.new(60, 255, 60))
self.contents.font.size = 16
draw_actor_state(actor, x + 45, -9)
self.contents.font.color = normal_color
self.contents.font.bold = true
self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x + 16, 382-372, 100, 32, "#{actor.hp}/#{actor.maxhp}", 1)
self.contents.font.color = actor.sp == 0 ? crisis_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x + 16, 402-372, 100, 32, "#{actor.sp}/#{actor.maxsp}", 1)
self.contents.font.color = system_color
self.contents.font.size = 20
self.contents.font.bold = false
self.contents.draw_text(x, 384-372, 50, 32, $data_system.words.hp)
self.contents.draw_text(x, 404-372, 50, 32, $data_system.words.sp)
self.contents.draw_text(x, 424-372, 50, 32, "Exp")
   end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
   refresh if @old_size != $game_party.actors.size
   @old_hp.each_with_index {|hp, index| refresh if hp != $game_party.actors[index].hp}   
   @old_sp.each_with_index {|sp, index| refresh if sp != $game_party.actors[index].sp}   
   @old_exp.each_with_index {|exp, index| refresh if exp != $game_party.actors[index].exp}
   self.visible = $game_switches[Raz_Hud::SWITCH_ID]
end
end
#===============================================================================

# * Window_Dummy
#===============================================================================


class Window_Dummy < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#   size: Party's size
#--------------------------------------------------------------------------
def initialize(size)
   @old_size = $game_party.actors.size
   x = Raz_Hud::Center_hud == true ? 240 - ($game_party.actors.size - 1) * 80 : 0
   super(160 * size + x, 0,160, 108)
   self.visible = $game_switches[Raz_Hud::SWITCH_ID]
   self.opacity = 200
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Slant Bar (by SephirothSpawn)
#--------------------------------------------------------------------------
def draw_slant_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
   for i in 0..height
self.contents.fill_rect(x + i, y + height - i, width + 1, 1, Color.new(50, 50, 50, 255))
   end
   for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x + i, y + height - i, width, 1, Color.new(r, b, g, a))
   end
   for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height - 1)
   r = bar_color.red * (width - i) / width + end_color.red * i / width
   g = bar_color.green * (width - i) / width + end_color.green * i / width
   b = bar_color.blue * (width - i) / width + end_color.blue * i / width
   a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
   self.contents.fill_rect(x + i + j, y + height - j, 1, 1, Color.new(r, g, b, a))
end
   end
end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor
#--------------------------------------------------------------------------
# * Now Exp
#--------------------------------------------------------------------------
def now_exp
   return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Next Exp
#--------------------------------------------------------------------------
def next_exp
   return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

July 06, 2012, 06:25:10 pm #2 Last Edit: July 06, 2012, 06:29:21 pm by mattertatter
The no steps window fix worked, thanks for that.

The HUD is now at the top but I was wondering if there is a way to move it all the way to the left so that it is in the corner.

I still need help with the Climate/Time box, I want to move it from the top left of the game screen and place it where the steps counter used to be. If you could help me with that it would be greatly appreciated.

Here is a picture of what I would like, if you could do it or explain how to do it that would be awesome.

KK20

Quote from: Configuration within the script#set it to true to center the hud if there are less than four party members
Center_hud = true
Change that to false.

I have never looked into the Climate/Time issue. I kinda expected F0 to do that :P
I'll look into it later probably.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

July 06, 2012, 11:40:14 pm #4 Last Edit: July 07, 2012, 12:19:13 am by mattertatter
Wow I cant believe I missed the fact that Center Hud was on. thanks for the fix and it would be great if you could look into the climate thing.

If it helps this is what my menu looks like and where I want the Time/Day/Date box

KK20

Question: Do you want the clock to update when you are in the menu?

I already got the window thrown into Scene_Menu. Just want to know if there's anything else before I submit it.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

July 07, 2012, 12:58:37 am #6 Last Edit: July 08, 2012, 03:19:15 am by mattertatter
It would be great if the clock updated while the menu is open.
Thanks for all your help btw

Also if it;s not to much trouble could you explain to me how to make the HUD show the current exp/max exp like the health and mana bars do?
so for level one it would show 0/30

KK20

Spoiler: ShowHide
#==============================================================================
# Scene_Menu
#   - Creates the time window in the menu
#==============================================================================
class Scene_Menu
  attr_accessor :clock
 
  alias create_f0_time_window main
  def main
    # Create clock if memory is true.
    $game_system.time.clock_face(0, 288, 255, 'Calibri', 18)
    if $game_system.clock_memory
      @clock = $game_system.analog_clock ? Analog_Clock.new : MenuClock.new(160,128)
    end
    # Call alias
    create_f0_time_window
    # Dispose clock
    a = CCTS::CLOCK_FACE
    $game_system.time.clock_face(a[0],a[1],a[2],a[3],a[4])
    @clock.dispose
  end
 
  alias update_f0_time_window update
  def update
    $game_system.update
    @clock.update
    update_f0_time_window
  end
 
end
#==============================================================================
# Game_System
#   - Quick edits to the original script ( clone CLOCK_FACE and @time.update )
#==============================================================================
class Game_System
 
  def initialize
    zer0_time_system_init
    # Initialize the Time_System class.
    @time = Time_System.new
    # Initialize a few other instance variables used by the system.
    @clock, @simple_clock, @bgs_volume_update = true, false, 0
    @clock_memory, @analog_clock = true, CCTS::ANALOG_CLOCK
    # Set starting values for the clock faces.
    @clock_face, @analog_face = CCTS::CLOCK_FACE.clone, CCTS::ANALOG_FACE
  end
 
  def update
    # Updates the time
    @time.update
    # Update BGS volume transitions if needed.
    if @bgs_volume_update != 0
      @bgs_volume += @bgs_volume_rate
      change_bgs_volume(@bgs_volume.round)
      @bgs_volume_update -= 1
    end
    # Call normal update method of Game_System.
    zer0_time_system_upd
  end
 
end
#==============================================================================
# MenuClock
#   - A duplicate of class Clock, but uses its own settings
#==============================================================================
class MenuClock < Window_Base
 
  def initialize(w = nil, h = nil)
    # Determine dimensions by what type of clock will be created.
    if [w,h].include?(nil)
      dim = $game_system.simple_clock ? [100, 47] : [176, 80]
    else
      dim = [w, h]
    end
    # Create the window
    super($game_system.clock_face[0], $game_system.clock_face[1], dim[0], dim[1])
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity, self.z = $game_system.clock_face[2], 9998
    self.contents.font.name = $game_system.clock_face[3]
    self.contents.font.size = $game_system.clock_face[4]
    # Determine the skin used for the clock.
    if CCTS::CLOCK_SKIN == nil
      self.windowskin = nil
    elsif CCTS::CLOCK_SKIN == 'DEFAULT SKIN'
      self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name)
    else
      self.windowskin = RPG::Cache.windowskin(CCTS::CLOCK_SKIN)
    end
    # Draw the clock.
    refresh
  end
 
  def refresh
    # Set a few local variables to current time variables.
    day, year = $game_system.time.day.to_s, $game_system.time.year.to_s
    month = CCTS::MONTHS[$game_system.time.month-1]
    time = sprintf(CCTS::TIME_FORMAT, $game_system.time.hour, $game_system.time.minute)
    # Clear the current bitmap.
    self.contents.clear
    # Set local variables equal to different text widths.
    tmw = 8 + contents.text_size('Time:').width
    dyw = 8 + contents.text_size('Day:').width
    dtw = 8 + contents.text_size('Date:').width
    self.contents.font.color = system_color
    size = self.contents.font.size
    # Begin to draw the clock. Only include more details if not Simple Clock.
    self.contents.draw_text(0, 0, 144, size, 'Time:')
    unless $game_system.simple_clock
      self.contents.draw_text(0, 15+20, 144, size, 'Day:')
      self.contents.draw_text(0, 30+40, 144, size, 'Date:')
      self.contents.font.color = normal_color
      self.contents.draw_text(dyw, 15+20, 144, size, $game_system.time.day_name)
      self.contents.draw_text(dtw, 30+40, 144, size, "#{month} #{day}, #{year}")
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(tmw, 0, 144, size, time)
    # Set instance variable. Used to check when to next refresh.
    @mins = $game_system.time.minute
  end
 
  def update
    super
    # Redraw the clock every game minute.
    refresh if @mins != $game_system.time.minute
  end
 
end
Throw that under Time/Climate script.

As for the EXP in the HUD:
Spoiler: ShowHide
class Window_HUD < Window_Base
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
   self.contents.clear
   @old_hp, @old_sp, @old_exp, @old_size = [],[],[],$game_party.actors.size
   for actor in $game_party.actors
@old_hp << actor.hp; @old_sp << actor.sp; @old_exp << actor.exp
a = $game_party.actors.size - 1
center = Raz_Hud::Center_hud == true ? (240 - (a * 80)) : 0
x = ($game_party.actors.index(actor) * 160 + 25) + center
     self.contents.font.size = 21
draw_actor_graphic(actor, x - 15, 445-372)
self.contents.font.color = normal_color
self.contents.draw_text(x - 25, -9, 100, 32, actor.name)
draw_slant_bar(x + 8, 396-372, actor.hp, actor.maxhp, 100, 6)
     draw_slant_bar(x + 8, 416-372, actor.sp, actor.maxsp, 100, 6, Color.new(0, 0, 150), Color.new(60, 155, 155))
now_exp = actor.level == 99 ? 1 : actor.now_exp
next_exp = actor.level == 99 ? 1 : actor.next_exp
draw_slant_bar(x + 8, 436-372, now_exp, next_exp, 100, 6, Color.new(0, 150, 0), Color.new(60, 255, 60))
self.contents.font.size = 16
draw_actor_state(actor, x + 45, -9)
self.contents.font.color = normal_color
self.contents.font.bold = true
self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x + 16, 382-372, 100, 32, "#{actor.hp}/#{actor.maxhp}", 1)
self.contents.font.color = actor.sp == 0 ? crisis_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x + 16, 402-372, 100, 32, "#{actor.sp}/#{actor.maxsp}", 1)
   ############################################
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 16, 424-372, 100, 32, "#{actor.exp_s}/#{actor.next_exp_s}", 1)
   ############################################
self.contents.font.color = system_color
self.contents.font.size = 20
self.contents.font.bold = false
self.contents.draw_text(x, 384-372, 50, 32, $data_system.words.hp)
self.contents.draw_text(x, 404-372, 50, 32, $data_system.words.sp)
self.contents.draw_text(x, 424-372, 50, 32, "Exp")
   end
end
end
Paste below the HUD script. The specific code is located in between the line of ###.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

July 08, 2012, 05:23:11 pm #8 Last Edit: July 08, 2012, 05:27:10 pm by mattertatter
I'm sorry but I'm confused about where you want me to put the script for time in the menu. Do I create a new script under the time/climate or do I add it to the existing script somewhere? FORGET THAT I found it

Now I am getting this error


and this is my Scene_Menu script
# * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Save"
    s6 = "Quit"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    # Make play time window
    @clock_window = Clock.new
    @clock_window.x = 0
    @clock_window.y = 224
    # Make steps window
    @steps_window = Window_Steps.new
    @steps_window.x = 0
    @steps_window.y = 320
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 160
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @clock_window.dispose
    @steps_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @clock_window.update
    @steps_window.update
    @gold_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 5  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end

KK20

I see you tried to edit in the clock yourself. Remove all of those--my fix already does that stuff for you.

Also for next time, in your error it says line 73, but line 73 is just a comment code (a.k.a. not the reason you are getting the error). I need to see what that line is in the code.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

July 08, 2012, 09:28:42 pm #10 Last Edit: July 08, 2012, 09:51:21 pm by mattertatter
Ok so I guess I didn't put the script in the right place because the clock still isn't there...

if it helps the journal script im using edits the menu
class Scene_Menu
        #--------------------------------------------------------------------------
        # * Object Initialization
        #    menu_index : command cursor's initial position
        #--------------------------------------------------------------------------
        def initialize(menu_index = 0)
          @menu_index = menu_index
        end
        #--------------------------------------------------------------------------
        # * Main Processing
        #--------------------------------------------------------------------------
        def main
          # Make command window
          s1 = $data_system.words.item
          s2 = $data_system.words.skill
          s3 = $data_system.words.equip
          s4 = "Status"
          s5 = "Journal"
          s6 = "Save"
          s7 = "End Game"
          @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
          @command_window.index = @menu_index
          # If number of party members is 0
          if $game_party.actors.size == 0
            # Disable items, skills, equipment, and status
            @command_window.disable_item(0)
            @command_window.disable_item(1)
            @command_window.disable_item(2)
            @command_window.disable_item(3)
          end
          # If save is forbidden
          if $game_system.save_disabled
            # Disable save
            @command_window.disable_item(4)
          end
          # Make play time window
          @playtime_window = Window_PlayTime.new
          @playtime_window.x = 0
          @playtime_window.y = 256
          @playtime_window.height = 96
          # Make steps window
          @steps_window = Window_Steps.new
          @steps_window.x = 0
          @steps_window.y = 352
          # Make gold window
          @gold_window = Window_Gold.new
          @gold_window.x = 0
          @gold_window.y = 416
          @gold_window.height = 64
          # Make status window
          @status_window = Window_MenuStatus.new
          @status_window.x = 160
          @status_window.y = 0
          # Execute transition
          Graphics.transition
          # Main loop
          loop do
            # Update game screen
            Graphics.update
            # Update input information
            Input.update
            # Frame update
            update
            # Abort loop if screen is changed
            if $scene != self
              break
            end
          end
          # Prepare for transition
          Graphics.freeze
          # Dispose of windows
          @command_window.dispose
          @playtime_window.dispose
          @steps_window.dispose
          @gold_window.dispose
          @status_window.dispose
        end
     
        def update_command
          # If B button was pressed
          if Input.trigger?(Input::B)
            # Play cancel SE
            $game_system.se_play($data_system.cancel_se)
            # Switch to map screen
            $scene = Scene_Map.new
            return
          end
          # If C button was pressed
          if Input.trigger?(Input::C)
            # If command other than save or end game, and party members = 0
            if $game_party.actors.size == 0 and @command_window.index < 4
              # Play buzzer SE
              $game_system.se_play($data_system.buzzer_se)
              return
            end
            # Branch by command window cursor position
            case @command_window.index
            when 0  # item
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Switch to item screen
              $scene = Scene_Item.new
            when 1  # skill
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Make status window active
              @command_window.active = false
              @status_window.active = true
              @status_window.index = 0
            when 2  # equipment
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Make status window active
              @command_window.active = false
              @status_window.active = true
              @status_window.index = 0
            when 3  # status
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Make status window active
              @command_window.active = false
              @status_window.active = true
              @status_window.index = 0
            when 4  # journal
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Switch to journal scene
              $scene = Scene_Journal.new
            when 5  # save
              # If saving is forbidden
              if $game_system.save_disabled
                # Play buzzer SE
                $game_system.se_play($data_system.buzzer_se)
                return
              end
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Switch to save screen
              $scene = Scene_Save.new
            when 6  # end game
              # Play decision SE
              $game_system.se_play($data_system.decision_se)
              # Switch to end game screen
              $scene = Scene_End.new
            end
            return
          end
        end
      end
     
      #=============================================================
     # ** Window_Steps
     #------------------------------------------------------------------------------
     #  This window displays step count on the menu screen.
     #=============================================================
     
     class Window_Steps < Window_Base
       #--------------------------------------------------------------------------
       # * Object Initialization
       #--------------------------------------------------------------------------
       def initialize
         super(0, 0, 160, 64)
         self.contents = Bitmap.new(width - 32, height - 32)
         refresh
       end
       #--------------------------------------------------------------------------
       # * Refresh
       #--------------------------------------------------------------------------
       def refresh
         self.contents.clear
         self.contents.font.color = system_color
         self.contents.draw_text(0, 0, 50, 32, "Steps")
         self.contents.font.color = normal_color
         self.contents.draw_text(50, 0, 78, 32, $game_party.steps.to_s, 2)
       end
     end


Another small detail that if you can fix I would really appreciate is when I select End Game and then cancel it it exits but the selector goes to the save selection. the same thing happens if i select save only it goes to the Journal option. but if i select Journal or anything above it it works fine

KK20

Small bug fix I found: ShowHide
#==============================================================================
# Scene_Menu
#   - Creates the time window in the menu
#==============================================================================
class Scene_Menu
  attr_accessor :clock
 
  alias create_f0_time_window main
  def main
    # Create clock if memory is true.
    $game_system.time.clock_face(0, 288, 255, 'Calibri', 18)
    if $game_system.clock_memory
      @clock = $game_system.analog_clock ? Analog_Clock.new : MenuClock.new(160,128)
    end
    # Call alias
    create_f0_time_window
    # Dispose clock
    a = CCTS::CLOCK_FACE
    $game_system.time.clock_face(a[0],a[1],a[2],a[3],a[4]) if $scene.is_a?(Scene_Map)
    @clock.dispose
  end
 
  alias update_f0_time_window update
  def update
    $game_system.update
    @clock.update
    update_f0_time_window
  end
 
end
#==============================================================================
# Game_System
#   - Quick edits to the original script ( clone CLOCK_FACE and @time.update )
#==============================================================================
class Game_System
 
  def initialize
    zer0_time_system_init
    # Initialize the Time_System class.
    @time = Time_System.new
    # Initialize a few other instance variables used by the system.
    @clock, @simple_clock, @bgs_volume_update = true, false, 0
    @clock_memory, @analog_clock = true, CCTS::ANALOG_CLOCK
    # Set starting values for the clock faces.
    @clock_face, @analog_face = CCTS::CLOCK_FACE.clone, CCTS::ANALOG_FACE
  end
 
  def update
    # Updates the time
    @time.update
    # Update BGS volume transitions if needed.
    if @bgs_volume_update != 0
      @bgs_volume += @bgs_volume_rate
      change_bgs_volume(@bgs_volume.round)
      @bgs_volume_update -= 1
    end
    # Call normal update method of Game_System.
    zer0_time_system_upd
  end
 
end
#==============================================================================
# MenuClock
#   - A duplicate of class Clock, but uses its own settings
#==============================================================================
class MenuClock < Window_Base
 
  def initialize(w = nil, h = nil)
    # Determine dimensions by what type of clock will be created.
    if [w,h].include?(nil)
      dim = $game_system.simple_clock ? [100, 47] : [176, 80]
    else
      dim = [w, h]
    end
    # Create the window
    super($game_system.clock_face[0], $game_system.clock_face[1], dim[0], dim[1])
    self.contents = Bitmap.new(width - 32, height - 32)
    self.back_opacity, self.z = $game_system.clock_face[2], 9998
    self.contents.font.name = $game_system.clock_face[3]
    self.contents.font.size = $game_system.clock_face[4]
    # Determine the skin used for the clock.
    if CCTS::CLOCK_SKIN == nil
      self.windowskin = nil
    elsif CCTS::CLOCK_SKIN == 'DEFAULT SKIN'
      self.windowskin = RPG::Cache.windowskin($game_system.windowskin_name)
    else
      self.windowskin = RPG::Cache.windowskin(CCTS::CLOCK_SKIN)
    end
    # Draw the clock.
    refresh
  end
 
  def refresh
    # Set a few local variables to current time variables.
    day, year = $game_system.time.day.to_s, $game_system.time.year.to_s
    month = CCTS::MONTHS[$game_system.time.month-1]
    time = sprintf(CCTS::TIME_FORMAT, $game_system.time.hour, $game_system.time.minute)
    # Clear the current bitmap.
    self.contents.clear
    # Set local variables equal to different text widths.
    tmw = 8 + contents.text_size('Time:').width
    dyw = 8 + contents.text_size('Day:').width
    dtw = 8 + contents.text_size('Date:').width
    self.contents.font.color = system_color
    size = self.contents.font.size
    # Begin to draw the clock. Only include more details if not Simple Clock.
    self.contents.draw_text(0, 0, 144, size, 'Time:')
    unless $game_system.simple_clock
      self.contents.draw_text(0, 15+20, 144, size, 'Day:')
      self.contents.draw_text(0, 30+40, 144, size, 'Date:')
      self.contents.font.color = normal_color
      self.contents.draw_text(dyw, 15+20, 144, size, $game_system.time.day_name)
      self.contents.draw_text(dtw, 30+40, 144, size, "#{month} #{day}, #{year}")
    end
    self.contents.font.color = normal_color
    self.contents.draw_text(tmw, 0, 144, size, time)
    # Set instance variable. Used to check when to next refresh.
    @mins = $game_system.time.minute
  end
 
  def update
    super
    # Redraw the clock every game minute.
    refresh if @mins != $game_system.time.minute
  end
 
end
Script order is simply:
Time/Climate
Your Editted Menu
The script in this post


You shouldn't be getting any errors.
As for the other issue, that's a matter of setting the correct value to the menu index when you call back to Scene_Menu. Somewhere in the Scene_Save and Scene_End scripts you should see a line that says
$scene = Scene_Menu.new(some_number)
Just increase the number it has indicated there by one (Scene_Save should be 5 and Scene_End should be 6).

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

July 08, 2012, 11:01:50 pm #12 Last Edit: July 08, 2012, 11:16:58 pm by mattertatter
Thank you so much, you are the best. I just need 2 more tiny favors, how do I extend the first box on the menu so it covers the black part. I believe it has to do with changing the Y value right? I just don't know how to do that. Right now it looks like this.



And the very last thing is how do I make it so the Time/Day/Date box disappears without the person playing seeing it. right now I have an event on autorun that closes it, but you can see it, then it closes. so it is over the HUD for a second and it doesn't look very, for lack of a better word, professional.
EDIT
It seems to appear and disappear every time the player moves to a different map.

That was the last thing I promise. I really appreciate your help.

KK20

The y-value will only move the box up and down. What it sounds like you want to do is stretch the window, thus changing its height.

In your editted menu script, near the beginning of it, you will find:
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
@command_window.index = @menu_index
Put the following line directly below those lines:
@command_window.height = 288

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

Thanks for the fix and also for the knowledge. I hate to feel like I'm bothering you but could you please look into the edit's of my last post. If you are busy or just don't want to that's alright you have helped me a bunch,

KK20

Didn't take long to find the problem. It was whenever 'Scene_Map.new' is called, the time window would be drawn first.
Spoiler: ShowHide
module CCTS
  # Hides the window whenever Scene_Map is called
  HIDE_WINDOW_ON_MAP = true
end

class Scene_Map
 
  def main
    Graphics.transition
    # Create clock if memory is true.
    if $game_system.clock_memory and !CCTS::HIDE_WINDOW_ON_MAP
      @clock = $game_system.analog_clock ? Analog_Clock.new : Clock.new
    end
    # Main loop.
    zer0_clock_main
    # Dispose clock if it still exists when scene changes.
    if @clock != nil
      @clock.dispose
    end
  end
 
end
Paste below Time/Climate script.

My job is to help with the easy, little script edits around here anyways. I've got nothing else better to do. :P

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

mattertatter

Ok, all problems solved. I really appreciate the help thanks