TerraModloader (or just TerraML) is a modloader for Alabaster Dawn. It's as simple and non-destructive as possible, but still allows full control over the game code.
It should technically work even for newer versions of the game, but don't be surprised if it doesn't
- Put file modloader.js in root directory of the game.
- Add a line
"inject_js_start": "modloader.js",to thepackage.json
{
"name": "Alabaster Dawn",
"version": "0.0.0.0.0.1",
"main": "terra/index.html",
"inject_js_start": "modloader.js", // <-- add here
"chromium-args": "...",
// rest of the file
}- Create a
modsfolder in the root directory of the game and put all your mods in it - Thats it, now you can enjoy your modded experience!
To create your brand new mod you'll need to create a starting file main.js and a manifest file mod.json
mod.json might look like this:
{
"version": "0.0.1",
"name": "Test Mod",
"description": "This is an example mod for TerraML",
"author": "Sam Leeway",
"main": "main.js",
"priority": 10
}Mod examples are available here!
To debug your mod you will need to enable chrome DevTools. To do that, you need to install SDK build of NW.js. You can check current version of NW.js in the title screen of the game.
At the time of writing it's 0.86.0 and is available here. Download the correct version for your system, if you use Windows its most definately nwjs-sdk-v0.86.0-win-x64.zip.
Unpack it into a root directory of the game. Now you can press F12 to open DevTools console!
Right now it's early days of Alabaster Dawn modding and developing a mod requires looking at a massive WebPack bundle.js file provided by the game.
A way to unpack the code back into different readable files is still in development.
If anyone knows a way to connect source maps to unpacked files, hit me up! I will be really greatful!
Right now mods activate only after full game initialization.
Mods activate in order of set priority, from lowest to highest (with default of 0). This will probably be replaced with proper dependency system in the future.
I loved CrossCode, it's one of my favorite games. Now that Alabaster Dawn is coming out, I decided that I have enough skills to add mutliplayer to the game to play with my friends. And my friends love simplicity, so I tried to make mod installation as painless as possible.
Multiplayer mod is still is on the way. Right now I'm only planning on player character sync, and maybe (a really big maybe) enemy sync as well.