Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RESOLVED] Need help with 3 things please

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
http://www.rmxpunlimited.net/forums/topic/6996-complete-climate-time-system-ccts/

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.
http://www.rmxpunlimited.net/forums/topic/8415-hud-menu/

Thanks in advance for your help.
 

Eventing_Guy

Awesome Bro

If I remember Correctly... in the script "Scene_Menu"

Look for...

# Make play time window
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 320


[It's around row 43 - 46]

adjust Y, to move it up and down.

Hope that helps :grin:
 
the only problem is that the Day/Date/Time box isn't in the menu to start with. it is on the game screen.
It looks like this
http://www.imgur.com/2CtYV

I want it in the menu screen.

if it helps this is what my menu screen currently looks like
http://i.imgur.com/jFEcm.png
 
I took a look at the script and it's pretty complicated, but assuming you aren't using the analog clock, you can try this:

Like Eventing_Guy mentioned, find the line where is adds the playtime. Now replace every "@playtime_window" with "@clock_window" and every "Window_PlayTime.new" with "Clock.new" (Ctrl-H). You can also adjust the height (y) there.

This should work because Clock is a class that inherits from Window_Base (the parent class of all windows in the menu).

Then to disable the clock on Scene_Map, use this in a script call:
clock(false)

Just an untested hunch, so let me know if that does/n't works out!
 
Hmm, mind posting your edited "Scene_Menu" for me (or at least line 78)?

By script call, I mean the "Call Script" function (I believe it's on event page 3?) which lets you run code in Ruby. If you take a look at ForeverZer0's script, it should have instructions on what command does what.
"clock(false)" for example turns off the clock display.
 
Line 78: @command_window.update

So I made an event
Script clock(false)
set to auto run
and when i start i get this error NoMethodError occurred while running script undefined method `clock' for #<interpreter:0x8f05610> I FIXED THIS. the code was time.clock(false)
 
ok here is the script.

Code:
 # * 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
 
Hmm, do you have other custom scripts that edit the menu? I'm assuming the "Skill Tree" and "Journal" options come from another script, which might conflict with this. It'd be helpful if you posted those as well.
 
Ok

Journal 4 parts im only posting the one that edits the menu
Code:
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
and the skill tree was just added into the menu as an option, it doesn't actually do anything so I deleted it for now.
 
Okay. If that script is under "Scene_Menu" it should override it, so all the changes you made in the first one (@playtime_window -> @clock_window) should go in this script instead. (It's probably a good habit to revert the default Scene_Menu to what it originally was, though.)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top