Skip to content

MegaBonk

DigitalHeaven.Games.MegaBonk WIP is a BepInEx 6 mod that brings DigitalHeaven skin replacement to MegaBonk.

Mod loaderBepInEx 6 (IL2CPP)
Game versionIL2CPP (default Steam build)
Rendering pipelineBuilt-in (MK.Toon shader)
Mod managerr2modman (recommended)

This mod depends on the DigitalHeaven.Unity library for model loading, rig setup, and material creation. MegaBonk is single-player — no multiplayer features apply.

FeatureStatus
OverlayUnstable
Avatar replacementWIP

Unlike the pose-mirroring approach used by most mods, MegaBonk integrates with the game’s native skin system:

  1. DH avatars are loaded from pallets and registered as additional skins in MegaBonk’s character select screen
  2. When a DH skin is selected, the character’s model is swapped with the DH model
  3. The game’s animation system drives the DH model directly (no pose mirroring needed)

No humanoid rig is required — the game’s own animation system handles everything.

Config file: BepInEx/config/io.mltn.digitalheaven.megabonk.cfg

SettingSectionDefaultDescription
Enabled[General]trueEnable or disable the mod
UseGameShader[Rendering]trueReplace DH shaders with MK.Toon for visual consistency
Mappings[Skins]""Character-to-barcode skin mappings (see below)

Mappings are semicolon-separated Character=barcode pairs. A barcode is the full pallet.id:path/to/asset identifier. The same barcode can be mapped to multiple characters.

[Skins]
Mappings = Fox=io.example.skin:avatar.dh-avatar;Cat=io.example.skin:avatar.dh-avatar

Valid character names: Fox, Cat, Frog, Moose, Pigeon, Shark, Gorilla, Bear, Rhino, Bee

  • No skin icons — DH skins appear as text-only entries in the character select
  • No physics bones — custom physics (jiggle, spring bones) are not supported yet
  • Single skin per character — each character can have one DH skin mapped at a time

The mod project lives at Games/DigitalHeaven.Games.MegaBonk/ and is included in the main DigitalHeaven.sln solution under the Games folder.

  • MegaBonk installed via Steam
  • BepInEx 6 IL2CPP installed (via r2modman or manual install)
  • The game must have been launched at least once with BepInEx to generate the interop/ assemblies

Copy DigitalHeaven.Games.MegaBonk.csproj.user.example and remove the .example extension. This file configures your local paths and is git-ignored:

DigitalHeaven.Games.MegaBonk.csproj.user
<Project>
<PropertyGroup>
<MegaBonkDir>C:\Program Files (x86)\Steam\steamapps\common\Megabonk</MegaBonkDir>
<BepInExFolder>C:\Users\mltn\AppData\Roaming\r2modmanPlus-local\Megabonk\profiles\Default\BepInEx</BepInExFolder>
</PropertyGroup>
</Project>

The project references unhollowed game assemblies from $(BepInExFolder)\interop\ and BepInEx framework via NuGet. After building, a post-build target automatically deploys the mod and its dependencies to $(BepInExFolder)\plugins\DigitalHeaven\.

The project targets net6.0 (BepInEx 6 IL2CPP uses CoreCLR) and references DigitalHeaven.Core, DigitalHeaven.Unity, DigitalHeaven.Overlay, and DigitalHeaven.Unity.Overlay as project dependencies.

MegaBonk is an IL2CPP game, which introduces constraints not present in Mono games:

  • MonoBehaviour registration: Custom MonoBehaviours must be registered with ClassInjector.RegisterTypeInIl2Cpp<T>() before use. This includes DigitalHeavenAvatar and DigitalHeavenRig from the DH Unity library.
  • GC prevention: IL2CPP’s garbage collector can collect managed wrappers for Unity objects. The mod pins all created ScriptableObject and GameObject references.
  • Collection types: Game-side collections use Il2CppSystem.Collections.Generic.List<T> instead of System.Collections.Generic.List<T>.