Modders Logger UI

版本 v1.0.0·更新於 2025-10-11

A logging tool with a UI that allows dynamic lookup of method and classes within Megabonk source

模組介紹 作者原文

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

  • Copy the DLL to your plugins folder:

\BepInEx\plugins\Megabonk.LoggerUI.dll

  • Launch the game. In BepInEx\LogOutput.log you should see:

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

Usage

  • Press F8 (default) to open/close the UI.
  • 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 # (e.g., #0)
  • Click Patch. Then perform the action in game.
  • 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.

安裝與使用 安裝:按包內說明操作

  1. 解壓本站下載的壓縮包,先讀包內的 readme / 說明檔案。
  2. 多數模組依賴遊戲的模組載入器:常見做法是用社群模組管理器(如 r2modman)選中本遊戲安裝,由管理器自動處理載入器與依賴。
  3. 手動安裝時,把模組檔案放進遊戲目錄下對應的 Mod / plugins 資料夾。
  4. 啟動遊戲確認載入成功;帶「前置依賴」的模組需要把依賴一併安裝。

不同模組的安裝位置差異較大,包內說明是最可靠的依據。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack_IL2CPP

檔案與校驗

檔案名稱
Modders_Logger_UI-1.0.0.zip
檔案大小
69.1 KiB