02-15-2015, 11:34 PM
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:
Through this, I can access particular information (like specific variables) in the save file display.This is in the DataManager module for my own game, albeit slimmed down:
PHP Code:
<?php
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
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:
<?php
def self.make_save_contents
contents = {}
contents[:system] = $game_system
[...]
def self.extract_save_contents(contents)
$game_system = contents[:system]
[...]