Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
268
First Language
English
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 ?
 

Jeremy Cannady

Coldfire
Veteran
Joined
Oct 25, 2015
Messages
449
Reaction score
268
First Language
English
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.
 

kentaromiura

Veteran
Veteran
Joined
Nov 1, 2015
Messages
46
Reaction score
26
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Going live at 2pm EST
Today is the day! I will be productive in game dev work! I will - *gets distracted by cat playing with her toy mouse* Awww <3
Whelp. I tried to be productive.
Decided to work on Fandom Scouts today. I've decided that instead of using the generic "scrolling text" event that MV has (I'm using MV for FS, not MZ) I'll use the movie option. I'm still trying to find a way to get Premiere Pro to output the compatible format though. If anyone can give me some help, it would be greatly appreciated!
Barthdry wrote on tln143's profile.
Hello tln143 Welcome to the RPG Maker Forum. We wish you enjoy and make good rpg games
Barthdry wrote on 00cassiesmells's profile.
Hello 00casiemells Welcome to the RPG Maker Forum. We wish you enjoy and make good rpg games

Forum statistics

Threads
109,037
Messages
1,041,521
Members
141,523
Latest member
Zereitzu
Top