- Install required NPM packages with
yarn install
. - Transpile the TypeScript code to Lua by running
yarn build
. - Bundle the built code with other mod files by running
yarn run bundle
. - Create a deployment-ready zip file by running
yarn run zip
.
- Steps 2 and 3 can by run together with
yarn prepare
. - Steps 2, 3 and 4 can be run together with
yarn package
.
- Run
link.bat
(Windows) orlink.sh
(Linux/MacOS) AFTER bundling the mod to symbolic-link the bundled code to your Factorio mods folder. - Run
yarn prepare
whenever changes are made to your code/assets to rebuild and rebundle everything.
- Factorio can be automatically launched with
yarn run launch
. - When I can be bothered I'll set up Nodemon to automatically run
yarn prepare
when changes are made to the code.
- To list currently downloaded most, run
yarn run list-mods
(currently only works on Windows). This will create the fileexports/downloadedMods.json
, which can then be copy-pasted into the dependencies field ininfo.json
. - The Data Raw JSON mod can be used to dump information to a file. See the top of
exports/items.txt
for an example of a command for doing this. It will create the file in%APPDATA%\Factorio\script-output
or$HOME/.Factorio/script-output
. - Changes to the data code files will require a full restart of Factorio.