Skip to content

Weapon Asset Reference

Every item in Unturned™ that can deal damage to another entity - a player, a zombie, an animal, a structure, a resource node, a vehicle, or a world object - is defined by the ItemWeaponAsset class. This is the base class that both the ItemGunAsset and ItemMeleeAsset classes inherit from. The weapon asset provides the foundational property set that controls how damage is applied, at what distance it is applied, how much durability the weapon loses per use, and what special effects occur on impact. The gun and melee child classes inherit every field documented in this article and add their own type-specific fields on top.

Unturned weapon assets hierarchy: Gun and Melee both inherit from ItemWeaponAsset

Documentation source: This article is derived from the official Smartly Dressed Games modding documentation Chapter 75 (Weapon Assets). The field definitions, default values, and behavioral descriptions reflect the stable Unturned™ release branch as of the current version. Game file examples are drawn from the vanilla asset set in Bundles/Items/Guns/ and Bundles/Items/Melee/.

Who this article is for

This article is written for Unturned™ mod authors who are already familiar with the item asset system and the .dat file format. If you are new to Unturned™ modding, start with Item Asset Anatomy and Data File Format Reference before returning here. The Gun Mod Tutorial and Melee Asset articles provide the child-class-specific field documentation that builds on this base class reference.

What you will learn

  • What the ItemWeaponAsset base class is and how it relates to gun and melee assets.
  • How the Range field behaves differently across weapon subtypes (ballistic, melee, explosive).
  • The full damage field taxonomy: player damage, zombie damage, animal damage, structure damage, vehicle damage, barricade damage, resource damage, and object damage.
  • How limb multipliers (leg, arm, spine, skull) modify damage per hit location.
  • How the durability system works: Durability, Wear, and how the engine tracks degradation.
  • The status effect fields: bleeding, broken bones, food, water, virus, and hallucination.
  • The BladeID system for restricting which resources a weapon can damage.
  • The Stun_Zombie_Always and Stun_Zombie_Never flags and how they override zombie stun behavior.
  • The Bypass_Allowed_To_Damage_Player flag for PvE and group-friendly-fire rules.
  • How the Invulnerable flag controls damage against invulnerable-tagged entities.

Background: the weapon asset hierarchy

The ItemWeaponAsset class inherits from ItemAsset. It is not instantiated directly - it exists only as a parent class that provides shared fields to ItemGunAsset and ItemMeleeAsset. When a modder authors a weapon .dat file, the fields documented in this article are available on both gun and melee assets, with the same behavior on both.

As shown in the diagram above, ItemWeaponAsset sits one level above the concrete weapon types. Every field documented in this article is inherited by both ItemGunAsset and ItemMeleeAsset. A field added to this article does not need to be documented again in the child-class articles, though those articles may reference it.

The Range field

The Range field is the single most behaviorally diverse field in the weapon asset class because its meaning changes depending on the weapon's child class.

Weapon classRange behaviorUnit
Ballistic projectile ranged weapons (guns)Maximum distance the projectile may travel before it expires. Damage falloff begins before this point and reaches zero at exactly this distance.meters
Melee weaponsMaximum swinging distance from the player's hand position. The sphere cast for hit detection extends to this radius.meters
Physics projectile ranged weapons (explosive launchers)Radius of the explosion that occurs on impact. This is the area-of-effect radius, not a travel distance.meters

The three interpretations of Range are a common source of confusion for modders transitioning between weapon types. An explosive launcher that sets Range 15 will have a 15-meter blast radius, not a 15-meter projectile travel distance. The projectile still travels the distance set by its ballistic simulation parameters; the Range field on an explosive weapon controls the explosion's area of effect, not the projectile's flight range.

Range values from shipped game files

The table below documents Range values observed in vanilla Unturned™ weapon .dat files. These confirm the behavioral ranges discussed above.

Vanilla weaponTypeRangeNotes
EaglefireGun (ballistic)200Standard assault rifle engagement range
AceGun (ballistic)100Compact PDW with shorter effective range
BluntforceGun (shotgun)35Shotgun with fast damage falloff
CrossbowGun (projectile)200Archery weapon range
Axe_CampMelee2.0Standard melee swing reach
Axe_FireMelee2.25Extended melee reach
Knife_ButcherMelee1.5Short melee range

The Range values across vanilla weapons range from 1.5 meters (small knives) to 350 meters (long-range rifles). Explosive weapons with physics projectile behavior use Range as their blast radius, with values typically between 6 and 20 meters.

The durability system

The Durability and Wear fields together define how many times a weapon can be used before it degrades to destruction.

Durability

FieldTypeDefaultPurpose
Durabilityfloat321.0Probability of quality loss upon the weapon being used, expressed as a decimal in the range 0.0 to 1.0. This is not a hit-point value; it is a probability that each use degrades the weapon.

The Durability field in the SDG documentation is defined as "Probability of quality loss upon the weapon being used, as a decimal." This is distinct from the durability-as-max-HP model used by some other item systems. In the weapon asset context, Durability governs the chance that each use consumes a Wear increment. A value of 1.0 guarantees quality loss on every use. A value of 0.0 means quality is never lost.

In practice, most vanilla weapons use a Durability value of 0.1 or lower (guns) or 1.0 (melee weapons with a Wear field), but the field accepts the full float32 range. The 57 Studios™ cohort recommendation is to use 1.0 for all custom weapons unless a specific probabilistic degradation mechanic is desired.

