HumankindAssetFramework

Ecosystem Survey — what other Humankind BepInEx plugins solve, and what we can learn

Compiled 2026-07-12 from a GitHub-wide search (repo/code/README search + walking each known modder’s account), then reading each repo’s README and key sources. Everything below was verified against the actual code, not just descriptions. Class/method names are as they appear in those repos (2021–2024 game versions) — re-verify signatures against current game DLLs (ilspycmd) before relying on one.

Why this document: these repos collectively map which Amplitude systems are patchable and how the community solved problems we share (lifecycle timing, per-entity runtime state, sim→presentation sequencing, distribution). Use it as a technique index when building the next Factory feature.

Quick reference

Repo Problem it solves Headline technique for us License Last activity
Theadd/Humankind-GUI-Tools In-game toolbox: unit spawner, cheats, live map editor, free cam PostAndTrackOrder(...).UponCompletion(...) + PresentationArmy.DoUpdateMesh MIT 2024-10
Theadd/Modding.Humankind.DevTools Framework library: game-state facades, lifecycle, hotkeys, window kit Readiness gates; Interop-vs-Simulation dual access map MIT 2022-11
Theadd/HumankindHacks Cheat/QoL plugins + shared-project framework v2 AssetHunter (find which loaded bundle holds an asset); zero-Harmony coroutine architecture none 2022-06
Theadd/ModdingTools CLI that scaffolds a BepInEx plugin workspace Assembly publicizer + wildcard-reference build props; hot-reload loop none 2023-01
Gedemon/HK-CultureUnlockFromTerritory Cultures unlock only if you hold their historical territory Sandbox.ThreadStart/ThreadStarted lifecycle trio; Databases.GetDatabase<T>().Touch(row) none 2022-10
Gedemon/HK-Uchronia TCL successor + battle postures, AI faction choice, debug overlay Per-entity save extension keyed by GUID; presentation controllers callable from Update() none 2022-04
Gedemon/HK-Cognomen Dynamic empire names from civics/ideology/era Postfix the game’s SimulationEventRaised_* handlers (our fire-on-attack pattern) none 2022-04
Gedemon/HK-DelayedAITurn “Humans first, then AI” turn mode Order veto: prefix DepartmentOfCommunication.ProcessOrder*, return false none 2022-03
shakee2/shakee.Humankind.FameByScoring Fame from periodic scoring rounds instead of era stars MajorEmpire.Serialize postfix → mod state inside vanilla saves; full lobby-option recipe MIT 2023-01
rykolu/HkFPCameraModSimple First-person fly camera (F2) Disable PresentationCameraMover, add own fly-cam, nearClipPlane = 0.01 → in-game model inspection none 2022-01
rykolu/HkModEntry Pre-BepInEx custom mod loader (discontinued) Anti-pattern (patched game DLL); repo doubles as decompiled Amplitude.UI reference none 2021-09
Touhma/Humankind_Plugin JSON-configurable balance knobs XML mods can’t reach Postfix Initialize() on data definitions; write-defaults-then-read JSON config none 2021-09

The Theadd stack (framework + flagship)

One author, one layered stack: DevTools is the base library-mod, GUI-Tools the flagship built on it (hard [BepInDependency]), HumankindHacks a later monorepo re-extracting the framework, ModdingTools an offline scaffolder. All BepInEx 5 / IMGUI.

Humankind-GUI-Tools ★15 — the in-game toolbox

Problem solved. Resurrects the 100+ hidden debug windows Amplitude shipped disabled inside the game (MilitaryCheats, DistrictPainter, PawnAnimation, Pawns, GPUProfilerWindow, …) and adapts ~15 into a toolbox: spawn any unit anywhere, paint districts, free camera, cheats, live map editor.

How. All state changes go through the order bus — SandboxManager.PostOrder(new OrderSpawnArmy { WorldPosition = …, UnitDefinitions = new[]{ unitDefinitionName } }), OrderDamageUnits, OrderChangeUnitsXP, editor orders like EditorOrderCreateExtensionDistrictAt. Reads selection via Snapshots.ArmyCursorSnapshot.PresentationData and resolves GUID → presentation object with Presentation.PresentationEntityFactoryController.GetArmy((ulong)guid). Extends the sealed PresentationCursorController by caching its private MethodInfos and injecting a custom cursor subclass — grafting behavior into presentation controllers without Harmony.

What we could use.

Modding.Humankind.DevTools — the framework library

Problem solved. Gives other plugins documented facades (HumankindGame, HumankindEmpire), a reliable loaded/new-turn lifecycle, attribute-driven hotkeys ([InGameKeyboardShortcut], [OnGameHasLoaded] — discovered by scanning all loaded assemblies for [DevToolsModule]), and an IMGUI window framework. Hot-reloads via BepInEx ScriptEngine (deploy to BepInEx\scripts\).

What we could use.

HumankindHacks — plugins without Harmony

Problem solved. Cheat/QoL plugins (EndlessMovingArmies etc.) plus the framework as shared projects. Notable: EndlessMovingArmies uses no Harmony at all — a coroutine polls until services exist, then a MonoBehaviour loop reads/writes via Interop snapshots.

What we could use.

