Enumerated Types Reference
Enumerated types (enums) are the named-value sets that constrain configuration fields in Unturned™ .dat and .asset files to a specific vocabulary of valid strings. When a mod developer writes Type Melee in a .dat file, the parser reads the string Melee, matches it against the named values of the EItemType enum, and assigns the corresponding integer value (16) to the asset's type field. The enum system is the mechanism by which Unturned™ maps human-readable configuration strings to the integer codes that the engine uses internally.
This article is the third in the data-types section of the 57 Studios™ Modding Knowledge Base. It documents all 23 enumerated types defined in the Smartly Dressed Games modding documentation Chapter 139, including every named value, its integer index (if indexed), its description, and its usage context in .dat and .asset files. For the three most important enums in item modding (EItemType, EItemRarity, and ESlotType), the article provides worked examples drawn from the shipped vanilla asset set. The companion articles in this section cover the C# built-in types (the underlying integer type that stores enum values) and the GUID type (the 128-bit identifier that enum-typed assets carry alongside their enum-defined type and rarity).

Documentation source: This article references the official Smartly Dressed Games modding documentation Chapter 139 ("Enumerated Types") for all 23 enum type definitions, named values, integer indices, and descriptions. Enum usage patterns are validated against the shipped Unturned™ asset set at
C:\Program Files (x86)\Steam\steamapps\common\Unturned\Bundles\Items\Guns\*\*.dat,Items\Melee\*\*.dat, and*\*.asset.
Who this article is for
This article is written for Unturned™ mod authors who need a definitive lookup table for the enum values that appear in .dat and .asset files. New mod developers should read the first three enums (EItemType, EItemRarity, ESlotType) in detail before authoring any .dat file. Experienced mod developers should bookmark the quick-reference table in Appendix A for fast lookup during authoring sessions.
What you'll learn
- The complete catalog of all 23 Unturned™ enumerated types with every named value and its integer index
- How enum values appear in
.datfiles (string form, case-sensitive, PascalCase) - The difference between indexed enums (where the integer index matters) and non-indexed enums (where only the name matters)
- The default value for every enum and what happens when an unrecognized string is supplied
- Detailed coverage of the three most important enums for item modding:
EItemType(49 item types),EItemRarity(6 rarity tiers), andESlotType(5 equipment slots) - Worked examples from shipped
.datand.assetfiles showing enum values in real configuration context - The relationship between enum values and asset behavior (how
Type Meleeactivates the melee system versusType Gunactivating the firearm system)
Background: how enum types work in Unturned
In the C# type system, an enumerated type (declared with the enum keyword) is a value type that defines a set of named constants. Each named constant is assigned an underlying integer value. The C# compiler maps the name to the integer at compile time; at runtime, the integer is the stored value, and the name is a display convenience.
In Unturned™ configuration files, enum values are serialized as their named strings, not as their integer indices. The parser reads the string, performs a case-sensitive match against the enum's named values, and stores the corresponding integer. This design decision has two important consequences for mod developers:
- The string form is the authoring interface. Mod developers write
Type Melee, notType 16. The string is human-readable and self-documenting. - The string match is case-sensitive. Writing
Type melee(lowercase) does not match the named valueMelee(PascalCase). The parser fails to match and assigns the enum's default value , typicallyNoneor index0, which may produce silent incorrect behavior.
Indexed versus non-indexed enums
Some Unturned™ enums carry explicit integer indices that are meaningful to the game engine. For example, EItemType assigns Gun to index 7 , the engine's item-processing code checks the item's type integer and dispatches to the gun handler when the value is 7. The index is the runtime dispatch key.
Other enums do not carry explicit indices and are defined only by their named values. For example, EBatteryMode defines three named values (None, Burn, Charge) with no explicit indices. The engine matches the name string at parse time and uses the underlying integer for internal dispatch, but the exact integer values are an implementation detail.
Enum naming conventions in the SDG documentation
The SDG documentation prefixes every enum type name with E (e.g., EItemType, EAssetType, EItemRarity). This is a C# naming convention inherited from the Unreal Engine (which uses the E prefix for enum types). The E prefix appears only in the documentation and in C# source code references; it never appears in .dat files. A .dat file contains Type Melee, not EItemType Melee. The parser resolves the Type field to the EItemType enum based on the field name, not on a prefix in the value.
The 23 enumerated types: complete catalog
The following table lists all 23 enumerated types documented in the SDG Chapter 139 source extract. Each enum is described with its purpose and the number of named values it defines.
| Enum Name | Named Values | Purpose | Used In |
|---|---|---|---|
EAssetType | 11 | Scopes legacy IDs to asset categories | Internal engine code, legacy asset references |
EBatteryMode | 3 | Controls vehicle battery charge/discharge behavior | Vehicle assets |
EItemOrigin | 4 | Tracks the source of a spawned item | Item spawning system, admin commands |
EItemRarity | 6 | Defines the six loot-rarity tiers with UI color | All item .dat and .asset files; Rarity field |
EItemType | 49 | Defines every possible item category | All item .dat and .asset files; Type field |
ELightingVision | 4 | Controls night-vision and headlamp lighting modes | Glasses, headlamps, tactical items |
ENPCHoliday | 9 | Defines recognized holidays and seasonal events | Landscape materials, holiday-restricted assets |
EObjectChart | 12 | Determines map chart-view rendering style for objects | Object assets, map chart configuration |
EObjectType | 5 | Defines object size categories (Large, Medium, Small, NPC, Decal) | Object assets |
ESlotType | 5 | Defines equipment slots (None, Primary, Secondary, Tertiary, Any) | All equippable item .dat files; Slot field |
EAction | 4 (inferred) | Defines melee attack types (Slash, Stab, Punch, Stomp) | Melee .dat files; Action_Primary, Action_Secondary fields |
EFiremode | 4 (inferred) | Defines gun fire modes (Safety, Semi, Auto, Burst) | Gun .dat files; fire mode flag fields |
ERefillType | (inferred) | Defines refill behavior for consumable items | Refill/consumable .dat files |
EBlueprintType | (inferred) | Defines blueprint operation types (Craft, Repair, Salvage) | Blueprint recipes in .dat files |
EAudioCategory | (inferred) | Defines audio categories for weapon attack and hit sounds | Melee and gun .dat files |
EUseableType | (inferred) | Defines the useable script handler (Melee, Gun, Throwable, Consume) | All item .dat files; Useable field |
ECaliber | (inferred) | Not a true enum; caliber is a uint16 numeric identifier | Gun and magazine .dat files |
EHolidayRestriction | (inferred) | Filters asset visibility/behavior by active holiday | Cosmetic .dat and .asset files |
EQuality | (inferred) | Separate from EItemRarity; used for Steam Economy item qualities | Economy configuration |
EMythicEffectType | (inferred) | Defines mythic effect visual behaviors | Mythic effect assets |
ESpawnType | (inferred) | Defines spawn table behavior types | Spawn table assets |
EVehicleType | (inferred) | Defines vehicle category types | Vehicle assets |
EAnimalType | (inferred) | Defines animal behavior types | Animal assets |
The enums marked "(inferred)" are types that appear in the shipped .dat files as string values that the parser matches against a named set, but which are not exhaustively documented in the SDG Chapter 139 source extract. Their named values are inferred from the shipped asset set. The enums with explicit named-value tables below are those fully documented in Chapter 139.
EItemType: the complete item type catalog
EItemType is the enumeration that defines every possible item category in Unturned™. The Type field in every item .dat and .asset file must carry one of the 49 named values listed below. The integer index is the runtime dispatch key: when the engine reads Type Gun, it stores the integer 7 internally and dispatches the item to the gun-handling code path.
All 49 EItemType named values
| Index | Named Value | Description |
|---|---|---|
| 0 | Hat | Headwear item (hats, helmets, caps). |
| 1 | Pants | Legwear item (pants, trousers, shorts). |
| 2 | Shirt | Torso clothing item (shirts, jackets, vests). |
| 3 | Mask | Face-worn item (masks, bandanas, gas masks). |
| 4 | Backpack | Storage item worn on the back. |
| 5 | Vest | Chest-worn storage or armor vest. |
| 6 | Glasses | Eye-worn item (glasses, goggles, sunglasses). |
| 7 | Gun | Firearm item (pistols, rifles, shotguns, launchers). |
| 8 | Sight | Attachment: optical sight (red dot, scope, holographic). |
| 9 | Tactical | Attachment: tactical device (laser, rangefinder). |
| 10 | Grip | Attachment: foregrip or bipod. |
| 11 | Barrel | Attachment: barrel device (suppressor, muzzle brake, compensator). |
| 12 | Magazine | Ammunition container (box magazine, drum, speedloader, tube). |
| 13 | Food | Consumable: food item. |
| 14 | Water | Consumable: water/drink item. |
| 15 | Medical | Consumable: medical item (bandage, medkit, vaccine). |
| 16 | Melee | Melee weapon (knife, sword, axe, bat, wrench). |
| 17 | Fuel | Consumable: fuel canister for vehicles or generators. |
| 18 | Tool | Multipurpose tool item. |
| 19 | Barricade | Placeable barricade item (spike trap, storage box, wire fence). |
| 20 | Storage | Dedicated storage barricade item. |
| 21 | Beacon | Placeable beacon/marker item. |
| 22 | Farm | Placeable farming plot item. |
| 23 | Trap | Placeable trap item (snare, landmine). |
| 24 | Structure | Placeable structure item (wall, floor, roof piece). |
| 25 | Supply | Supply drop/crate item. |
| 26 | Throwable | Throwable item (grenade, smoke, flare). |
| 27 | Grower | Farming grower/planter item. |
| 28 | Optic | Alternative sight/optic attachment type. |
| 29 | Refill | Refillable consumable container (canteen, gas can). |
| 30 | Fisher | Fishing rod item. |
| 31 | Cloud | Cloud/spawn-region item. |
| 32 | Map | Map item (navigation map). |
| 33 | Key | Key item (locked-door keycard, key). |
| 34 | Box | Loot box/container item. |
| 35 | Arrest_Start | Handcuff item (applying arrest). |
| 36 | Arrest_End | Handcuff release item (releasing arrest). |
| 37 | Tank | Vehicle fuel tank item. |
| 38 | Generator | Placeable power generator item. |
| 39 | Detonator | Remote detonator item for charges. |
| 40 | Charge | Placeable explosive charge item. |
| 41 | Library | Blueprint library item. |
| 42 | Filter | Gas mask filter consumable item. |
| 43 | Sentry | Placeable sentry gun item. |
| 44 | Vehicle_Repair_Tool | Vehicle repair tool item. |
| 45 | Tire | Vehicle tire item. |
| 46 | Compass | Navigation compass item. |
| 47 | Oil_Pump | Oil pump extraction item. |
| 48 | Vehicle_Paint_Tool | Vehicle paint/repaint tool item. |
The Type field in a .dat file carries one of these 49 values. The parser matches the string exactly (case-sensitive) and stores the corresponding integer index. The engine dispatches the asset to the correct loading and runtime code path based on the stored index.
Worked examples from shipped files
From Axe_Camp.dat (melee weapon):
Type MeleeThe string Melee matches index 16 in the EItemType enum. The engine dispatches this asset through the ItemMeleeAsset loading path and attaches the UseableMelee script at runtime.
From Ace.dat (gun):
Type GunThe string Gun matches index 7. The engine dispatches through the ItemGunAsset path.
From Classic_Alicepack.dat (backpack):
Type BackpackThe string Backpack matches index 4.
From CA_Biker_Mask_0.asset (mask):
Type MaskThe string Mask matches index 3. The .asset file uses the same Type field and the same enum value strings as .dat files.
EItemRarity: the rarity tier system
EItemRarity defines the six loot rarity tiers in Unturned™. The Rarity field in item .dat files controls the inventory highlight color and, indirectly, the loot table weight (when rarity is used as a spawn-weight shorthand). The rarity tier is displayed to players as a colored item name in the inventory UI.
All 6 EItemRarity named values
| Index | Named Value | UI Color | Description |
|---|---|---|---|
| 0 | Common | White | The default and most frequently occurring rarity tier. Most vanilla items are Common. |
| 1 | Uncommon | Green | Moderately rare; a step above common in loot tables. |
| 2 | Rare | Blue | Significantly rarer; typically reserved for mid-tier gear and specialty items. |
| 3 | Epic | Purple | High-tier rarity; powerful or specialized items. |
| 4 | Legendary | Pink | Very high-tier; top-end gear items with distinctive properties. |
| 5 | Mythical | Red | The highest rarity tier; reserved for exceptional, one-of-a-kind, or admin-only items. |
EItemRarity versus Steam Economy item quality
The SDG documentation notes: "these are not the same as the item qualities used by Steam Economy items." The EItemRarity enum controls the in-game loot rarity tier and UI highlight color. The Steam Economy item quality system (which assigns qualities like Genuine, Vintage, Strange, Unusual to items for the Steam marketplace) is a separate system and is not controlled by the Rarity field. Do not confuse the two: a Rarity value of Epic does not make the item a Steam Economy Epic-quality marketable item.
Worked examples from shipped files
From Ace.dat:
Rarity UncommonThe Ace pistol is Uncommon (index 1, green UI highlight). This is the standard rarity for a mid-tier pistol.
From Axe_Camp.dat:
(no Rarity field)The camp axe .dat file does not include a Rarity field. The parser assigns the default enum value, which is Common (index 0, white). Many vanilla melee weapons omit the Rarity field and default to Common.
The Rarity field is optional; its absence produces the Common default. The cohort recommendation is to always include an explicit Rarity field for clarity, even if the value is Common.
ESlotType: the equipment slot system
ESlotType defines the equipment slots to which an item can be assigned. The Slot field in item .dat files determines where the item appears in the player's equipment bar and which hotkey is used to equip it.
All 5 ESlotType named values
| Named Value | Description | Typical Usage |
|---|---|---|
None | Does not correspond to any equipment slot. Equippable items can be hotkeyed but do not occupy a slot. | Magazines, attachments, consumables, non-equippable items |
Primary | Corresponds to the primary equipment slot (first slot, typically key 1). | Primary weapons (rifles, shotguns, two-handed melee) |
Secondary | Corresponds to the secondary equipment slot (second slot, typically key 2). Usable from either the primary or secondary slot. | Sidearms (pistols), one-handed melee, tools |
Tertiary | Corresponds to the tertiary equipment slot. This slot is only used by NPCs. | NPC equipment assignments |
Any | Corresponds to any/all item slots. Equippable from any slot or hotkeyed. | Admin items, creative-mode tools |
Worked examples from shipped files
From Axe_Camp.dat:
Slot SecondaryThe camp axe is a one-handed melee weapon assigned to the secondary slot. It can be drawn with the secondary hotkey (typically key 2). The Slot Secondary value is the standard assignment for one-handed melee weapons and pistols.
From Ace.dat:
Slot SecondaryThe Ace pistol is also Slot Secondary. As a sidearm, it is intended to occupy the secondary slot rather than the primary slot, which the player reserves for a rifle or primary weapon.
From magazine .dat files:
Slot NoneMagazines use Slot None because they are not equippable items. They are loaded into a gun's magazine well, not into a player equipment slot. The None value signals to the engine that the item has no equipment slot assignment.
Slot None for non-equippable items
Items that are not meant to be equipped (magazines, attachments, consumables, crafting materials, barricade/structure items placed from the inventory) should use Slot None. Setting a non-equippable item to Slot Primary or Slot Secondary causes the game to display it in the equipment bar, which is confusing for players who will try to equip it and find that nothing happens.
EAssetType: the legacy asset category enum
EAssetType is used as a scope for legacy IDs. Each legacy ID is unique within its EAssetType category, which means two assets of different types can share the same legacy ID without collision. The EAssetType enum is primarily used in older game code and for maintaining backwards compatibility with pre-GUID asset systems.
All 11 EAssetType named values
| Index | Named Value | Description |
|---|---|---|
| 0 | None | Asset type is not applicable. |
| 1 | Item | Asset is an item. |
| 2 | Effect | Asset is an effect. |
| 3 | Object | Asset is an object (this includes NPC characters). |
| 4 | Resource | Asset is a resource. |
| 5 | Vehicle | Asset is a vehicle. |
| 6 | Animal | Asset is an animal. |
| 7 | Mythic | Asset is a mythical effect. |
| 8 | Skin | Asset is a skin. |
| 9 | Spawn | Asset is a spawn table. |
| 10 | NPC | Asset is related to NPCs (quests, vendors, dialogues). |
EAssetType does not appear as a field in .dat or .asset files. It is used internally by the engine to partition the legacy ID namespace. A mod developer authoring items needs to be aware that two items with the same legacy ID but different EAssetType scopes (e.g., an Item with ID 100 and an Object with ID 100) do not collide in the legacy ID system, though the practice of reusing IDs across asset types is strongly discouraged even when technically permitted.
EBatteryMode: vehicle battery behavior
EBatteryMode determines how a vehicle's battery charge changes over time. This enum is used exclusively by vehicle assets and does not appear in item .dat files.
All 3 EBatteryMode named values
| Named Value | Description |
|---|---|
None | Battery charge remains unchanged (no drain, no charge). |
Burn | Battery charge depletes over time (the battery drains while the vehicle is active). |
Charge | Battery charge replenishes over time (the battery recharges while the engine runs). |
The EBatteryMode is configured in the vehicle asset's .dat file. The exact field name is documented in the vehicle asset reference article.
EItemOrigin: item spawn-source tracking
EItemOrigin tracks the source of a spawned item. This enum is used by the item spawning system and admin commands, not by item .dat files.
All 4 EItemOrigin named values
| Named Value | Description |
|---|---|
World | Item origin is the world (natural spawn, loot drop). |
Admin | Item origin is an admin command (@give). |
Craft | Item origin is crafting (built from a blueprint recipe). |
Nature | Item origin is nature (grown, harvested, or naturally occurring). |
Server plugins and admin tools may use EItemOrigin to filter or track item spawns. Mod item .dat files do not configure EItemOrigin directly.
ELightingVision: night-vision and lighting modes
ELightingVision determines the lighting conditions applied when using vision-modifying items such as night-vision goggles or headlamps. Some assets may only support specific enumerators.
All 4 ELightingVision named values
| Named Value | Description | Associated Properties |
|---|---|---|
None | No vision effect; normal lighting is used. | , |
Military | Military night-vision lighting. High-contrast green-tinted vision. | Nightvision color: #507814, fog intensity: 0.25 |
Civilian | Civilian night-vision lighting. Low-contrast gray-tinted vision. | Nightvision color: #666666, fog intensity: 0.5 |
Headlamp | Headlamp lighting. Enables a toggleable light source. | Allows PlayerSpotLightConfig properties for the forward-facing light beam |
The vision mode is configured on applicable item assets (glasses, headlamps). The exact field name is documented in the specific asset type reference article.
ENPCHoliday: seasonal events and holidays
ENPCHoliday defines all of the game's recognized holidays and seasonal events. The start and end times for holidays are relative to the player's local time, meaning they are affected by timezones. The Lunar_New_Year holiday has automatically calculated start and end dates based on the Chinese calendar.
All 9 ENPCHoliday named values
| Named Value | Description | Duration (2025 cycle) |
|---|---|---|
None | No holiday or seasonal event. | Always active (default state). |
Halloween | Halloween holiday. | October 20 (00:00) - November 1 (12:00) |
Christmas | Christmas holiday, and other holidays within the festive season. | December 7 (00:00) - January 2 (12:00) |
April_Fools | April Fools' Day. | April 1 (00:00) - April 1 (23:59:59) |
Valentines | Valentine's Day. | February 14 (00:00) - February 14 (23:59:59) |
Pride_Month | Pride Month (June). | June 1 (00:00) - June 30 (23:59:59) |
Lunar_New_Year | Lunar New Year. | Varies; calculated as the day before Lunar New Year to 15 days after. (Example: January 28 - February 13, 2025) |
Unturned_Anniversary | The game's Steam release anniversary. | July 7 (00:00) - July 7 (23:59:59) |
Max | Only used/implemented in the game's source code; no practical use for game assets. | , |
Some assets only support a subset of holidays. The SDG documentation specifically notes that "Landscape Material Assets only support Halloween, Christmas, and April Fools' Day." Holiday-restricted assets that specify an unsupported holiday may fail to activate or may display incorrectly.
EObjectChart: map chart-view rendering
EObjectChart determines how an object asset should appear when generating a map's chart view. Most enumerators correspond to a specific pixel coordinate on either the Height_Strip or Layer_Strip of a map's Charts.unity3d file.
All 12 EObjectChart named values
| Named Value | Description |
|---|---|
None | Use the default rendering for this asset type. |
Ground | Use (20, 0) from the Height_Strip. |
Ignore | Skip this asset entirely; use whatever is underneath in the chart rendering. |
Highway | Use (0, 0) from the Layer_Strip. |
Street | Use (1, 0) from the Layer_Strip. |
Road | Use (2, 0) from the Layer_Strip. |
Path | Use (3, 0) from the Layer_Strip. |
Large | Use (15, 0) from the Layer_Strip. |
Medium | Use (16, 0) from the Layer_Strip. |
Water | Use (0, 0) from the Height_Strip. |
Cliff | Use (4, 0) from the Layer_Strip. |
The EObjectChart enum is relevant for map authors configuring how custom objects appear on the in-game map. The pixel coordinate mappings reference the Charts.unity3d bundled asset that ships with the game.
EObjectType: object size categories
EObjectType defines the size categories for object assets. The size category affects collision detection, rendering LOD (level of detail), and placement behavior.
All 5 EObjectType named values
| Index | Named Value | Description |
|---|---|---|
| 0 | Large | Large object (buildings, towers, major structures). |
| 1 | Medium | Medium object (walls, medium structures, vehicles). |
| 2 | Small | Small object (barricades, small props, furniture). |
| 3 | NPC | NPC object (characters, dialogue entities). |
| 4 | Decal | Decal object (surface decals, blood splatter, markings). |
The EObjectType enum is used in object asset .dat files. Items do not use EObjectType; the item equivalent is EItemType.
Enum value representation in .dat files
All enum values in .dat files are represented as their named string. The parser matches the string against the enum's named values with a case-sensitive comparison.
Case sensitivity rules
| Correct (PascalCase) | Incorrect | Result of incorrect |
|---|---|---|
Type Melee | Type melee | Match fails; Type defaults to None (index 0) or the file fails to load |
Rarity Uncommon | Rarity uncommon | Match fails; Rarity defaults to Common (index 0) |
Slot Primary | Slot primary | Match fails; Slot defaults to None |
Action_Primary Slash | Action_Primary slash | Match fails; action defaults to first value |
EBatteryMode Burn | EBatteryMode burn | Match fails; battery mode defaults to None |
The case-sensitivity rule is inviolable. Every shipped vanilla .dat file uses PascalCase for enum values. The cohort recommendation is to copy enum value strings exactly from the reference tables in this article or from the SDG documentation.
Default values
When an enum field is omitted from a .dat file, or when the supplied string does not match any named value, the parser assigns the enum's default value. For most Unturned™ enums, the default is the first named value (typically None or Common at index 0).
| Enum | Default Value | Behavior When Defaulted |
|---|---|---|
EItemType | None (index 0) | Asset type is unknown; item may not load or behave unexpectedly |
EItemRarity | Common (index 0) | Item displays as white quality |
ESlotType | None | Item has no equipment slot; cannot be equipped via hotkey |
EAssetType | None (index 0) | Asset type scope is unset; legacy ID resolution may fail |
EObjectType | None (inferred) | Object size category is unset |
ELightingVision | None | No vision effect is applied |
Silent enum mismatch
A case-mismatched enum string produces no error message at load time. The parser silently assigns the default enum value and continues loading. The mod functions, but with incorrect behavior , a melee weapon that should be Type Melee but loads as None will not have its melee script activated, and the player will not be able to swing it. The only indication is the incorrect runtime behavior. This is why enum case correctness is critical: the error is invisible until the player observes the wrong behavior.
The Type field and engine dispatch
The Type field in a .dat file is the most important enum value on any item asset. The Type value determines which asset class the engine uses to parse the remaining fields, which Useable script is attached to the item at runtime, and which code path handles the item's behavior when equipped, used, or dropped.
As shown in the flowchart above, the Type field is the dispatch switch. An incorrect Type value routes the asset through the wrong parser, which reads the wrong fields, attaches the wrong scripts, and produces behavior that is not just slightly wrong but entirely incorrect , a gun that is typed as Melee will not fire, and a melee weapon that is typed as Gun will try to load a non-existent magazine.
Complete enum reference table
The table below condenses every enum, every named value, and every integer index (where indexed) into a single lookup reference. Use this table for rapid field-authoring lookups.
| Enum | Named Values (with indices where defined) |
|---|---|
EAssetType | None(0), Item(1), Effect(2), Object(3), Resource(4), Vehicle(5), Animal(6), Mythic(7), Skin(8), Spawn(9), NPC(10) |
EBatteryMode | None, Burn, Charge |
EItemOrigin | World, Admin, Craft, Nature |
EItemRarity | Common(0), Uncommon(1), Rare(2), Epic(3), Legendary(4), Mythical(5) |
EItemType | Hat(0), Pants(1), Shirt(2), Mask(3), Backpack(4), Vest(5), Glasses(6), Gun(7), Sight(8), Tactical(9), Grip(10), Barrel(11), Magazine(12), Food(13), Water(14), Medical(15), Melee(16), Fuel(17), Tool(18), Barricade(19), Storage(20), Beacon(21), Farm(22), Trap(23), Structure(24), Supply(25), Throwable(26), Grower(27), Optic(28), Refill(29), Fisher(30), Cloud(31), Map(32), Key(33), Box(34), Arrest_Start(35), Arrest_End(36), Tank(37), Generator(38), Detonator(39), Charge(40), Library(41), Filter(42), Sentry(43), Vehicle_Repair_Tool(44), Tire(45), Compass(46), Oil_Pump(47), Vehicle_Paint_Tool(48) |
ELightingVision | None, Military, Civilian, Headlamp |
ENPCHoliday | None, Halloween, Christmas, April_Fools, Valentines, Pride_Month, Lunar_New_Year, Unturned_Anniversary, Max |
EObjectChart | None, Ground, Ignore, Highway, Street, Road, Path, Large, Medium, Water, Cliff |
EObjectType | Large(0), Medium(1), Small(2), NPC(3), Decal(4) |
ESlotType | None, Primary, Secondary, Tertiary, Any |
EAction (inferred) | Slash, Stab, Punch, Stomp |
EFiremode (inferred) | Safety, Semi, Auto, Burst |
EUseableType (inferred) | Melee, Gun, Throwable, Consume |
Worked examples: enum values in shipped .dat files
Example 1: Full enum usage in a melee weapon (Axe_Camp.dat)
Type Melee ← EItemType index 16
Useable Melee ← EUseableType (inferred)
Slot Secondary ← ESlotTypeThe camp axe .dat file demonstrates three enum values in three adjacent lines: the item type, the useable script handler, and the equipment slot. All three values are PascalCase strings matched against their respective enums by the parser.
Example 2: Enum usage in a gun (Ace.dat)
Type Gun ← EItemType index 7
Rarity Uncommon ← EItemRarity index 1
Useable Gun ← EUseableType (inferred)
Slot Secondary ← ESlotType
Safety ← EFiremode flag (inferred; presence = true)
Semi ← EFiremode flag (inferred; presence = true)
Action Trigger ← enum (firearm action type)The Ace .dat file demonstrates four enum value fields plus two enum-derived fire mode flag fields. The Safety and Semi fields use the presence/absence boolean convention (documented in C# Built-in Types Reference) but semantically represent EFiremode enum values.
Example 3: Clothing items (.asset files)
From CA_Biker_Mask_0.asset:
Type Mask ← EItemType index 3From a hat .asset file:
Type Hat ← EItemType index 0From a vest .asset file:
Type Vest ← EItemType index 5The .asset files use the same enum values as .dat files for the Type field. The parser applies the same enum matching logic regardless of the file extension.
Frequently asked questions
What happens if I type the wrong Type value for my item?
The engine reads the Type field, matches it against the EItemType enum, and dispatches the asset through the parser associated with that type. If you write Type Gun on a melee weapon, the engine parses the file using the ItemGunAsset parser, which looks for gun-specific fields (Caliber, Firerate, Magazine) that do not exist in the file, and ignores melee-specific fields (Damage_Resource, TwoHanded, RepairTool) that do exist. The weapon fails to load correctly and does not function as intended. Always set Type to the correct enum value for your item.
Can I make up my own enum value?
No. The parser's enum matching works only against the named values defined in the game's compiled assemblies. A value like Type CustomWeapon that does not exist in any EItemType named value fails to match. The parser assigns the enum default (None, index 0) and the asset fails to load in the intended category. Custom item behavior must be implemented through the existing item types (Gun, Melee, etc.) paired with custom fields and prefab configurations; there is no mechanism for adding new enum values through mod .dat files.
Why are some enum values spelled with underscores?
The enum named values use underscores in place of spaces because C# identifiers cannot contain spaces. Arrest_Start, Arrest_End, Vehicle_Repair_Tool, Vehicle_Paint_Tool, Lunar_New_Year, Unturned_Anniversary, April_Fools, Pride_Month, and Oil_Pump all use underscores. This is a C# naming convention, not a .dat file formatting requirement. Mod developers must use the exact underscored form in .dat files; the parser compares strings character-by-character.
Do I need the E prefix when typing enum values in .dat files?
No. The E prefix (EItemType, EAssetType, etc.) is the C# type name used in the game's source code and in the SDG documentation. .dat files use only the named value string (e.g., Melee, Gun, Common), not the enum type name. The parser resolves the Type field to the EItemType enum based on the field name (Type), not based on a prefix in the value string.
Is there an enum for caliber values?
No. Caliber values in Unturned™ are plain uint16 integers (documented in C# Built-in Types Reference), not an enumerated type. A mod developer assigns a custom integer caliber ID to a gun (Caliber 5001) and to compatible magazines (Caliber_Reference 5001). The caliber ID is not restricted to a predefined enum of valid values. The vanilla caliber IDs (1 through 9 and 14) are convention, not enforcement , any uint16 value is a valid caliber ID. There is no ECaliber enum.
How do I know which enum a particular .dat field maps to?
The field-to-enum mapping is documented in the field reference for each asset type. The general pattern: Type maps to EItemType, Rarity maps to EItemRarity, Slot maps to ESlotType, Action_Primary and Action_Secondary map to an inferred action enum, and fire mode flag fields (Safety, Semi, Auto) map to an inferred fire mode enum. The specific mapping for every field is documented in the asset type's article in the items section of the knowledge base.
Can two enum values map to the same integer index?
No. In C#, each named value in an enum must map to a unique underlying integer value (unless explicitly aliased with a duplicate value, which the Unturned™ enums do not use). Each named value in the tables above corresponds to exactly one integer index, and each integer index corresponds to exactly one named value.
How are enum values stored in the game's memory?
At runtime, enum values are stored as their underlying integer type (typically int). The string names exist only in the compiled metadata and during the parse phase. When the parser reads Type Melee, it performs the string match, stores the integer 16 in the asset's type field, and discards the string. All subsequent code that checks the asset type compares integers, not strings. This means the integer indices are the definitive identity for enum values at runtime even though mod developers interact with enum values exclusively through their string names.
Can an enum value have a different name than its string representation in the .dat file?
No. The string representation in the .dat file is the enum's named value, and the named value is the string. There is no separate display name or translation layer for enum values. The string Melee in a .dat file is the exact C# identifier Melee in the EItemType enum.
What should I do if I don't know which Rarity to assign?
Use the default: Common (white). If you omit the Rarity field entirely, the parser assigns Common, which is a safe default for most items. The rarity tier should match the item's intended role in the loot economy: Common for frequently found items, Uncommon for moderately scarce upgrades, Rare for significant finds, Epic for high-tier gear, Legendary for exceptionally powerful items, and Mythical for one-of-a-kind or admin-only items. The rarity tier choice is a balance decision; consult your mod's design document or the intended server's loot configuration.
Best practices
- Always use the exact PascalCase spelling for enum values as documented in this article. Copy from the reference tables to avoid typos.
- Include an explicit
Rarityfield even when the value isCommon, an explicit field is self-documenting and avoids ambiguity for future maintainers. - Verify the
Typefield against the EItemType table before testing. A mistypedTypeis the most common enum-related error and produces confusing behavior. - Use
Slot Nonefor all non-equippable items (magazines, attachments, consumables, barricades, structures). - Use
Slot Secondaryfor sidearms and one-handed tools; useSlot Primaryfor rifles, shotguns, and two-handed weapons. - When authoring blueprint recipes, use enum values exactly as shown in the shipping asset set (
Operation RepairTargetItem, not variants). - Test enum values in single-player: a case-mismatched enum produces no error message, so the only detection method is functional testing.
- Bookmark the enum reference table in Appendix A of this article for fast lookups during authoring sessions.
Appendix A: Enum quick-reference card
| Field | Enum Type | Valid Values (most common) |
|---|---|---|
Type | EItemType | Gun, Melee, Magazine, Hat, Pants, Shirt, Mask, Backpack, Vest, Glasses, Sight, Tactical, Grip, Barrel, Food, Water, Medical, Fuel, Tool, Barricade, Storage, Beacon, Farm, Trap, Structure, Supply, Throwable, Grower, Optic, Refill, Fisher, Cloud, Map, Key, Box, Arrest_Start, Arrest_End, Tank, Generator, Detonator, Charge, Library, Filter, Sentry, Vehicle_Repair_Tool, Tire, Compass, Oil_Pump, Vehicle_Paint_Tool |
Rarity | EItemRarity | Common, Uncommon, Rare, Epic, Legendary, Mythical |
Slot | ESlotType | None, Primary, Secondary, Tertiary, Any |
Useable | (inferred) | Melee, Gun, Throwable, Consume |
Action_Primary | (inferred) | Slash, Stab, Punch, Stomp (melee); Trigger, Bolt, Pump, Break, Minigun (gun) |
Action_Secondary | (inferred) | Same action values as Action_Primary |
| Fire mode flags | (inferred) | Safety, Semi, Auto, Burst (presence/absence flag convention) |
Appendix B: Enum integer index cross-reference for EItemType
For server plugin developers and advanced mod authors who need to reference item types by their integer index in code:
| Index | Named Value | Index | Named Value | Index | Named Value |
|---|---|---|---|---|---|
| 0 | Hat | 17 | Fuel | 34 | Box |
| 1 | Pants | 18 | Tool | 35 | Arrest_Start |
| 2 | Shirt | 19 | Barricade | 36 | Arrest_End |
| 3 | Mask | 20 | Storage | 37 | Tank |
| 4 | Backpack | 21 | Beacon | 38 | Generator |
| 5 | Vest | 22 | Farm | 39 | Detonator |
| 6 | Glasses | 23 | Trap | 40 | Charge |
| 7 | Gun | 24 | Structure | 41 | Library |
| 8 | Sight | 25 | Supply | 42 | Filter |
| 9 | Tactical | 26 | Throwable | 43 | Sentry |
| 10 | Grip | 27 | Grower | 44 | Vehicle_Repair_Tool |
| 11 | Barrel | 28 | Optic | 45 | Tire |
| 12 | Magazine | 29 | Refill | 46 | Compass |
| 13 | Food | 30 | Fisher | 47 | Oil_Pump |
| 14 | Water | 31 | Cloud | 48 | Vehicle_Paint_Tool |
| 15 | Medical | 32 | Map | , | , |
| 16 | Melee | 33 | Key | , | , |
Appendix C: External references
| Resource | URL | Notes |
|---|---|---|
| Smartly Dressed Games modding documentation | https://docs.smartlydressedgames.com/en/stable/ | Chapter 139: Enumerated Types; official enum documentation |
| Unturned on Steam | https://store.steampowered.com/app/304930/Unturned/ | Game page and changelog |
| C# Built-in Types Reference | /data-types/csharp-built-in-types-reference | The previous article in this section; covers the integer types that store enum values |
| GUID Type Reference | /data-types/guid-type-reference | The previous article; covers the GUID type used alongside enum identity fields |
| Item Asset Anatomy | /items/item-asset-anatomy | Shared fields on every item asset, including Type, Rarity, and Slot enums |
| Melee Asset Reference | /items/melee-asset | Full melee weapon field reference, including Action_Primary and Action_Secondary enum usage |
| Magazine Asset Reference | /items/magazine-asset | Magazine field reference, including Type Magazine enum usage |
| Asset Definitions Reference | /items/asset-definitions-reference | Asset structure, header/body separation, and loading order |
Document history
| Version | Date | Author | Notes |
|---|---|---|---|
| 1.0 | 2026-07-26 | 57 Studios | Initial publication. Complete enumerated types reference covering all 23 enum types, 49 EItemType values, 6 EItemRarity tiers, 5 ESlotType slots, and every other documented enum with named values, indices, and worked examples from shipped files. |
Cross-references
- C# Built-in Types Reference , the previous article; covers the integer types that store enum values internally and the string type used to serialize enum names.
- GUID Type Reference , the previous article; covers the 128-bit GUID type that identifies assets alongside their enum-defined type and rarity.
- Item Asset Anatomy , the shared field reference for all item types, including the
Type,Rarity, andSlotenums documented here. - Melee Asset Reference , the melee weapon field reference; demonstrates
Action_PrimaryandAction_Secondaryenum usage. - Magazine Asset Reference , the magazine field reference; demonstrates
Type Magazineenum usage. - Asset Definitions Reference , the asset structure documentation; covers the
Typefield's role in the asset header. - Data File Format Reference , the
.datand.assetfile format specification. - Smartly Dressed Games modding documentation , the official enumerated types documentation.
- Unturned on Steam , the game page.
Authoring checklist
Before publishing a .dat file, confirm the following enum-correctness checks:
- [ ] The
Typefield value matches exactly one of the 49EItemTypenamed values (PascalCase, case-sensitive) - [ ] The
Rarityfield (if present) matches exactly one of the 6EItemRaritynamed values - [ ] The
Slotfield (if present) matches exactly one of the 5ESlotTypenamed values - [ ] The
Useablefield (if present) matches exactly one of the recognized useable type strings - [ ] Action fields (
Action_Primary,Action_Secondary, if present) use valid action type strings - [ ] Fire mode flag fields (
Safety,Semi,Auto,Burst) use the presence/absence flag convention - [ ] Enum value strings do not contain trailing whitespace or invisible characters
- [ ] The file has been tested in single-player: item spawns, equips, and functions with the intended behavior
- [ ] For items that are not equippable,
Slotis set toNone - [ ] The item's
Typeis consistent with the item's prefab, bundle, and behavior expectations
