Building from Source¶
This project uses CMake and vcpkg for dependency management. MSVC or Clang-CL on Windows is required — GCC and MinGW are not supported because SKSE plugins must be Windows DLLs built against the Windows SDK.
For where everything lives in the tree, see the repo layout in the Author Overview.
Prerequisites¶
- CMake 3.21+
- vcpkg
- MSVC (Visual Studio 2022) or Clang-CL
Build steps¶
- Clone the repository:
- Bootstrap vcpkg (Windows):
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install --triplet x64-windows-skse
- Set
VCPKG_ROOT:
- Configure and build:
| Preset (configure) | Preset (build) | Compiler |
|---|---|---|
build-release-msvc |
release-msvc |
MSVC |
build-debug-msvc |
debug-msvc |
MSVC |
build-release-clang |
release-clang |
Clang-CL |
build-debug-clang |
debug-clang |
Clang-CL |
The output DLL is placed under build/<preset>/ and deployed to dist/Core/SKSE/Plugins/SexlabArousedNG.dll.
Tests¶
The C++ math is covered by Catch2 tests in test/ArousalMath.cpp:
Papyrus scripts¶
Papyrus sources live in dist/Core/Source/Scripts/*.psc; compiled bytecode lands in dist/Core/Scripts/*.pex. Compile the .psc files with the Creation Kit's PapyrusCompiler.exe (or your editor's Papyrus integration) against the SKSE/SkyUI/PapyrusUtil script headers. Never hand-edit the .pex files — they are build output.
Bumping the version¶
Three files hold version strings — keep them in sync:
dist/fomod/info.xml— the FOMOD installer version shown in mod managers (<Version>). This is the canonical user-facing version.dist/Core/Source/Scripts/slaconfigscr.psc—GetVersionString()is the display string shown in MCM;GetVersion()is the integer form using theMMmmppppacking scheme documented in the function (e.g.30100009for 3.1.9). The integer also drivesOnVersionUpdate()migration paths — only the integer triggers migrations, the string is display-only. Recompileslaconfigscr.pexafter editing.CMakeLists.txt—project(... VERSION X.Y.Z ...)controls the DLL's resource version. Synced to the fomod version since 3.1.11; bump when cutting a release that includes C++ changes.
Cosave ID is stable
The cosave ID SLAN (0x4E414C53) is stable across versions — do not change it without a save-compatibility strategy. On load, per-actor arousal is validated against the sum of its effects (a checksum), and Revert clears all data.