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.

Window_SaveFile Help

Hi reader. :)

I was wondering how to make it so that when Scene_Load or Scene_Save come up it shows the first actor's name in the window instead of ''File 1'' in the Window_SaveFile.

Something at name, right? :
Code:
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    name = "File blablabla"

But what more needs to be added and stuff.

Thank you. ::)
 

poccil

Sponsor

Add the following after line 32 of the script section Window_SaveFile, the one that reads: "@game_variables = Marshal.load(file)".

Code:
      @game_self_switches = Marshal.load(file)
      @game_screen = Marshal.load(file)
      @game_actors = Marshal.load(file)

In the refresh method of Window_SaveFile, replace this line:

Code:
      name = "File#{@file_index + 1}"

with this:

Code:
    if @file_exist
      name = "File #{@game_actors[1].name}"
    else
      name = "File #{@file_index + 1}"      
    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