ModdingTools — the scaffolder

Problem solved. dotnet-CLI that generates a complete plugin workspace for any Unity game: detects the game install, installs BepInEx templates, and — the key part — publicizes every game DLL into lib/references/ with a Directory.Build.props that wildcard-references them and post-build-copies the plugin to BepInEx\scripts\ for ScriptEngine hot reload.

What we could use.


The Gedemon school (simulation-side gameplay mods)

Four repos sharing one toolkit (HumankindModTool, credited to “AOM”) and one architecture: publicized DLLs, PatchAll() in Awake(), patch classes organized by target namespace. All unlicensed and dormant since 2022 — treat as technique documentation, don’t vendor code.

HK-CultureUnlockFromTerritory — the most complete example

Problem solved. “True Culture Location”: you can only become Rome if you hold Latium. Territory renaming, historical city names, culture-change territory loss, extra empire slots.

What we could use.

HK-Uchronia — battle hooks and presentation controllers

Problem solved. TCL successor: battle “postures” with forced auto-resolve, AI faction-choice rework, F3 territory debug overlay.

What we could use.

HK-Cognomen — the SimulationEvent recipe (and the best-commented tutorial)

Problem solved. Dynamic empire titles (“Celtic Kingdom”, “People’s Democratic Republic”) derived from civics/ideology/era. A single ~1200-line file deliberately written as a modding tutorial — the best “how to write a Humankind Harmony mod” document in the ecosystem.

What we could use.

HK-DelayedAITurn — the minimal-viable plugin

Problem solved. “Humans first” turn mode: AI empires wait until every human has clicked End Turn. One file, ~230 lines, five patches — a good skeleton reference.

What we could use.


The singles

shakee2/shakee.Humankind.FameByScoring — save-file extensions and lobby options (MIT!)

Problem solved. Fame from periodic Military/City/State/Economy scoring rounds instead of era stars, with ~10 new lobby options and a fame-history tooltip on the empire banner.

What we could use.

rykolu/HkFPCameraModSimple — the in-game inspection camera

Problem solved. F2 toggles a first-person WASD fly camera. ~150 lines, no Harmony.

What we could use.

rykolu/HkModEntry — the cautionary tale

Problem solved. A 2021 mod loader that patched Amplitude.UI.dll itself (decompile → inject a DLL-scanner into UIUpdatingManager.Update() → recompile). Author’s own verdict: “Discontinued, since BepInEx does this but better.”

Takeaways. Validates our BepInEx no-exe-patching approach — replacing shipped DLLs breaks every game update. Two residual nuggets: a convention-based plugin contract (<Name>.Main.Load() + optional per-frame OnUpdate) if the Factory ever wants drop-in model packs with runtime hooks; and the repo is a grep-able decompiled snapshot of Amplitude.UI circa 1.0.x.

Touhma/Humankind_Plugin — reaching what XML mods can’t

Problem solved. Makes code-initialized balance values (game-speed multipliers, era-star requirements, pollution thresholds, end-game conditions) configurable via JSON — the plugin half of a data-mod + plugin pairing, existing precisely because XML/data mods can’t touch definition fields set in code.

What we could use.


Cross-cutting lessons, ranked by value to us

  1. The order bus + completion callback (SandboxManager.PostAndTrackOrder(...).UponCompletion(...)PresentationArmy.DoUpdateMesh) is the ecosystem’s sanctioned sim→presentation sequencing primitive. Our respawn-after-load and any future per-pawn effect should evaluate it.
  2. Lifecycle anchors instead of timers — a complete, proven set exists: Sandbox.ThreadStart (prefix=enter / postfix=exit) + ThreadStarted (world ready) + Presentation.HasBeenStarted + PresentationAvatarController.DoStart/DoShutdown + session-type detection via SandboxThreadStartSettings.Parameter() casts.
  3. Two proven combat-hook idioms for fire-on-attack-style effects: postfix the game’s SimulationEventRaised_* handler methods (Cognomen), or patch SimulationEvent_X.Raise itself (FameByScoring — BattleTerminated, UnitKilledByOther are proven targets).
  4. Databases.GetDatabase<T>().Touch(row) injects database rows at load time — localization for custom unit names, real lobby options (full recipe in FameByScoring’s GameOptionHelper), UI mappers.
  5. Save-file extensions — postfix Serialize(Serializer) on any sim entity + an ISerializable sidecar = mod state inside vanilla saves, no external files.
  6. Publicized assemblies (ModdingTools’ generate-locally approach) would convert our runtime reflection risk into compile-time errors after game patches.
  7. Dev-velocity trio: OrderSpawnArmy debug spawner + FP inspection camera + ScriptEngine hot reload would together remove most of our test friction.
  8. Licensing reality: only GUI-Tools, DevTools, and FameByScoring are MIT. Everything else has no license (default all-rights-reserved) — borrow techniques and patch targets freely, never copy code verbatim into anything we distribute. Several repos also commit game DLLs; don’t imitate that.
  9. Everything is dormant (mostly 2021–2022; only GUI-Tools saw 2024 activity). Patch targets documented here predate recent game versions — treat this file as a map, and re-verify each signature with ilspycmd before use.