Skip to main content

Your first tracked run

This guide will walk you through using SpawnLogger for the first time, from launching the game to understanding every counter on the overlay.
1

Launch MegaBonk

Start the game normally. SpawnLogger loads automatically with BepInEx.You should see initialization messages in the console (if enabled):
[Info   : SpawnLogger] Loading SpawnLogger v0.5.3 by Antiparty
[Info   : SpawnLogger] SpawnLogger loaded successfully!
The overlay won’t appear in menus - it only activates during active rounds when objects spawn.
2

Start a round

Begin a new game or continue an existing save. Once you start playing:
  • SpawnLogger enables tracking when the round begins
  • Hooks activate to monitor spawn events
  • Counters reset to prepare for the new round
The mod monitors GameManager.StartPlaying(), TryInit(), and CreateInstances() to detect round starts.
3

Wait for spawns

As you play, objects will spawn in the level:
  • Chests typically spawn early when SpawnInteractables.SpawnChests() runs
  • ShadyGuys may appear as you explore
  • Shrines (Charge and Moai types) spawn with the level
When the first chests spawn, the overlay automatically appears in the bottom-left corner of your screen.
If nothing has spawned yet, the overlay will show “Waiting for spawns…” to confirm it’s active.
4

Read the overlay

The overlay displays four tracking lines with real-time counters:
Chests: 2/5
ShadyGuys: 1/3  
Shrines: 1/2
Moai: 0/1
Each line follows the format: Object: Remaining/Total or Object: Completed/Total

Understanding the counters

Chests: X/Y

Tracks chest availability:
  • X = Unopened chests remaining
  • Y = Total chests spawned this round
Example: Chests: 3/5 means 5 chests spawned and 3 are still unopened.
  • Increments when SpawnInteractables.SpawnChests() runs
  • Decrements when TrackStats.OnChestOpened() fires
  • Resets to 0/0 at the end of each round
// From Plugin.cs:292-294
ChestTracker.totalChests += __instance.numChests;
ChestTracker.unopenedChests += __instance.numChests;

ShadyGuys: X/Y

Monitors ShadyGuy NPCs:
  • X = Number of ShadyGuys that disappeared (without interaction)
  • Y = Total ShadyGuys spawned
Example: ShadyGuys: 1/3 means 3 ShadyGuys appeared and 1 has already disappeared.
ShadyGuys can disappear if you don’t interact with them quickly enough. Use this counter to track how many you’ve missed.
  • Increments total when InteractableShadyGuy.Start() runs
  • Tracks interactions via InteractableShadyGuy.Interact()
  • Counts disappeared via InteractableShadyGuy.Disappear()
// From Plugin.cs:350-351
ShadyGuyTracker.total++;
Plugin.log.LogInfo($"[ShadyGuy] Spawned new ShadyGuy (Total: {ShadyGuyTracker.total})");

Shrines: X/Y

Tracks Charge Shrine status:
  • X = Active shrines (not yet completed)
  • Y = Total shrines spawned
Example: Shrines: 2/4 means 4 shrines spawned and 2 are still waiting to be completed.
  • Increments when ChargeShrine.Start() runs
  • Decrements when ChargeShrine.Complete() fires
  • Both counters reset at round end
// From Plugin.cs:388-390
ChargeShrineTracker.ActiveShrineCount++;
ChargeShrineTracker.total++;

Moai: X/Y

Monitors Moai Shrine interactions:
  • X = Moai shrines interacted with
  • Y = Total Moai shrines spawned
Example: Moai: 1/2 means 2 Moai shrines exist and you’ve used 1.
  • Increments total when SpawnInteractables.SpawnShrines() creates Moai
  • Tracks interactions via InteractableShrineMoai.Interact()
  • Only counts successful interactions (when __result is true)
// From Plugin.cs:254-255  
MoaiTracker.interacted++;
Plugin.log.LogInfo($"[Moai] Interacted with Moai Shrine! ({MoaiTracker.interacted}/{MoaiTracker.total})");

Tracking behavior

Round lifecycle

SpawnLogger automatically manages tracking based on round state:
1

Round start

When a round begins via GameManager.StartPlaying(), TryInit(), or CreateInstances():
  • All counters reset to zero
  • Tracking is enabled (Plugin.disableTracker = false)
  • Round state is marked active (ChargeShrineTracker.IsRoundActive = true)
2

Active gameplay

During the round:
  • Spawns are detected and counted in real-time
  • Interactions update counters immediately
  • The overlay updates automatically with each change
3

Round end

When you die (GameManager.OnDied()) or the GameManager is destroyed:
  • Tracking disables (Plugin.disableTracker = true)
  • All counters reset to zero
  • The overlay hides but persists for the next round
4

Stage transitions

When moving to a new stage via portal (SpawnPlayerPortal.StartPortal()):
  • Tracking re-enables for the new stage
  • Round state updates to active
  • Previous stage counters are maintained until round end
The overlay persists across stage transitions using Unity’s DontDestroyOnLoad(), so you’ll keep seeing your tracking data even when loading new areas.

Console logging

For detailed debugging or verification, SpawnLogger writes comprehensive logs:
[SpawnLogger] Chests spawned: 5
[ChestTracker] Chest opened! Remaining unopened: 4
[ShadyGuy] Spawned new ShadyGuy (Total: 2)
[ShadyGuy] Interacted with ShadyGuy! (1/2)
[ShrineTracker] A Charge Shrine was counted! Total Shrines: 3
[Moai] Spawned a Moai Shrine! (Total: 1)
These messages appear in:
  • The BepInEx console window (if enabled)
  • BepInEx/LogOutput.log file
Enable the console window in BepInEx settings to see real-time tracking events as you play.

Tips for effective tracking

Check regularly

Glance at the overlay periodically to ensure you haven’t missed any chests or shrines before advancing.

Watch ShadyGuys

The disappeared counter helps you see how many ShadyGuys you missed - try to interact before they vanish.

Complete shrines

Active shrine count shows incomplete shrines - useful for completionists who want to finish everything.

Track efficiency

Compare opened vs total chests to measure your exploration thoroughness across runs.

What’s next?

You’re now tracking all spawned objects in MegaBonk! The overlay will continue working automatically across all your runs. Want more details? Check out:
SpawnLogger is open source (v0.5.3 by Antiparty). The plugin GUID is Antiparty_SpawnLogger if you’re configuring mod compatibility.

Build docs developers (and LLMs) love