Wear

FieldTypeDefaultPurpose
Wearuint81The amount by which the weapon's quality is degraded on each use when the Durability probability check succeeds.

Unlike Durability, the Wear field is an absolute integer that directly decrements the weapon's internal quality counter. The effective number of uses before destruction is:

Maximum uses = floor(initial_quality / Wear)

Where initial_quality is derived from the weapon's Durability field multiplied by 100. A weapon with Durability 1.0 and Wear 2 has an effective lifetime of 50 uses. A weapon with Durability 1.0 and Wear 0 never degrades.

Wear valueUses before destruction (at Durability 1.0)Use case
0InfiniteAdmin tools, indestructible quest items
1100Standard weapons, high durability
250Heavy-use weapons with noticeable attrition
520Specialty tools with fast degradation
1010Single-session disposable weapons

Durability and Wear in shipped game files

Vanilla weaponDurabilityWearNotes
Eaglefire (gun)0.15-Probabilistic degradation
Axe_Camp (melee)0.1-Melee with only Durability set
Axe_Fire (melee)0.1-Same degradation rate
Bow_Birch (gun)1.05Full Durability with explicit Wear
Crossbow (gun)1.02Slower degradation than bows

Note that many gun assets use only Durability without a Wear field, relying on the probabilistic model. Melee assets and bows more commonly use the Durability 1.0 + Wear N pattern, which gives deterministic rather than probabilistic degradation.

Damage fields

The weapon asset defines a comprehensive set of per-target-category damage fields. Each field is independent - tuning one does not affect the others.

The core damage fields

FieldTypeDefaultApplies toWhen used
Player_Damagefloat32See notesPlayer entitiesAlways. The primary combat damage value.
Zombie_Damagefloat32See notesZombie entitiesAlways. Typically higher than Player_Damage.
Animal_Damagefloat32See notesAnimal entitiesAlways. Typically lower than Zombie_Damage.
Barricade_Damagefloat320Barricades (walls, doors, traps, storage)Always applied when hitting a barricade.
Structure_Damagefloat320Structures (floors, roofs, pillars, ramps)Always applied when hitting a structure.
Vehicle_Damagefloat320Vehicles (cars, trucks, APCs, helicopters)Always applied when hitting a vehicle.
Resource_Damagefloat320Resource nodes (trees, rocks, ore, fuel)Always applied when hitting a resource node.
Object_Damagefloat32See notesWorld objectsDefaults to the value of Resource_Damage if not set explicitly.

The per-category damage model allows a single weapon class to behave very differently against different target types. A resource-harvesting axe has high Resource_Damage and low Player_Damage. A combat rifle has high Player_Damage and Zombie_Damage but negligible Resource_Damage. The fields are fully independent and should be tuned to the weapon's intended role.

Damage values from shipped game files

Vanilla weaponPlayer_DamageZombie_DamageAnimal_DamageBarricade_DamageStructure_DamageVehicle_DamageResource_DamageObject_Damage
Eaglefire (gun)3535353525302535
Ace (gun)5099502520302025
Bluntforce (shotgun)404040107101012
Axe_Camp (melee)34343415102510025
Axe_Fire (melee)3434342520357535
Axe_Pick (melee)34343415102510025

The most striking pattern in the vanilla data is that the Zombie_Damage field on many gun assets is set to 99 - the vanilla engine's cap for zombie damage per hit. This means the vanilla design intent is that any gun hit kills a standard zombie in one shot. Melee weapons use more moderate zombie damage values, reflecting the melee system's different balance.

The Resource_Damage values for melee axes (75-100) are dramatically higher than for guns (20-25), confirming that resource harvesting is the melee subtype's primary role. The Object_Damage field, when not explicitly set, defaults to the value of Resource_Damage.

The Bypass_Allowed_To_Damage_Player field

FieldTypeDefaultPurpose
Bypass_Allowed_To_Damage_PlayerboolfalseWhen true, the weapon bypasses the server's PvE and friendly-fire rules. A player can always damage another player with this weapon regardless of the server's damage rules.

By default, a weapon cannot damage another player if the server is set to PvE, or if the target player belongs to the same group and friendly fire is disabled. Setting Bypass_Allowed_To_Damage_Player True overrides both restrictions. This field should be used sparingly in public mods because it removes the server operator's ability to control player-versus-player engagement through server settings. The cohort recommendation is to set this field only on admin tools, debug items, and weapons that are explicitly designed to ignore PvE rules (trap weapons, environmental hazards).

Player status effect fields

The weapon asset class includes a set of fields that control player status effects beyond raw damage. These fields allow a weapon to induce bleeding, break bones, or affect the player's food, water, virus, and hallucination levels.

Bleeding and bones fields

FieldTypeValid valuesDefaultPurpose
Player_Damage_BleedingenumAlways, Default, Heal, NeverDefaultControls the bleeding status effect on hit. Always applies bleeding on every hit. Default applies bleeding only if the damage threshold is met. Heal removes the bleeding status effect from the target. Never prevents bleeding from being applied by this weapon.
Player_Damage_BonesenumAlways, Heal, NoneNoneControls the broken bones status effect on hit. Always breaks bones on every hit. Heal heals the target's broken bones. None never breaks bones.

