[SOLVED] How $dataQuests is saved (to file) on YEP Quest System Plugin?

Status
Not open for further replies.

iNumPad

Warper
Member
Joined
Apr 16, 2013
Messages
3
Reaction score
1
First Language
Portuguese
Primarily Uses
RMMV
Hi there.

I'm using Quest Journal System from Yanfly. When I save the game and then loaded it again: The quests are there, the same way it was before the saving. BUT, analyzing the plugin's code itself, I didn't see any line that says "Save $dataQuests content to the save file."

http://yanfly.moe/2017/10/13/yep-152-quest-journal-system-rpg-maker-mv/
http://yanfly.moe/plugins/en/YEP_QuestJournal.js

Why I'm looking for this? I'm trying to make the Quests to be saved/loaded on a JSON file*, as a test for myself on learning how to make plugins. But when I didn't find how the quests are saved on the game I felt like it's a bad start on my first attempt to code something.

Here is a print showing every $dataQuests mention on the plugin:

*: I'm thinking in save the Quests in a file like Actors.json on Data folder. And then, maybe create a web editor to create/edit Quests. Wish me luck.
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
2,088
Reaction score
1,508
First Language
EN
Primarily Uses
RMMZ
Like the default $dataActors, $dataItems, etc, $dataQuests serves only as a static reference. As you've noticed, the array itself is drawn and parsed from the plugin's parameters (plugins.js) rather than a data file like the default $dataX objects:
Code:
DataManager.questDatabaseCreate = function() {
  $dataQuests = [null];
  for (var i = 1; i <= 100; ++i) {
    var questData = JSON.parse(Yanfly.Parameters['Quest ' + i] || 'null');
    if (!questData) continue;
    this.questDatabaseAdd(i, questData);
  };
};
The actual quest progression data is stored under $gameSystem, an object already included in save files. C.f.
Code:
Game_System.prototype.getAllQuests = function() {
  this.initQuestSettings();
  return this._questsKnown;
};
 
Last edited:

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
7,842
Reaction score
5,225
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top