Skip to content

ItemAsset — The Root of All Items

ItemAsset is the abstract base class for every item in Unturned. It inherits from Asset and adds fields that every item type shares: inventory size and slot, rarity, useable behavior, item description formatting, the economy Pro flag, the exchangeability system, the stacking system, the model parent attachment system, and the blueprint/crafting interface. Every concrete item class — ItemGunAsset, ItemClothingAsset, ItemMeleeAsset, ItemFoodAsset, and 40+ more — inherits from ItemAsset and its intermediate subclass ItemWeaponAsset.

This article documents the ItemAsset class hierarchy, every shared field with its data type and default, the ItemWeaponAsset intermediate class that adds damage multipliers and range, the ItemDescriptionBuilder system, the EEquipableModelParent enum, the EItemType and EItemRarity enums, the blueprint crafting system via IBlueprintOwner, and the isPro economy flag with its effect on non-Gold players.

Source code location: Unturned/Bundles/ItemAsset.cs, Unturned/Bundles/ItemWeaponAsset.cs

Inheritance Chain

Asset (base)
  └─ ItemAsset
       ├─ ItemWeaponAsset (weapons, tools, melee, guns)
       │    ├─ ItemMeleeAsset
       │    ├─ ItemToolAsset
       │    ├─ ItemGunAsset
       │    ├─ ItemThrowableAsset
       │    └─ ItemChargeAsset
       ├─ ItemClothingAsset (wearable items)
       │    ├─ ItemGearAsset
       │    │    ├─ ItemHatAsset
       │    │    ├─ ItemMaskAsset
       │    │    └─ ItemGlassesAsset
       │    └─ ItemBagAsset
       │         ├─ ItemShirtAsset
       │         ├─ ItemPantsAsset
       │         ├─ ItemVestAsset
       │         └─ ItemBackpackAsset
       ├─ ItemConsumeableAsset (food, water, medical)
       ├─ ItemBarricadeAsset
       ├─ ItemStructureAsset
       ├─ ItemStorageAsset
       ├─ ItemTankAsset
       ├─ ItemGeneratorAsset
       ├─ ItemFarmAsset
       └─ (30+ more direct subclasses)

ItemAsset Shared Fields

ItemAsset is defined in SDG.Unturned and implements ISkinableAsset and IBlueprintOwner. Its fields are populated in PopulateAsset from the .dat file's key-value pairs.

Identity and Classification

FieldType.dat keyDefaultPurpose
_itemNamestringNamenullDisplay name from localization
_itemDescriptionstringDescriptionnullDisplay description (Deprecated, use English.dat)
typeEItemTypeTypeItem classification enum
rarityEItemRarityRarityCOMMONRarity tier for UI color
isProboolProfalseGold/PRO-restricted item
shouldVerifyHashboolfalseWhether to verify asset hash

The Name field in the .dat file (parsed by the base Asset.PopulateAsset) is distinct from _itemName which is parsed here. The FriendlyName property returns _itemName if set, otherwise falls back to name (the base asset name).

Inventory Size

FieldType.dat keyDefaultPurpose
size_xbyteSize_X1Width in inventory grid cells
size_ybyteSize_Y1Height in inventory grid cells
size_zfloatSize_Z0Depth of world collision box when dropped
size2_zfloatSize2_Z0Secondary depth for special collision shapes

Slot and Equipping

FieldType.dat keyDefaultPurpose
slotEItemSlotSlotNONEWhich inventory slot the item occupies
equipableboolEquipabletrueWhether the item can be moved to an equip slot
equipModelParentEEquipableModelParentRightHookWhich bone the equipped model attaches to
equipableMovementSpeedMultiplierfloatEquipable_Movement_Speed_Multiplier1.0Movement speed multiplier while equipped

The EEquipableModelParent enum determines the attachment bone:

ValueBoneItems using this
RightHookRight hand attachment pointMost weapons, tools
LeftHookLeft hand attachment pointTwo-handed weapons, shields
SpineCharacter spine boneBack attachments
SpineHookSpine hook pointBackpacks worn on back

Interaction

FieldType.dat keyDefaultPurpose
shouldDeleteAtZeroQualityboolShould_Delete_At_ZerotrueDestroy item when durability reaches zero
shouldDropOnDeathboolShould_Drop_On_DeathtrueDrop item on player death
isEligibleForPoolSwapMultiplierfloatdependentLoot pool weight multiplier
shouldDeleteWhenEmptyboolfalseDelete when last unit is used

