Skip to content

ItemBackpackAsset — Backpack Clothing Definition

Overview

ItemBackpackAsset defines a wearable backpack item in Unturned. It inherits from ItemBagAsset (storage dimensions), which inherits from ItemClothingAsset (armor, proof system, movement speed), which inherits from ItemAsset. Backpacks are primarily storage items: they provide inventory expansion through the Width/Height storage dimensions from ItemBagAsset.

Backpacks occupy the EItemType.BACKPACK slot. They are not eligible for armor damage reduction — like masks and glasses, the BuildDescription armor section only shows for HAT, SHIRT, PANTS, and VEST. Backpacks share the zipper wear audio with vests but override the inventory audio to use metal equipment sounds that scale with storage size.

Source code location: Unturned/Bundles/ItemBackpackAsset.cs (49 lines), inheriting from ItemBagAsset.cs (52 lines), ItemClothingAsset.cs (304 lines), and ItemAsset.cs (base).

Inheritance Chain

ItemAsset
  └─ ItemClothingAsset (abstract) — armor (not applied to BACKPACK), proof, movement speed, visuals
       └─ ItemBagAsset (abstract) — storage dimensions (Width, Height)
            └─ ItemBackpackAsset — backpack prefab, metal inventory audio

Class Definition

csharp
public class ItemBackpackAsset : ItemBagAsset
{
    protected GameObject _backpack;
    public GameObject backpack => _backpack;

    public override void PopulateAsset(in PopulateAssetParameters p) { ... }

    protected override AudioReference GetDefaultInventoryAudio() { ... }

    internal override GameObject ClothingPrefab => backpack;
}

Backpack Prefab Loading

csharp
if (!Dedicator.IsDedicatedServer)
{
    _backpack = loadRequiredAsset<GameObject>(p.bundle, "Backpack");

    if (Assets.shouldValidateAssets)
    {
        AssetValidation.ValidateLayersEqual(this, _backpack, LayerMasks.ENEMY);
        AssetValidation.ValidateClothComponents(this, _backpack);
    }
}
AspectDetail
Load key"Backpack" GameObject from master bundle
RequiredYes — loadRequiredAsset
Server skipDedicated server skips prefab
Layer validationENEMY layer check
Cloth validationCloth component warnings

The ClothingPrefab override:

csharp
internal override GameObject ClothingPrefab => backpack;

Armor — Not Applied to Backpacks

Backpacks are excluded from the armor system:

csharp
if (type == EItemType.HAT || type == EItemType.SHIRT || type == EItemType.PANTS || type == EItemType.VEST)

The BACKPACK slot type is not in the eligibility list. Even if a backpack .dat sets Armor 0.5, the value is parsed and stored but never reduces damage and never appears in the inventory tooltip.


Storage Dimensions (Inherited from ItemBagAsset)

Backpacks are the primary storage-expansion clothing item. The storage system from ItemBagAsset provides:

.dat KeyTypeDefaultBackpack typical range
Widthbyte04–6
Heightbyte03–5

PRO backpacks have storage forced to 0. Storage display:

csharp
if (width > 0 && height > 0)
{
    builder.Append(localization.format("ItemDescription_StorageDimensions", width, height), DescSort_Important);
}

Backpack Storage Tiers

TierDimensionsSlotsTypical Name
Small4×312Daypack, Schoolbag
Medium5×420Travelpack, Hiking Bag
Large6×530Alicepack, Military Rucksack
Extra Large7×642(modded, rare)

Inventory Audio — Metal Equipment System

Backpacks override GetDefaultInventoryAudio with a unique metal-based audio scaling system:

csharp
protected override AudioReference GetDefaultInventoryAudio()
{
    if (width <= 3 || height <= 3)
    {
        return new AudioReference("core.masterbundle", "Sounds/Inventory/LightMetalEquipment.asset");
    }
    else if (width <= 6 || height <= 6)
    {
        return new AudioReference("core.masterbundle", "Sounds/Inventory/MediumMetalEquipment.asset");
    }
    else
    {
        return new AudioReference("core.masterbundle", "Sounds/Inventory/HeavyMetalEquipment.asset");
    }
}
Storage sizeAudioSound character
Width ≤ 3 OR Height ≤ 3LightMetalEquipment.assetSmall metallic clink
Width ≤ 6 OR Height ≤ 6MediumMetalEquipment.assetMedium metallic thud
LargerHeavyMetalEquipment.assetHeavy metallic clank

Note: the condition uses || (OR), not && (AND). If either dimension is small (≤3), light audio is used. This means a 6×1 backpack (long and thin) would use light audio, while a 4×4 backpack (square) would use medium.

This is in contrast to the base ItemClothingAsset.GetDefaultInventoryAudio which uses cloth-based sounds:

  • Light cloth for ≤1 in either dimension
  • Light cloth equipment for common/uncommon rarity
  • Medium cloth equipment for rare+

The backpack override replaces cloth with metal because backpacks are typically made of tougher materials and contain metal zippers, buckles, and frames.


Inherited Behavior: ItemClothingAsset

Wear Audio — Zipper

Backpacks default to the zipper sound (shared with vests):

csharp
if (type == EItemType.BACKPACK || type == EItemType.VEST)
{
    wearAudio = new AudioReference("core.masterbundle", "Sounds/Zipper.mp3");
}

Proof System

