Building from Source¶
Clone¶
Already cloned without submodules? git submodule update --init --recursive - the recursion matters, CommonLibSSE-NG pulls openvr itself.
The DLL¶
Requirements: xmake 3.x, MSVC v143 (Visual Studio 2022 build tools). CommonLibSSE-NG (alandtse fork) is the submodule at lib/commonlibsse-ng; one build covers SE, AE and VR via Address Library.
The Papyrus scripts¶
Sources live in dist/Core/source/scripts/, compiled output in dist/Core/Scripts/. A skyrimse.ppj ships for pyro-style builds; either way the import path needs:
- the vanilla + SKSE sources
- SkyUI's full script source (for
SKI_ConfigBase-SLIF_Menu). The SDK stub is not enough:SLIF_Menu.OnVersionUpdatecallsOnConfigManagerReset, which the stub leaves out - PapyrusUtil's
StorageUtil.psc(forSLIFNG_Migrateand theSLIF_Morphmirror)
Always rebuild the whole script set
Papyrus bakes call arities into compiled callers. If a native signature in SLIFNG.psc changes, every shim that calls it must be recompiled in the same pass - a partial rebuild produces scripts that abort at run time with no compile error.
MCM translations¶
Every string the MCM shows is a $SLIFNG_* key. The prose lives in dist/Core/Interface/Translations/SexLab Inflation Framework_<LANGUAGE>.txt: UTF-16 LE with BOM, one $key<TAB>value per line, ; for a comment, \n for a line break.
The file name is the data file's name, not ModName - the game resolves translations per active plugin ("modname is replaced by the name of the mod data file", SkyUI: Localization) - so it has to keep the plugin's name, spaces and all.
Two properties of that lookup shape the keys:
- It is whole-string:
"$KEY"is replaced,"$KEY " + countis not. A runtime value goes in through SkyUI's argument form instead - the script passes"$KEY{" + value + "}"and the txt keys it as$KEY{}with a{}where the value lands (that is how the pending import count reaches its row). That form is SkyUI's, not the game's: it works on menu strings but not onDebug.Notification, which is why the two migration notifications that report a count stay English. - A language with no file of its own shows raw keys, not English. So the English file ships copied under every language name; translating one is editing a copy in place, and nothing in the scripts changes.
The Actor page's report rows are built by the engine (actor and slider names, mod keys, numbers) and are deliberately not translated - they are the same diagnostics that go into SLIFNG.log and into bug reports.
Page names are stored in the save, so switching them to keys needs the save-side rebuild too: OnConfigOpen compares Pages[0] against the expected key and calls BuildPages() when it differs, which catches saves whose stored config version is already current.
Repository layout¶
src/ the SKSE plugin
Ledger.{h,cpp} contributions, folds, hidden pins, magnitudes, co-save
Calc.h SLIF's six calculation types, verbatim
BodyProfile.{h,cpp} per-actor INI profiles, custom regions
Skee.{h,cpp} NiTransform/BodyMorph application, coalescing, threading
Ramp.{h,cpp} incremental inflation (the native drain-loop replacement)
Papyrus.cpp the native surface SLIFNG.psc binds to
Query.h the shared read core (Papyrus + C++ answers)
APIServer.cpp serves API/SLIFNG_API.h (C export + SKSE messaging)
API/SLIFNG_API.h the public header other plugins copy
dist/Core/ the shippable mod (ESP, SEQ, scripts, DLL, profiles)
Interface/Translations/ the MCM's strings, one file per language
dist/Bodies/ the FOMOD's per-body default.ini variants
dist/fomod/ installer metadata
CONTRACT.md the pinned compatibility contract - read this first
PLAN.md architecture and phase history
TESTING.md the smoke procedure (console drivers)
Packaging a release¶
Packages the integration kit: src/API/SLIFNG_API.h, the three consumer-facing scripts, the
README from tools/api-kit/, and a VERSIONS.txt whose numbers are read out of the sources
that define them (kApiVersion from Papyrus.cpp, kQueryVersion from SLIFNG_API.h, the mod
version from SLIFNG_Version.psc) so they cannot drift from what the mod reports at runtime.
The mod archive itself is dist/ zipped with Core, Bodies and fomod at the root — that is
the FOMOD the installer reads. Both zips go on the GitHub release; Release/ is build output and
is not tracked.
Testing¶
There is no test suite in the usual sense; there is a smoke procedure. TESTING.md walks it: slifng smoke exercises the whole pipeline from the console with no consumer mod installed (needs ConsoleUtil Extended), and most assertions are lines you can grep in SLIFNG.log. The compatibility matrix in PLAN.md (P7) is the release gate.
The log cannot confirm a body changed. A matching skee readback proves the write landed, not that a vertex moved - GetMorph reads skee's dictionary, not the mesh. Any claim that inflation visibly works has to be seen on a character, dressed as well as nude; a bug that required unequipping armour to see a belly change survived every release precisely because the log read green throughout.
Versioning¶
The mod version lives in exactly one script, SLIFNG_Version.psc, packed as major*10000 + minor*100 + patch (SL Widgets convention). The MCM's GetVersion() delegates to it, and SkyUI's OnVersionUpdate ladder keys on the packed number. The packed value must stay above 122 forever: a migrating save carries the replaced SLIF MCM's stored version 122 and SkyUI only fires version updates on an increase - which is why 0.2.0 was the first version that could exist.