Save $data v1.00
by Adiktuzmiko
++ Intoduction ++
Normally, when you edit in-gamethe values of the $data items (like $data_actors,
$data_classes etc), those edits are lost after closing the game.
This is because the game doesn't save the $data objects into the file.
So, I created this script so that the game will include them in the save file.
So now you can make in your game things like permanent upgrades to weapons
without the need to create new weapons.
Also, take note that as per normal behavior of the game, edits to the
$data objects are kept if you don't close the game. Meaning if an edit
is done, and the player just chose to go back to title screen and starts
a new game, his new game will contain the edited data. So I also added
into this script the ability to reset the $data once the player goes to
the title screen. Of course, loading a file will load the saved $data objects
in that file
The scripts saves the following:
$data_actors
$data_classes
$data_items
$data_skills
$data_weapons
$data_armors
$data_enemies
$data_states
$data_troops
Script
Author's notes:
Yeah I know it's really super simple... haha... anyway, only use this if you need to save those data (like if you want to implement some kind of upgrade system which changes the values of the database items), else it will just increase the size of your save files and has some kind of drawback stated below
Also, take note that this means that future edits on the database items included in this script won't affect save files made before the edit
by Adiktuzmiko
++ Intoduction ++
Normally, when you edit in-gamethe values of the $data items (like $data_actors,
$data_classes etc), those edits are lost after closing the game.
This is because the game doesn't save the $data objects into the file.
So, I created this script so that the game will include them in the save file.
So now you can make in your game things like permanent upgrades to weapons
without the need to create new weapons.
Also, take note that as per normal behavior of the game, edits to the
$data objects are kept if you don't close the game. Meaning if an edit
is done, and the player just chose to go back to title screen and starts
a new game, his new game will contain the edited data. So I also added
into this script the ability to reset the $data once the player goes to
the title screen. Of course, loading a file will load the saved $data objects
in that file
The scripts saves the following:
$data_actors
$data_classes
$data_items
$data_skills
$data_weapons
$data_armors
$data_enemies
$data_states
$data_troops
Script
]
#==============================================================================# # Save $data - v1.00# -- Last Updated: 12/09/2013# -- Level: Easy# -- Requires: n/a# #==============================================================================# ++ Intoduction ++#==============================================================================## Normally, when you edit in-gamethe values of the $data items (like $data_actors, # $data_classes etc), those edits are lost after closing the game.# This is because the game doesn't save the $data objects into the file.# # So, I created this script so that the game will include them in the save file. # So now you can make in your game things like permanent upgrades to weapons # without the need to create new weapons.## Also, take note that as per normal behavior of the game, edits to the# $data objects are kept if you don't close the game. Meaning if an edit# is done, and the player just chose to go back to title screen and starts# a new game, his new game will contain the edited data. So I also added# into this script the ability to reset the $data once the player goes to# the title screen. Of course, loading a file will load the saved $data objects# in that file## The scripts saves the following:## $data_actors# $data_classes# $data_items# $data_skills# $data_weapons# $data_armors# $data_enemies# $data_states# $data_troops##==============================================================================# ++ How to use ++#==============================================================================# Just paste it into an empty script in your script editor (preferebly below all# other scripts or at least below any script that modifies Scene_Title)## Take note that you should start a new game or else it will probably throw# an error##==============================================================================# ++ Terms and Conditions ++#==============================================================================## Read this: [URL="http://lescripts.wordpress.com/terms-and-conditions/%5B/url%5D#%23==============================================================================module"]http://lescripts.wordpress.com/terms-and-conditions/##==============================================================================module[/URL] DataManager #-------------------------------------------------------------------------- # * Create Save Contents #-------------------------------------------------------------------------- class <<self; alias make_save_contents_adik make_save_contents; end def self.make_save_contents contents = make_save_contents_adik contents[:data_actors] = $data_actors contents[:data_classes] = $data_classes contents[:data_items] = $data_items contents[:data_skills] = $data_skills contents[:data_weapons] = $data_weapons contents[:data_armors] = $data_armors contents[:data_states] = $data_states contents[:data_enemies] = $data_enemies contents[:data_troops] = $data_troops contents end #-------------------------------------------------------------------------- # * Extract Save Contents #-------------------------------------------------------------------------- class <<self; alias extract_save_contents_adik extract_save_contents; end def self.extract_save_contents(contents) extract_save_contents_adik(contents) $data_actors = contents[:data_actors] $data_classes = contents[:data_classes] $data_items = contents[:data_items] $data_skills = contents[:data_skills] $data_weapons = contents[:data_weapons] $data_armors = contents[:data_armors] $data_states = contents[:data_states] $data_enemies = contents[:data_enemies] $data_troops = contents[:data_troops] endend class Scene_Title < Scene_Base alias start_adik start def start DataManager.load_database start_adik endend
#==============================================================================# # Save $data - v1.00# -- Last Updated: 12/09/2013# -- Level: Easy# -- Requires: n/a# #==============================================================================# ++ Intoduction ++#==============================================================================## Normally, when you edit in-gamethe values of the $data items (like $data_actors, # $data_classes etc), those edits are lost after closing the game.# This is because the game doesn't save the $data objects into the file.# # So, I created this script so that the game will include them in the save file. # So now you can make in your game things like permanent upgrades to weapons # without the need to create new weapons.## Also, take note that as per normal behavior of the game, edits to the# $data objects are kept if you don't close the game. Meaning if an edit# is done, and the player just chose to go back to title screen and starts# a new game, his new game will contain the edited data. So I also added# into this script the ability to reset the $data once the player goes to# the title screen. Of course, loading a file will load the saved $data objects# in that file## The scripts saves the following:## $data_actors# $data_classes# $data_items# $data_skills# $data_weapons# $data_armors# $data_enemies# $data_states# $data_troops##==============================================================================# ++ How to use ++#==============================================================================# Just paste it into an empty script in your script editor (preferebly below all# other scripts or at least below any script that modifies Scene_Title)## Take note that you should start a new game or else it will probably throw# an error##==============================================================================# ++ Terms and Conditions ++#==============================================================================## Read this: [URL="http://lescripts.wordpress.com/terms-and-conditions/%5B/url%5D#%23==============================================================================module"]http://lescripts.wordpress.com/terms-and-conditions/##==============================================================================module[/URL] DataManager #-------------------------------------------------------------------------- # * Create Save Contents #-------------------------------------------------------------------------- class <<self; alias make_save_contents_adik make_save_contents; end def self.make_save_contents contents = make_save_contents_adik contents[:data_actors] = $data_actors contents[:data_classes] = $data_classes contents[:data_items] = $data_items contents[:data_skills] = $data_skills contents[:data_weapons] = $data_weapons contents[:data_armors] = $data_armors contents[:data_states] = $data_states contents[:data_enemies] = $data_enemies contents[:data_troops] = $data_troops contents end #-------------------------------------------------------------------------- # * Extract Save Contents #-------------------------------------------------------------------------- class <<self; alias extract_save_contents_adik extract_save_contents; end def self.extract_save_contents(contents) extract_save_contents_adik(contents) $data_actors = contents[:data_actors] $data_classes = contents[:data_classes] $data_items = contents[:data_items] $data_skills = contents[:data_skills] $data_weapons = contents[:data_weapons] $data_armors = contents[:data_armors] $data_states = contents[:data_states] $data_enemies = contents[:data_enemies] $data_troops = contents[:data_troops] endend class Scene_Title < Scene_Base alias start_adik start def start DataManager.load_database start_adik endend
Yeah I know it's really super simple... haha... anyway, only use this if you need to save those data (like if you want to implement some kind of upgrade system which changes the values of the database items), else it will just increase the size of your save files and has some kind of drawback stated below
Also, take note that this means that future edits on the database items included in this script won't affect save files made before the edit