Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Best Practices for Adding New Data to Saves
#3
It depends on what you're asking? What you're talking about my instinct was handling "header" data for save files. In VXAce, instead of accessing the main body of saved data in actors, system, etc, it creates a set of data that's used for showing in the save menu.

This is in the DataManager module for my own game, albeit slimmed down:
PHP Code:
def self.make_save_header
    header 
= {}
    
header[:characters] = $game_party.characters_for_savefile
    header
[:partysize]  = $game_party.members.size
    header
[:playtime]   = $game_system.playtime
    header
[:location]   = $game_map.display_name
    header
[:day]        = $game_variables[4]
    
header[:image]      = $game_variables[5]
    
header
  end 
Through this, I can access particular information (like specific variables) in the save file display.

However, if you're asking specifically about just saving that data, then I'm not sure what to suggest. I've honestly always just aliased related inits of certain Game_ classes, like System for general things. I've avoided creating whole new modules or classes because of how older RMs treated them in the past. As I recall, if you didn't save and load data in the same order in RMXP, it would cause problems. (Never mind data being absent.)

Of course, checking the Game Data Sneak script/tutorial link, that could be a method around it. It performs the aliasing of Game_ classes without bogging them down. As for the save/load for RMVXA, I suspect it avoids the issues RMXP has: make_save_contents and extract_save_contents in DataManager look a lot more efficient than RMXP's method.
PHP Code:
def self.make_save_contents
    contents 
= {}
    
contents[:system]        = $game_system
[...]
  
def self.extract_save_contents(contents)
    
$game_system        contents[:system]
[...] 
Reply }


Messages In This Thread
RE: Best Practices for Adding New Data to Saves - by Taylor - 02-15-2015, 11:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 13,238 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   Adding more stats that behave like SP Bennerdeben 8 8,181 07-24-2020, 02:49 PM
Last Post: Bennerdeben
   The Self Data Suite support thread PK8 0 3,445 07-18-2015, 09:41 PM
Last Post: PK8
   Importing previous data to a 'sequal' fgsfds 1 3,849 05-06-2010, 07:35 PM
Last Post: deValdr
   Adding new Stats? shintashi 2 5,047 03-27-2010, 11:42 PM
Last Post: Victor Sant



Users browsing this thread: