AntiMaterialRifle

版本 v1.2.2·更新於 2026-08-11

Anti-Material Rifle — a heavy kinetic bolt-action sniper for Mycopunk. High single-shot damage, low capacity, single-round reload.

模組介紹 作者原文

Ballistic Sniper

BepInEx mod for Mycopunk that adds the Anti-Material Rifle — a dedicated long-range kinetic sniper.

Weapon

| | |

|---|---|

| Name | Anti-Material Rifle |

| API | ballistic_sniper |

| Gear ID | 87421 |

| Base model | Cartridge SMG (runtime clone) |

Fantasy

Pure long-range precision. Slow, deliberate, high-impact kinetic shots. No energy charge, no smart targeting.

Base stats

| Stat | Value |

|---|---|

| Damage | 145 |

| Fire rate | 48 RPM (1.25 s between shots) |

| Magazine | 5 |

| Reserve | 20 |

| Reload | 3.1 s total (single-round; ~0.62 s per shell) |

| Fire mode | Semi / bolt-action |

| Projectile | Travel time + bullet drop |

| Falloff | Soft after long range |

| ADS | Slow (~0.55 s), strong zoom |

| Hip-fire | Very poor |

Single-round reload

Reload chambers one round at a time. Each shell’s animation is scaled so a full empty magazine still takes about the full reload duration. Press fire during reload (with at least one round chambered) to cancel the remaining shells and shoot immediately.

Architecture

Runtime clone of CartridgeSMG (always present in Global.AllGear):

  • Clone prefab → new GearInfo + empty upgrade pool
  • ApplyBallisticSniperStats rewrites GunData
  • BallisticSniperBehaviour marks the gear for reload hooks
  • Equip remaps NGO spawn to the vanilla base gun, then stamps catalog identity

| File | Role |

|---|---|

| Plugin.cs | BepInEx entry, registration timing |

| WeaponRegistration.cs | Clone, GearInfo, sniper stats, AllGear inject |

| BallisticSniperBehaviour.cs | Identity host on catalog / live instances |

| BallisticSniperReloadHook.cs | Single-round reload + per-shell duration |

| SpawnGearHooks.cs | Equip remap + GearSelectionWindow safety |

Install

/BepInEx/plugins/BallisticSniper.dll

Dependencies: Mycopunk, BepInEx 5.4.2403+.

Build

dotnet build --configuration Release

Output: bin/Release/netstandard2.1/BallisticSniper.dll

Persistence

Save data is keyed by gear ID (87421). The mod registers into AllGear before PlayerData.OnAwake runs AddGear, then re-binds GearData.Gear afterward so levels, unlock, and equip (weapon1ID / weapon2ID) survive relaunch.

Look for: [BallisticSniper] Persistence OK: level=… unlocked=…

In-game checklist

  • BepInEx log shows gear registration (ballistic_sniper, id 87421)
  • Gear select lists Anti-Material Rifle (auto-unlocked)
  • Equip primary → slow semi fire, high damage, small mag
  • Reload loads one round at a time
  • ADS is accurate when standing still; hip-fire is poor
  • Level up / equip, full quit, relaunch → progress and loadout kept
  • Upgrade UI shows hex grid + inventory (Match-Grade Rounds is in the pool; own instances via drops/craft)

Notes

  • Visuals currently reuse the Cartridge SMG model; swap later via ModelImportHooks / AssetBundle.
  • 28 upgrades registered (Heavy Grain through Overkill, plus Boundary Incursion). See upgrade notes.txt.
  • Hold reload with full mag + High Explosive equipped to throw/detonate C4.
  • Uses standard projectile bullets (travel time + drop), not rail/hitscan.
  • Multiplayer: all clients need the same mod and matching gear id.

License

MIT — see LICENSE

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

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

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

前置依賴

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

BepInEx-BepInExPack_Mycopunk

檔案與校驗

檔案名稱
AntiMaterialRifle-1.2.2.zip
檔案大小
67.7 KiB