Skip to content
Tyler Kuhn edited this page Feb 14, 2026 · 1 revision

Basic Implementation

First Steps

The first steps in implementing the AtomicFramework in a mod is writing the Plugin class many mods have. Instead of extending BaseUnityPlugin, however, you extend Mod from the AtomicFramework namespace.

Mod automatically adds some of the helpful BepInEx attributes, however, you must still add BepInPlugin.

Configuring Your Mod

In order for AtomicFramework to ensure your mod is handled properly, the Mod class takes in a Mod.Options struct in its constructor. The struct has sane defaults, but these defaults are potentially restrictive.

AtomicFramework supports disabling mods, and is forwards compatible with reloading mods. Due to the unimplemented nature of reloading, do not support this to prevent potential unforeseen incompatibilities. To enable disabling, set Mod.Options.runtimeOptions to Mod.Options.Runtime.TOGGLEABLE.

AtomicFramework automatically negotiates mod lists between servers and clients. Currently the default is REQUIRES_HOST which requires the host have the mod. To support client side only mods, change Mod.Options.multiplayerOptions to Mod.Options.Multiplayer.CLIENT_ONLY. Options SERVER_ONLY and CLIENT_ONLY are not currently implemented.

The repository (default empty) allows AtomicFramework to automatically update your mod. To do so after the game has launched requires the unimplemented RELOADABLE. The repository is a string of format GITHUB_USER/GITHUB_REPO. This feature is currently unimplemented. (It mostly exists, but some features are still in flux.)

Loading Events

Currently, loading events are accessed through LoadingManager. The events are basic C# events listened by delegates.

The events are documented thoroughly in the source files, but for the sake of reference, a basic list will follow:

  • GameLoaded The main menu has loaded. This previously also meant most other features were loaded, but this has since changed.
  • NetworkReady The game's network manager has loaded. The framework manager should also have loaded by this point, but to be safe, verify Mod.Networking is not null.
  • MissionLoaded The mission has more or less loaded. All players are available, but NOBlackBox swears a few items are still unloaded.
  • MissionUnloaded The mission has been unloaded, either by exit or disconnect.

Clone this wiki locally