The bleeding and bones fields are the weapon-authoring mechanism for status effects that the player experiences after being hit. A weapon with Player_Damage_Bleeding Always and Player_Damage_Bones Always is a high-threat weapon that leaves the target bleeding and immobile after every hit, even if the raw damage is low. A healing weapon with Player_Damage_Bleeding Heal and Player_Damage_Bones Heal is a medical tool that cures effects rather than applying them.

Hunger, thirst, virus, and hallucination fields

FieldTypeDefaultPurpose
Player_Damage_Foodfloat320Amount of food level degradation dealt to the target. Positive values increase the target's food level (beneficial). Negative values decrease it (detrimental). Negative values are blocked in safezones and shortly after respawn.
Player_Damage_Waterfloat320Amount of water level degradation dealt to the target. Positive values increase water level (beneficial). Negative values decrease it (detrimental). Negative values are blocked in the same situations as food damage.
Player_Damage_Virusfloat320Amount of immunity degradation dealt to the target. Positive values increase immunity level (beneficial). Negative values decrease it (detrimental). Negative values are blocked in safezones and after respawn.
Player_Damage_Hallucinationfloat320Duration of hallucinations inflicted on the target, in seconds. Positive values increase hallucination duration (detrimental). Negative values decrease hallucination duration (beneficial). Positive values are blocked in safezones and after respawn.

These four fields enable weapons that interact with the player's survival meters. A contaminated weapon could apply Player_Damage_Virus -10 (decreasing immunity) in addition to its normal damage. A healing syringe weapon could apply Player_Damage_Food 20, Player_Damage_Water 20, and Player_Damage_Virus 20 to provide a broad survival boost. A hallucinogenic weapon could apply Player_Damage_Hallucination 15 to disorient the target for 15 seconds.

Safe zone blocking

All four fields are blocked (positive values as well as negative values are suppressed) when the target is in a safe zone or shortly after respawn. This is a safety mechanism that prevents weapons from being used to grief players in safe zones. The Player_Damage core field is also blocked in safe zones under the standard PvE rules.

Limb multipliers

Each entity category (player, zombie, animal) has a set of limb multiplier fields that modify the base damage based on which body part is hit. The limb multipliers are applied as multiplicative factors on the base damage after the entity category field is selected but before armor or other modifiers are applied.

Player limb multipliers

FieldTypeDefaultPurpose
Player_Leg_Multiplierfloat320.6Multiplier on damage targeted against a player's legs.
Player_Arm_Multiplierfloat320.6Multiplier on damage targeted against a player's arms.
Player_Spine_Multiplierfloat320.8Multiplier on damage targeted against a player's torso.
Player_Skull_Multiplierfloat321.1Multiplier on damage targeted against a player's head.

Zombie limb multipliers

FieldTypeDefaultPurpose
Zombie_Leg_Multiplierfloat320.3Multiplier on damage targeted against a zombie's legs.
Zombie_Arm_Multiplierfloat320.3Multiplier on damage targeted against a zombie's arms.
Zombie_Spine_Multiplierfloat320.6Multiplier on damage targeted against a zombie's torso.
Zombie_Skull_Multiplierfloat321.1Multiplier on damage targeted against a zombie's head.

Animal limb multipliers

FieldTypeDefaultPurpose
Animal_Leg_Multiplierfloat320.6Multiplier on damage targeted against an animal's limbs.
Animal_Spine_Multiplierfloat320.8Multiplier on damage targeted against an animal's torso.
Animal_Skull_Multiplierfloat321.1Multiplier on damage targeted against an animal's head.

As shown in the flowchart above, the damage calculation for a weapon hit follows a two-step resolution: first select the entity category field (Player_Damage for a player), then apply the limb multiplier for the specific body part hit. A vanilla headshot on a player applies Player_Damage × 1.1. A leg hit applies Player_Damage × 0.6. The same multiplier structure applies to zombies and animals.

Limb multipliers are not used by explosive weapons

The SDG documentation specifies that limb multipliers are not utilized by explosive weapons. Explosive weapons apply their damage uniformly across the entity's body without per-limb differentiation. This is because explosive damage is area-of-effect and does not pinpoint a specific limb.

Limb multiplier values from shipped game files

The vanila weapon set consistently uses the following multiplier values across all weapon types:

Multiplier fieldMost common valueEffect
*_Leg_Multiplier0.6 (player/animal) / 0.3 (zombie)Leg hits deal 60% (or 30% for zombie) of base damage
*_Arm_Multiplier0.6 (player) / 0.3 (zombie)Arm hits deal 60% (or 30%) of base damage
*_Spine_Multiplier0.8 (player/animal) / 0.6 (zombie)Torso hits deal 80% (or 60%) of base damage
*_Skull_Multiplier1.1Headshots deal 110% of base damage

The zombie limb multipliers are consistently lower than the player multipliers, reflecting the vanilla design intent that zombies require more shots to incapacitate through limb damage (zombies keep coming until the skull is hit). The skull multiplier of 1.1 is uniform across all entity categories.

Allow_Flesh_Fx

FieldTypeDefaultPurpose
Allow_Flesh_FxbooltrueControls whether special visual effects (blood spray, impact particles) occur when the weapon damages a fleshy target (player, zombie, animal).

When Allow_Flesh_Fx is set to false, no flesh-specific impact effects are generated. The weapon still deals full damage - the field is purely cosmetic. Setting this to false is appropriate for non-lethal weapons, training weapons, or weapons that deal damage through non-physical means (energy weapons, status-effect-only tools).

