DayZ
111 ratings
Explosion Fragments
3
3
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod Type: Mechanics, Weapon
File Size
Posted
Updated
54.198 KB
9 Mar @ 1:12pm
3 Jun @ 4:09pm
7 Change Notes ( view )

Subscribe to download
Explosion Fragments

Description
Explosion Fragments - Real Grenade Fragmentation

DayZ doesn’t create grenade fragments — explosions simply deal area damage. This mod changes that by adding true grenade fragmentation, where each explosion releases shrapnel that can hit objects, surfaces, and enemies.

Raycasts used for fragments are calculated server-side and happen instantly. However, particles and sounds are client-side and spawn in a wave from the explosion center, simulating flight time. This means you can be hit by a fragment milliseconds before the visual effects reach you.

Check out Immersive Armor — this will enhance the experience by allowing armor to realistically catch fragments.

JSON config example:
"EffectsPerRPC": 50,// Sending RPC in batches to minimize client lag. The fewer the number, the less lag, but more delay if there are a lot of effects "Explosives": [ { "explosiveClassname": "RGD5Grenade",// Classname of an explosive item or bullet "fragmentationPreset": { "Type": 0,// 0 - SPHERE, 1 - OPTIMIZEDSPHERE, 2 - ELLIPSOID, 3 - CONE "EllipsoidPower": 0.5,// How flat the ellipsoid is. 1 is a flat circle "EllipsoidDirectional": 0,// Makes it relative to the object's dimensions "ConeAngle": 45.0,// Angle of the cone in degrees "ConeVector": [// Directional vector in object space 0.0, 0.0, 1.0 ] }, "fragmentAmount": 300,// Amount of fragments per explosion "maxDistance": 50.0,// Maximum distance for fragments "damageCoef": 1.0,// Base multiplier for fragment damage "useDamageCoefByDistance": 1,// If enabled, fragment damage decreases with distance (distance coefficient from 1 to 0, based on distance, using Quart easing) + damage coefficient "ammoType": "Bullet_ExplosionFragment",// Type of ammo used for fragments; defaults to Bullet_ExplosionFragment which is a copy of .45 ACP "createParticles": 1,// If particles should be created "minDistanceToSpawnParticles": 5.0,// Minimum distance to spawn particles "createSounds": 1,// If sounds should be created "minDistanceToSpawnSounds": 10.0,// Minimum distance to spawn sounds "offset": 0.15000000596046449,// Offset from the item's zero point or the point of contact in the case of projectiles. It's better to leave it at the default "delay": 100// Explosion FX has a slight delay. This compensates for it (in milliseconds) } ] "EnableDebug": 0

Info
  • This mod enhances explosions but does not alter the base damage values of grenades.
  • Anything inherited from ExplosivesBase, Ammunition_Base, TrapBase and projectiles are supported.

Future Updates
  • Performance optimization.
  • Possibly fragment penetration if I find a way to implement this.

Known Issues
  • If there is too much sound, they can get queued and play with a delay. Increase minDistanceToSpawnSounds if this is the issue for you.
  • Still working on optimization.
  • Fragments have no penetration as they are raycasts, not real projectiles.

Debug
If EnableDebug is not in DayZ_Diag, it only prints configuration info in the script log. In DayZ_Diag, it also draws debug shapes.
  • White line: Fragment didn't hit anything.
  • Green line: Fragment hit something and allowed the spawning of both particles and sound.
  • Yellow line: Fragment hit something but allowed only the spawning of particles.
  • Blue line: Fragment hit something but allowed only the spawning of sound.
  • Red line: Fragment hit something but is not allowed to spawn sound or particles.
If the OPTIMIZEDSPHERE preset is used, diagnostic spheres for surface checks are drawn:
  • Green sphere: Surface detected.
  • Red sphere: Surface not detected.
If more than 6 spheres are green, the preset is used; otherwise, the default sphere is used, assuming the explosion happened mid-air or not on a solid surface.



If you have questions, contact me on Discord: Mod Support[discord.gg]

Thanks to mmetrjuk and guys in Enfusion Modders, especially Tree.

The real cancer of DayZ modding community isn’t repacking—it’s obfuscating. However, I’d recommend not repacking it for at least a few months after release, as there will likely be a lot of code optimisation and improvements. Use your PBO to override.
43 Comments
quall 11 Jul @ 2:08pm 
that comment at the end is real, your the people pushing the modding community forward <3
Genriet  [author] 15 Apr @ 11:31am 
@El_Bratcho can't help if can't replicate, try to regenerate json, though it's just gonna switch to default one if file is corrupted, so unlikeky it's the issue.
El_Bratcho 15 Apr @ 10:35am 
No crash-log files were created showing anything useful unfortunately. Uninstalling this mod has fixed things.
Genriet  [author] 12 Apr @ 7:45am 
@El_Bratcho send crashlog
El_Bratcho 11 Apr @ 1:53pm 
Hi mate, frag grenades and explosive ammo for grenade launchers cause this mod to crash my server, is this a known issue?
ҜĦΔØŦƗĆ 24 Mar @ 10:06am 
will do just fixing a update give me half hour
Genriet  [author] 24 Mar @ 10:01am 
@ҜĦΔØŦƗĆ give me crash log in discord
ҜĦΔØŦƗĆ 24 Mar @ 9:59am 
hey man i can get crash logs for you, but dismantlement or shooting the mine causes our server to crash red chain
Genriet  [author] 24 Mar @ 5:57am 
Issue found thanks @weesledun for provided help, if your server is crashing it is because you didn't regenerate json after the last update, delete current one in profiles\ExplosionFragments\ExplosionFragments.json and run the server to let it generate new one.
Genriet  [author] 24 Mar @ 2:57am 
@ҜĦΔØŦƗĆ crash log
@weesledun if you can't provide crash log, at least tell what exactly you did so i can try to replicate myself