Packaging and publishing ​
Once your addon has its operations, code and settings, build it, test it in game, then package it as a .swoftyaddon file to share. These steps are the same for data addons and code addons.
1. Build ​
Install the addon folder, enable it in a modded profile, then build the profile. The build checks every operation without touching the game folder:
swofty addons install ./my-addon
swofty addons enable yourname.my-addon
swofty buildswofty build applies the profile's operations and writes the result to $DATA/cache/overlay/<profile>/<buildhash>/. That folder holds plan.json, listing the game files the build replaces and adds with their sources, and the session's swofty/settings.json.
Read every line of output before you launch. It prints every warn message, each owned unlock row, skipped operations and each conflict. A conflict means a later addon replaced a target that an earlier addon wrote. Fix the warnings, then build again. See swofty build.
Installing the folder again replaces the copy in $DATA/addons/<id>/, so reinstall after each change.
2. Test in game ​
swofty run --applyswofty run --apply installs your profile, starts the game and follows the logs. When the game exits, the game folder returns to its stock files. If the game crashes, run swofty restore to put them back.
- Test with only your addon enabled.
- Test with the addons and mods players combine it with.
- Try every value of each setting. Changing a
dbsetting rebuilds the profile, so build and relaunch after changing one.
3. Read the logs ​
| Log | Contents |
|---|---|
<game>/swofty/loader. | The in-game loader, your engine plugin's swofty::log lines, the runtime asset steps ([assets]) and the game's own warnings |
$DATA/sessions/<id>/ | One folder per session; swofty logs prints the latest summary |
$DATA/cache/addons/<id>/helper. | Your launcher plugin's stderr |
4. Package it ​
A .swoftyaddon is a zip of your addon folder's contents. swofty.json has to sit at the zip root, not inside a subfolder, so change into the folder before zipping it:
cd my-addon
zip -r ../yourname.my-addon.swoftyaddon .Players drop the file on the launcher, or install and enable it from the command line:
swofty addons install yourname.my-addon.swoftyaddon
swofty addons enable yourname.my-addonswofty addons install also takes a plain .zip with the same layout, or the folder itself. A .swoftymod file from an earlier version installs too.
Before you zip:
- Set
id,name,version,authoranddescriptioninswofty.json. - Set
compat.game_buildsandcompat.seasonsto the builds and seasons your addon was made for. - Remove every file that none of your operations name. Leave out build folders such as
target/. - Ship your compiled binaries: the engine plugin DLL and one launcher plugin binary per OS in
launcher.program. - Include a README crediting each author whose files you ship, and get their permission to redistribute those files. Never include the game's own archives, database or executable.
5. Publish ​
- Bump
versioninswofty.jsonfor each release. - Tell players which game build and season you tested on, and check that
compat.game_buildsandcompat.seasonsmatch. - Credit every author whose files you include.
- Attach the
.swoftyaddonto your release.
Reference ​
- Addon manifest: every
swofty.jsonfield, includingcompat. - Command line:
swofty build,swofty run,swofty logs,swofty restoreandswofty addons. - Logging: writing to
swofty/loader.logfrom an engine plugin. .serpspackages: sharing whole game files as a mod instead.