Exchangeability

The exchange system controls whether items can be traded in the economy UI:

FieldType.dat keyDefaultPurpose
exchangeboolExchangefalseWhether the item can be exchanged
exchangeableItemIDGuidemptyGUID of item received when exchanging
exchangeableItemLegacyIDushort0Legacy ID fallback for exchange
exchangeableCountbyte1Number of units received on exchange
exchangeableMultiplierfloat1.0Multiplier on receive count

Tooltip and Description

FieldType.dat keyDefaultPurpose
shouldUseInspectQueryboolfalseShow inspect prompt in tooltip
inspectQueryKeystringnullKey binding for inspect action
shouldUseFriendlyQueryboolfalseShow friendly action query
friendlyQueryKeystringnullKey binding for friendly action

Item Description Builder

ItemAsset provides the BuildDescription virtual method that subclasses override to add type-specific information lines. The builder uses ItemDescriptionBuilder with a flag-based content selection system:

csharp
[Flags]
public enum EItemDescriptionFlags
{
    LegacyContent = 0,        // No auto-descriptions (for IMGUI)
    GunAttachments = 1 << 0,  // List gun's attachments
    Uncategorized = 1 << 1,   // All other additional info
    All = GunAttachments | Uncategorized,
}

Each description line has a sortOrder that controls grouping. Lines with the same sort order are grouped together without blank lines. Lines with sort order differences greater than 100 are separated by blank lines.

The sort order constants in the class hierarchy:

DescSort_Important             = -200
DescSort_ClothingStat          = -300
DescSort_Weapon_Explosive_RangeAndDamage = -400
DescSort_LowerIsBeneficial(x) / DescSort_HigherIsBeneficial(x)

ISkinableAsset

The ISkinableAsset interface provides texture access for the economy skin system:

csharp
public interface ISkinableAsset
{
    Texture albedoBase { get; }
    Texture metallicBase { get; }
    Texture emissionBase { get; }
}

Items that support skins expose their base textures through this interface. The skin system swaps these textures at runtime when an economy skin is applied.

IBlueprintOwner — Crafting

csharp
public interface IBlueprintOwner
{
    ushort id { get; }
    ushort GetBlueprintCount();
    Blueprint GetBlueprint(ushort index);
    EItemType type { get; }
    EItemRarity rarity { get; }
}

The blueprint system allows items to define crafting recipes that produce them. The GetBlueprintCount and GetBlueprint methods are populated from item asset blueprints defined in the .dat file. Blueprints specify:

  • Required ingredients (items and quantities)
  • Produced output count
  • Tool requirements
  • Crafting permissions (at a station vs. anywhere)

ItemWeaponAsset — The Weapon Intermediate

ItemWeaponAsset inherits from ItemAsset and adds fields common to all weapons — damage multipliers per target category, range, durability, wear, and blade IDs.

Damage Fields

ItemWeaponAsset introduces structured damage multipliers rather than flat damage values. The PlayerDamageMultiplier struct holds:

Field.dat keyTypeDefaultPurpose
damagePlayer_Damagefloat0Base damage to players
multiplerfloat1Global damage multiplier
timesfloat0Times-based damage (legacy)

The same pattern is used for ZombieDamageMultiplier and AnimalDamageMultiplier. Each provides a damage field mapped to .dat keys Zombie_Damage and Animal_Damage respectively.

Target Category Damage

Field.dat keyTypeDefaultPurpose
barricadeDamageBarricade_Damagefloat0Damage to barricades
structureDamageStructure_Damagefloat0Damage to structures
vehicleDamageVehicle_Damagefloat0Damage to vehicles
resourceDamageResource_Damagefloat0Damage to resource nodes
objectDamageObject_Damagefloat0Damage to world objects

Range and Durability

Field.dat keyTypeDefaultPurpose
rangeRangefloat0Maximum engagement distance
durabilityDurabilityfloat0Starting durability
wearWearbyte1Durability lost per use
isInvulnerableboolfalseCannot be damaged

Player Damage Parameters

The weapon system supports modifying player stats on hit beyond raw damage:

