Skip to content

Repository files navigation

SPT.ReferenceAssemblies

Reference assemblies for building SPT BepInEx plugins without needing the game installed.

What this is

A NuGet package containing reference assemblies (method bodies stripped) for:

  • Unity Engine modules (MonoBehaviour, GUI/IMGUI, Physics, etc.)
  • EFT types from Assembly-CSharp (EFT.Builds, EFT.InventoryLogic, EFT.UI, etc.)
  • SPT module types (SPT.Reflection.Patching, SPT.Common.Http, etc.)
  • Other game assemblies (Comfort, ItemComponent.Types, Sirenix, etc.)

BepInEx and Harmony are already on NuGet — this package fills the gap for everything else.

Reference assemblies contain only type signatures with no implementation code. They're produced using JetBrains Refasmer, inspired by krafs/RimRef from the RimWorld modding community.

Why it exists

SPT mod projects typically reference game DLLs via <HintPath> pointing at a local game install. This means:

  • CI builds are impossible without the game installed on the build server
  • Every contributor needs to configure local paths
  • Projects must live inside the game directory structure

This package replaces all those HintPath references with a single NuGet dependency.

Usage

Replace your <Reference> / <HintPath> blocks with:

<PackageReference Include="SPT.ReferenceAssemblies" Version="1.0.0-spt4.0.13" PrivateAssets="all" />

PrivateAssets="all" ensures the reference assemblies are compile-only — at runtime, the real DLLs are loaded by the game.

You'll still need BepInEx as a separate NuGet reference:

<PackageReference Include="BepInEx.Core" Version="5.*" />

Add the GitHub Packages and BepInEx NuGet feeds to your nuget.config:

<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="BepInEx" value="https://nuget.bepinex.dev/v3/index.json" />
    <add key="github-cebarks" value="https://nuget.pkg.github.com/cebarks/index.json" />
  </packageSources>
</configuration>

Versioning

Package versions use a pre-release suffix to indicate the SPT version:

  • 1.0.0-spt4.0.13 — reference assemblies from SPT 4.0.13

Regenerating reference assemblies

If you need to update for a new SPT version:

  1. Install just and Refasmer: dotnet tool install --global JetBrains.Refasmer.CliTool
  2. Run: just generate ~/path/to/spt-install
  3. Review the diff, commit, tag, push

License

LGPL-3.0-only

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages