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.

menu edit error

after 25 minutes i figured out how to remove the save option from the main menu.
i think it would look stupid for a game that uses a save crystal to have an unused save option on the menu.
here's my problem:
problem.jpg

after i go to end game and then to cancel, it shows a blank button that doesn't do anything. how can i fix this?
btw to make the script i deleted s5 and made s4 the end game one.
 
Go to lines 50-71, which should look like this:

Code:
  #--------------------------------------------------------------------------

  # * Create Command Window

  #--------------------------------------------------------------------------

  def create_command_window

    s1 = Vocab::item

    s2 = Vocab::skill

    s3 = Vocab::equip

    s4 = Vocab::status

    s5 = Vocab::save

    s6 = Vocab::game_end

    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])

    @command_window.index = @menu_index

    if $game_party.members.size == 0          # If number of party members is 0

      @command_window.draw_item(0, false)     # Disable item

      @command_window.draw_item(1, false)     # Disable skill

      @command_window.draw_item(2, false)     # Disable equipment

      @command_window.draw_item(3, false)     # Disable status

    end

    if $game_system.save_disabled             # If save is forbidden

      @command_window.draw_item(4, false)     # Disable save

    end

  end

Now, change those lines to this:

Code:
  #--------------------------------------------------------------------------

  # * Create Command Window

  #--------------------------------------------------------------------------

  def create_command_window

    s1 = Vocab::item

    s2 = Vocab::skill

    s3 = Vocab::equip

    s4 = Vocab::status

    s5 = Vocab::game_end

    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])

    @command_window.index = @menu_index

    if $game_party.members.size == 0          # If number of party members is 0

      @command_window.draw_item(0, false)     # Disable item

      @command_window.draw_item(1, false)     # Disable skill

      @command_window.draw_item(2, false)     # Disable equipment

      @command_window.draw_item(3, false)     # Disable status

    end

    if $game_system.save_disabled             # If save is forbidden

      @command_window.draw_item(4, false)     # Disable save

    end

  end

In case you were wondering what the problem was, check your copy where you see the s5 =... to the @command_window =...

Also, this isn't all you need to do. You also need to edit the following portion of code (found right after the section above)

Code:
  #--------------------------------------------------------------------------

  # * Update Command Selection

  #--------------------------------------------------------------------------

  def update_command_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      $scene = Scene_Map.new

    elsif Input.trigger?(Input::C)

      if $game_party.members.size == 0 and @command_window.index < 4

        Sound.play_buzzer

        return

      elsif $game_system.save_disabled and @command_window.index == 4

        Sound.play_buzzer

        return

      end

      Sound.play_decision

      case @command_window.index

      when 0      # Item

        $scene = Scene_Item.new

      when 1,2,3  # Skill, equipment, status

        start_actor_selection

      when 4      # Save

        $scene = Scene_File.new(true, false, false)

      when 5      # End Game

        $scene = Scene_End.new

      end

    end

  end

so that it looks like this:

Code:
  #--------------------------------------------------------------------------

  # * Update Command Selection

  #--------------------------------------------------------------------------

  def update_command_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      $scene = Scene_Map.new

    elsif Input.trigger?(Input::C)

      if $game_party.members.size == 0 and @command_window.index < 4

        Sound.play_buzzer

        return

      elsif $game_system.save_disabled and @command_window.index == 4

        Sound.play_buzzer

        return

      end

      Sound.play_decision

      case @command_window.index

      when 0      # Item

        $scene = Scene_Item.new

      when 1,2,3  # Skill, equipment, status

        start_actor_selection

      when 4      # End Game

        $scene = Scene_End.new

      end

    end

  end
 
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
@command_window = Window_Command.new(130, [s1, s2, s3, s4, s5])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
end

thats what i had before...i'll try it
line 58 nomethod error occured
 
Heres all the scripts i edited.
Scene_Menu 50-94
Code:
  #--------------------------------------------------------------------------

  # * Create Command Window

  #--------------------------------------------------------------------------

    def create_command_window

      s1 = Vocab::item

      s2 = Vocab::skill

      s3 = Vocab::equip

      s4 = Vocab::status

      s5 = Vocab::game_end

      @command_window = Window_Command.new(130, [s1, s2, s3, s4, s5])

      @command_window.index = @menu_index

  if $game_party.members.size == 0 # If number of party members is 0

    @command_window.draw_item(0, false) # Disable item

    @command_window.draw_item(1, false) # Disable skill

    @command_window.draw_item(2, false) # Disable equipment

    @command_window.draw_item(3, false) # Disable status

    end

  end

 

  #--------------------------------------------------------------------------

  # * Update Command Selection

  #--------------------------------------------------------------------------

  def update_command_selection

    if Input.trigger?(Input::B)

      Sound.play_cancel

      $scene = Scene_Map.new

    elsif Input.trigger?(Input::C)

      if $game_party.members.size == 0 and @command_window.index < 4

        Sound.play_buzzer

        return

      elsif $game_system.save_disabled and @command_window.index == 4

        Sound.play_buzzer

        return

      end

      Sound.play_decision

      case @command_window.index

      when 0      # Item

        $scene = Scene_Item.new

      when 1,2,3  # Skill, equipment, status

        start_actor_selection

      when 4      # End Game

        $scene = Scene_End.new

      end

    end

  end

Vocab:
Code:
  # Status

  def self.status

    return $data_system.terms.status

  end

 

  # Game End

  def self.save

    return $data_system.terms.game_end

  end
I removed the save word.
 
Tar Nybuki":118xy25c said:
thats what i had before...i'll try it
line 58 nomethod error occured

Not sure what could cause that error, it works fine for me. Also, to fix the final problem, find these lines in Scene_End (lines 38-43)

Code:
  #--------------------------------------------------------------------------

  # * Return to Original Screen

  #--------------------------------------------------------------------------

  def return_scene

    $scene = Scene_Menu.new(5)

  end

and replace it with this:

Code:
  #--------------------------------------------------------------------------

  # * Return to Original Screen

  #--------------------------------------------------------------------------

  def return_scene

    $scene = Scene_Menu.new(4)

  end
 

Jason

Awesome Bro

Glitchfinder":1oysxej8 said:
Tar Nybuki":1oysxej8 said:
thats what i had before...i'll try it
line 58 nomethod error occured

Not dure what could cause that error, it works fine for me. Also, to fix the final problem, find these lines in Scene_End (lines 38-43)

Code:
  #--------------------------------------------------------------------------

  # * Return to Original Screen

  #--------------------------------------------------------------------------

  def return_scene

    $scene = Scene_Menu.new(5)

  end

and replace it with this:

Code:
  #--------------------------------------------------------------------------

  # * Return to Original Screen

  #--------------------------------------------------------------------------

  def return_scene

    $scene = Scene_Menu.new(4)

  end

Bingo !

Thats most likely what I missed off, lol. :cheers:
 
Oh, found the error. You removed a piece of necessary vocab. Just change the edited line (in the vocab module) back to:

Code:
  # Game End

  def self.game_end

    return $data_system.terms.game_end

  end
 

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