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.

[FILLED] Relatively Simple Script Request

Forgive me if this has been done, but I'm requesting a Scene_Title that only shows New Game and Shutdown if the player has no savefile, but will show all three options (New Game, Load, and Shutdown) if the player does have a save. It sounds simple, but I don't really know what's simple or complicated in scripting. In anycase, I'm sure I'm not the only one who would want this. Again, forgive me if this has been done before and if it has, please provide me with a link.
 
Move this
Code:
    # Continue enabled determinant
    # Check if at least one save file exists
    # If enabled, make @continue_enabled true; if disabled, make it false
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
Above this
Code:
    # Make command window

Find
Code:
    @command_window = Window_Command.new(192, [s1, s2, s3])

Replace with
Code:
    commands = @continue_enabled ? [s1, s2, s3] : [s1, s2]
    @command_window = Window_Command.new(192, commands)

Replace
Code:
      when 1  # Continue
        command_continue
With
Code:
      when 1  # Continue / Shutdown
        @continue_enabled ? command_continue : command_shutdown
 
Great, but I had to replace commands = @continue_enabled ? [s1, s2, s3] : [s1, s2] with commands = @continue_enabled ? [s1, s2, s3] : [s1, s3]

However, although Shut Down works when there is no savefile, it's opacity is low (like continue is when you have no savefile in the default script). Anyway to change that?

EDIT:

Nevermind, figured it out. Thanks Seph, great script :)
 

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