Backpacks can carry proof flags though this is less common. A backpack with Proof_Water might represent a waterproof dry-bag, and with Proof_Fire might represent a fireproof container.

Movement Speed

Movement speed modifiers apply to backpacks. Larger/heavier backpacks typically have a penalty (e.g., Movement_Speed_Multiplier 0.90 for a heavy rucksack).

Cosmetic Priority

Backpacks use the default cosmetic priority (GetDefaultTakesPriorityOverCosmetic returns false).


PRO vs Non-PRO Behavior

FeatureNon-PRO BackpackPRO Backpack
Storage dimensionsParsed from .datForced to 0 (no storage)
Prefab loadingNormalNormal + CosmeticPreviewOverride
Proof flagsParsedParsed
Movement speedParsedParsed

PRO backpacks are visual-only. They appear on the character but provide zero storage — a critical distinction for gameplay items.


PopulateAsset Call Chain

ItemAsset.PopulateAsset
  └─ ItemClothingAsset.PopulateAsset  — armor (stored, not applied), proof, movement, visuals, wear audio (zipper)
       └─ ItemBagAsset.PopulateAsset  — Width, Height
            └─ ItemBackpackAsset.PopulateAsset
                 ├─ Load "Backpack" prefab (client only)
                 └─ Layer + cloth validation (if validateAssets)

BuildCargoData — Wiki Export

Backpacks contribute to two Cargo tables:

Clothing table (from ItemClothingAsset)

Standard columns. Armor values are stored but not applied at runtime.

Bag table (from ItemBagAsset)

ColumnSource
GUIDPK, FK to Clothing
Width_width
Height_height

.dat File Reference — Backpack-Specific

.dat KeyTypeDefaultCategory
Widthbyte0Storage columns
Heightbyte0Storage rows
Armorfloat1.0Stored but NOT applied
Falling_Damage_Multiplierfloat1.0Fall damage
Proof_WaterflagWater breathing
Proof_FireflagFire immunity
Proof_RadiationflagRadiation immunity
Movement_Speed_Multiplierfloat1.0Movement speed
Hair_VisiblebooltrueHair visibility
Beard_VisiblebooltrueBeard visibility
Visible_On_RagdollbooltrueVisible on death
Mirror_Left_Handed_ModelbooltrueMirror model
WearAudioAudioReferenceSounds/Zipper.mp3Equip sound (zipper default)
Destroy_Clothing_CollidersbooltrueRemove colliders

Master Bundle Asset Requirements

Bundle KeyTypeRequiredPurpose
"Backpack"GameObjectRequired3D backpack prefab with SkinnedMeshRenderer
"CosmeticPreviewOverride"GameObjectOptional (PRO)PRO cosmetic preview

Modding Example — Small Daypack .dat

ini
GUID a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6
Type Backpack
Rarity Common
Size_X 3
Size_Y 2
Width 4
Height 3
Armor 1.0

Creates a basic daypack with:

  • 4×3 storage (12 slots) — LightMetalEquipment audio
  • No movement penalty
  • Common rarity

Modding Example — Military Alicepack .dat

ini
GUID f1e2d3c4b5a69788796a5b4c3d2e1f0a
Type Backpack
Rarity Rare
Size_X 4
Size_Y 3
Width 6
Height 5
Movement_Speed_Multiplier 0.90

Creates a large military rucksack with:

  • 6×5 storage (30 slots) — MediumMetalEquipment audio
  • 10% movement speed penalty
  • Rare rarity

Modding Example — Heavy Industrial Pack .dat

ini
GUID d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9
Type Backpack
Rarity Epic
Size_X 4
Size_Y 4
Width 7
Height 6
Movement_Speed_Multiplier 0.80

Creates a massive industrial backpack with:

  • 7×6 storage (42 slots) — HeavyMetalEquipment audio
  • 20% movement speed penalty
  • Epic rarity

Comparison: Backpack vs Vest (Similar but Distinct)

FeatureItemBackpackAssetItemVestAsset
Armor eligibilityNoYes
Slot typeBACKPACKVEST
Wear audioZipperZipper
Inventory audioMetal (custom override)Cloth (from ItemClothingAsset)
Fallback shirtNoYes
Typical storage4×3 to 7×62×2 to 3×2
Prefab key"Backpack""Vest"

Common Issues

  1. Backpack storage not showing: Both Width and Height must be greater than 0 for storage to display. A Width 4 with Height 0 shows no storage line in the tooltip and provides no inventory expansion.

  2. Metal audio not playing: The GetDefaultInventoryAudio override uses storage dimensions to determine audio tier. If the backpack has unusual dimensions (e.g., 1×10), the width <= 3 check triggers the light audio regardless of total capacity.

  3. PRO backpack has no storage: PRO backpacks force Width and Height to 0. They are purely cosmetic — provide no inventory expansion.

  4. Armor not reducing damage: Backpacks are excluded from the armor system. The Armor field is stored in the data but never applied. Use movement speed penalty and larger storage as the tradeoff for backpacks.

  5. Prefab not found: The key must be exactly "Backpack" (capital B, case-sensitive). This is distinct from "Bag" which is the C# class name — the bundle key is "Backpack".

Document history

VersionDateAuthorNotes
1.02026-07-2857 StudiosInitial publication. Full backpack asset documentation including metal inventory audio scaling, armor exclusion, and modding examples.