Adding JSON data temporarily.

So I have a JSON file for actors. 

I can currently generate new actors in the game and write them to the JSON file thus having a character generation in game.

Problem is when you start a new game you have all of the database actors plus the new ones from the previous save file.

I would like to have these separate.

Question is do I not write to Actors.json but make a new json specfic for that save file?

And when I load the save game do I just combine the two data files together ?
You could take a look at DoubleX's Dynamic Data plugin: http://forums.rpgmakerweb.com/index.php?/topic/48589-doublex-rmmv-dynamic-data/
Looks like he just stores the data in $gameSystem and just overwrites it when you load the game. No JSON at all.

I will try to do something similar. 

Thanks I, big help.
Looks like he just stores the data in $gameSystem and just overwrites it when you load the game. No JSON at all.

I will try to do something similar. 

Thanks I, big help.
If you want to save to a file look at StorageManager.saveToLocalFile which just use node.js fs to save the file,

if instead you are happy to add your data to the savefile just do something like https://github.com/kentaromiura/RPGMV-Plugins/blob/master/Plugins/Battle/EnemyStats.js#L80-L90,

basically just run the original DataManager.makeSaveContents and append the property you want to save there,

on DataManager.extractSaveContents it will be there so you can use that to add your actors

Original thread: https://forums.rpgmakerweb.com/threads/adding-json-data-temporarily.51057/