A ready-to-use template for Factorio mods
Download the repository, unzip it, and put it in your Factorio mods directory, in your developing subfolder (any name can be used). The directory structure should look like this:
factorio
├── config
├── mods # main mods folder
│ ├── mod-list.json # list of enabled mods
│ ├── mod-settings.dat # your stored mods' settings
│ ├── mod-A_1.0.0.zip # any mod
│ ├── mod-B_1.0.0.zip # any mod
│ ├── ...
│ └── dev # developing subfolder
│ └── factorio-mod-template # unzipped template
├── saves
├── scenarios
└── ...
Remember to change the mod's name, author and hyperlinks in the info.json
as well.
Mod's name must not include spaces in its internal name
The developing subdirectory and your mod's folder name can have any name
If you're using Visual Studio Code, you can run any of the already available tasks to automatically export your mod in the Factorio convention.
archive/
,.vscode/
and.gitignore
will not be exported/copied along with your mod.
The task export
will export the mod directly into the main mod folder in .zip
format: factorio/mods/factorio-mod-template_0.1.0.zip
, using the name
and version
specified in the info.json
, ready to be used or uploaded to the Mod Portal. Will also overwrite any existent zipped mod with the same name and version.
task:export is particularly useful for data-stages and distribution
The task copy
will export the mod directly into the main mod folder just as it is (unzipped): factorio/mods/factorio-mod-template_0.1.0
, using the name
and version
specified in the info.json
, ready to be used. Will also overwrite any existent mod folder with the same name and version.
task:copy is particularly useful for testing, especially runtime scripts
The task clear
will remove any instance of matching name
and version
of your mod from the factorio/mods
directory, if you need a cleanup.
- Markdown: Basic Syntax
- Factorio:
- Data raw: documentation of Factorio's prototypes at data stage
- Runtime docs: documentation of classes and events at runtime
- Mod portal: the official Factorio Mod Portal
- Lua 5.2 manual
- Visual Studio Code: setting up tasks