Zombie stun behavior fields

FieldTypeDefaultPurpose
Stun_Zombie_Alwaysflagnot setWhen present, a zombie is always stunned when targeted by the weapon, regardless of any other zombie stun rules.
Stun_Zombie_Neverflagnot setWhen present, a zombie is never stunned when targeted by the weapon, regardless of any other zombie stun rules.
Zombie_Ragdoll_Force_Multiplierfloat321.0Scales the force applied to a zombie's ragdoll on death. Values above 1.0 cause the ragdoll to fly farther; values below 1.0 reduce ragdoll travel.

The two stun flags are mutually exclusive in intent but not in engine enforcement. The cohort recommendation is to apply at most one of the two flags. A weapon with neither flag uses the default zombie stun behavior (stun chance scaled by damage relative to zombie max HP).

The Zombie_Ragdoll_Force_Multiplier field is the only one of the three that takes a float value rather than a flag. A high-caliber rifle with Zombie_Ragdoll_Force_Multiplier 2.0 sends zombie ragdolls flying with double the default force. A low-caliber pistol might use Zombie_Ragdoll_Force_Multiplier 0.5 to produce a less dramatic ragdoll reaction.

The BladeID system

The BladeID system is a filtering mechanism that restricts which resources and world objects a weapon can damage. It is the weapon side of a two-field compatibility check: the weapon declares which BladeID values it can damage, and the resource or object declares which BladeID it requires.

FieldTypeDefaultPurpose
BladeIDuint8Not setA single BladeID that the weapon can damage. Deprecated in favor of BladeIDs and BladeID_#.
BladeIDsint320The number of BladeID values the weapon supports. Should equal the number of BladeID_# fields that follow.
BladeID_#uint8Not setIndividual BladeID values. The weapon can damage any resource or object that has a matching BladeID.

As shown in the flowchart, the BladeID system is a simple tag-matching filter. If the weapon's list of BladeID values contains the resource's BladeID, the weapon can damage that resource. If no match exists, the weapon's Resource_Damage and Object_Damage fields are not applied to that entity.

BladeID is deprecated

The single BladeID field is deprecated in favor of the array-based BladeIDs + BladeID_# system. When authoring a new weapon mod that requires BladeID filtering, use the array system (set BladeIDs to the count and list each value as BladeID_0, BladeID_1, etc.). The single BladeID field is maintained for backwards compatibility with older mods but should not be used in new work.

BladeID values from shipped game files

The vanila Axe_Pick melee weapon uses the BladeID system:

BladeIDs 3
BladeID_0 0
BladeID_1 1
BladeID_2 2

This pickaxe can damage any resource or object tagged with BladeID 0, 1, or 2. If a custom resource defines its BladeID as 3, this pickaxe would not be able to harvest it - only a weapon with BladeID 3 or BladeIDs containing 3 could damage it.

The Invulnerable flag

FieldTypeDefaultPurpose
Invulnerableflagnot setWhen present, the weapon can damage entities that are tagged as invulnerable to low-power weaponry. This does not apply to explosive weapons, which always ignore invulnerability.

The Invulnerable flag is the weapon side of an entity-level tag. Some world objects and structures are flagged as invulnerable in their own asset configuration. A normal weapon cannot damage them. A weapon with the Invulnerable flag can. This is used for high-caliber weapons that should be able to break through reinforced objects that weaker weapons cannot scratch.

Explosive weapons always ignore the invulnerable tag regardless of the Invulnerable flag. This is hardcoded engine behavior, not configurable through the .dat file. If a weapon needs to break invulnerable objects and is explosive, it does not need the Invulnerable flag.

Complete field reference table

The table below lists every field that the ItemWeaponAsset class contributes, organized by category. Fields inherited from ItemAsset (ID, GUID, Type, Name, Rarity, Slot, Size_X, Size_Y, Model) are not repeated here - see Item Asset Anatomy for the shared field reference.

Core fields

FieldTypeRequiredDefaultPurpose
Allow_Flesh_FxboolNotrueEnable flesh impact visual effects
Durabilityfloat32No1.0Probability of quality loss per use (0.0-1.0)
Rangefloat32YesVariesSee Range section: projectile travel / melee reach / explosive radius
Wearuint8No1Degradation increment per quality loss event

Damage fields

FieldTypeRequiredDefaultPurpose
Player_Damagefloat32NoVaries by weapon typeBase damage to player entities
Zombie_Damagefloat32NoVaries by weapon typeBase damage to zombie entities
Animal_Damagefloat32NoVaries by weapon typeBase damage to animal entities
Barricade_Damagefloat32No0Base damage to barricades
Structure_Damagefloat32No0Base damage to structures
Vehicle_Damagefloat32No0Base damage to vehicles
Resource_Damagefloat32No0Base damage to resource nodes
Object_Damagefloat32NoSame as Resource_DamageBase damage to world objects

Player limb multiplier fields

FieldTypeRequiredDefaultPurpose
Player_Leg_Multiplierfloat32No0.6Damage multiplier for leg hits
Player_Arm_Multiplierfloat32No0.6Damage multiplier for arm hits
Player_Spine_Multiplierfloat32No0.8Damage multiplier for torso hits
Player_Skull_Multiplierfloat32No1.1Damage multiplier for head hits

Zombie limb multiplier fields

