MindAttic/GTFO.EZ.Shared
Library

GTFO.EZ.Shared.

One copy of the code four GTFO mods must agree on.

GTFO.EZ.Shared is the C# source the GTFO.EZ family compiles in from a git submodule: shared hotkeys, team-synced infinite health and ammo, on-screen messages and safe network events, with no extra DLL for players to install.

Active C# .NET 6 BepInEx 6 IL2CPP GTFO-API Git submodule

What it is

Shared behaviour without a shared DLL

GTFO.EZ, GTFO.EZ.AbsurdWeapons, GTFO.EZ.AbsurdMoves and GTFO.EZ.AbsurdItems each work on their own, and players often run all four. That raises awkward questions: which mod answers the Insert key, how does one mod read another's settings, and how does a toggle reach every player in the lobby?

GTFO.EZ.Shared answers them once. Each mod pulls the repo in as a git submodule and compiles the files it needs straight into its own assembly. Every type is internal, so each copy stays private to its mod, and the copies coordinate at runtime instead of colliding.

The result for players is simple: install any mix of the family and the shared keys toggle exactly once, the whole team gets the same state, and there is never a separate library package to keep in step.

Who it's for

  • GTFO.EZ family maintainersChange shared behaviour in one place, then move each mod's submodule pointer when it is ready.
  • BepInEx IL2CPP mod authorsA small, readable example of mods that coexist safely: owner election, cross-mod settings reads and throw-proof GTFO-API events.
  • Players of the familyNothing to install or configure; it is why several family mods together still behave like one.

Features

What you get

01

Owner election

SharedOwner picks the one loaded copy that answers shared keys: the highest ProtocolVersion wins, with a fixed mod order breaking ties. A mod switched off counts as not installed.

02

Cross-mod settings

SharedOwner.IsActive(guid) and SharedOwner.TryGetSetting<T>(...) let one mod check whether another is loaded and switched on, and read its config.

03

Team-wide infinite health and ammo

Insert and Delete go to the host, which broadcasts the team's state over GTFO-API. Every game protects the players it owns, bots included.

04

Honest sync messages

A client's press says it was requested until the host confirms it for the whole team, and announcements name any teammate whose mod is missing or on another protocol version.

05

Everything topped off

Infinite ammo fills every magazine in the backpack, keeps grenades, tools and placed sentries full, and makes spending ammo cost nothing while it is on.

06

One message API

MessageHelper.Show(text, MessageType.Warden | EventLog | Center | Subtitle, seconds) puts a message wherever it fits on the local player's screen.

07

Network events that can't throw

RemoteEvents.Register<T>(name, handler) wraps a GTFO-API event so an exception never escapes into the game's own packet handling.

08

Kits as consumables

KitLoot turns consumable loot into small kits for GTFO.EZ.AbsurdItems' *Consumables Are Kits* option.

How it works

How a mod uses it

  1. Add the submodule

    Each mod keeps this repo at external/GTFO.EZ.Shared.

  2. Link the files

    Linked <Compile> items in the mod's .csproj pull in only the files it uses, shown under Shared\ in the IDE.

  3. Build as usual

    The shared code lands inside the mod's own DLL. Players install one mod, not two.

  4. Move the pointer

    After a shared change is pushed, each mod pulls the submodule to the new commit, rebuilds and commits the pointer.

Quick start

Add it to a mod

Then link the files you need into your plugin project and reference GTFO-API for the networked pieces.

The full setup guide lives in the documentation.

shell
> git submodule add https://github.com/mindattic/Mods.GTFO.EZ.Shared.git external/GTFO.EZ.Shared
> git submodule update --init

Part of MindAttic

The glue of the GTFO.EZ family

GTFO.EZ.Shared ships inside every family mod rather than beside them. It is on the family's major-only vN version scheme, and the v22 family release pins all four mods to the same Shared commit.

Status

Where it stands

Active

Team sync built; pinning one version for v22

Host-confirmed team toggles and team-wide health and ammo are in. The milestone is one pinned, documented commit that all four family mods compile in their v22 release.

Current milestone: Shared source v22: a CHANGELOG 22.0.0 section, and every family mod pinned to the same commit at the v22 release.

Next step

Read the shared source

Guides, reference and design notes are in the searchable MindAttic documentation. The source, issues and history are on GitHub.