Persistent Data Script [RMXP] [RGSS]

Persistent data is a data that still exist when the player visits the game again. The example of this is stuff like a “New Game +” feature on some game, system setting, unlockables, and gallery.

However, RMXP only loads stored data when a player loads a specific save file, which is rather inconvenient when we’re trying to make a system similar to those I’ve mentioned before.

This script enables the game to load certain in-game switches and variables automatically when the game starts.

Here’s how to set this script up. First, put the script on your game. Chose switches and variables that you want to treat as persistent data. Put [p] somewhere in their name (note that the p is in lower case).

When you made some changes to the persistent data, save it using these script call:
$scene =

The variables will be stored in a file named System.rxdata. And you’re done! This script will load the data stored in that file when player run the game, and load it again when player start a new game, or after the player load a game from a certain save file.

The persistent data can be accessed like normal switches or variables from almost anywhere within the game.

Intriguing, isn’t it?

Here’s the script: Persistent Data Script

Terms of Use:
1. This script can be used for commercial or non-commercial games, only if you credit me (Black Mage) properly.

2. Put a link back to my site (
3. Tell me about the game you made. I’ll be happy to play and review your game, assumed I have some times to spare :)

Just in case you’re still wondering, the script is licensed under Attribution 3.0 Unported.

Log Change:
Version 1.1 (20 April 2017) – Bugfix for “nil”-named switches & variables caused by initialization of “foreign” scripts.
Version 1.0 (19 November 2015) – Initial design.


2 thoughts on “Persistent Data Script [RMXP] [RGSS]

  1. Seems pretty interesting, but I’m a little lost on what it exactly does. Is this a different take on a NG+ or something else? Would be great if there was a Tutorial Video on how to use it or a demo to try it out.

    Hopefully this can be a very useful feature for those who need it.

  2. Pingback: Script Update, RMVXA Persistent Data Script | Trail of A Developer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s