FieldTypeRequiredDefaultPurpose
Zombie_Leg_Multiplierfloat32No0.3Damage multiplier for zombie leg hits
Zombie_Arm_Multiplierfloat32No0.3Damage multiplier for zombie arm hits
Zombie_Spine_Multiplierfloat32No0.6Damage multiplier for zombie torso hits
Zombie_Skull_Multiplierfloat32No1.1Damage multiplier for zombie head hits

Animal limb multiplier fields

FieldTypeRequiredDefaultPurpose
Animal_Leg_Multiplierfloat32No0.6Damage multiplier for animal limb hits
Animal_Spine_Multiplierfloat32No0.8Damage multiplier for animal torso hits
Animal_Skull_Multiplierfloat32No1.1Damage multiplier for animal head hits

Player status effect fields

FieldTypeRequiredDefaultPurpose
Bypass_Allowed_To_Damage_PlayerboolNofalseIgnore PvE and friendly-fire restrictions
Player_Damage_BleedingenumNoDefaultBleeding status application: Always, Default, Heal, Never
Player_Damage_BonesenumNoNoneBroken bones status application: Always, Heal, None
Player_Damage_Foodfloat32No0Food level change on hit (positive=fed, negative=starved)
Player_Damage_Waterfloat32No0Water level change on hit (positive=hydrated, negative=dehydrated)
Player_Damage_Virusfloat32No0Immunity change on hit (positive=boosted, negative=reduced)
Player_Damage_Hallucinationfloat32No0Hallucination duration in seconds on hit

Zombie behavior fields

FieldTypeRequiredDefaultPurpose
Stun_Zombie_AlwaysflagNonot setAlways stun zombies on hit
Stun_Zombie_NeverflagNonot setNever stun zombies on hit
Zombie_Ragdoll_Force_Multiplierfloat32No1.0Ragdoll force multiplier on zombie death

BladeID fields

FieldTypeRequiredDefaultPurpose
BladeIDuint8NoNot setSingle BladeID for resource compatibility (deprecated)
BladeIDsint32No0Count of BladeID_# fields
BladeID_#uint8NoNot setIndividual BladeID values for resource filtering

Invulnerable flag

FieldTypeRequiredDefaultPurpose
InvulnerableflagNonot setCan damage invulnerable-tagged entities (not applied by explosive weapons)

Worked example: tracing damage through the weapon asset pipeline

The following example traces a complete damage calculation from a weapon .dat file through the engine's resolution chain.

Step 1: The weapon's Gun.dat specifies:

Player_Damage 40
Player_Leg_Multiplier 0.6
Player_Skull_Multiplier 1.1
Zombie_Damage 99
Zombie_Leg_Multiplier 0.3
Zombie_Skull_Multiplier 1.1
Barricade_Damage 15
Resource_Damage 5

Step 2: The player fires the weapon and hits a zombie in the head:

The engine resolves the damage as follows:

  1. The hit is detected against a zombie entity. The engine selects Zombie_Damage 99.
  2. The hit location is the skull. The engine selects Zombie_Skull_Multiplier 1.1.
  3. The final damage is 99 × 1.1 = 108.9 HP, rounded down to 108.
  4. The zombie has approximately 100 HP. The zombie dies from this hit.

Step 3: The player fires the same weapon and hits a zombie in the leg:

  1. The hit is detected against a zombie entity. The engine selects Zombie_Damage 99.
  2. The hit location is the leg. The engine selects Zombie_Leg_Multiplier 0.3.
  3. The final damage is 99 × 0.3 = 29.7 HP, rounded down to 29.
  4. The zombie still has approximately 71 HP remaining. It is not stunned (no Stun_Zombie_Always flag), and the damage did not exceed the default stun threshold.

Step 4: The same weapon hits a player-built barricade:

  1. The hit is detected against a barricade entity. The engine selects Barricade_Damage 15.
  2. Barricades do not have limb multipliers. No multiplier is applied.
  3. The final damage is 15 HP applied to the barricade's HP pool.

Step 5: The same weapon hits a resource node (tree):

  1. The hit is detected against a resource node. The engine selects Resource_Damage 5.
  2. The engine checks the weapon's BladeID list. The weapon has no BladeID fields set, so no filtering is applied (the weapon can damage any resource).
  3. The final damage is 5 HP applied to the tree's HP pool.

Worked example: Gun .dat with weapon asset fields highlighted

The fields that the ItemWeaponAsset class contributes are marked with ← WeaponAsset. All other fields are specific to the ItemGunAsset child class.

ID 3001
GUID f47ac10b58cc4372a5670e02b2c3d479
Type Gun
Name ExampleRifle
Rarity Uncommon
Slot Primary
Size_X 4
Size_Y 1

Caliber 0
Magazine 3002

Firemodes 2
Firemode_0 Safety
Firemode_1 Semi
Firerate 4
Action Trigger

Recoil_Min_X -0.4
Recoil_Max_X 0.4
Recoil_Min_Y 1.6
Recoil_Max_Y 2.0
Recover_X 0.5
Recover_Y 0.5

Spread_Hip 0.2
Spread_Aim 0.05
Sway 1.0

Ballistic_Steps 10
Ballistic_Drop 0.05
Range 400                    ← WeaponAsset
Player_Damage 40             ← WeaponAsset
Zombie_Damage 60             ← WeaponAsset
Animal_Damage 50             ← WeaponAsset
Barricade_Damage 15          ← WeaponAsset
Structure_Damage 15          ← WeaponAsset
Vehicle_Damage 25            ← WeaponAsset
Resource_Damage 5            ← WeaponAsset
Object_Damage 10             ← WeaponAsset

Durability 0.15              ← WeaponAsset
Wear 1                       ← WeaponAsset

Player_Leg_Multiplier 0.6    ← WeaponAsset
Player_Arm_Multiplier 0.6    ← WeaponAsset
Player_Spine_Multiplier 0.8  ← WeaponAsset
Player_Skull_Multiplier 1.1  ← WeaponAsset

Zombie_Leg_Multiplier 0.3    ← WeaponAsset
Zombie_Arm_Multiplier 0.3    ← WeaponAsset
Zombie_Spine_Multiplier 0.6  ← WeaponAsset
Zombie_Skull_Multiplier 1.1  ← WeaponAsset

Sight 0
Hook 0
Grip 0
Barrel 0
Tactical 0

Shoot Heavy_Rifle

Worked example: Melee .dat with weapon asset fields highlighted

ID 16
GUID 3bba8c2b013646fb964932c31060b60a
Type Melee
Name Axe_Camp
Slot Secondary
Size_X 2
Size_Y 3

Range 2                      ← WeaponAsset
Strength 1.5

Player_Damage 34             ← WeaponAsset
Zombie_Damage 34             ← WeaponAsset
Animal_Damage 34             ← WeaponAsset
Barricade_Damage 15          ← WeaponAsset
Structure_Damage 10          ← WeaponAsset
Vehicle_Damage 25            ← WeaponAsset
Resource_Damage 100          ← WeaponAsset
Object_Damage 25             ← WeaponAsset

Durability 0.1               ← WeaponAsset

Player_Leg_Multiplier 0.6    ← WeaponAsset
Player_Arm_Multiplier 0.6    ← WeaponAsset
Player_Spine_Multiplier 0.8  ← WeaponAsset
Player_Skull_Multiplier 1.1  ← WeaponAsset

Zombie_Leg_Multiplier 0.3    ← WeaponAsset
Zombie_Arm_Multiplier 0.3    ← WeaponAsset
Zombie_Spine_Multiplier 0.6  ← WeaponAsset
Zombie_Skull_Multiplier 1.1  ← WeaponAsset

Animal_Leg_Multiplier 0.3    ← WeaponAsset
Animal_Spine_Multiplier 0.6  ← WeaponAsset
Animal_Skull_Multiplier 1.1  ← WeaponAsset

The melee .dat includes the same weapon asset fields as the gun .dat. The core difference is that the melee weapon uses the Range field as a swing distance (Range 2.0 meters) rather than a projectile travel distance, and the Durability behavior is applied to each swing rather than each shot.

Best practices

  • Set all eight damage fields explicitly on every custom weapon. Relying on defaults for an unset damage field can produce a weapon that deals zero damage to that entity category without any error message.
  • Use Wear 0 only for indestructible items. A weapon with no attrition removes a meaningful gameplay dimension. If the weapon should be very durable but not indestructible, use Wear 1 with a high Rarity to signal that the weapon is special.
  • Keep limb multipliers at the vanilla defaults unless the weapon has a specific design reason to deviate. Changing limb multipliers affects the weapon's feel at all ranges and against all entity categories - it is not a fine-tuning tool.
  • Set Player_Damage_Bleeding Always only on weapons that are explicitly designed to cause bleeding as their primary effect. A weapon with both high Player_Damage and automatic bleeding can feel oppressive in PvP.
  • Use Stun_Zombie_Never on weapons that are intended to be non-lethal crowd-control tools, where the player should not be able to stun-lock a zombie.
  • Set BladeIDs only when the weapon is intended to interact with specific resource types. A general-purpose weapon (combat knife, rifle) does not need BladeID filtering.
  • Document the weapon's intended role in the Workshop description so players understand what entity categories the weapon is tuned against.

Frequently asked questions

What is the difference between ItemWeaponAsset and ItemGunAsset?

ItemWeaponAsset is the base class that provides the shared fields documented in this article (Range, durability, damage fields, limb multipliers, status effects, BladeID, Invulnerable). ItemGunAsset is the child class that adds firemode fields, recoil, spread, magazine linkage, ballistic simulation parameters, and attachment slot configuration. A gun .dat uses fields from both classes. This article covers only the ItemWeaponAsset base class fields. The gun-specific fields are documented in Gun Asset Reference.

What is the difference between ItemWeaponAsset and ItemMeleeAsset?

ItemWeaponAsset provides the shared fields. ItemMeleeAsset adds swing action fields (Action_Primary, Action_Secondary), melee-specific strength and stamina fields, two-handed and repair-tool flags, and the melee-specific audio category. The melee-specific fields are documented in Melee Asset.

Can a non-weapon item type use weapon damage fields?

No. The Player_Damage, Zombie_Damage, and related fields are only available on assets that inherit from ItemWeaponAsset. A consumable item (food, medical) or a tool (fishing rod, binoculars) cannot deal damage through these fields. Damage-dealing items that are not guns or melee weapons use different mechanisms (custom scripting, throwable item logic, vehicle collision).

Why does Resource_Damage sometimes not work on a resource?

