Megabonk

Details

Last Updated
last week
First Uploaded
last week
Downloads
250
Likes
1
Size
71KB
Dependency string
BigBrainBois-Modders_Logger_UI-1.0.0
Dependants

Megabonk Logger UI (IL2CPP)

A tiny in-game logger/patcher for IL2CPP Unity games. Pick a Type, Method, and optional parameter signature at runtime and Harmony-patch it to log calls — no rebuilds required.

This was made primarily because apparently the newest version of BepInEx bleeding edge and unity explorer are legitimately harder for me to get working than just creating a tool to do basically the same thing with extra steps

Note: This release ships only the plugin DLL. It assumes you already have BepInEx 6 (IL2CPP/CoreCLR) installed for the game.


Features

  • In-game UI to select target Type / Method
  • Works with global-namespace classes and nested types (Outer+Inner)
  • Patch by explicit signature or by overload index (#0, #1, …)
  • Logs prefix/postfix to BepInEx/LogOutput.log
  • Configurable hotkey + Ctrl/Alt/Shift modifiers
  • No dependency packaging required (Unity & Harmony come from your install)

Basic Modding tutorial with this tool

  • First, have a good understanding of c# and Cpp2IL which can be found here
  • You must run the following:
    • Example: dump dummy DLLs for a Unity game folder Cpp2IL.exe --game-path "C:\Path\To\Your\Game" --output-root "C:\Cpp2IL-Out" --run-analysis --skip-method-dumps
  • Using this tool will generate a dump of all of the dlls a unity game uses, which you can then use a tool like ILSpy to figure out what methods might contain the fields you want to patch

This is not a full modding tutorial, do the research on using ILSpy

  • From here, you have to use microsoft SDK and .NET to generate dlls from c# code, using BepInEx libraries and such.
  • You're on your own from here to create whatever mod you would like to use or see

Requirements (not bundled)

  • BepInEx 6 bleeding-edge (IL2CPP/CoreCLR build)
  • The game’s UnityEngine assemblies (already in the game)
  • HarmonyX (included with BepInEx)

Installation

  1. Copy the DLL to your plugins folder:

    <GameFolder>\BepInEx\plugins\Megabonk.LoggerUI.dll
    
  2. Launch the game. In BepInEx\LogOutput.log you should see:

    [Info   :MB-LoggerUI] Logger UI loaded. Toggle: F8
    

Usage

  1. Press F8 (default) to open/close the UI.
  2. Fill the fields:
    • Type
      • Global namespace: ChestOpening
      • Nested class: Outer+Inner
      • Full name also works: Assets.Scripts.Actors.Player.MyPlayer
    • Method
      • Example: OpenChest, Update
    • Param Types CSV (optional)
      • Leave empty for parameterless or unique methods
      • Use full names, e.g.:
        System.Int32, Assets.Scripts._Data.ItemData
        
      • Or click List Overloads and enter #<index> (e.g., #0)
  3. Click Patch. Then perform the action in game.
  4. Watch BepInEx\LogOutput.log for entries like:
    [Prefix] ChestOpening args: ...
    [Postfix] ChestOpening -> (done)
    

Helper Buttons

  • Find Type – searches loaded assemblies and logs matching types.
  • List Overloads – logs all overloads for the specified method on the resolved type.

Configuration

A config file is created on first run:

BepInEx\config\com.yourname.megabonk.loggerui.cfg
[UI]
ToggleKey = F8
RequireCtrl = false
RequireAlt = false
RequireShift = false

Examples

  • F8 only → leave all modifiers false
  • Ctrl+Shift+F8 → ToggleKey=F8, RequireCtrl=true, RequireShift=true

Tips

  • If ILSpy shows the class under {} (global namespace), use just the class name in Type.
  • For nested types, use a plus: Parent+Child.
  • If signature resolution is tricky, use List Overloads then select with #index.
  • Some auto-generated accessors (e.g., property getters/setters) may not be patchable.

Troubleshooting

  • UI doesn’t open
    Check the config file above and ensure your hotkey + modifiers are correct. Verify BepInEx is loading the plugin in LogOutput.log.

  • “Method not found” when patching
    Use Find Type to confirm the full name, then List Overloads and pick with #index.


Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.