Wath happen with json files and notes?

Hello everybody!

I was designing an plugin and in the process I think... If I create a new json and a new object and I explain to datamanager it, will it work?

For example:

Json file X:
[
{A: "miau miau miau", B: "mew mew mew", C: "nya nya nya"},
{A: "miau2 miau2 miau2", B: "mew2 mew2 mew2", C: "nya2 nya2 nya2"}
]

And I create a new objcet "Game_X" .

And in the manager I explain DataManager._databaseFiles = [ all content, {name: '$variable', src: 'X'}]

When I publish my game... will this information be loaded?

I'm not entirely sure how this works.


A greet and thank you in advance.

Cheer up!
why not just load like this ? it very more powerful and easy to control than the rmmv loader

PHP:
var $myCustomJson; // your global var to stock your parsed json

        const loader0 = new PIXI.loaders.Loader();
        loader0.add("customName", "yourFullpath/myCustomData.json");
        loader0.load(); // start load

        loader0.onProgress.add((loader, res) => {
            $myCustomJson = res.data;
        });
        loader0.onComplete.add((loader, res) => {
            console.log($myCustomJson);
        });
why not just load like this ? it very more powerful and easy to control than the rmmv loader

PHP:
var $myCustomJson; // your global var to stock your parsed json

        const loader0 = new PIXI.loaders.Loader();
        loader0.add("customName", "yourFullpath/myCustomData.json");
        loader0.load(); // start load

        loader0.onProgress.add((loader, res) => {
            $myCustomJson = res.data;
        });
        loader0.onComplete.add((loader, res) => {
            console.log($myCustomJson);
        });

Thanks you for your answer, was very useful!.

In addtion, for the readers, is viable using relative path instead of fillpath:
PHP:
 loader0.add("KeyName", "/folder/filename.json");

Cheer up!
remove the first /

example on my side

PHP:
"data/Scene_Title_data.json"
so you can do
PHP:
loader.add("folder/filename.json");
the "KeyName" are useful only if you need manage the cache.

if you want learn more how i use loader in the rmmv context, you can also study my work and take some good idea for your custom projet, it public.
https://github.com/djmisterjon/PIXI.ProStageEditor/blob/master/js/plugins/core_Loader.js
remove the first /
if you want learn more how i use loader in the rmmv context, you can also study my work and take some good idea for your custom projet, it public.
https://github.com/djmisterjon/PIXI.ProStageEditor/blob/master/js/plugins/core_Loader.js

Thanks you. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/wath-happen-with-json-files-and-notes.99471/