Install VSCode and two extensions. It's amazing.
-
Extension 1: Install your favorite xml extension
- Extension: xml red hat
- Install Method: In VSCode, click extensions tab, search for xml red hat, click install.
-
Extension 2: To enhance your development experience, you can manually install the X4CodeComplete:
- Extension: X4CodeComplete.vsix
- Install Method: In VSCode, choose install from file. Press Ctrl+, paste this into the box 'x4CodeComplete.unpackedFileLocation' add path to the vanilla extracted files.
Ensure that Node.js and npm are installed on your system. Use the following commands to check if they are already installed:
node -v
npm -v
If Node.js and npm are not installed, follow these steps:
- Visit the official Node.js website and download the appropriate version for your operating system.
- Follow the installation instructions on the website.
After installation, check the versions of Node.js and npm again to confirm the installation:
node -v
npm -v
In your project folder, run the following command to install all the necessary dependencies specified in your package.json
file:
npm install
This will ensure that all required libraries and packages are installed for your project to function correctly.
{
"scripts": {
"{scriptname}": "npx ts-node compileMod.ts {mod_folder}"
}
}
This script will allow you to compile your mod with a single command.
When creating diffs, use the following file path structure to ensure the correct schema is referenced:
- MD files:
../../xsd/mddiff.xsd
. - AIScript files:
../../xsd/aiscriptdiff.xsd
.
This allows for the proper schema to be used during the diffing process.
To compile your mod, you must include an allowedextensions
file in the root directory of your mod. This file specifies which file types will be added to the release .zip, helping ensure that only production-ready files are included in the final output.
This approach allows you to have dev-only files during development, while keeping the production version clean.
To compile your mod into a .zip
file, simply run the corresponding npm script:
npm run {scriptname}