Wath happen with json files and notes?

Zausen

Villager
Member
Joined
Dec 10, 2016
Messages
16
Reaction score
7
First Language
Spanish
Primarily Uses
N/A
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!
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV
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);
        });
 

Zausen

Villager
Member
Joined
Dec 10, 2016
Messages
16
Reaction score
7
First Language
Spanish
Primarily Uses
N/A
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!
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,623
Reaction score
1,439
First Language
French
Primarily Uses
RMMV

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

Latest Threads

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,081
Members
137,582
Latest member
Spartacraft
Top