DoubleX RMVXA Dynamic Data

Purpose

Stores the changes to the database done by users during game executions

Can't be used with data having contents that can't be serialized

Can't be used with data read from the database files upon use

Games using this script

None so far

Configuration

Spoiler
# Sets if this script will save the actor parts of the database changes in # savefiles as SAVE_ACTORS # It can't be changed once set # Example: To always reload the original actor parts of the database upon # loading savefiles, set this as false SAVE_ACTORS = true # Sets if this script will save the class parts of the database changes in # savefiles as SAVE_CLASSES # It can't be changed once set # Example: To always reload the original class parts of the database upon # loading savefiles, set this as false SAVE_CLASSES = true # Sets if this script will save the skill parts of the database changes in # savefiles as SAVE_SKILLS # It can't be changed once set # Example: To always reload the original skill parts of the database upon # loading savefiles, set this as false SAVE_SKILLS = true # Sets if this script will save the item parts of the database changes in # savefiles as SAVE_ITEMS # It can't be changed once set # Example: To always reload the original item parts of the database upon # loading savefiles, set this as false SAVE_ITEMS = true # Sets if this script will save the weapon parts of the database changes in # savefiles as SAVE_WEAPONS # It can't be changed once set # Example: To always reload the original weapon parts of the database upon # loading savefiles, set this as false SAVE_WEAPONS = true # Sets if this script will save the armor parts of the database changes in # savefiles as SAVE_ARMORS # It can't be changed once set # Example: To always reload the original armor parts of the database upon # loading savefiles, set this as false SAVE_ARMORS = true # Sets if this script will save the enemy parts of the database changes in # savefiles as SAVE_ENEMIES # It can't be changed once set # Example: To always reload the original enemy parts of the database upon # loading savefiles, set this as false SAVE_ENEMIES = true # Sets if this script will save the troop parts of the database changes in # savefiles as SAVE_TROOPS # It can't be changed once set # Example: To always reload the original troop parts of the database upon # loading savefiles, set this as false SAVE_TROOPS = true # Sets if this script will save the state parts of the database changes in # savefiles as SAVE_STATES # It can't be changed once set # Example: To always reload the original state parts of the database upon # loading savefiles, set this as false SAVE_STATES = true # Sets if this script will save the animation parts of the database changes # in savefiles as SAVE_ANIMATIONS # It can't be changed once set # Example: To always reload the original animation parts of the database # upon loading savefiles, set this as false SAVE_ANIMATIONS = true # Sets if this script will save the tileset parts of the database changes in # savefiles as SAVE_TILESETS # It can't be changed once set # Example: To always reload the original tileset parts of the database upon # loading savefiles, set this as false SAVE_TILESETS = true # Sets if this script will save the common event parts of the database # changes in savefiles as SAVE_COMMON_EVENTS # It can't be changed once set # Example: To always reload the original common event parts of the database # upon loading savefiles, set this as false SAVE_COMMON_EVENTS = true # Sets if this script will save the system parts of the database changes in # savefiles as SAVE_SYSTEM # It can't be changed once set # Example: To always reload the original system parts of the database upon # loading savefiles, set this as false SAVE_SYSTEM = true
Prerequisites

Abilities:

1. Custom script comprehensions to edit that script's used data stored in RPG::BaseItem and/or its subclasses

Terms Of Use

You shall keep this script's Script Info part's contents intact

You shalln't claim that this script is written by anyone other than DoubleX or his aliases

None of the above applies to DoubleX or his/her aliases

Instructions
Open the script editor and put this script into an open slot between Materials and Main. Save to take effect.

FAQ

Q1: Why the savefiles are so large?
A1: It's because all data are stored in the savefile lol

Authors

DoubleX

Changelog

Spoiler
#    v1.01a(GMT 0100 12-11-2015):                                              |#    1. Lets users set which parts of the database changes will be saved       |# v1.00b(GMT 0600 8-8-2015): |# 1. Fixed using edited data bug when starting new game without closing it |# 2. Increased this script's compatibility, efficiency and readability |# v1.00a(GMT 0400 16-5-2015): |# 1. 1st version of this script finished |
(DoubleX)Dynamic Data v1.01a.rar
So, I guess we're to expect that this will be used as a basis for future scripts?
Only if the script needs to modify database entries at runtime. All the script does is copying (part of) your Data folder into the savegames, so you can have seperate "databases" for every save. Note that this also means that changes made to the database won't be accessible in an earlier save. So if you create a new animation and load a savefile created before, it won't know anything about it.
Only if the script needs to modify database entries at runtime. All the script does is copying (part of) your Data folder into the savegames, so you can have seperate "databases" for every save. Note that this also means that changes made to the database won't be accessible in an earlier save. So if you create a new animation and load a savefile created before, it won't know anything about it.
I'm so happy that someone gets it(I expect that getting the full picture needs at least some scripting proficiency) 😀

I wanted to elaborate this script's purpose, but I feel that it would be extremely hard to do so without explaining lots of technical stuffs. But now I'll try anyway 🙂

Using DoubleX RMVXA State Triggers as an example, users with some scripting proficiency probably know they can modify the stored state trigger notetag values:

Spoiler
#----------------------------------------------------------------------------| # New method: load_notetags_state_triggers | # - Loads each <timing state trigger: STCX, STAX> notetag from its notebox | #----------------------------------------------------------------------------| def load_notetags_state_triggers # Stores all timing, STCX and STAX triples from matching lines sequentially @state_triggers = {} st = "DoubleX_RMVXA::State_Triggers::" @note.split(/[\r\n]+/).each { |line| next unless line =~ /<(\w+) state trigger:\s*(\w+)\s*,\s*(\w+)\s*>/ @state_triggers[$1.to_sym] ||= [] @state_triggers[$1.to_sym].push( [eval("-> battler { battler.instance_exec { #{eval("#{st}#{$2}")} } }"), eval("-> battler { battler.instance_exec { #{eval("#{st}#{$3}")} } }")]) } # end # load_notetags_state_triggers
By using this script call:

$data_states[state_id].state_triggers[timing][note_order] = [cond, act]But $data_states won't be saved, so upon loading, the above change will be gone and the original notetag values will be used again.

This script lets you store your changes to parts of the database, and what those parts are depends on other custom scripts you're using.

For scripts reading notetag values from the noteboxes right before using it, this script will be useless there.

P.S.: Also, I forgot to mention that this script doesn't work on map data lol
Updates

Code:
#    v1.00b(GMT 0600 8-8-2015):                                                |#    1. Fixed using edited data bug when starting new game without closing it  |#    2. Increased this script's compatibility, efficiency and readability      |
Updates

Code:
#    v1.01a(GMT 0100 12-11-2015):                                              |#    1. Lets users set which parts of the database changes will be saved       |

Original thread: https://forums.rpgmakerweb.com/threads/doublex-rmvxa-dynamic-data.40054/