Skip to content

Releases: Scream034/ScavShrapnelMod

v0.9.2 The Gunplay & Kinetic Impacts Update

22 Mar 03:38

Choose a tag to compare

This massive update (covering all changes since v0.8.4) completely overhauls how firearms interact with the world. Bullets no longer just create simple sparks — they now transfer kinetic momentum through the environment, kick up massive directional dust plumes, and leave lingering gunpowder smoke.

💨 Kinetic Energy Transfer (Bullet Impacts)

Bullets hitting surfaces now feature a realistic, three-phase kinetic impact system:

  • Directional Plumes: Dust now sprays backward from the impact point (toward the shooter), simulating material blowing out of the entry hole.
  • Material Conductivity: Metal blocks conduct kinetic energy further through their structure (1.5× scan radius), while soft materials (sand, dirt, flesh) absorb the energy, creating a smaller but much denser local dust cloud.
  • Conduction Sparks: Hitting metal now spawns bright "needle sparks" that travel perpendicular to the bullet's path, simulating energy conducted along the surface.
  • Safe Blast Direction: A new reflection algorithm ensures that dust and sparks never clip or spray into solid terrain, always ejecting out into the open air.

💥 Muzzle Blasts & Smoke

  • Concussive Muzzle Gas: Firing a gun now emits a concussive blast that disturbs loose material on nearby surfaces.
  • Column-Scan Algorithm: Replaced the old brute-force grid scan with a highly efficient "Column-Scan" algorithm that perfectly finds ground, ceilings, and walls. Because it's so fast, the blast radius has been increased to 12 blocks for guns and 18 blocks for turrets.
  • Gunpowder Smoke: Shots now leave 1-3 dark propellant gas wisps rising from the barrel, and lingering smoke at the bullet's impact point. (Uses Lit materials, so it correctly hides in shadows!).

🔄 Better Ricochets & Shrapnel Interactions

  • 360° Fragment Scatter: Bullet fragments no longer just fly straight off a wall. 60% of fragments fly in a hemisphere away from the wall, while 40% scatter randomly (including straight back at the shooter for realistic ricochets).
  • Fragment Balancing: Bullet fragments now have capped speeds (max 18 m/s) and reduced damage (0.4×). They will scratch and cause bleeding, but won't cross-map one-shot NPCs anymore.
  • Shrapnel-to-Block Debris: When a flying shrapnel shard hits a block, it now spawns material-appropriate debris (sparks for metal, dust/chunks for soft blocks) based on its impact speed.

🛠️ Critical Fixes

  • The "Zero Power" Bug Fixed: In previous versions, weapons with shotsPerFire = 0 (like single-shot rifles) accidentally multiplied their entire power formula by zero. This prevented physics fragments from spawning and made sparks nearly invisible. Power is now correctly calculated and clamped!
  • Double-Explosions on Clients Fixed: Turret deaths and bullet impacts were incorrectly triggering local visual explosions on clients, fighting with the server's authoritative sync. Clients now correctly wait for the server.
  • Unicode Crash Fixed: Removed unsupported characters (like ) from console logs that caused font fallback crashes.

⌨️ New Developer Tools

Added powerful new console commands to test the mod's pipeline:

  • shrapnel_shot rifle R -metal — Tests the full bullet effect pipeline anywhere on the screen (supports pistol, rifle, shotgun, turret).
  • shrapnel_guninfo all — Dumps all GunScript fields via reflection to diagnose weapon power calculations.
  • shrapnel_highlight 15 — Makes all physical shards glow bright orange through walls for 15 seconds (great for debugging clipping).
  • shrapnel_status full & shrapnel_net diag — Upgraded with deeper material and network sync diagnostics.

🛠️ Installation

  1. Requires BepInEx 5.4.21+
    installed in your game directory.
  2. Place ScavShrapnelMod.dll into:
    CasualtiesUnknownDemo/BepInEx/plugins/
  3. Launch the game — config updates automatically on first run.

Full technical breakdown in CHANGELOG.md.

v0.8.4 - The Client Physics Rewrite

20 Mar 16:05
5db5889

Choose a tag to compare

