ShockMine
A landmine that doesn't blow you up: it freezes everyone in the blast, zaps them with lightning, then knocks them flat.
| Date uploaded | 2 weeks ago |
| Version | 1.0.0 |
| Download link | BETCGaming-ShockMine-1.0.0.zip |
| Downloads | 63 |
| Dependency string | BETCGaming-ShockMine-1.0.0 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2305README
Shock Mine
A landmine that doesn't blow you up. It's worse.
The Shock Mine is a new item for Super Battle Golf. Plant it like a landmine and wait. When it goes off, it doesn't throw anyone across the course: it locks everyone nearby in place, crackling with lightning, for a few long seconds. Then it drops them flat on their face.
Set one by the green, on the cart path, or right where your rival is about to line up a putt.
What it does
- Freezes everyone in the blast. Anyone caught is held completely still. Not slowed, stopped. Caught mid-jump, you hang there in the air until it lets go.
- Zaps them for everyone to see. Victims crackle with the Thunderstorm's lightning for the whole hold, with a thunderclap when they're caught and an electric hum until they're let go.
- Knocks them down. When the shock ends, every victim goes down with a full knockout and gets up on the game's usual recovery timer.
- Gives the planter the credit. The kill feed names whoever planted it. If a shocked player is still out of the running when the hole resolves, that one is theirs.
- Keeps catching while it runs. The shock lasts for one window, started by the first person to trip it. Anyone who wanders in while it's still crackling gets caught too, and everyone is released together.
- Empties golf carts. Driving into one doesn't save you: passengers are thrown clear and shocked where they land.
Plays just like a landmine
If you know the landmine, you already know the Shock Mine. It's built from the landmine, so it plays by the same rules:
- Plant it or toss it. Planting stops you in your tracks until it's in the ground. You can't jump or turn mid-plant or mid-toss, and you can't plant in mid-air.
- Arms the same way, blinks the same warning, and trips on the same proximity: walk into it at speed, or bump right into it.
- Catches wider than it trips. It's triggered at close range but shocks everything inside the landmine's full blast radius, so stopping just short doesn't save you.
- Can be shot. Hit one with a railgun, shotgun or lightning and it discharges on the spot, catching anyone standing too close.
- Can be disarmed. Pick up someone else's armed Shock Mine and you've disarmed it, notice and all.
- Spares your teammates, not you. In Teams mode it won't catch the planter's teammates, just like a landmine. It will catch the planter.
Shock Mines are recoloured an electric blue, in hand and once placed, with their own icon, so you can tell them apart from a regular landmine before it's too late.
Host settings
Everything is set by the host in match setup. No config files needed:
- Shock Mine seize duration: a new row in the Battle section. Choose 3, 5, 7 or 9 seconds (default 5).
- Spawn rate: the Shock Mine gets its own slider in the item probabilities, next to the game's own items. It starts at the same rarity as the landmine, in every pool the landmine appears in.
Requirements
- Everyone in the lobby needs the mod. The Shock Mine is added to the item pool, which the host and every player have to agree on. Players without it are disconnected with a message saying why, so nobody ends up in a broken match. Hosts can turn this off.
- Everyone needs the same version. Updates can change how the host and players talk to each other, so update together.
- Item probabilities reset once. Adding an item changes the pool the game saves your item probabilities against, so they go back to defaults the first time you play with the mod. The same happens whenever you switch between a modded and an unmodded setup.
Configuration
Optional. These live in the BepInEx config, and ModConfig is supported for editing them in-game.
| Setting | Default | What it does |
|---|---|---|
Enabled |
true |
Turns the Shock Mine on or off. Off, it never spawns. |
SoundVolume |
0.8 |
Volume of the hum while a player is held. |
BlockUnmodded |
true |
Host only: disconnect players who don't have the mod. |
DebugHotkeys |
false |
Host-only testing keys: F7 gives you a mine, F8 sets off the nearest one. |
VerboseLogging |
false |
Logs every step of planting, tripping and releasing, for bug reports. |
Plays well with others
The Shock Mine uses its own item, rule and network ids, chosen well clear of the game's own and of other item mods such as the Switcheroo (BallSwapItem), so the two are designed to be installed side by side.
Found a bug?
Turn on VerboseLogging, reproduce it, and send BepInEx/LogOutput.log along with what
happened. See the changelog for what's new in each version.
CHANGELOG
Changelog
1.0.0
First public release on Thunderstore. Gameplay is unchanged from 0.4.1; this marks the Shock
Mine as complete after two-player testing, and adds the player-facing store page
(THUNDERSTORE.md).
Verified in two-player play: the shock holds and knocks down both the host and remote players on their own screens, shot mines discharge visibly, and picking up an armed mine disarms it.
Testers on 0.4.x: update. 1.0.0 talks to 0.4.1 the same way, but mixed versions are not supported.
0.4.1
Every player needs 0.4.1: it adds a network message that 0.4.0 does not know.
Fixed
- A shot mine silently vanished a few seconds later. Shooting a Shock Mine (railgun,
shotgun, lightning) sets it off, as it does a landmine: the landmine's own hit handlers call
ServerExplode. With nobody in range nothing was caught, and the zap only ever showed on victims, so the mine gave no sign it had gone off. It then sat out its full window and disappeared. Every discharge now shows at the mine itself — a lightning strike and a thunderclap on every client. A discharge that catches nobody on its first sweep is spent immediately, as a landmine's explosion is.
0.4.0
Every player needs 0.4.0. The release message gained fields, so a 0.3.0 client cannot read it from a 0.4.0 host, or the reverse.
Changed
- Deploying follows the landmine's rules. Planting halts you until the mine is in the
ground, and you cannot jump or turn while planting or tossing. 0.3.0 mirrored the plant
routine line for line, but the landmine's halt is not in the routine: it lives in
PlayerMovement.CanMove,CanJumpandApplyRotation'sCanRotate, which special-caseItemType.Landmineand never matched a modded type. - The rest of the landmine's special cases now apply too, found by searching the game for
every
ItemType.Landmine:- Lightning strikes and railgun shots no longer delete a Shock Mine outright, as they spare a landmine. The hit still sets it off, as it sets off a landmine.
- A planted Shock Mine struck by a rocket-driver swing no longer draws the rocket trail.
- Picking up someone else's armed Shock Mine shows the game's "disarmed" notice.
- No more pull toward the mine. Victims freeze where they are caught. The 6 m/s "snap" never did anything visible: the hold zeroed velocity in the same physics tick, so it moved a victim ~12 cm at most.
Fixed
- Nobody fell over when the shock ended. The 0.3.0 knockout was called on the server and
failed both ways. For the host it was refused every time, because unfreezing a local player
starts the game's thaw immunity synchronously, and that blocked the knockout on the next line.
For a remote player it succeeded on the server's copy only, threw "Only the local player is
allowed to remove their own status effects", and never reached their screen:
TryKnockOutis a local-player API. The release message now carries the planter, the use id and the mine's position. The victim's own client waits for the thaw, cancels the thaw immunity, and knocks itself down. The server still credits the planter. - Remote players were not held still. On the host a remote player's rigidbody is kinematic, because their own client simulates them, so the server's velocity zeroing did nothing but log "Setting linear velocity of a kinematic body is not supported" twice a tick (500 in one five-second seize). Each player's own client now holds them; the server holds only the bodies it simulates.
Known
- Leaving a match with a mine still armed logs ~30
NullReferenceExceptions fromLandmineManager.FixedUpdatefor a few frames. This is the game's own code: it skips deregistering mines while shutting down, so by the code it should happen with an armed real landmine too (not yet confirmed in play). It is harmless and is left alone on purpose.
0.3.0
Fixed
- 900 NullReferenceExceptions per session, from suppressing the ice block. The game's own
frozen-player code reads
PlayerInfo.AsHittable.IceBlock.Colliderwith no null check, every physics tick, inPlayerMovement.UpdateFrozenState. Preventing the block from existing threw on every tick of every seize and leftFrozenPlayerStatenever computed. The block is now built exactly as the game expects and then hidden — renderers off, collider disabled — which the grounding boxcast tolerates because it only reads the collider's size and transform. Restoration hangs off the block's ownWillBeReturnedToPoolevent, so a pooled block is never handed to the next freeze-bomb victim invisible. - Two more NREs, from destroying the row's localizer. 0.2.0 fixed the On/Off dropdown with
DestroyImmediateonLocalizeDropdown, butDropdownOptionkeeps a serialized reference to it and callsRefreshOptionsthrough it unguarded, soInitDropdownthrew. The component is now left alive and silenced for our row only, via a prefix onRefreshOptions. - No knockout animation on release.
ServerInformKnockedOutonly reports a knockout to the feed and scoring — it never touchesknockoutState. Releasing now goes throughTryKnockOut, which actually knocks the player down and brings the immunity and teammate-protection checks with it. No impulse: victims crumple where they were held, and recovery is the game's standard knockout duration.
Removed
- The One Shock Mine per hole host rule, along with its lock message, hole hook and use-time refusal. Mines are limited only by how often they are found.
0.2.0
Renamed from GrapplerTrap to ShockMine: namespace, plugin GUID, Thunderstore package, repository folder and every player-facing string. Testers install this as a new mod rather than an upgrade; the 0.1.x package is abandoned.
Fixed
- The zap never went away, piled up, and left a trail. One root cause: the effect was driven
by pulling a fresh pooled particle system each time the previous one ran out, never stopping
the old one, and the pool reclaimed instances mid-hold because
Playdefaults toregisterWhenFinished: true. Now one pooled effect per victim, parented to the victim so it tracks them, replayed on the same instance, and explicitly stopped, unparented and returned on release. - The seize duration row read On/Off instead of durations.
Object.Destroyon the row'sLocalizeDropdownis deferred to end of frame, so the component was still alive and repopulated On/Off immediately after the durations were set. NowDestroyImmediate, and the options are re-asserted on every visit to the screen before the stored value is applied. - Players in golf carts got no shock. A cart is now emptied on being caught: passengers are thrown clear on the game's own knockout exit and seized individually, each with their own zap, countdown and release.
- Held players were not really held.
FrozenStateonly changes a body's damping and gravity, so victims slid and fell. All linear and angular motion is now cancelled every physics tick for the duration. - The mine was invisible in hand, which also made the planting animation look broken — the
character went through the landmine's motions holding nothing. Held models come from a
separate
EquipmentTypesystem that falls through toNonefor an unrecognised item; the mine now registers its own, carrying a recoloured clone of the landmine's hand model, so what you carry matches what you place.
Changed
- Seize duration options are now 3, 5, 7, 9 seconds (was 3, 5, 7, 10), default 5.
- When the shock ends the victim is knocked out and falls over, and the planter is credited
with
EliminationReason.Landmine. This reverses the earlier "no elimination credit" decision: a Shock Mine can now cost someone the hole.
0.1.1
First build shared for testing.
Phases 0-5 of plans/grappler-trap-plan.md are implemented. The mod loads cleanly in-game:
item registered as ItemType 201, both match rules added to the Battle section, pool injection
done, no errors. Gameplay itself - planting, tripping, seizing - is still untested.
Phase 0 - audits
All three risky assumptions cleared, so the design stands as planned:
PlayerInventory.IncrementAndGetCurrentItemUseIdis one counter plus a struct field, not a per-item array, so a moddedItemTypepasses straight through.CourseManager.ServerSpawnItemresolves through theallItemDatadictionary anditemData.Prefab; nothing is indexed byItemType.ItemTypeExtensions.TryGetEliminationReasonis a switch with adefaultarm returningEliminationReason.None- which is the "no elimination credit" the trap wants anyway.- Also checked:
_Write_ItemTypeand friends areWriteVarInt, so type 201 is safe on the wire.
Added
- The Grappler Trap as
ItemType201, cloned from the landmine's item data and prefab, tinted steel blue, with an embedded icon and its own Mirror asset id. - Plant and toss use routines mirroring
PlantLandmineRoutine/TossLandmineRoutine, with the threeItemType.Landminehandling gates ported so the trap cannot be planted mid-air. - A seize that diverts
Landmine.ServerExplode: one shared window from the first trip, catching anything that enters the mine's explosion radius, held byFrozenState.Frozenwith the ice block suppressed, released together, then the trap is spent. - A grapple snap toward the trap as a victim is caught, and horizontal velocity cancelled once a held player has settled so they cannot slide out.
- The lightning zap looped over each victim for the hold, the thunderclap on being caught, an electrical hum for the duration, a camera jolt and an on-screen countdown for the player held, and an info-feed line crediting whoever planted it.
- Item pool injection at the landmine's own weight in every pool the landmine is in, with the
itemOrderLookuprebuild that gives the trap its own probability slider, and a draw-time fallback if either fails. - Two Battle-section match rules: One Grappler Trap per hole, and Seize duration (3/5/7/10s, default 5).
ModGate, keeping unmodded clients out of a lobby whose item pools hold a type they cannot resolve.
Found by the first in-game run
- The landmine's item data has
HitInfoFeedMessageIcon = None: the mine credits itself throughEliminationReason.LandmineandShowEliminationMessage, not throughShowItemHitMessage. A seize eliminates nobody, so the trap takes the other route and now setsInfoFeedIconType.Landmineexplicitly, or no seize would ever be credited. EnsureNetworkPrefabRegisteredran every frame and Mirror logs a warning on each replacement - 8,702 of them in one session. It now checksNetworkClient.prefabsbefore registering.- The landmine appears in only the Close item pool, so "wherever the mine goes" currently means the trap spawns only from close-range boxes, at weight 15. Working as specified, but worth a decision: the Switcheroo, which injects unconditionally, reaches five pools.
Notes
- Networking uses plain registered
NetworkMessages rather than[Command]/[ClientRpc]: a BepInEx mod cannot run Mirror's weaver. - The game ships no looping zap sound, so the hold borrows the Electromagnet shield's hum and the thunderclap marks the catch.