Skip to content

Releases

sf-mod-build 0.7.2

Choose a tag to compare

@github-actions github-actions released this 04 Dec 08:58

What's new

  • zip reads the zip time with git -c core.fsmonitor=false log --no-show-signature -1 --format=%ct -- .. Before, git read the mod folder's own git config with no overrides, so a mod whose .git folder set log.showSignature=true and a gpg.program made zip run that program without a word in any output. The README and AGENTS.md now say that a mod's own .git folder is trusted input too.
  • The voice step checks every folder it deletes in (voice.out and the folders under it) the way dist, stage and creations-out are checked: it refuses a link or junction on the way, a link on or anywhere inside voice.out\data and a voice.out inside the game's folder, with RESULT: CANNOT MAKE VOICE and exit 2, before it deletes anything.

Example

Here a made-up mod's own .git folder asks for signature checks (log.showSignature=true) and names a gpg program that writes a marker file.

> sf-mod-build zip sfmod.json

0.7.1 ran that gpg program while it read the time of the last commit. 0.7.2 does not run it: the marker file is never made, and the zip time line still says "the mod's last git commit".

Check each download against SHA256SUMS or its .sha256 file.

sf-mod-build 0.7.1

Choose a tag to compare

@github-actions github-actions released this 03 Dec 21:20

What's new

  • sf-mod-build refuses an sfmod.json whose builder.command, builder.args or a steps entry holds a control character (a tab, a carriage return, an escape code or another character below U+0020, a DEL, a text-direction mark or another invisible format character). Before, validate printed such a character as it was, so a hostile sfmod.json could show a harmless command on a runs: line while a different one ran. The refusal is a PROBLEM that names the field, with exit 2. As a second guard, every line validate prints (the runs: lines, the check: line, which names the checker program and the check.args options, and the lines after them, so a value such as a zip.files name can't move the cursor back over a runs: line) and the lines that say what a step or the builder is running now escape those characters (the loader doesn't refuse them in check.checker or check.args, and the check: line prints a tab there as it is). The README and AGENTS.md now say to read the check: line too, since check.checker names a program a build runs.
  • pack prints a line for the Main_ps.ba2 copy it makes with "xbox": true.
  • validate prints the Wwise line only when the voice section has a source folder of WAVs to convert (a voice section that only reuses lines runs no Wwise).
  • A mod with a voice section and an archives entry with the suffix Main now fails at validate, not at pack.
  • The --masters-dir error names the command that failed (build or voice).
  • The starter template pins BuildKit 0.6.3 (it was 0.6.2).
  • The README and AGENTS.md say that verify --against dist lists zip.files as missing, because those files never live in dist.

Example

A made-up sfmod.json whose builder.command holds a carriage return, so that the line shows echo harmless while evil runs:

> sf-mod-build validate
PROBLEM: C:\Mods\Spoof\sfmod.json: builder.command[2]: it holds a control character (such as a tab, line break, carriage return or escape) or an invisible format character, which could make validate's runs: line show a different command from the one that runs. Fix: remove the character; a command and its arguments are plain text on one line.
RESULT: 1 PROBLEM(S) in C:\Mods\Spoof\sfmod.json; fix them and run validate again

(exit 2. 0.7.0 printed the line with the raw carriage return.)

Check each download against SHA256SUMS or its .sha256 file.

sf-mod-build 0.7.0

Choose a tag to compare

@github-actions github-actions released this 01 Dec 18:35