Field.dat keyPurpose
playerDamageBleedingBleeding modifier
playerDamageBonesBone break modifier
playerDamageFoodFood value change
playerDamageWaterWater value change
playerDamageVirusVirus value change
playerDamageHallucinationHallucination value change

These are set via initPlayerDamageParameters(ref DamagePlayerParameters) which populates a DamagePlayerParameters struct used by the damage system at runtime.

Blade IDs

Weapons carry bladeIDs — a byte array that controls what surface types the weapon can damage. The first blade ID defaults to 0 and allows damaging trees and objects by default (issue #3357). The hasBladeID(byte) method checks membership.

Damage Multiplier Resolution

The weapon asset provides two convenience properties that resolve which damage multiplier to use based on game mode config:

csharp
public IDamageMultiplier animalOrPlayerDamageMultiplier
{
    get
    {
        bool usePlayerDmg = Provider.modeConfigData.Animals.Weapons_Use_Player_Damage;
        return usePlayerDmg ? playerDamageMultiplier : animalDamageMultiplier;
    }
}

The same pattern applies to zombieOrPlayerDamageMultiplier. When the game mode config says animals use player damage values, the weapon's player damage multiplier is used for animal targets as well.

EItemType Enum

csharp
public enum EItemType
{
    HAT, PANTS, SHIRT, BACKPACK, VEST, MASK, GLASSES,
    GUN, SIGHT, TACTICAL, GRIP, BARREL, MAGAZINE,
    FOOD, WATER, MEDICAL, MELEE, FUEL, TOOL,
    BARRICADE, STORAGE, TANK, GENERATOR, BEACON, FARM,
    TRAP, STRUCTURE, SUPPLY, THROWABLE, GROWER, OPTIC,
    REFILL, FISHER, CLOUD, MAP, KEY, BOX,
    ARREST_START, ARREST_END, DETONATOR, CHARGE, LIBRARY,
    FILTER, SENTRY, TIRE, OIL_PUMP,
    VEHICLE_REPAIR_TOOL, VEHICLE_PAINT_TOOL, VEHICLE_LOCKPICK_TOOL,
}

Each value maps to a specific Item*Asset subclass via the UnturnedNexus.initialize() registration.

EItemRarity Enum

csharp
public enum EItemRarity
{
    COMMON, UNCOMMON, RARE, EPIC, LEGENDARY, MYTHICAL
}

Rarity controls the inventory UI color and is used by the spawn table system for weight tier conventions. It is purely cosmetic at the engine level — the .dat parser reads it as a string and converts to enum.

Economy and Pro System

The isPro flag gates items behind the Unturned Gold (PRO) upgrade:

csharp
if (isPro)
{
    _armor = 1f;  // Pro clothing items cannot have armor
    _explosionArmor = 1f;
    fallingDamageMultiplier = 1.0f;
}

PRO items cannot provide gameplay advantages — their armor and protection values are forced to neutral defaults. This is enforced in the PopulateAsset overrides of ItemClothingAsset and ItemBagAsset.

PopulateAsset Call Chain

The complete PopulateAsset call chain for weapon items demonstrates how each level reads its own fields:

Asset.PopulateAsset
  ├─ Read name from bundle
  ├─ Read Ignore_NPOT, Ignore_TexRW
  └─ Read originMasterBundle

ItemAsset.PopulateAsset
  ├─ Read Size_X, Size_Y, Size_Z, Size2_Z
  ├─ Read Slot, Equipable, Pro
  ├─ Read Should_Drop_On_Death
  ├─ Read Exchange fields
  ├─ Read blueprints
  └─ Read description flags

ItemWeaponAsset.PopulateAsset
  ├─ Read Range
  ├─ Read Player_Damage, Zombie_Damage, Animal_Damage
  ├─ Read Barricade_Damage through Object_Damage
  ├─ Read Durability, Wear
  ├─ Read blade IDs
  └─ Read player damage parameters (bleeding, bones, food, water, etc.)

Items as Data Configuration

Every field in ItemAsset and ItemWeaponAsset is read from the .dat file's key-value pairs. The entire item system is data-driven — none of these fields are hard-coded. Mod authors create items by authoring .dat files and Unity bundles, not by modifying C# source code. The inheritance chain maps directly to field availability: ItemWeaponAsset fields are available to gun, melee, throwable, and charge assets but not to clothing or consumable assets.

Blueprint (Crafting) System

Items that are craftable define one or more Blueprint instances through the IBlueprintOwner interface:

csharp
public interface IBlueprintOwner
{
    ushort id { get; }
    ushort GetBlueprintCount();
    Blueprint GetBlueprint(ushort index);
    EItemType type { get; }
    EItemRarity rarity { get; }
}

Blueprints are parsed from the .dat file in ItemAsset.PopulateAsset. Each blueprint defines:

  • Ingredient items (ID + quantity)
  • Tool requirements
  • Output count (how many of the item are produced per craft)
  • Crafting permissions (workbench required, campfire required, etc.)

The blueprint fields in .dat use enumerated keys:

Blueprint_0_Ingredient_ID 101
Blueprint_0_Ingredient_Amount 2
Blueprint_0_Tool_ID 102
Blueprint_0_Output 1

Each item can have multiple blueprints, indexed by position (Blueprint_0_..., Blueprint_1_..., etc.). The GetBlueprintCount method returns the count of parsed blueprints.

Item Description Building System

The BuildDescription virtual method on ItemAsset provides the item's stat lines for the inventory tooltip. It uses the ItemDescriptionBuilder struct:

csharp
public virtual void BuildDescription(ItemDescriptionBuilder builder, Item itemInstance)

The builder uses sorted lines with group spacing. Lines with sort order differences > 100 are separated by blank lines. The constants for priority are:

DescSort_Important       = -200  (Storage dimensions, ammo count)
DescSort_ClothingStat    = -300  (Armor, explosion armor, movement speed)
DescSort_Beneficial      = (used for positive stat color)
DescSort_LowerIsBeneficial(0.8f)  = -301 (lower armor is better)
DescSort_HigherIsBeneficial(1.2f) = -302 (higher movement speed is better)

Subclasses override BuildDescription to add their type-specific lines. ItemWeaponAsset adds damage stats, ItemGunAsset adds fire rate/caliber, ItemClothingAsset adds armor/proof flags. The EItemDescriptionFlags enum controls which auto-generated content appears:

FlagContent added
GunAttachmentsList of equipped attachments
UncategorizedArmor values, proof flags, movement speed, damage stats
AllAll of the above
LegacyContentNone (IMGUI fallback)

The flag selection is determined by the Use_Auto_Stat_Descriptions field in the .dat file. When true, the builder includes All flags for the Glazier UI, or LegacyContent for IMGUI.

Server-Side Asset Mapping

When connecting to a server, Assets.ApplyServerAssetMapping constructs a new currentAssetMapping that reflects the server's asset set:

csharp
internal static void ApplyServerAssetMapping(
    LevelInfo pendingLevel,
    List<Steamworks.PublishedFileId_t> serverWorkshopFileIds)
{
    currentAssetMapping = new AssetMapping();
    // Add origins in order: core → level → server workshop → remaining
}

The mapping order is critical for ID resolution: if multiple origins define the same legacy ID, the last-added origin wins. The resolution order is:

  1. Core origin — Always first (base game assets)
  2. Level origin — Map-specific assets (if loading a specific map)
  3. Server workshop file IDs — In order of the server's workshop list
  4. All remaining origins — On dedicated server, remaining origins are inserted at front

On dedicated servers, the remaining origins are inserted before level and workshop origins to reduce ID conflict chances, since the client won't have those assets and the difference must be minimized.

isPro Economy Enforcement

The isPro flag has different enforcement behavior depending on the asset type:

Asset typePRO behavior
ItemClothingAssetArmor forced to 1.0, explosion armor forced to 1.0, falling damage multiplier forced to 1.0
ItemBagAssetWidth and height forced to 0 (no storage)
ItemAsset (base)Non-Gold players cannot equip PRO items
WeaponsPRO weapons have no gameplay restrictions (visual only)

The enforcement is done in each subclass's PopulateAsset override, not in the base class. This is intentional — different item types restrict different fields for PRO items.

Equipable Model Parent System

The EEquipableModelParent enum determines which character bone the equipped model is attached to:

ValueBone transformItems using this
RightHookCharacter_RightHand (or similar)Most one-handed weapons and tools
LeftHookCharacter_LeftHandTwo-handed weapons, shields
SpineCharacter_SpineBack-slot items
SpineHookCustom spine hook pointBackpacks worn on back, visible in third person

The attachment is handled in the character rendering system, not in ItemAsset. When the character equips an item, the useable script reads the model parent and parents the prefab to the corresponding bone. The bone hierarchy is defined in the character skeleton FBX asset.

Appendix A: Item Description Sort Order Constants

ConstantValueUsed by
DescSort_Important-200Storage dimensions, ammo capacity
DescSort_ClothingStat-300Armor, proof flags, movement speed
DescSort_Weapon_Explosive_RangeAndDamage-400Explosive weapon stats
DescSort_LowerIsBeneficial(float)-300 + (1.0 - value) * 100Armor, spread
DescSort_HigherIsBeneficial(float)-300 + (value - 1.0) * 100Movement speed, fire rate
DescSort_Beneficial-310Binary beneficial stat (proof flag)

Appendix B: ItemAsset Field Default Value Reference

FieldTypeDefaultBehavior when absent
size_xbyte1Default value used
size_ybyte1Default value used
size_zfloat0Mesh bounds used
slotEItemSlotNONEItem not equippable
rarityEItemRarityCOMMONWhite name color
isProboolfalseNo Gold restriction
equipablebooltrueCan be equipped to slot
shouldDeleteAtZeroQualitybooltrueItem destroyed at 0 durability
shouldDropOnDeathbooltrueItem drops on death
exchangeboolfalseNot exchangeable

Appendix C: ItemWeaponAsset Damage Field Defaults

Field.dat keyTypeDefault
playerDamageMultiplier.damagePlayer_Damagefloat0
zombieDamageMultiplier.damageZombie_Damagefloat0
animalDamageMultiplier.damageAnimal_Damagefloat0
barricadeDamageBarricade_Damagefloat0
structureDamageStructure_Damagefloat0
vehicleDamageVehicle_Damagefloat0
resourceDamageResource_Damagefloat0
objectDamageObject_Damagefloat0
rangeRangefloat0
durabilityDurabilityfloat0
wearWearbyte1

Items as Data Configuration

Every field in ItemAsset and ItemWeaponAsset is read from the .dat file's key-value pairs. The entire item system is data-driven — none of these fields are hard-coded. Mod authors create items by authoring .dat files and Unity bundles, not by modifying C# source code. The inheritance chain maps directly to field availability: ItemWeaponAsset fields are available to gun, melee, throwable, and charge assets but not to clothing or consumable assets.

Item Stacking Behavior

Items with the same id can stack in a single inventory cell. Stacking behavior is controlled by the item's shouldDeleteWhenEmpty flag and the inventory system's logic. When a player picks up an item that already exists in their inventory the system attempts to stack:

Pick up item with ID X
  → Check if inventory already has item with ID X
  → If yes and item is stackable:
      → Add to existing stack count
      → If stack at max, create new stack in next available slot
  → If no:
      → Create new item instance in inventory slot

The maximum stack size is not defined in ItemAsset — it is controlled by the inventory system (typically 255 units, matching the uint8 quantity type).

Item Model Prefab Requirements

Each item's visual appearance is defined by a Unity prefab in the item's master bundle. The prefab is loaded by name matching:

csharp
// In ItemGunAsset or ItemClothingAsset subclass:
GameObject prefab = loadRequiredAsset<GameObject>(p.bundle, "Hat");

The prefab name varies by item type:

Item typePrefab asset key
Gun"Barrel", "Grip", "Sight", "Tactical", "Magazine", "Eject" (children)
Hat"Hat"
Mask"Mask"
Glasses"Glasses"
Vest"Vest"
Backpack"Backpack"
Shirt"Shirt" (Texture2D, not GameObject)
Pants"Pants" (Texture2D, not GameObject)
MeleePrefab at root "<item_name>"
Food/MedicalPrefab at root "<item_name>"

The loadRequiredAsset<T> method attempts to load the asset from the bundle and reports an error if it is missing:

csharp
protected T loadRequiredAsset<T>(Bundle fromBundle, string name) where T : UnityEngine.Object
{
    T asset = fromBundle.load<T>(name);
    if (asset == null)
    {
        Assets.ReportError(this, $"missing \"{name}\" {typeof(T).Name}");
    }
    return asset;
}

Items that load GameObjects pass them through AssetValidation.searchGameObjectForErrors when validation is enabled.

Item Audio System

Items define audio behavior through the AudioReference struct and their subclass-specific audio fields:

csharp
public struct AudioReference
{
    public string name;  // Master bundle name
    public string path;  // Asset path within bundle
}

The GetDefaultInventoryAudio method on ItemAsset is overridden by subclasses to provide slot-appropriate inventory sounds:

SubclassDefault inventory audio
ItemClothingAssetLightCloth.asset (small) or MediumClothEquipment.asset (large/rare)
ItemBagAssetLightMetalEquipment.asset (small) or HeavyMetalEquipment.asset (large)

Gun assets define Shoot, Reload, Hammer, Aim, and Minigun audio clips through named references in the prefab. Melee assets define Attack and Hit audio categories via .dat field names.

ItemDescription Building for Subclass Lines

The BuildDescription method is extended by each subclass to add relevant stat lines:

ItemWeaponAsset:      Player_Damage, Zombie_Damage, Range, Durability
ItemGunAsset:         Firerate, Caliber, Magazine capacity, Attachment info
ItemMeleeAsset:       Damage_Player, Damage_Zombie, Durability
ItemClothingAsset:    Armor, Explosion_Armor, Movement_Speed, Proof flags
ItemConsumeableAsset: Food, Water, Health, Virus restore values

Each line has a sortOrder that determines its position in the description. Lines with sort order differences > 100 are separated by blank lines for visual grouping.

Appendix D: ItemAsset Subclass and Field Availability Matrix

FieldItemAssetItemWeaponAssetItemClothingAssetItemConsumeableAsset
ID
GUID
Type
Rarity
Slot
Size_X/Y
Player_Damage
Zombie_Damage
Durability
Armor
Movement_Speed
Food/Water

Appendix E: PopulateAsset Field Read Order

ItemAsset reads:
  Size_X, Size_Y, Size_Z, Size2_Z
  Slot, Equipable, Pro
  Should_Drop_On_Death
  Exchange fields
  Blueprints (0..N)
  Rarity
  Equipable_Movement_Speed_Multiplier
  Should_Delete_At_Zero
  Bypass_ID_Limit
  Use_Auto_Stat_Descriptions

ItemWeaponAsset reads:
  Range
  Player_Damage, Zombie_Damage, Animal_Damage
  Barricade_Damage, Structure_Damage, Vehicle_Damage
  Resource_Damage, Object_Damage
  Durability, Wear
  Invulnerable_Quality
  blade IDs
  Player damage parameters (bleeding, bones, food, water, etc.)

Item State Management

Items can carry runtime state via the getState / setState virtual methods:

csharp
public virtual byte[] getState(EItemOrigin origin)
{
    return new byte[0];
}

The state array is used by items that need to track per-instance data:

  • Clothing items with NVG track their active/inactive state (1 byte)
  • Gun magazines track their current ammo count
  • Durability-based items track their current condition

The EItemOrigin parameter indicates whether the item was found in the world (EItemOrigin.WORLD) or crafted (EItemOrigin.CRAFT). Some items vary their starting state based on origin.

Appendix F: ItemEItemType Enum Complete Listing

Enum valueAssociated class.dat Type string
HATItemHatAssetHat
PANTSItemPantsAssetPants
SHIRTItemShirtAssetShirt
BACKPACKItemBackpackAssetBackpack
VESTItemVestAssetVest
MASKItemMaskAssetMask
GLASSESItemGlassesAssetGlasses
GUNItemGunAssetGun
SIGHTItemSightAssetSight
TACTICALItemTacticalAssetTactical
GRIPItemGripAssetGrip
BARRELItemBarrelAssetBarrel
MAGAZINEItemMagazineAssetMagazine
FOODItemFoodAssetFood
WATERItemWaterAssetWater
MEDICALItemMedicalAssetMedical
MELEEItemMeleeAssetMelee
FUELItemFuelAssetFuel
TOOLItemToolAssetTool

Document history

VersionDateAuthorNotes
1.02026-07-2757 StudiosInitial publication. ItemAsset shared fields, ItemWeaponAsset damage multipliers, rarity, slot, blueprint system.