Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Map name as save file name
#9
Investigation.... Detective Realization... Thinking Recognition... Plan

You're using Legacy's menu. Good thing I didn't delete your old project, right?

Paste THIS directly below Legacy's Menu instead:

Code:
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Get Map Name
  #--------------------------------------------------------------------------  
  def map_name
    @mapinfo = load_data("Data/MapInfos.rxdata") if @mapinfo == nil
    return @mapinfo[@map_id].name
  end
end


#==============================================================================
# ** Window_File
#------------------------------------------------------------------------------
#  This window displays files on the save and load screens.
#==============================================================================

class Window_File < Window_Selectable
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    time_stamp = Time.at(0)
    for i in 0...LegACy::SAVE_NUMBER
      filename = "Save#{i + 1}.rxdata"
      self.contents.draw_text(1, i * 32, 32, 32, (i + 1).to_s, 1)
      
      
      if FileTest.exist?(filename)
        #===================================================================
        file = File.open(filename, "r")
        @time_stamp = file.mtime
        @characters = Marshal.load(file)
        @frame_count = Marshal.load(file)
        @game_system = Marshal.load(file)
        @game_switches = Marshal.load(file)
        @game_variables = Marshal.load(file)
        # ==================================================
        #  -- This skips through other pieces of data until
        #     We get to the game map section
        t = Marshal.load(file) # Self Switches
        t = Marshal.load(file) # Screen
        t = Marshal.load(file) # Actors
        t = Marshal.load(file) # Party
        t = Marshal.load(file) # Troop
        # ==================================================
        @game_map       = Marshal.load(file)
        @total_sec = @frame_count / Graphics.frame_rate
        file.close          
        #===================================================================
=begin        
        size = File.size(filename)
        if size.between?(1000, 999999)
          size /= 1000
          size_str = "#{size} KB"
        elsif size > 999999
          size /= 1000000
          size_str = "#{size} MB"
        else
          size_str = size.to_s
        end
        time_stamp = File.open(filename, "r").mtime
        date = time_stamp.strftime("%m/%d/%Y")
        time = time_stamp.strftime("%H:%M")
        self.contents.font.size = 18 #20
        self.contents.font.bold = true
        self.contents.draw_text(38, i * 32, 120, 32, date)
        self.contents.draw_text(160, i * 32, 100, 32, time)
        self.contents.draw_text(0, i * 32, 284, 32, size_str, 2)
=end  
        #===================================================================
        # HERE is where you edit!!!!!
        time_stamp  = File.open(filename, "r").mtime
        date        = time_stamp.strftime("%m/%d/%Y")
        name        = @game_map.map_name
        self.contents.draw_text (38, (i-1) * 32, 320, 32, name)
        self.contents.draw_text(160, (i-1) * 32, 120, 32, date)
        
        #===================================================================
      end

      
    end
  end
end

Note the area between thick lines that you may edit.

And as Doug would say... Doug Marcaida It will kill...
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
[Image: QrnbKlx.jpg]
[Image: sGz1ErF.png] [Image: liM4ikn.png] [Image: fdzKgZA.png] [Image: sj0H81z.png]
[Image: QL7oRau.png] [Image: uSqjY09.png] [Image: GAA3qE9.png] [Image: 2Hmnx1G.png] [Image: BwtNdKw.png%5B]
Above are clickable links

Reply }


Messages In This Thread
Map name as save file name - by Whisper - 04-29-2020, 09:31 PM
RE: Map name as save file name - by DerVVulfman - 04-30-2020, 03:36 AM
RE: Map name as save file name - by kyonides - 04-30-2020, 04:00 AM
RE: Map name as save file name - by DerVVulfman - 04-30-2020, 04:11 AM
RE: Map name as save file name - by Whisper - 04-30-2020, 05:17 PM
RE: Map name as save file name - by kyonides - 04-30-2020, 08:56 PM
RE: Map name as save file name - by Whisper - 04-30-2020, 10:11 PM
RE: Map name as save file name - by kyonides - 05-01-2020, 12:59 AM
RE: Map name as save file name - by DerVVulfman - 05-01-2020, 03:57 AM
RE: Map name as save file name - by Whisper - 05-01-2020, 05:35 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Weird error when using a custom save script. Steel Beast 6Beets 8 10,040 06-27-2015, 05:54 PM
Last Post: Steel Beast 6Beets
   Custom Save/Load screen Raou 2 6,913 04-01-2015, 08:18 PM
Last Post: Raou
   Script Request - Variables Specific Save File JayRay 2 4,514 04-28-2014, 05:15 AM
Last Post: JayRay
   Checking if a file exists without knowing the extension? PK8 1 4,604 05-29-2011, 10:13 AM
Last Post: MGC
   Save Screen Screenshot Yin 2 5,549 07-05-2010, 06:31 PM
Last Post: Yin
   Can I execute a txt file from a script? deValdr 8 9,656 04-18-2010, 07:34 PM
Last Post: deValdr
   Help With Law's Save System Ryu-ka 0 3,442 04-06-2010, 06:37 PM
Last Post: Ryu-ka
   Need advice on best/easiest save setup rcg916 3 5,580 11-08-2009, 06:24 AM
Last Post: DerVVulfman
   How can I save a map? Charlie Fleed 3 6,092 07-08-2009, 09:55 PM
Last Post: dacloudster
   Forced Save? Yin 9 12,555 04-18-2009, 08:41 PM
Last Post: DerVVulfman



Users browsing this thread: