Wath happen with json files and notes?

● ARCHIVED · READ-ONLY
Started by Zausen 5 posts View original ↗
  1. 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!
  2. 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);
            });
  3. Jonforum said:
    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!