Developers
Cairn is a Unity IL2CPP game. Mods are .NET assemblies: MelonLoader loads them, Il2CppInterop exposes the game types, Harmony patches them.
Stack
- MelonLoader — loads mod assemblies, lifecycle hooks
- Il2CppInterop — managed proxies; call
Il2Cpp.<Type> - Harmony — prefix / postfix the game's own methods
Build on the libraries
The cross-menu toolkit (formerly CrossMenuLib) is folding into
CairnAPI — target that.
Minimal mod
using MelonLoader;
[assembly: MelonInfo(typeof(MyMod.Core), "MyMod", "0.1.0", "you")]
[assembly: MelonGame("The Game Bakers", "Cairn")]
namespace MyMod;
public class Core : MelonMod
{
public override void OnInitializeMelon() => LoggerInstance.Msg("loaded");
public override void OnUpdate() { /* per-frame */ }
}
Build against MelonLoader\Il2CppAssemblies\ (generated on first run), reference
MelonLoader.dll, drop the .dll in Mods\.
Live iteration
CairnDevTools runs an HTTP console that evals C# against the live game — probe state without a rebuild.