For those who are looking into why Mtool won't work for the newer versions, the author encrypted the .json files in the data folder. You can see that while previous versions have readable .json, the current ones are a jumble of text in a single line. The game decrypts these files with a plugin when loading them in game.
The scripts used to decrypt them are located in js/plugins and are called core_1.js and core_2.js. These scripts are obfuscated, but gpt was able to deobfuscate the latter into readable code. Here's a snippet:
Code:
DataManager["loadDataFile"] = function (objectName, fileName, src) {
if (objectName.length < 400) {
if (fileName !== "Actors.json" && fileName !== "MapInfos.json" &&
fileName !== "Classes.json" && fileName !== "Animations.json" &&
fileName !== "CommonEvents.json" && fileName !== "Enemies.json" &&
fileName !== "Items.json" && fileName !== "States.json" &&
fileName !== "Skills.json" && fileName !== "System.json" &&
fileName !== "Tilesets.json" && fileName !== "Troops.json") {
window[objectName] = JSON.parse(objectName.responseText);
} else {
const decryptedText = CryptoJS["AES"]["decrypt"](objectName.responseText, "pojiecaonima").toString(CryptoJS.enc.Utf8);
window[objectName] = JSON.parse(decryptedText);
}
this["onLoad"](window[objectName]);
} else {
this["onXhrError"](objectName, fileName, src);
}
};
As you can see, the game is using CryptoJS AES to decrypt the files using the password "pojiecaonima". I have tried to manually decrypt the .json files with this password using javascript and python, but I keep running into issues with padding and the initialization vector. I couldn't get past this step but maybe you can, so I'm posting what I've found here.
What needs to be done next is 1. Successfully decrypt the encrypted .json file, 2. Apply this decryption function to all the .json files in the data folder, and 3. Delete the if statement in the obfuscated core_2.js that decrypts the jsons in game.