This update completely replaces the client-side shrapnel system. Instead of
lightweight visual "mirrors" that floated through walls, clients now run the
exact same physics as the server — real Rigidbody2D, real colliders, real
bouncing. Bandwidth dropped by ~70 packets per explosion.

🔥 What's New

  • Real Client-Side Physics: Clients now create actual ShrapnelProjectile
    instances with Rigidbody2D and CircleCollider2D — identical to the server.
    Shards bounce off walls, ricochet off metal surfaces, and settle into terrain
    naturally via Unity's physics engine. No more wall-clipping between server
    snapshots.

  • Ricochets Work on Clients: Previous mirrors had no physics and flew straight
    through surfaces. Now the same ricochet logic runs on every screen — shards
    spark off metallic blocks and deflect at the correct angle automatically.

  • Bandwidth Reduced ~90%: The MSG_SNAPSHOT message type (10Hz position
    updates for every flying shard) is completely removed. A typical explosion with
    125 shards previously sent ~52 snapshot packets. Now it sends zero. Only three
    message types remain: spawn, rest correction, destroy.

  • ClientMirrorShrapnel Deleted: The entire 600-line mirror system with
    manual gravity simulation, snapshot interpolation, velocity correction, landing
    blend, and camera LOD is gone. The same ShrapnelProjectile component handles
    everything — server and client alike.

  • Server REST Correction: Physics diverge slightly between host and client
    (different collision timing, floating point). When a server shard comes to rest,
    MSG_STATE sends the authoritative final position and rotation. The client shard
    snaps smoothly via ForceToState — the landing position is always correct.

  • All Damage Stays Server-Side: Client shards are visually identical but
    gameplay-inert. Collisions with limbs, blocks, entities, and step-on triggers
    are silently ignored on the client. IsServerAuthoritative = false gates every
    damage path — no double damage, no phantom injuries.

🛠️ Installation

  1. Requires BepInEx 5.4.21+
    installed in your game directory.
  2. Place ScavShrapnelMod.dll into:
    CasualtiesUnknownDemo/BepInEx/plugins/
  3. Launch the game — config updates automatically on first run.

Full technical breakdown in CHANGELOG.md.

v0.8.2 - The Synchronization & Performance Update

19 Mar 22:48
0c54bff

Choose a tag to compare

This massive update brings true server-authoritative multiplayer synchronization, a completely rewritten Zero-GC performance engine, and finally allows shrapnel to shred enemies and traps!

🔥 Main Features

  • True Multiplayer Synchronization: Built a fully custom, server-authoritative network protocol from scratch. Physics are handled entirely by the host, while clients use advanced parabolic extrapolation and interpolation for buttery smooth visuals. No more "phantom shards" or desync!
  • Zero-GC Performance Engine: Replaced Unity's standard particle instantiation with a custom AshParticlePoolManager and GPU-batched sparks. This completely eliminates Garbage Collection (GC) spikes, ensuring zero micro-stutters even during massive chain explosions.
  • Mob & Trap Damage: Shrapnel is no longer just for players and blocks! Flying shards will now legitimately damage and kill enemies (spiders), destroy traps (turrets), and trigger explosive barrels.
  • The "Fake Fall Damage" Fix: Fixed a notorious vanilla bug where broken Grav Bags would trigger a ghost explosion, causing the mod to spawn shrapnel inside the player's torso (resulting in instant, lethal internal bleeding that players mistook for fall damage).
  • Cleaner Floors: Reduced the default amount of ground debris by 50% based on player feedback, keeping the aftermath of battles looking realistic but less messy.
  • Advanced Console Commands: Completely overhauled the console commands (shrapnel_explode, shrapnel_debris). Arguments are now order-independent and support shorthand flags (like -e for effects-only, -v for verbose, and -net for network diagnostics).

For a detailed, line-by-line breakdown of all bug fixes and technical changes, please see the CHANGELOG.md file!

🛠️ Installation

  1. Requires BepInEx 5.4.21+ installed in your game directory.
  2. Place the ScavShrapnelMod.dll file into the following folder: CasualtiesUnknownDemo/BepInEx/plugins/
  3. Launch the game! (The configuration file will auto-generate and update safely on the first run).