The most common cause is a BladeID mismatch. If the weapon has BladeIDs set but the resource's BladeID is not in the weapon's list, the weapon's Resource_Damage is not applied. Check both the weapon's BladeID/BladeIDs fields and the resource asset's BladeID. The second most common cause is that the resource asset has Requires_Harvest_Tool set and the weapon is not recognized as a valid harvesting tool.

What happens if I set all damage fields to 0?

The weapon will deal zero damage to every entity category. No error is produced at load time or at runtime. The weapon still swings or fires, animations play, sound effects play, and the round count decrements - but no damage is applied. This is a valid configuration for non-lethal training weapons, quest props, or decoy items.

Can I make a weapon that heals players instead of damaging them?

Not directly through the damage fields. The Player_Damage field only accepts positive values that deal damage to the target. However, the Player_Damage_Food, Player_Damage_Water, Player_Damage_Virus, Player_Damage_Bleeding (with Heal), and Player_Damage_Bones (with Heal) fields can apply beneficial effects. A weapon that heals HP directly requires custom scripting outside the standard .dat system.

Does Range affect the visual bullet travel distance?

No. Range governs the damage falloff endpoint and the projectile expiry distance. The visual bullet trace may extend beyond the Range limit, but the projectile deals no damage past that point. The visual bullet travel is a client-side effect that is not constrained by the Range field.

Can I have Range values below 1.0?

Yes. A melee weapon with Range 0.5 meters is valid but will require the player to be within touching distance to register a hit. A ballistic weapon with Range 1.0 meter will effectively fire a projectile that expires after traveling one meter - the projectile will appear to fire but will not reach any target beyond one meter. There is no practical reason to set Range below 1.0 for a melee weapon or below 10.0 for a ballistic weapon.

Is there a maximum Range value?

There is no hard maximum enforced by the engine, but practical values beyond 2000 meters exceed the playable area of most Unturned maps. Weapons with ranges beyond 500 meters should be tested on the target map to confirm that the map's bounds are large enough to make the range meaningful.

How does Durability interact with the Repair blueprint system?

When Durability is set to a value below 1.0, the weapon can be repaired using a repair blueprint that consumes materials (typically metal scrap and a blowtorch). The repair blueprint restores the weapon's durability to its maximum value. Weapons with Durability 0 or Wear 0 that never degrade do not need repair. The repair blueprint is authored in the weapon's .dat file under the Blueprints section, not in the ItemWeaponAsset fields.

Why does my custom weapon have different damage against zombies than expected?

Check the Zombie_Leg_Multiplier, Zombie_Arm_Multiplier, Zombie_Spine_Multiplier, and Zombie_Skull_Multiplier fields. A zombie hit in the leg deals only 30% of the base Zombie_Damage. If the base field is set to an apparently sufficient value (e.g., 50) but the hit location is a leg, the actual damage is 50 × 0.3 = 15 HP. This is typically insufficient to kill a standard zombie in one hit.

What does Object_Damage apply to?

Object_Damage applies to world objects that are not resource nodes, barricades, structures, or vehicles. Examples include breakable windows, street lamps, furniture, and other decorative-level world entities. When Object_Damage is not explicitly set, it defaults to the value of Resource_Damage. This means a weapon with high Resource_Damage (a harvesting axe) also deals high damage to world objects unless Object_Damage is explicitly lowered.

Are explosive weapons affected by the Invulnerable flag?

No. Explosive weapons always ignore the invulnerable tag, regardless of whether the Invulnerable flag is set in the .dat. This is hardcoded engine behavior. If a weapon is an explosive type and the intent is that it should be able to break invulnerable objects, no action is needed - it already can.

Can I have different limb multipliers for the primary and secondary attack on a melee weapon?

No. Limb multipliers are per-weapon, not per-action. A melee weapon with Action_Primary Slash and Action_Secondary Stab uses the same Player_Leg_Multiplier, Zombie_Skull_Multiplier, and all other limb multiplier fields for both actions. The only difference between the two actions is the hit-cast shape and animation, not the damage multiplier.

Diagnostic table

SymptomMost likely causeResolution
Weapon deals zero damage to playersPlayer_Damage is 0 or not setSet a positive value (minimum 1.0)
Weapon deals zero damage to zombiesZombie_Damage is 0 or not setSet a positive value
Weapon deals zero damage to structuresStructure_Damage is 0 or not setSet a positive value
Weapon deals zero damage to resource nodesResource_Damage is 0 or BladeID mismatchSet Resource_Damage; check BladeIDs
Weapon deals unexpectedly low damage to zombie legsZombie_Leg_Multiplier at 0.3 defaultThis is expected behavior - leg hits are intentionally weak
Weapon never degradesWear is 0 or Durability is 0.0Set Wear 1 or higher, or set Durability 1.0
Weapon has no flesh impact effectsAllow_Flesh_Fx set to falseSet Allow_Flesh_Fx True
Weapon can damage any invulnerable object unintentionallyWeapon is explosive typeExplosive weapons always ignore invulnerability - add a non-explosive variant
Weapon damages players in safe zonesBypass_Allowed_To_Damage_Player set to trueRemove the field or set to false
Weapon never causes bleedingPlayer_Damage_Bleeding is Never or Default with low damageSet to Always to force bleeding on every hit
Weapon heals target's bonesPlayer_Damage_Bones is HealChange to None or remove the field

Appendix A: Weapon asset field quick-reference card

