Skip to content

SDK Properties ​

Mod projects use the Lustral SDK:

xml
<Project Sdk="Lustral.Sdk/0.1.0">
  <PropertyGroup>
    <LustralGame>Lethal Company</LustralGame>
    <ModId>you.betterhud</ModId>
    <Version>1.0.0</Version>
  </PropertyGroup>
</Project>

On every build, the SDK locates the game, selects the target framework (.NET 10 for IL2CPP games, .NET Standard 2.1 for Mono games), references Lustral.Api, HarmonyX and the game's assemblies without copying them, validates the project, generates the manifest and deploys the mod to <game>/Mods/<id>/.

Game ​

PropertyDescription
LustralGameThe game's folder name under a Steam library's steamapps\common (for example Lethal Company), or the full path to the game folder. All Steam libraries on the machine are searched.
LustralGameDirThe full path to the game folder. Takes precedence over LustralGame. Set it in Game.props.user next to the project to keep machine-specific paths out of source control.
LustralMonoGame, LustralIl2CppGameUsed instead of LustralGame for multi-backend mods: one game of each kind. The project is built once per backend (netstandard2.1 for Mono, net10.0 for IL2CPP), each against and into its game.
LustralMonoGameDir, LustralIl2CppGameDirThe full paths of those games, analogous to LustralGameDir.
LustralBackendSet on the command line (-p:LustralBackend=Mono) to build only one backend of a multi-backend mod.

The SDK defines the following properties for use in the project: LustralBackend (Il2Cpp or Mono), LustralGameDirectory, LustralModsDirectory (the game's Mods folder), LustralInteropDirectory (IL2CPP) and LustralManagedDirectory (Mono), as well as the compilation symbol LUSTRAL_IL2CPP or LUSTRAL_MONO.

Mod Metadata ​

PropertyDefaultDescription
ModIdRequiredThe mod ID: lowercase letters and digits, separated by single dots, dashes or underscores (you.betterhud). It names the mod's folder, settings file and log entries, and must not change.
ModNameAssembly nameThe display name.
Version1.0.0The mod's semantic version.
DescriptionA one-sentence description of the mod.
AuthorsThe authors, separated by semicolons.
ModCreditsAcknowledgements, shown with the mod's details.
PackageLicenseExpressionAn SPDX license expression, such as MIT.
PackageProjectUrlThe mod's website, written as its website link.
RepositoryUrlThe mod's source repository, written as its source link.
ModKindmodmod, or library for a library mod.
ModColorDerived from the IDThe color of the mod's name in the console: a Unity color name (orange) or #rrggbb.
ModLoadOrder0Among mods that do not depend on each other, lower values load first.

Requirements ​

See Compatibility Requirements.

PropertyDefaultDescription
ModLustralVersion^<SDK version>The supported Lustral versions, as a version range.
ModBackendsThe game's backendmono, il2cpp, or both: mono;il2cpp.
ModPlatformsAnywindows, linux or macos, optionally followed by -x64, -x86 or -arm64; separated by semicolons.
ModUnityVersionAnyA version range of supported Unity versions, such as >=2022.3.
ModProcessesAnyExecutable names, for games that ship more than one executable.

Distribution and Updates ​

See Publishing and Updates.

PropertyDefaultDescription
ModUpdateSourceThe update source: github:owner/repository, or the HTTPS address of a JSON feed.
ModUpdateAssetThe release's only .zipFor GitHub sources: the release file to download, with * wildcards.
ModPackagefalsetrue to also write <id>-<version>.zip to the output folder, containing the mod's folder, for attaching to a release.

Build and Launch ​

PropertyDefaultDescription
LustralDeploytruefalse to build without deploying the mod to the game.
LustralLaunchSettingstruefalse to prevent the SDK from writing Properties/launchSettings.json.
LustralSteamAppIdFrom the Steam libraryThe Steam app ID set by the launch profile, if the SDK cannot determine it.
LustralMonoDebuggerAddress127.0.0.1:56000The address of Mono's debugger agent, used by launch profiles for Mono games.

Items ​

xml
<ItemGroup>
  <!-- Other mods -->
  <ModDependency Include="someone.uikit" Version="^1.2" />
  <ModDependency Include="someone.extras" Version="*" Optional="true" />
  <ModIncompatibility Include="someone.otherhud" Version="&lt;2.0" />

  <!-- Supported games -->
  <ModGame Include="BloonsTD6" Developer="Ninja Kiwi" Versions="56.*" />

  <!-- Additional links shown with the mod's details -->
  <ModLink Include="issues" Url="https://github.com/you/betterhud/issues" />

  <!-- Assemblies a library exposes to its dependents -->
  <ModExport Include="UiKit" />

  <!-- Files shipped with the mod -->
  <None Include="Assets\**" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
ItemMetadataDescription
ModDependencyVersion (required), Optional, ReferenceA required mod, or with Optional="true", a mod used when present. If it is a library installed in the game, its exported assemblies are referenced (Reference="false" omits them). See Mod Dependencies.
ModIncompatibilityVersion (default: all)A mod this mod is incompatible with: if it is loaded, this mod is not.
ModGameDeveloper, VersionsA supported game, by the name the game reports. Versions are separated by semicolons and support * wildcards.
ModLinkUrlA named HTTP(S) link.
ModExportFor libraries: an assembly name (without .dll) that dependents may use. Defaults to the library's own assembly.
Any item copied to the outputDeployed to the mod's folder at the same relative path and included in the release package. See Files and Data.

Validation ​

The build fails with a descriptive error when:

  • ModId is missing or invalid, or ModKind is neither mod nor library.
  • The game cannot be found or is not a Unity game.
  • The project sets a TargetFramework other than the one required by the game's backend.
  • The game uses IL2CPP and has no interop assemblies yet (launch the game once with Lustral installed).
  • A version, version range, color, link, platform, backend or update source is malformed.

Mods are third-party software. Lustral does not verify their behavior and is not responsible for any damage they cause.