[RGSS] Storing objects

Started by bigace, February 01, 2014, 12:00:02 am

Previous topic - Next topic

bigace

So I've final near completed my option scene for my game and I have one more thing I need to finish it. What I want store is the settings so when you click confirm the settings save, but when you click cancel the setting revert back to the previously saved settings. So far all I have is the default settings set:

def yes_default
DataManager.full_screen_mode if $game_system.fullscreen
$game_system.message_speed = $warconfig[:settings][:message_speed]
$game_system.fullscreen = $warconfig[:settings][:fullscreen]
$game_system.bar_style = $warconfig[:settings][:bar_style]
$game_system.autodash = $warconfig[:settings][:autodash]
$game_system.mini_map = $warconfig[:settings][:mini_map]
$game_system.item_sort = $warconfig[:sort][0]
[:bgm, :sfx].each {|v| $game_system.volume_change(v, 100)}
['bgm','bgs'].each {|v| eval "$game_system.#{v}_play($game_system.#{v}_memorize)"}
update_o_commands
cancel_default
end


But have no clue on where to start on the storing updated versions of the configurations above.


Use Dropbox to upload your files. Much simpler than other upload sites, you can simply place a folder on your desktop that will sync with your DropBox account.

Ryex

store the entire configuration in an object attached to $game_system, it the easiest way to ensure the configuration gets saved
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />