Skip to content

BuildKit 0.5.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 19:50
· 32 commits to main since this release

What's new

The gap check now runs sf-mod-check gap, from the public sf-mod-check tool (0.15.0 or later), instead of the private mutagen-gap-check.py script. It is never skipped silently: when sf-mod-check can't be found, BuildKit prints one line that names the fix. The "Show Debug Messages (PC only)" option and every other on/off option now carry the two value rows the Creation Kit writes.

Plugins with a Gameplay Options on/off option are 81 bytes larger when built again with 0.5.0 (the eight added fields). A localized plugin's string IDs after the option's text shift too.

Example

This is the output of the README's builder, run with BuildKit 0.5.0 and sf-mod-check 0.15.0 installed as a .NET global tool (so it is on the PATH) against the Steam copy of Starfield.esm. It wrote an 883-byte out\MyMod.esm:

> dotnet run
ID lock: 4 records, 4 new, 0 moved back to their locked IDs (ids.lock.json)
  BuildKit: Bethesda fields filled: 0 message back-out index, 0 form list add-to-list, 0 model light layer, 1 keyword, 0 story-manager quest node
  BuildKit: form version 582 set on 1 own records left at Mutagen's 576
  BuildKit: header interior cell count (INCC) set to 0 (was unset)
  BuildKit: own records written in Bethesda's FE FormID form (light plugin)
  gap check: running C:\Users\Me\.dotnet\tools\sf-mod-check.exe gap
  gap check: MyMod.esm: 4 own records, 0 overrides, 0 compared with their master's copy
  gap check:   0 error(s), 0 warning(s)
  gap check: RESULT: OK (0 errors, 0 warnings)
  gap check: sf-mod-check 0.15.0 by Richard Bejtlich - GPL-3.0 - https://github.com/taosecurity/sf-mod-check

Without sf-mod-check, the same build prints this instead of the five gap check: lines, and still writes the plugin:

  gap check: NOT RUN (sf-mod-check was not found). Get it from github.com/taosecurity/sf-mod-check/releases (unzip the exe and put its folder on PATH, or install the .nupkg as a .NET global tool), or set BUILDKIT_SFMODCHECK or WriteOptions.GapCheckExe to its path.

Changes

  • The gap check looks for sf-mod-check in WriteOptions.GapCheckExe, then the BUILDKIT_SFMODCHECK environment variable, then PATH (on Windows, only sf-mod-check.exe is found on PATH). A path named by the option or the variable must be a full path to an existing program, or the build throws naming the fix. PluginWriter.GapCheck called directly reads the variable and PATH the same way, and PluginWriter.ResolveSfModCheck is the public form of that lookup. It passes the Data folder as --data and GapCheckMastersDir as --masters-dir, and any nonzero exit throws when FailOnGapErrors is on. Eight new tests cover it, most with a stub exe.
  • Breaking for builders that used the old gap check: WriteOptions.GapCheckScript, PluginWriter.GapCheckScriptName and PluginWriter.FindPython are gone. Use GapCheckExe instead of GapCheckScript. The fourth argument of PluginWriter.GapCheck is now exe, the sf-mod-check program, instead of script; a .py path there or in GapCheckExe throws an error that says so. The gap check no longer looks in BUILDKIT_TOOLS for a Python script or for Python itself, and BuildKit no longer runs Python. PluginWriter.TryFindTool and FindTool still use BUILDKIT_TOOLS for a builder's own helper files.
  • When the gap check exits 1 the error says it found errors; any other nonzero exit says it could not check (a missing master, or an sf-mod-check older than 0.15.0).
  • GameplayOptions.Bool and GameplayOptions.Debug write the two value rows (VOVS, VORV, RESN, VORN: DISABLE at 0, ENABLE at 1) that the Creation Kit writes on every on/off option, and no GPOD (the Creation Kit writes that only on sliders; all of Bethesda's own options are sliders). A byte compare against a Creation Kit-made option from another author shows the same eight fields. These fixed values never go through a builder's text: function. Three new tests check the written fields.

Not yet

  • The new rows haven't been looked at in game on a rebuilt mod; the menu should still show the switch and its text.

Download

dotnet add package Taosecurity.Starfield.BuildKit --version 0.5.0