🤝 Credits & Special Thanks

Massive thanks to the community for testing this update:

  • Madi — for excellent balance feedback.
  • Unverified & tongguetieddd — for exceptional bug reporting and video capturing.
  • jaeforzs — for invaluable assistance in multiplayer logic testing.

0.7.0 - The Lighting & Physics Overhaul

16 Mar 22:59

Choose a tag to compare

This major update completely rewrites how explosions interact with the environment, fixing long-standing visual bugs and adding highly realistic shockwave physics.

🌑 True Lighting & Shadows
No more glowing dirt! Inert particles like rocks, dust, wood splinters, and smoke now correctly respect the game's 2D lighting and will be pitch black in dark areas. Only genuinely hot materials (fire embers, sparks, pyrotechnics) will glow in the dark.

🌍 Universal Language Support (Russian/Localization Fix)
Fixed a major bug where the mod failed to recognize blocks if the game wasn't in English. Material classification now uses the game's internal hardcoded audio IDs. Whether you play in English, Russian, or use modded blocks, wood will always splinter, sand will always billow, and stone will always shatter correctly.

💥 True Multi-Directional Shockwaves
Explosions now scan every single block face in the blast radius. Debris will now correctly blast outward from cave ceilings, vertical walls, pillars, and overhangs—not just flat ground.

💨 Visible Pressure Waves
Added a new "Airwave" effect. You can now see the subtle, expanding dust ring of the shockwave traveling through open air, complete with realistic propagation delay based on distance from the epicenter.

⚖️ Perfect Explosion Symmetry
Fixed a logic bug that caused explosion debris to heavily favor the right side of the screen. Shockwaves now calculate center-outward with alternating priority, guaranteeing perfectly symmetrical debris rings. Ground-placed mines also now correctly form a perfect upward cone.

⚡ Performance Optimizations
Eliminated the annoying ~0.05s micro-stutter during massive explosions by removing memory allocations in the hot paths. We've also added a new BlockDebrisCountMultiplier in the config so you can fine-tune particle density to match your PC's performance.

Installation

  1. Requires BepInEx 5.4.21+
  2. Drop ScavShrapnelMod.dll into CasualtiesUnknownDemo/BepInEx/plugins/
  3. Launch game, config file auto-generates on first run

Compatibility

0.6.0 Rebalance, Upgrade visual effects

16 Mar 12:24

Choose a tag to compare

v0.6.0 - The Cinematic Update

  • 💥 Advanced Explosion Effects: Added towering smoke columns, glowing fire embers that scatter and land, and lingering crater dust after massive explosions.
  • 🌍 Biome Reactions: Explosions now react to the environment! Expect massive steam clouds in freezing temperatures (< 5°C) and thick sand dust when exploding in desert biomes.
  • 🧱 Block Debris: Destroying blocks with explosives now generates physical debris particles flying outwards.
  • 🔫 Enhanced Gunplay Feedback: Shooting metal surfaces is now incredibly satisfying. Added bright impact flashes, dynamic spark showers (mix of streaks and floating sparks), and scattering metal chips.
  • Visual Decay: Shrapnel stuck in walls or lying on the ground now elegantly shrinks and fades away at the end of its lifetime instead of abruptly vanishing.
  • 🚀 Performance & Multiplayer Mastery:
    • Rebuilt the tracking system (now uses ultra-fast Ring Buffers). This fixes the bug where physical shrapnel would despawn prematurely during massive explosions.
    • 100% Multiplayer Synchronization! Switched all randomization to deterministic seeds. Every spark, ember, and shrapnel piece will fly in the exact same direction for all players.
    • Added visual "Pre-warming" to eliminate stutter/lag during the very first explosion in a play session.
  • ⚙️ New Configs: Added over 20 new configuration options to tweak particle counts, lifetimes, and effects.

Installation

  1. Requires BepInEx 5.4.21+
  2. Drop ScavShrapnelMod.dll into CasualtiesUnknownDemo/BepInEx/plugins/
  3. Launch game, config file auto-generates on first run

Compatibility