
HeavyIntegration
Full heavy package: loadout heavy, damage-to-ammo regen, Focus support, and scrollable heavy crate UI when many heavies unlock.Heavy Integration
A BepInEx mod for Mycopunk that combines heavy-weapon QoL into one package:
- Loadout heavy — keep a heavy in your stored slot from the gear menu
- Ammo regen — other weapons’ damage refills heavy magazine ammo
- Heavy Focus — Focus heavies so upgrade drops can skew toward them
- Selection UI — scrollable heavy crate list when many heavies are unlocked
Replaces the standalone LoadoutHeavy, HeavyAmmoRegen, and HeavySelectionExpansion mods. Disable those if both are installed to avoid double-patching.
Features
Loadout heavy
Vanilla loadouts only save two primaries and a grenade. Heavies are mission pickups in the stored slot. This mod lets you pick a heavy in the gear menu and always have it on the stored-weapon key.
- Left-click an unlocked heavy in the Heavy Weapons list to set it as loadout heavy
- Left-click again to clear (empty is allowed)
- Right-click still opens upgrades / inspect
- Spawned into
Gear[5](vanilla stored / heavy pickup slot) - World pickups temporarily replace stored; your loadout heavy returns after drop (configurable)
- Selection persists in BepInEx config by gear ID
Ammo regen
Heavy magazines refill when your other loadout weapons deal damage — same damage-to-ammo idea primaries use, at a configurable rate.
- Detects heavies via
GearType.Heavyacross all gear slots (and held gear) - Default 100% of vanilla conversion density into the heavy mag
- Optional ammo refund sound
Heavy Focus
Vanilla blocks Focus on GearType.Heavy in the gear UI. Backend drop weighting already supports any focused gear (~50% chance to force that gear’s upgrade pool). This mod re-enables the Focus binding on unlocked heavies that have world-pool upgrades.
- Uses the same Favorite / Focus bind as primaries
- Same gates as vanilla: unlocked, player level ≥ 5, gear menu (not showcase), world-pool upgrades
- Does not auto-focus when you equip a loadout heavy — Focus stays a separate action
Selection UI
When many heavies are unlocked (vanilla G6 plus custom heavies), the heavy crate WeaponSelectWindow grows its slot list but vanilla never lays out the extras or enables scroll — they clip past the menu. This mod:
- Stacks active heavy slots into a vertical list (using prefab spacing when available)
- Clips overflow with a rect mask
- Enables mouse-wheel / stick scrolling (reuses an existing
ScrollArea/ScrollBarwhen present, otherwise a lightweight fallback driver) - Hides unused trailing slots left over from a previous open with more heavies
- Null-guards
ScrollArea.Scrollso Menu/ScrollWheel after UI teardown does not spam NREs
How to use
Loadout
- Open the gear / loadout menu.
- Open Heavy Weapons.
- Left-click the heavy you want.
- Close the menu — it appears on your stored-weapon hotkey.
- Left-click the same heavy again to unequip it from your loadout.
Focus
- Open the gear menu → Heavy Weapons.
- Hover an unlocked heavy.
- Press the Focus (Favorite) bind — same as focusing a primary.
- Rainbow outline / “focused” property appear; upgrade drops skew toward that heavy.
- Press Focus again to clear.
Heavy crate picker
Open a heavy weapon crate in-mission. If you have more unlocked heavies than fit on screen, scroll the list with mouse wheel or stick.
Configuration
Edit BepInEx/config/sparroh.heavyintegration.cfg (created on first launch):
| Section | Setting | Default | Description |
|---|---|---|---|
| Loadout | Enabled | true |
Master toggle for loadout heavy. |
| Loadout | Heavy Gear Id | 0 |
Selected heavy GearInfo.ID. 0 = none. Prefer in-menu select. |
| Loadout | Reapply After Drop | true |
Restore loadout heavy after dropping a temporary stored pickup. |
| Ammo Regen | Enable Feature | true |
Master toggle for damage→heavy ammo. |
| Ammo Regen | Regen Multiplier | 1.0 |
Multiplier on vanilla damage→ammo density for the heavy magazine. |
| Ammo Regen | Play Ammo Sound | false |
Play refund sound on restore. |
| Focus | Enable Heavy Focus | true |
Allow Focus binding on heavies in the gear menu. |
| Selection UI | Enable Feature | true |
Lay out and scroll the heavy crate picker when many heavies unlock. |
The config file is watched and reloads automatically after you save changes. The ScrollArea null-guard stays on regardless of the Selection UI toggle.
Controls
| Input | Behavior |
|---|---|
| Stored weapon key | Equip / swap to loadout heavy (vanilla stored gear) |
| Hold stored key | Drop stored gear (vanilla) — loadout heavy re-applies if enabled |
| Left-click heavy in list | Set / clear loadout heavy |
| Focus (Favorite) on heavy | Focus / unfocus for upgrade drop skew |
| Right-click heavy | Inspect / upgrades (vanilla) |
| Scroll wheel / stick on heavy crate list | Scroll when many heavies are unlocked |
Dependencies
- Mycopunk
- BepInEx Pack for Mycopunk 5.4.2403 or compatible
Installation
Thunderstore / r2modman (recommended)
Install from Thunderstore once published, or add a local profile install of your built package.
Manual
Copy HeavyIntegration.dll to:
<Mycopunk>/BepInEx/plugins/
Disable standalone LoadoutHeavy, HeavyAmmoRegen, and HeavySelectionExpansion if present.
Building
dotnet build --configuration Release
Output:
bin/Release/netstandard2.1/HeavyIntegration.dll
Notes
- Marked sandbox (
ModFlags.IsSandbox) because it changes combat loadout and ammo. - Multiplayer: gear spawn uses the normal owner → server path (best as host / listen-server owner).
- Compatible with mods that leave the stored slot alone (e.g. Equip All Weapons extras use other indices).
- Content mods may still list standalone HeavySelectionExpansion as an optional soft dependency; this package covers the same UI fixes.
Authors
- Sparroh
License
MIT — see LICENSE.