CategoryFieldTypeDefault
CoreAllow_Flesh_Fxbooltrue
CoreDurabilityfloat321.0
CoreRangefloat32Varies by weapon type
CoreWearuint81
Player damagePlayer_Damagefloat32Varies
Player damagePlayer_Leg_Multiplierfloat320.6
Player damagePlayer_Arm_Multiplierfloat320.6
Player damagePlayer_Spine_Multiplierfloat320.8
Player damagePlayer_Skull_Multiplierfloat321.1
Zombie damageZombie_Damagefloat32Varies
Zombie damageZombie_Leg_Multiplierfloat320.3
Zombie damageZombie_Arm_Multiplierfloat320.3
Zombie damageZombie_Spine_Multiplierfloat320.6
Zombie damageZombie_Skull_Multiplierfloat321.1
Animal damageAnimal_Damagefloat32Varies
Animal damageAnimal_Leg_Multiplierfloat320.6
Animal damageAnimal_Spine_Multiplierfloat320.8
Animal damageAnimal_Skull_Multiplierfloat321.1
Construct damageBarricade_Damagefloat320
Construct damageStructure_Damagefloat320
Construct damageVehicle_Damagefloat320
Construct damageResource_Damagefloat320
Construct damageObject_Damagefloat32Same as Resource_Damage
Player statusBypass_Allowed_To_Damage_Playerboolfalse
Player statusPlayer_Damage_BleedingenumDefault
Player statusPlayer_Damage_BonesenumNone
Player statusPlayer_Damage_Foodfloat320
Player statusPlayer_Damage_Waterfloat320
Player statusPlayer_Damage_Virusfloat320
Player statusPlayer_Damage_Hallucinationfloat320
Zombie behaviorStun_Zombie_Alwaysflagnot set
Zombie behaviorStun_Zombie_Neverflagnot set
Zombie behaviorZombie_Ragdoll_Force_Multiplierfloat321.0
BladeIDBladeIDuint8Not set (deprecated)
BladeIDBladeIDsint320
BladeIDBladeID_#uint8Not set
OtherInvulnerableflagnot set

Appendix B: Damage chain resolution flowchart

The flowchart above traces a weapon hit through the full damage resolution chain. Constructs (barricades, structures, vehicles) and objects skip the limb multiplier step because they do not have limb hit locations. Resource nodes pass through a BladeID check before damage is applied.

Appendix C: Weapon asset and child class distinction

FeatureItemWeaponAsset (this article)ItemGunAssetItemMeleeAsset
Range interpretationBase definitionProjectile travel distanceSwing distance
Damage fieldsAll eight fieldsInherited, plus magazine-side modifiersInherited
Limb multipliersPlayer, zombie, animalInherited unchangedInherited unchanged
DurabilityBase behaviorProbabilistic or deterministicDeterministic with Wear
Status effectsBleeding, bones, food, water, virus, hallucinationInheritedInherited
BladeIDAvailableAvailableAvailable
Stun zombie flagsAvailableAvailableAvailable
InvulnerableAvailableAvailableAvailable
FiremodesNot availableFiremodes, Firemode_#, Firerate, ActionNot available
Recoil and spreadNot availableRecoil_*, Spread_*, Shake_*, SwayNot available
Magazine systemNot availableCaliber, Magazine, Magazine_*Not available
Attachment slotsNot availableSight, Hook, Grip, Barrel, TacticalNot available
Action fieldsNot availableNot availableAction_Primary, Action_Secondary
Two-handedNot availableNot availableTwoHanded
Repair toolNot availableNot availableRepairTool

The table above clarifies which fields belong to each class. A modder authoring a gun .dat should read both this article (for the inherited weapon asset fields) and the Gun Asset Reference (for the gun-specific fields). A modder authoring a melee .dat should read this article and the Melee Asset article.

Authoring checklist

Before publishing a weapon mod (gun or melee) to the Steam Workshop, confirm the following:

  • [ ] All eight damage fields are set to explicit values (none left at zero unintentionally).
  • [ ] Range is appropriate for the weapon type (projectile travel for guns, swing reach for melee, blast radius for explosive).
  • [ ] Durability and Wear are configured to the intended degradation model (probabilistic or deterministic).
  • [ ] Allow_Flesh_Fx is set to false only if the weapon intentionally suppresses flesh effects.
  • [ ] Limb multipliers are at vanilla defaults unless the weapon has a specific design reason to deviate.
  • [ ] Player_Damage_Bleeding and Player_Damage_Bones are set to the intended behavior (not accidentally Always when the weapon should not apply status effects).
  • [ ] BladeIDs (if used) include all resource types the weapon should be able to damage.
  • [ ] Bypass_Allowed_To_Damage_Player is not set unless the weapon is an admin tool or intentionally ignores PvE rules.
  • [ ] Stun_Zombie_Always and Stun_Zombie_Never are not both set simultaneously.
  • [ ] The weapon is tested against each entity category (player dummy, zombie, animal, barricade, structure, vehicle, resource node) to confirm damage values match the intended design.
  • [ ] The Range field is tested at multiple distances to confirm damage falloff or swing reach behavior matches the intended engagement range.

Document history

VersionDateAuthorNotes
1.02026-07-2657 StudiosInitial publication. Complete ItemWeaponAsset base class reference covering Range, damage fields, limb multipliers, durability, status effects, BladeID, and the field inheritance chain to Gun and Melee child classes.

Cross-references