ClrHook.Terraria is a proof-of-concept (POC) client for Terraria (FNA/MonoGame) on Linux, based on the clrhook loader. It demonstrates runtime detour/injection using MonoMod.RuntimeDetour and ImGui.NET overlays, requiring no hard patching of the game binaries.
- All core functionality is implemented using runtime hooks (no static patching)
- Built on top of MonoMod and MonoMod.RuntimeDetour
- Designed for extensibility and easy integration with other mods or overlays
- Runtime method detouring and event hooks for Terraria internals
- ImGui.NET integration for in-game overlays and tools
- Example hooks for
Main.DrawandMain.LoadContent - Linux-native support (tested with FNA and MonoGame)
- Easy to extend for your own overlays or experiments
- Edit
env.propsand/orenv.override.propsas needed for your environment or build overrides. - Build the project using your preferred .NET build system (targeting net48).
- Copy the resulting DLLs and dependencies to the appropriate Terraria or clrhook loader directory.
- Launch Terraria with the clrhook loader.
Below is a screenshot of the ImGui overlay in action which is running in Terraria's embedded mono .NET4 runtime, via a .NET4.8 DLL.
- Terraria (FNA/MonoGame, Linux)
- .NET Framework 4.8 compatible runtime
- MonoMod.RuntimeDetour
- ImGui.NET
- clrhook loader
This project is for educational and research purposes. Respect Terraria's EULA and modding guidelines.
