Concord lets a mod change target runtime behavior while it is running. No runtime files touched, no IL to learn. You write C# that looks like it belongs next to the target code, and Concord handles runtime patch application.
It's a Harmony alternative built for .NET 10, type-safe, zero-allocation on the hot path.
Every campfire should run 5 degrees warmer:
[Patch]
abstract class CampfireWarmthPatch : Campfire
{
[Inject(At.Tail, nameof(GetWarmth))]
void AfterGetWarmth(ControlHandle<int> ch)
{
ch.ReturnValue += 5;
}
}That's the whole patch. The target code doesn't move.
Everything's at concordlib.dev:
- Start Here, the core ideas
- Your First Patch, a guided walk-through
- Common Tasks, the patches you'll write most
- How Patches Work, what's happening underneath
- API Reference, generated from source
Concord.Ref— compile-time reference assembly for authoring mods against the Concord API.Concord.Analyzers— build-time Roslyn analyzers that validate patch declarations.Concord.Generators— optional source generators + IDE refactorings (patch registry,[Shadow]members, scaffolding).Concord— the runtime assembly a target ships to load and apply patches.
Concord 1.0 covers the whole patch model: head, tail, return, around, and
invoke injections; ControlHandle cancel and return-value control; private target fields;
reverse patches; attached data on target instances; the [Patch] declaration
model; and the apply/undo API. The
Roadmap covers what comes next.
PRs are welcome. If you want to dig into the internals, the
Contributor Architecture page
is a good starting point. Target main: the
pull-request checklist will guide you from there.
