MV Using mpiShowSpine.js for Spine animation - stuck on loading

Firstly, I'm an expert with Esoteric Spine and a complete noob with JS and only the basics of OOP. I know how to animate and create exports from Spine without problems for use in Unity. I'm using Spine 3.8.99 and so have downloaded the appropriate pixi-spine.js library. Following instructions built into the script found at the author's page and plugging it into RMMV, I'm stuck at one of two problems.

A - I get a 'failed to load: data/spine_def.json' error​
B - After I create a spine_def.json in data using TexturePacker, the game freezes (or is permanently loading) at 'Now Loading...'​

After searching the script for 'data/spine_def.json', I find only this reference:

JavaScript:
// loadSpineAttachmentSetFile
    (function() {
        var xhr = new XMLHttpRequest();
        var url = 'data/spine_def.json';
        xhr.open('GET', url);
        xhr.overrideMimeType('application/json');
        xhr.onload = function() {
            if (xhr.status < 400) {
                $mpi.spineAtcmSets = JSON.parse(xhr.responseText);
            }
        };
        xhr.onerror = function() {
            DataManager._errorUrl = DataManager._errorUrl || url;
        };
        xhr.send();
    })();


Spine files don't generate a separate spine_def.json; they create 3 files that are based on the skeleton name. A json, atlas, and texture file. Digging into this error within the script, I find the only reference to a spine_def.json and download an example spine_def from the web. The example is clearly not exportable by Spine. There are mentions that I need the TexturePacker from codeandweb so I get a trial, export a texture from there for use in RMMV and it creates a json I can call spine_def.

So while this doesn't work, it feels like a step forward. I place the spine_def in the data folder and now when starting the game, it doesn't create an error but it freezes after the 'Now Loading' fades in.

At this point, I'm aware that the TexturePacker (TP) isn't the same as the spine export since each spine export has its own json, atlas, and texture files. This spine_def only refers to one texture despite the '/img/spines' folder able to house multiple characters and objects. So I'm not sure how to troubleshoot this standalone file that the game seems to require before it will start without error.

In the RMMV SPINE 2D thread , there's this flowchart image that I'm trying to make sense of but am unsure if it's even useful.

That said, I have no idea if there are steps I need to take with the texture packing but the best I can figure out is the spine_def.json is faulty in some way. I could really use someone's more practiced eye to help me understand just what I'm stuck with. I've created 2 fresh projects and recreated this step by step many times trying to get animations in and it's the same two results each time so it tells me that it's something to do with spine_def and RMMV's means of loading.
Problem was solved. Simple issues: The atlas export for RMMV is slightly different than the export for Unity. Unity requires a '.atlas.txt' suffix, RMMV requires just '.atlas'

Also, the filepath to the character's spine file was wrong and I completely forgot that you could press F12 to see what might be affected when doing a testplay. Still not sure why I need the spine_def file or if it will cause problems adding more spine files. BUT Spine works great with this script but I might have to come back again if I hit problems with multiple spine outputs.

edit: Big thanks to capybaracanth on RPGMaker.net's Discord for the help.

Original thread: https://forums.rpgmakerweb.com/threads/using-mpishowspine-js-for-spine-animation-stuck-on-loading.143144/