Skip to content

Environment Setup

Client mods target .NET 6 and x64. Server companions target .NET Framework 4.8 and the matching LabAPI release. Client mods use the developer SDK artifact from the same Anomaly release; server companions use the SDK’s matching Anomaly.Server and Anomaly.Shared assemblies.

A client project references:

  • Anomaly.Client.Api.dll.
  • Anomaly.Shared.dll for shared contracts such as custom messages and capability descriptors.
  • The MelonLoader and generated IL2CPP reference assemblies for the selected SCP:SL build.

Do not compile against Anomaly.Client.dll. It is runtime implementation, not the public API.

A server companion references Anomaly.Server.dll from the matching developer SDK, plus Anomaly.Shared.dll, LabAPI, and the server’s managed game references. The developer SDK includes Anomaly.Server.dll, its XML documentation, the server public baseline, and the HelloAnomalyServer starter.

Install and start the matching modded game once so MelonLoader generates its references. Extract the matching developer SDK, then open samples/HelloAnomalyMod. From that directory:

Terminal window
dotnet build -c Release -p:AnomalyGameRoot="X:\Games\Anomaly" -p:DeployLocal=false

The starter finds its enclosing SDK automatically. When copying it outside the SDK, retain the sibling Anomaly.Sample.props and also pass -p:AnomalySdkRoot="X:\SDKs\Anomaly". You can instead supply AnomalyClientInteropDir and AnomalyClientMelonLibDir explicitly for nonstandard game layouts. Keep these machine-specific properties in an untracked props file or build arguments. The source repository is not required.

The SDK includes the ordinary MelonMod starter and an advanced managed-module starter. Public DLLs and their XML documentation are colocated under the SDK’s lib/net6.0 and lib/net48 directories. Use the appropriate runtime’s directory and one release set.

using Anomaly.Client.Api.Compatibility;
using MelonLoader;
[assembly: MelonInfo(typeof(MyMod.Core), "MyMod", "0.1.0", "YourName", null)]
[assembly: MelonGame("Northwood", "SCPSL")]
[assembly: MelonAdditionalDependencies("Anomaly.Client")]
[assembly: SupportedGameVersion("14.2.7^")]

Do not add MelonLoader’s required-game-version attribute for Anomaly compatibility. The Launcher reads Anomaly’s SupportedGameVersion attribute. The caret range above means versions greater than or equal to 14.2.7 and lower than 14.3.0.

Keep machine-specific game and SDK roots in an untracked .csproj.user file or MSBuild properties. Do not commit absolute user paths. Release and CI builds should receive all reference roots explicitly and fail with a clear missing-input message.

Build Release/x64 with deployment disabled, then test in a clean loadout using MelonLoader 0.7.2. Compilation proves reference compatibility only; retain separate Windows and Proton runtime receipts.

Continue to Client Mod Quickstart.