What's new

  • Voice files for lines another plugin owns, with two new fields in the voice section. "reuse": [{ "from": "Starfield.esm" }] gives a line of your plugin with no WAV the recording of the same voice type and number from that plugin (the .wem, and its .ffxanim when there is one), looked for in the entry's optional sources, then --masters-dir, then the game's Data folder. "replace": ["HelperCrew.esm"] gives a master's lines your own WAVs, from Voice\Sound\Voice\HelperCrew.esm\<voice type>\, at the master's own paths; the plugin must have that master. English voices only. source may be left out when the section only reuses. Reuse reads archives with sf-mod-check ba2 extract. A test build's 56 reused files and 26 made files came out byte for byte equal to the files shipped by the build it copied.
  • A voice path may come from one place only: a WAV for a path that assets.source or an archives source already ships is refused before Wwise runs, and a .wem an archives folder ships no longer gets a "stays silent" WARNING.
  • Zip entry times now follow the mod's last git commit (the newest file going in when there is no git) instead of 2000-01-01. --source-date (on zip and build) and SOURCE_DATE_EPOCH override it. zip still writes the same bytes from the same files and commit; a fresh Papyrus compile changes the scripts' archive, because the compiler writes the compile time into each .pex (README, "Reproducible builds").
  • Every zip comes with <zip>.files.sha256 (sha256sum format). New command sf-mod-build verify <zip> --against <zip, folder or Data folder> compares by checksum and exits 0, 1 (a file differs or is missing) or 2 (it couldn't check).
  • With "xbox": true, pack also writes <plugin> - Main_ps.ba2, a copy of the PC Main for PlayStation 5. PS5 reads PC-format files except audio, so a mod with voice files needs a PS5 audio test. There is no _ps Textures archive. A records-only xbox build's closing note now names the plugin in dist.
  • validate refuses dist or creationsOut inside the stage folder (as compile already did), and an unreadable voice.source or voice.wwiseProject folder is a PROBLEM line, not an error. The delete hint for a read-only file says to clear the read-only mark; the zip.folder hint says a folder inside dist is allowed.
  • --log refuses a file name with a colon and a link to a mod file. PROBLEM and WARNING lines escape control and bidirectional characters. PATH search skips . and relative entries.
  • The starter template pins BuildKit 0.6.2. The README has a Known limits section.

Example

Reuse, in a made-up mod whose new line copies a line of Starfield.esm:

"voice": { "reuse": [ { "from": "Starfield.esm" } ] }
> sf-mod-build voice
lines    3 voiced line(s): 0 with a WAV (0 to make, 0 unchanged), 3 reused, 0 without
RESULT: OK, 3 voice line(s) in C:\Mods\FriendlyCrew\.build\voice\data (0 made, 0 unchanged, 3 reused; 3 with a lip file)

Replace, with a WAV at Voice\Sound\Voice\HelperCrew.esm\npcfhelper\0001A2B3.wav:

"voice": { "source": "Voice", "replace": ["HelperCrew.esm"] }

Verify a new build against the zip you released before:

> sf-mod-build verify MyMod-0.1.0.zip --against C:\Downloads\MyMod-0.1.0.zip
ok       MyMod.esm
RESULT: OK, all 1 files of MyMod-0.1.0.zip match C:\Downloads\MyMod-0.1.0.zip

Compare with another zip, an unzipped copy or the game's Data folder. dist is not a full copy: it lacks the files zip.files adds (a starter project's README and LICENSE), so those show as MISSING there.

Check each download against SHA256SUMS or its .sha256 file.

sf-mod-build 0.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 22:56

What's new

  • New voice command and "voice" section in sfmod.json: sf-mod-build now makes the game's voice files (.wem) and lip files (.ffxanim) for your plugin's new lines from one WAV per line, with no Creation Kit window. build runs it between plugin and pack when the project has a voice section, and pack puts the files in <plugin> - Main.ba2, uncompressed.
  • The voice step lists the lines with sf-mod-check voice-lines (sf-mod-check 0.21.0 or later). It converts the WAVs with your own Audiokinetic Wwise 2021.1 and the Creation Kit's own Wwise project and "Voice Conversion" setting, and makes the lip files with the Creation Kit's LipGenerator and FaceFX ffxc. sf-mod-build never ships Wwise.
  • A line with no WAV is a WARNING (it stays silent), unless assets.source already has its .wem. A WAV that matches no line is a WARNING too. A line whose WAV, text and face set haven't changed is skipped, so a rerun with nothing new needs no Wwise.
  • Keep the WAVs: they are the source, and a line whose WAV is gone loses its made files at the next run. voice.source is refused when it is, holds or is inside dist, stage, creationsOut, voice.out or a folder pack ships as it is (assets.source, assets.xboxTextures or an archives source).
  • A line with no text (a sigh or a laugh) gets its .wem but no lip file, with a WARNING, because LipGenerator needs the words.
  • voice.source takes Starfield Voice Cloner's output folder as it is. voice.faces picks the face set per voice type (female, male or none); the default is the voice type's sex. voice.wwiseProject takes your own registered Wwise project.
  • doctor lists Wwise, LipGenerator and ffxc as notes, which aren't warnings, because only a project with a voice section needs them. validate shows the voice section.

Example

"voice": { "source": "Voice" }
sf-mod-build plugin
sf-mod-check voice-lines dist\MyMod.esm --out MyMod-lines.tsv
(make Voice\npcfmyvoice\0001A2B3.wav and the other WAVs, for example with Voice Cloner)
sf-mod-build build

A real run of the voice step alone, on a companion plugin with 564 voiced lines whose other lines keep the sound files the mod already ships (the plugin and voice type renamed; the WARNING list shortened here):

> sf-mod-build voice
listing  the voiced lines of MyMod.esm with sf-mod-check.exe voice-lines
WARNING  563 line(s) have no WAV in C:\Mods\MyMod\Voice, so they stay silent: npcfmyvoice\00007B22, ... and 558 more. Fix: ...
lines    564 voiced line(s): 1 with a WAV (1 to make, 0 unchanged), 563 without
wwise    converting 1 WAV(s) with C:\Audiokinetic\Wwise2021.1.14.8108\Authoring\x64\Release\bin\WwiseConsole.exe
lips     making 1 lip file(s) with LipGenerator and ffxc
RESULT: OK, 1 voice line(s) in C:\Mods\MyMod\.build\voice\data (1 made, 0 unchanged; 1 with a lip file)

The same Wwise, LipGenerator and ffxc steps, run by hand, made a line that played in real dialogue in game with the lips in time. This run's .wem is byte for byte that line's file.

Not yet

  • Xbox and PlayStation 5: a PC .wem plays silent there, so the voice section is refused with "xbox": true.
  • The lines of parts plugins.
  • A spoken text for the lip file that differs from the subtitle. LipGenerator reads the line's text as the plugin has it, so a subtitle with digits ("18,000 credits") gives a different lip file than the spoken words would; write such lines in words for the closest match.

Check each download against SHA256SUMS or its .sha256 file.

sf-mod-build 0.5.2

Choose a tag to compare

@github-actions github-actions released this 27 Nov 20:41

What's new

  • A second build can no longer delete files you keep in creationsOut. Before, a creationsOut folder inside dist was emptied by the next build's plugin step, your own files in it included. Now validate and every build stop with exit 2 when creationsOut is dist or inside dist, and the plugin step never deletes the creationsOut folder. The same check refuses a zip.folder that is the stage folder or inside it, because every build empties stage and the zips would go with it.
  • The default settings are not affected: creations-out and the default zip.folder (the mod's own folder) are outside dist and stage.

Example

A mod whose sfmod.json says "creationsOut": "dist/creations" now stops before it can lose anything:

> sf-mod-build validate
PROBLEM: C:\Mods\MyMod\sfmod.json: creationsOut: it is inside dist (C:\Mods\MyMod\dist), which the plugin step empties on every build, files you added included. Fix: use a folder of its own, for example "creations-out".
RESULT: 1 PROBLEM(S) in C:\Mods\MyMod\sfmod.json; fix them and run validate again

Change it to "creationsOut": "creations-out" and run again.

Check each download against SHA256SUMS or its .sha256 file.

sf-mod-build 0.5.1

Choose a tag to compare

@github-actions github-actions released this 25 Nov 19:47

What's new

  • The dotnet new sfmod template now pins BuildKit 0.6.0 (it was 0.5.0), so the quest helpers in BuildKit 0.6.0 (see BuildKit's README, "Quests") are there for the quests you add to a new mod. The starter builder itself doesn't use them. BuildKit 0.6.0 keeps Mutagen.Bethesda.Starfield 0.54.4. The starter mod builds with no code change, and the README and AGENTS.md name the new pin.

Example

dotnet new sfmod -n MyMod
cd MyMod
sf-mod-build build

The Builder\MyMod.Builder.csproj that dotnet new writes now has <PackageReference Include="Taosecurity.Starfield.BuildKit" Version="[0.6.0]" />.

sf-mod-build 0.5.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 15:33

What's new

  • A mod with parts now gets one zip per plugin, so you no longer split the zip by hand, and Vortex and Mod Organizer 2 install each plugin as its own mod. The main zip (zip.name, default {name}-{version}.zip) holds the main plugin, its archives and every other file (README, LICENSE, the other top-level files in dist). Each part gets {name}-<Part>-{version}.zip with the part plugin, its <part> - Main.ba2 when it has scripts, and a copy of each LICENSE or COPYING file renamed for the part, so no two zips hold the same file.
  • <Part> is the part plugin's name without the extension, with the mod's name taken off the front and only letters and digits kept (MyMod-Patch.esm gives Patch). A part's new zipPart field picks the word itself.
  • An archive in zip.archives goes in the zip of the plugin whose name starts it (the longest matching name wins).
  • zip never guesses where a file goes. It stops (exit 2, with the fix) when a zip.archives name starts with no plugin's name, or when two zips or two files in one zip would get the same name. It writes every zip before it moves any into place, and it never deletes an old zip: a zip from a part you removed stays, with a note: line naming it.
  • check checks each zip and reports the worst result. A part's zip gets --masters-dir <dist>, because its master is in the main zip. build's last line names every zip, and validate lists each zip and what it holds, and reports two zips with one name and a zip.archives name no plugin owns before a build.
  • New "zip": { "split": false } keeps one zip for all the plugins, as in 0.4.2.
  • pack with nothing to pack but ready archives (archives entries with file, and no scripts or loose files) no longer needs Archive2 or the game. A wrong --game still stops it.
  • The README and AGENTS.md now say which platforms are tested: PC (Steam) and Xbox. PS5 is not tested.

Changes

  • zip now stops (exit 2) when dist holds a plugin that is neither plugin nor one of the parts, also for a mod without parts. Before, such a plugin (an old copy, say) shipped in the zip without a word. The fix is in the message: list it in parts, or delete it from dist. With "split": false it ships, as before. Apart from this, a mod without parts gets the same zip as with 0.4.2, byte for byte.

Fixes

  • A zip.folder inside dist that the builder or a steps command creates is no longer added to dist's made list (.sf-mod-build-made). Before, it was, so after you moved zip.folder elsewhere the next plugin could delete that folder with the old zips in it.

Example

A made-up mod, GapMod, whose builder writes GapMod.esm and GapMod-Patch.esm, with "parts": [ { "plugin": "GapMod-Patch.esm" } ] in sfmod.json (folder names shortened; sf-mod-check 0.17.0 given as the checker):

> sf-mod-build build --checker C:\Tools\sf-mod-check.exe
...
== zip
zip      GapMod-0.1.0.zip
zipped   GapMod - Main.ba2
zipped   GapMod.esm
zipped   LICENSE-GapMod.txt
zipped   README-GapMod.md
sha256   f77126ddbe76e345dc4153158908af56474a1a24dcc825195d1192f2badd9c8b
zip      GapMod-Patch-0.1.0.zip
zipped   GapMod-Patch.esm
zipped   LICENSE-GapMod-Patch.txt
sha256   de746e4a7cfd31197d0812aedfc9ae54636639ad678c888b59d136f7ccfff120
RESULT: OK, 2 zips written in C:\Mods\GapMod (GapMod-0.1.0.zip: 4 files, 2948 bytes; GapMod-Patch-0.1.0.zip: 2 files, 581 bytes)
== check
checking GapMod-0.1.0.zip with sf-mod-check.exe
...
RESULT: OK, GapMod-0.1.0.zip passed the release check
checking GapMod-Patch-0.1.0.zip with sf-mod-check.exe
...
RESULT: OK, GapMod-Patch-0.1.0.zip passed the release check
RESULT: OK, built 2 zips: C:\Mods\GapMod\GapMod-0.1.0.zip; C:\Mods\GapMod\GapMod-Patch-0.1.0.zip

Download

  • sf-mod-build-0.5.0-win-x64.zip: the Windows program (no .NET needed).
  • sf-mod-build-template-0.5.0.zip: the starter project.
  • sf-mod-build.0.5.0.nupkg: the .NET tool package.
  • Check each download against SHA256SUMS or its own .sha256 file.

See CHANGELOG.md for the full history.

sf-mod-build 0.4.2

Choose a tag to compare

@github-actions github-actions released this 24 Nov 18:25

What's new

  • build and plugin now show the result of BuildKit's gap check without --verbose: its gap check: RESULT: ... line, its ERROR lines, or gap check: NOT RUN (...) when the check couldn't run (sf-mod-check not found). Before, all of it was hidden unless you added --verbose. The builder's other lines still need --verbose or --log. When the gap check finds errors but the builder still succeeds (a builder that sets FailOnGapErrors = false), a WARNING line says so.
  • build --checker <exe> (or check.checker in sfmod.json) now also gives that checker to BuildKit's gap check, through the BUILDKIT_SFMODCHECK variable, when its --version says 0.15.0 or later (the first with the gap command; an older one gets a note: line and is left out). Before, the gap check looked only on PATH, so it said NOT RUN even though you had named the checker.
  • build with "xbox": true ends by saying that the Creations check runs on the creations-out folder, not on the PC zip, and prints the command: sf-mod-check release <creations-out> --profile creations. The README, AGENTS.md and build --help say it too.
  • The dotnet new sfmod template now pins BuildKit 0.5.0 (it was 0.4.2). The starter mod builds with no code change.
  • New PRIVACY.md: what the tool reads, writes and runs, and that it sends nothing anywhere. The README links it, and the program zip holds it.

Fixes

  • The README and AGENTS.md named version 0.4.0's files (sf-mod-build.0.4.0.nupkg and so on). They now name 0.4.2's, and a test fails when either file names a release file or a "was tested" version that isn't the project's version.

Example

A new dotnet new sfmod project, built with sf-mod-check 0.15.2 on PATH (folder names shortened; the lines between are the same as before):

> sf-mod-build build
== compile
...
== plugin
running the builder: GapMod.Builder.csproj (the first run restores and builds it, which can take a few minutes)
         gap check: RESULT: OK (0 errors, 0 warnings)
built    D:\Mods\GapMod\dist\GapMod.esm (877 bytes)
RESULT: OK, GapMod.esm built into D:\Mods\GapMod\dist
...
RESULT: OK, built D:\Mods\GapMod\GapMod-0.1.0.zip

Without sf-mod-check on PATH the same line reads gap check: NOT RUN (sf-mod-check was not found). Get it from ....

Download

  • sf-mod-build-0.4.2-win-x64.zip: the Windows program (no .NET needed).
  • sf-mod-build-template-0.4.2.zip: the starter project.
  • sf-mod-build.0.4.2.nupkg: the .NET tool package.
  • Check each download against SHA256SUMS or its own .sha256 file.

See CHANGELOG.md for the full history.

sf-mod-build 0.4.1

Choose a tag to compare

@github-actions github-actions released this 24 Nov 00:28

Fixes

  • pack with "xbox": true no longer deletes your files in creations-out. Before, it emptied creations-out on every run, so a file you kept there (a Creations description draft, say) or a folder of your own was deleted without a word, and pack exited 0. Now it deletes only what earlier builds made there: the names in creations-out's new .sf-mod-build-made list, the mod's own plugins and archives, and the files it is about to copy there from dist. When creations-out holds anything else, pack deletes nothing, in creations-out or in dist, and stops with exit 2, naming each one and the fix. A creations-out folder that is a link or junction is now refused on this path too. 0.4.0 and earlier have this problem.
  • plugin no longer deletes a plugin or archive in dist that isn't the mod's own. Before, it deleted every .esm, .esp, .esl and .ba2 at the top of dist, so a backup such as MyMod-backup.esm was deleted without a word. Now it deletes only the names sfmod.json gives (the plugin, each part, the archives pack makes, the archives list and zip.archives) and the names in dist's made list; another plugin or archive stops it with exit 2, naming it, and nothing is deleted. 0.4.0 and earlier have this problem.

Example

A made-up mod with "xbox": true, after a first plugin and pack, with a description draft and a folder of drafts added to creations-out (folder names are shortened):

> sf-mod-build pack
RESULT: CANNOT PACK (the creations-out folder C:\Mods\MyMod\creations-out holds "CreationDescription-draft.txt", "my drafts" (a folder), which sf-mod-build didn't make, and pack deletes only the mod's own plugins and archives (the names sfmod.json gives) and what earlier builds made there, so nothing was deleted. Fix: move them out of creations-out and run again (sf-mod-build 0.4.0 and earlier left no list of what they made there, so their other files are named here once), or set "creationsOut" in C:\Mods\MyMod\sfmod.json to a folder of its own).

and the same mod with a backup plugin kept in dist:

> sf-mod-build plugin
RESULT: CANNOT BUILD THE PLUGIN (the dist folder C:\Mods\MyMod\dist holds "MyMod-backup.esm", which no earlier build listed as its own, and sf-mod-build deletes only the mod's own plugins and archives (the names sfmod.json gives) and what earlier builds made there, so nothing was deleted. Fix: move it out of dist and run again (a build by sf-mod-build 0.3.0 or earlier left no list of what it made, so its builder's other files are named here once), or set "dist" in C:\Mods\MyMod\sfmod.json to a folder of its own).

Both exit 2, and the draft, the folder and the backup are still there.

Download

  • sf-mod-build-0.4.1-win-x64.zip: the Windows program (no .NET needed).
  • sf-mod-build-template-0.4.1.zip: the starter project.
  • sf-mod-build.0.4.1.nupkg: the .NET tool package.
  • Check each download against SHA256SUMS or its own .sha256 file.

See CHANGELOG.md for the full history.

sf-mod-build 0.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 23:05

What's new

  • Two more kinds of builder in sfmod.json. Give exactly one of builder.project (a .NET project, as before), builder.command or builder.prebuilt; validate reports none or two as a PROBLEM.
  • builder.command runs any program that writes the plugin: a list with the program first and its first arguments after it, such as ["python", "tools/build.py"] or ["dotnet", "run", "build.cs", "--"]. builder.args are added after it, and the builder placeholders work in both. A program with a / or \ is a path relative to sfmod.json; a bare name is found on PATH. It runs in the sfmod.json folder without a shell, and doesn't need .NET.
  • builder.prebuilt copies a ready plugin (made in the Creation Kit or by hand) into dist under the plugin name. It takes no args, and plugin needs neither the game nor .NET for it.
  • validate now prints a runs: line with the command a build would run. Read it before you build a mod someone else made: builder.command runs whatever program it names.
  • steps.afterPlugin and steps.afterPack in sfmod.json: lists of your own commands, each written like builder.command, run in order at the end of plugin and at the end of pack. Running a step on its own runs its commands too, so build and one step at a time give the same result. They take the builder placeholders plus {name} and {plugin}. A missing program stops the step before any work (exit 2); a command that exits non-zero stops it (exit 1) with a RESULT line naming the command. validate prints one runs: line per command.
  • A top-level archives list in sfmod.json: more archives that pack makes in dist, each named <plugin> - <suffix>.ba2. An entry either packs a source folder laid out like Data (with "compression": "none" for voice files, which play silent when stored compressed, and "format": "dds" for textures) or copies a ready archive from file as it is. These archives ship in the zip, pack deletes their old copies, and they never count as stray. The suffix may be Main or Textures only when pack doesn't make that archive itself. pack checks a source folder's files (a steps.afterPlugin command may fill it) and stops with exit 2 before Archive2 runs when it is missing, empty or holds a file that doesn't belong (a dot file or a file in a dot folder, Thumbs.db and desktop.ini included, since Archive2 packs the folder as it is). validate refuses a source that is, holds or is inside assets.source, assets.xboxTextures or another entry's source, so no file ships twice. validate prints an archive: line for each entry. In this version the list can't be used with "xbox": true.
  • parts in sfmod.json: the other plugins your builder writes into dist, each { "plugin": "MyMod-Extra.esm" } with optional scripts of its own (the same shape as the top-level scripts; source defaults to the top-level source folders). compile compiles a part's scripts into <stage>/parts/<part>/Scripts, pack packs them into <part> - Main.ba2, plugin stops (exit 1) when a part plugin isn't in dist, and zip ships every plugin and archive and stops (exit 2) when one is missing. validate prints a part: line for each and refuses a part named like the main plugin or another part, a name that breaks the plugin-name rules, a script in two places, and parts with builder.prebuilt. In this version a part with scripts can't be used with "xbox": true.
  • check and build take --masters-dir <folder>, which can be given more than once, and pass each folder to sf-mod-check's release. Use it for a mod whose master plugin isn't in the Data folder, such as another mod's folder in your mod manager. A folder that isn't there stops check, or build before it starts, with exit 2.
  • scripts.optimize in sfmod.json (default true): set it to false to compile without the compiler's -optimize option, for a mod whose scripts were tested in game that way. A part's scripts follow the top-level value unless they set their own. -release stays refused either way.
  • The release now has a <file>.sha256 beside each download, as well as SHA256SUMS, so a tool can check one download on its own.

Example

A made-up mod whose builder is a Python script, with "builder": { "command": ["python", "tools/build.py", "--out", "{dist}"], "args": ["{version}"] } (folder names are shortened):

> sf-mod-build validate
...
builder:  command python
          args {version}
runs:     python tools/build.py --out {dist} {version}
...
RESULT: OK

> sf-mod-build plugin
running the builder: python.exe (builder.command)
built    C:\Mods\MyMod\dist\MyMod.esm (20 bytes)
RESULT: OK, MyMod.esm built into C:\Mods\MyMod\dist

and a mod with "builder": { "prebuilt": "Original/MyOtherMod.esm" }:

> sf-mod-build plugin
copied   C:\Mods\MyOtherMod\Original\MyOtherMod.esm to C:\Mods\MyOtherMod\dist\MyOtherMod.esm (21 bytes)
RESULT: OK, MyOtherMod.esm copied into C:\Mods\MyOtherMod\dist

and a made-up mod with one step after pack that fails, "steps": { "afterPack": [["python", "tools/after.py", "{dist}/missing.txt", "fail"]] }:

> sf-mod-build pack
running  steps.afterPack[0]: python.exe tools/after.py C:\Mods\StepsMod\dist/missing.txt fail
FAILED   steps.afterPack[0] (python.exe) exited with code 3
         after.py: C:\Mods\StepsMod\dist/missing.txt is missing
RESULT: FAILED at steps.afterPack[0] (python.exe exited with code 3). Fix: fix the error shown above (the full output is in the log: --log <file>), or the command in C:\Mods\StepsMod\sfmod.json, and run again.

and a made-up mod with a voice folder and a ready archive, "archives": [ { "suffix": "Voices", "source": "Voices", "compression": "none" }, { "suffix": "Extra", "file": "Original/Other - Extra.ba2" } ]:

> sf-mod-build validate
...
archive:  "VoiceMod - Voices.ba2" packed from C:\Mods\VoiceMod\Voices, uncompressed
archive:  "VoiceMod - Extra.ba2" copied from C:\Mods\VoiceMod\Original\Other - Extra.ba2
...
          holds VoiceMod.esm, VoiceMod - Voices.ba2, VoiceMod - Extra.ba2
RESULT: OK

> sf-mod-build pack
packed   C:\Mods\VoiceMod\dist\VoiceMod - Voices.ba2 (127 bytes)
copied   C:\Mods\VoiceMod\dist\VoiceMod - Extra.ba2 from C:\Mods\VoiceMod\Original\Other - Extra.ba2 (23 bytes)
RESULT: OK, "VoiceMod - Voices.ba2" and "VoiceMod - Extra.ba2" made in C:\Mods\VoiceMod\dist

and a made-up mod whose Python builder writes three plugins, with "parts": [ { "plugin": "PartsMod-Extra.esm", "scripts": { "namespaces": ["PTMX"] } }, { "plugin": "PartsMod-Patch.esm" } ]:

> sf-mod-build build
== compile
compiled PTM\PTM_Main.psc into C:\Mods\PartsMod\.build\stage\Scripts
compiled PTMX\PTMX_Extra.psc into C:\Mods\PartsMod\.build\stage\parts\PartsMod-Extra\Scripts
...
== plugin
running the builder: python.exe (builder.command)
built    C:\Mods\PartsMod\dist\PartsMod.esm (16 bytes)
built    C:\Mods\PartsMod\dist\PartsMod-Extra.esm (16 bytes)
built    C:\Mods\PartsMod\dist\PartsMod-Patch.esm (16 bytes)
RESULT: OK, PartsMod.esm and 2 part plugin(s) built into C:\Mods\PartsMod\dist
== pack
packed   C:\Mods\PartsMod\dist\PartsMod - Main.ba2 (331 bytes)
packed   C:\Mods\PartsMod\dist\PartsMod-Extra - Main.ba2 (336 bytes)
RESULT: OK, "PartsMod - Main.ba2" and "PartsMod-Extra - Main.ba2" made in C:\Mods\PartsMod\dist
== zip
zipped   PartsMod - Main.ba2
zipped   PartsMod-Extra - Main.ba2
zipped   PartsMod-Extra.esm
zipped   PartsMod-Patch.esm
zipped   PartsMod.esm
...

and a made-up mod whose dist holds a folder of old copies:

> sf-mod-build plugin
RESULT: CANNOT BUILD THE PLUGIN (the dist folder C:\Mods\MyMod\dist holds "old" (a folder), which no earlier build listed as its own, and sf-mod-build deletes only the plugins and archives in dist and what earlier builds made there, so nothing was deleted. Fix: move it out of dist and run again (a build by sf-mod-build 0.3.0 or earlier left no list of what it made, so its builder's other files are named here once), or set "dist" in C:\Mods\MyMod\sfmod.json to a folder of its own).

Fixed

  • plugin no longer deletes the folders and other files you keep in dist (plugins and archives there are still deleted). Before, it emptied dist on every build, so a folder you kept there (old copies, notes) was deleted without a word. Now it deletes only what earlier builds made there (the names in dist's new .sf-mod-build-made list, plugins and .ba2 archives) and keeps zips and a zip.folder inside dist. When dist holds anything else, it deletes nothing and stops with exit 2, naming each one and the fix. The first build after an update from 0.3.0 or earlier may name your builder's own extra files this way once, because those versions kept no list; delete them and run again. A dist folder that is a link or junction is refused too. When a delete fails (a plugin open in the Creation Kit, say), the list stays for the next run. 0.3.0 and earlier have this problem.
  • A build no longer fails the second time when a loose file it copies is read-only: the copies pack makes in stage and creations-out (and, new in 0.4.0, the prebuilt plugin and ready archives plugin and pack copy into dist) are no longer read-only, so the next build can delete them. 0.3.0 and earlier have this problem for read-only loose files.
  • AGENTS.md no longer says that archives your builder writes aren't supported: they have shipped through zip.archives since 0.3.0.
  • When a zip.files entry isn't there, validate's fix now says that a file the builder or a step makes goes in dist instead, because zip.files takes only files that are there before the build.

Download

  • sf-mod-build-0.4.0-win-x64.zip: the Windows program (no .NET needed).
  • sf-mod-build-template-0.4.0.zip: the starter project.
  • `sf-m...
Read more