DayZ
Bullets!
Hi

I was in bed thinking how exactly do bullets/damage works on this game

By what I understood damage is calculated by the round not the gun firing and additionally bullet velocity doesn't really take impact on the damage.

Meaning that if mod makers decide to make a point click laser it will still do the assigned damage correct?
Originally posted by SmashT:
Basically:

Ammo defines base damage
Weapon defines muzzle velocity
Velocity (relative to the ammo’s drop-off threshold) determines damage drop-off.

In detail:
When a round is fired, its muzzle velocity is calculated by multiplying the ammo’s initSpeed by the weapon’s initSpeedMultiplier:

initSpeed (ammo) × initSpeedMultiplier (weapon) = muzzle velocity

Damage drop-off is controlled by the ammo’s typicalSpeed and defaultDamageOverride, which together define a velocity threshold below which damage begins to scale down:

typicalSpeed × defaultDamageOverride = damage drop-off threshold

As long as the bullet’s velocity is greater than the drop-off threshold, it will deal full base damage. Once velocity falls below this threshold, damage scales down proportionally.

Using KC's examples above comparing a DMR and LAR firing .308

The .308 Win ammo config contains the following values:

class Bullet_308Win: Bullet_Base { initSpeed = 770; typicalSpeed = 940; airFriction = -0.001; class DamageApplied { defaultDamageOverride[] = {{0.9,1.0}}; class Health { damage = 150; }; }; };

This gives a damage drop-off threshold of:

940 × 0.9 = 846 m/s

You can think of 846 m/s as 100% damage speed.

LAR (FAL)
class FAL_Base: Rifle_Base { initSpeedMultiplier = 0.9; };

The .308 round has an initSpeed of 770 m/s.
The LAR modifies that velocity:

770 × 0.9 = 693 m/s

This means the bullet leaves the LAR at 693 m/s, which is already below the damage drop-off threshold of 846 m/s. As a result, the bullet is dealing reduced damage immediately, even at point-blank range.

To determine how much damage is applied, the current velocity is compared to the drop-off threshold:

693 ÷ 846 = 0.819

So the LAR applies roughly 82% of full damage at 0 metres:

150 × 0.82 = 122.9 damage

This is why the LAR does around 122–123 damage at point blank, despite the ammo’s base damage being 150.

DMR / M14
class M14_Base: Rifle_Base { initSpeedMultiplier = 1.23; };


For the DMR:

770 × 1.23 = 947 m/s velocity

This muzzle velocity is above the damage drop-off threshold of 846 m/s, so the DMR applies 100% base damage at 0 metres or 150 damage.

As long as the velocity is greater than the drop off speed, the bullet will do its full base damage so a lower DefaultDamageOverride will result in a bullet doing full damage at longer ranges, but this is also dependent on the firearm used to fire the bullet as a weapon with a slow velocity may never exceed the full-damage threshold.

There is also airFriction on the ammo, which controls how quickly a projectile loses velocity while in flight. The engine applies this continuously as the bullet travels, reducing its speed over time. A value closer to 0 results in less drag, allowing the projectile to retain velocity for longer, while a more negative value increases drag and causes the bullet to slow down more quickly. For example, a round with an airFriction of -0.0005 will have a flatter damage curve because its velocity decays more slowly, whereas a round with an airFriction of -0.002 will experience much steeper damage drop-off as its velocity decreases more rapidly.

This spreadsheet is super useful to play around with for handling the calculations and showing the damage at various distances as the velocity drops, make a copy for your personal use.

https://docs.google.com/spreadsheets/d/15o5wVOz4oooRw0ggL5kbpix51TMfpUb3vDacbs8etp8/edit?gid=0#gid=0

Wobo has a tool here for the official guns https://wobo.tools/dayz-damage-drop-off-tool

But yes, you absolutely could do what you want.
< >
Showing 1-4 of 4 comments
Originally posted by Ryzwind:
Hi

I was in bed thinking how exactly do bullets/damage works on this game

By what I understood damage is calculated by the round not the gun firing and additionally bullet velocity doesn't really take impact on the damage.
..snip..
Incorrect.

Damage is a combination of the weapon and the ammunition stats..
- Compare a DMR with a Savanna or a LAR .. They all use the same .308 "bullets" but have different Stats for Damage, Distance, Accuracy, etc.

*Edited quote to clarify my "incorrect" relates to OP's "is calculated by the round not the gun firing".
The author of this thread has indicated that this post answers the original topic.
Basically:

Ammo defines base damage
Weapon defines muzzle velocity
Velocity (relative to the ammo’s drop-off threshold) determines damage drop-off.

In detail:
When a round is fired, its muzzle velocity is calculated by multiplying the ammo’s initSpeed by the weapon’s initSpeedMultiplier:

initSpeed (ammo) × initSpeedMultiplier (weapon) = muzzle velocity

Damage drop-off is controlled by the ammo’s typicalSpeed and defaultDamageOverride, which together define a velocity threshold below which damage begins to scale down:

typicalSpeed × defaultDamageOverride = damage drop-off threshold

As long as the bullet’s velocity is greater than the drop-off threshold, it will deal full base damage. Once velocity falls below this threshold, damage scales down proportionally.

Using KC's examples above comparing a DMR and LAR firing .308

The .308 Win ammo config contains the following values:

class Bullet_308Win: Bullet_Base { initSpeed = 770; typicalSpeed = 940; airFriction = -0.001; class DamageApplied { defaultDamageOverride[] = {{0.9,1.0}}; class Health { damage = 150; }; }; };

This gives a damage drop-off threshold of:

940 × 0.9 = 846 m/s

You can think of 846 m/s as 100% damage speed.

LAR (FAL)
class FAL_Base: Rifle_Base { initSpeedMultiplier = 0.9; };

The .308 round has an initSpeed of 770 m/s.
The LAR modifies that velocity:

770 × 0.9 = 693 m/s

This means the bullet leaves the LAR at 693 m/s, which is already below the damage drop-off threshold of 846 m/s. As a result, the bullet is dealing reduced damage immediately, even at point-blank range.

To determine how much damage is applied, the current velocity is compared to the drop-off threshold:

693 ÷ 846 = 0.819

So the LAR applies roughly 82% of full damage at 0 metres:

150 × 0.82 = 122.9 damage

This is why the LAR does around 122–123 damage at point blank, despite the ammo’s base damage being 150.

DMR / M14
class M14_Base: Rifle_Base { initSpeedMultiplier = 1.23; };


For the DMR:

770 × 1.23 = 947 m/s velocity

This muzzle velocity is above the damage drop-off threshold of 846 m/s, so the DMR applies 100% base damage at 0 metres or 150 damage.

As long as the velocity is greater than the drop off speed, the bullet will do its full base damage so a lower DefaultDamageOverride will result in a bullet doing full damage at longer ranges, but this is also dependent on the firearm used to fire the bullet as a weapon with a slow velocity may never exceed the full-damage threshold.

There is also airFriction on the ammo, which controls how quickly a projectile loses velocity while in flight. The engine applies this continuously as the bullet travels, reducing its speed over time. A value closer to 0 results in less drag, allowing the projectile to retain velocity for longer, while a more negative value increases drag and causes the bullet to slow down more quickly. For example, a round with an airFriction of -0.0005 will have a flatter damage curve because its velocity decays more slowly, whereas a round with an airFriction of -0.002 will experience much steeper damage drop-off as its velocity decreases more rapidly.

This spreadsheet is super useful to play around with for handling the calculations and showing the damage at various distances as the velocity drops, make a copy for your personal use.

https://docs.google.com/spreadsheets/d/15o5wVOz4oooRw0ggL5kbpix51TMfpUb3vDacbs8etp8/edit?gid=0#gid=0

Wobo has a tool here for the official guns https://wobo.tools/dayz-damage-drop-off-tool

But yes, you absolutely could do what you want.
Originally posted by _KC76_:
Originally posted by Ryzwind:
Hi

I was in bed thinking how exactly do bullets/damage works on this game

By what I understood damage is calculated by the round not the gun firing and additionally bullet velocity doesn't really take impact on the damage.
..snip..
Incorrect.

Damage is a combination of the weapon and the ammunition stats..
- Compare a DMR with a Savanna or a LAR .. They all use the same .308 "bullets" but have different Stats for Damage, Distance, Accuracy, etc.

*Edited quote to clarify my "incorrect" relates to OP's "is calculated by the round not the gun firing".

This data is crazy I will study it :D
Originally posted by Ryzwind:
Originally posted by _KC76_:
Incorrect.

Damage is a combination of the weapon and the ammunition stats..
- Compare a DMR with a Savanna or a LAR .. They all use the same .308 "bullets" but have different Stats for Damage, Distance, Accuracy, etc.

*Edited quote to clarify my "incorrect" relates to OP's "is calculated by the round not the gun firing".

This data is crazy I will study it :D

Study it..
to what end?
< >
Showing 1-4 of 4 comments
Per page: 1530 50