Clothing
Version History
| Build Version | Change Date | Change Type | Description |
|---|---|---|---|
| 676042 | 2025-06-21 | stable | Current version with complete clothing catalog |
Overview
The Clothing system defines all character clothing and cosmetic items available in Don't Starve Together. This comprehensive data structure manages character appearance customization including body clothing, hand accessories, leg clothing, feet items, and head gear. The system handles visual symbol overrides, rarity classifications, character-specific variations, and marketplace configurations for all cosmetic items.
The clothing system is implemented as a large auto-generated data table (CLOTHING) that contains definitions for every cosmetic item in the game.
Usage Example
-- Access a specific clothing item
local shirt = CLOTHING["body_buttons_blue_sky"]
print(shirt.type) -- "body"
-- Check clothing type
local gloves = CLOTHING["hand_beltedgloves_brown_beaver"]
if gloves.type == "hand" then
print("This is hand clothing")
end
-- Access symbol overrides
for _, symbol in ipairs(shirt.symbol_overrides) do
print("Overrides symbol:", symbol) -- "torso", "arm_upper"
end
Constants
CLOTHING
Status: stable
Description: Global table containing all clothing item definitions, auto-generated by export_accountitems.lua.
Type: table
Structure:
CLOTHING = {
clothing_item_id = {
type = "body",
skin_tags = { "CLOTHING_BODY", "CLOTHING" },
symbol_overrides = { "torso", "arm_upper" },
rarity = "Spiffy",
marketable = true,
release_group = 0,
-- Additional properties...
}
}
Version History:
- Auto-generated from game data in each build
Data Structure Properties
Essential Properties
type
Status: stable
Description: Defines the clothing category and equipment slot.
Type: string
Values:
"body"- Primary torso clothing items"hand"- Hand accessories and gloves"legs"- Lower body clothing"feet"- Footwear items"head"- Headwear (rare in current data)
Example:
local item = CLOTHING["body_catcoon_costume"]
print(item.type) -- "body"
Version History:
- Added in initial implementation
skin_tags
Status: stable
Description: Classification tags for filtering and organization.
Type: table
Common Tags:
"CLOTHING_BODY","CLOTHING_HAND","CLOTHING_LEGS","CLOTHING_FEET"- Category identifiers"CLOTHING"- General clothing tag- Color tags:
"BLUE","RED","GREEN","BLACK","WHITE", etc. - Style tags:
"COSTUME","LUNAR_NY","FORMAL", etc.
Example:
local item = CLOTHING["body_cardigan_black_jet"]
-- skin_tags = { "LUNAR_NY", "CLOTHING_BODY", "CLOTHING", "BLACK" }
Version History:
- Added in initial implementation
symbol_overrides
Status: stable
Description: Character sprite symbols to replace with clothing variants.
Type: table
Common Symbols:
- Body:
"torso","arm_upper","arm_lower","torso_pelvis" - Hand:
"hand","arm_lower_cuff" - Legs:
"leg","torso_pelvis" - Feet:
"foot" - Special:
"tail","skirt"
Example:
local costume = CLOTHING["body_catcoon_costume"]
-- symbol_overrides = { "arm_lower", "arm_upper_skin", "hand", "torso", "torso_pelvis", "leg", "foot", "tail" }
Version History:
- Added in initial implementation
rarity
Status: stable
Description: Item rarity classification affecting visual presentation and value.
Type: string
Values:
nilor missing - Common items (default)"Spiffy"- Uncommon items"Classy"- Rare items"Distinguished"- Epic items"HeirloomDistinguished"- Legendary items
Example:
local gloves = CLOTHING["hand_beltedgloves_brown_beaver"]
print(gloves.rarity) -- "Classy"
local costume = CLOTHING["body_catcoon_costume"]
print(costume.rarity) -- "HeirloomDistinguished"
Version History:
- Added in initial implementation
marketable
Status: stable
Description: Whether the item can be traded on Steam marketplace.
Type: boolean
Example:
local shirt = CLOTHING["body_buttons_blue_sky"]
print(shirt.marketable) -- true
Version History:
- Added in initial implementation
release_group
Status: stable
Description: Release version group for content updates and organization.
Type: number
Common Groups:
0- Base game items1- Early content updates3- Lunar New Year items7- Seasonal items15- Halloween costume items64- General content updates105- Woven variant items
Example:
local lunar_cardigan = CLOTHING["body_cardigan_black_jet"]
print(lunar_cardigan.release_group) -- 3
local halloween_costume = CLOTHING["body_catcoon_costume"]
print(halloween_costume.release_group) -- 15
Version History:
- Added in initial implementation
Visual Customization Properties
symbol_hides
Status: stable
Description: Character symbols to hide when wearing this clothing.
Type: table
Example:
local costume = CLOTHING["body_catcoon_costume"]
-- symbol_hides = { "skirt", "arm_upper" }
Version History:
- Added in initial implementation
symbol_in_base_hides
Status: stable
Description: Base character symbols to hide in the character template.
Type: table
Example:
local gloves = CLOTHING["hand_beltedgloves_brown_beaver"]
-- symbol_in_base_hides = { "arm_lower_cuff" }
Version History:
- Added in initial implementation
symbol_overrides_by_character
Status: stable
Description: Character-specific symbol override mappings for per-character customization.
Type: table
Example:
local gloves = CLOTHING["hand_drivergloves_brown_sepia"]
-- symbol_overrides_by_character = {
-- default = { hand = "hand_wilson" },
-- walter = { hand = "hand_walter" },
-- wanda = { hand = "hand_wanda" },
-- warly = { hand = "hand_warly" },
-- waxwell = { hand = "hand_waxwell" },
-- webber = { hand = "hand_webber" },
-- wormwood = { hand = "hand_wormwood" },
-- wortox = { hand = "hand_wortox" },
-- wurt = { hand = "hand_wurt" },
-- wx78 = { hand = "hand_wx78" }
-- }
Version History:
- Added in initial implementation
torso_tuck
Status: stable
Description: How the clothing integrates with lower body items.
Type: string
Values:
"untucked"- Clothing hangs loose"full"- Fully tucked appearance"pelvis_skirt"- Tucked at pelvis level"skirt"- Skirt-style tucking
Example:
local shirt = CLOTHING["body_buttons_blue_sky"]
print(shirt.torso_tuck) -- "untucked"
Version History:
- Added in initial implementation
spinnable_tail
Status: stable
Description: Whether clothing includes animated tail elements.
Type: boolean
Example:
local costume = CLOTHING["body_catcoon_costume"]
print(costume.spinnable_tail) -- true
Version History:
- Added in initial implementation
rarity_modifier
Status: stable
Description: Additional rarity classification modifier.
Type: string
Values:
"Woven"- Indicates obtainable through weaving system
Example:
local woven_costume = CLOTHING["body_catcoon_costumep"]
print(woven_costume.rarity_modifier) -- "Woven"
Version History:
- Added in initial implementation
build_name_override
Status: stable
Description: Alternative build file to use for rendering instead of the item ID.
Type: string
Example:
local woven_chester = CLOTHING["body_chester_costumep"]
print(woven_chester.build_name_override) -- "body_chester_costume"
Version History:
- Added in initial implementation
Clothing Type Categories
Body Clothing (type = "body")
Coverage: Primary torso items including shirts, dresses, costumes, and armor.
Common Symbol Overrides: "torso", "arm_upper", "arm_lower", "torso_pelvis"
Example:
body_buttons_blue_sky = {
type = "body",
skin_tags = { "CLOTHING_BODY", "CLOTHING", "BLUE" },
symbol_overrides = { "torso", "arm_upper" },
torso_tuck = "untucked",
marketable = true,
release_group = 0
}
Hand Clothing (type = "hand")
Coverage: Hand accessories including gloves, gauntlets, bracers, and cuffs.
Common Symbol Overrides: "hand", "arm_lower_cuff"
Example:
hand_beltedgloves_brown_beaver = {
type = "hand",
skin_tags = { "CLOTHING_HAND", "CLOTHING", "BROWN" },
symbol_overrides = { "hand" },
symbol_in_base_hides = { "arm_lower_cuff" },
rarity = "Classy",
marketable = true,
release_group = 1
}
Legs Clothing (type = "legs")
Coverage: Lower body items including pants, skirts, leg armor, and boots.
Common Symbol Overrides: "leg", "torso_pelvis", "foot"
Feet Clothing (type = "feet")
Coverage: Footwear including shoes, boots, and sandals.
Common Symbol Overrides: "foot"
Common Usage Patterns
Accessing Clothing Data
-- Get specific clothing item
local clothing_item = CLOTHING["body_catcoon_costume"]
-- Check clothing type
if clothing_item.type == "body" then
print("This is body clothing")
end
-- Access symbol overrides
for _, symbol in ipairs(clothing_item.symbol_overrides) do
print("Overrides symbol:", symbol)
end
-- Check rarity
local rarity = clothing_item.rarity or "Common"
print("Item rarity:", rarity)
Filtering by Properties
-- Find all body clothing
local body_items = {}
for item_id, item_data in pairs(CLOTHING) do
if item_data.type == "body" then
body_items[item_id] = item_data
end
end
-- Find marketable items
local marketable_items = {}
for item_id, item_data in pairs(CLOTHING) do
if item_data.marketable then
marketable_items[item_id] = item_data
end
end
-- Find items by rarity
local legendary_items = {}
for item_id, item_data in pairs(CLOTHING) do
if item_data.rarity == "HeirloomDistinguished" then
legendary_items[item_id] = item_data
end
end
Character-Specific Variations
-- Get character-specific symbol for hand item
local hand_item = CLOTHING["hand_drivergloves_brown_sepia"]
if hand_item.symbol_overrides_by_character then
local wilson_hand = hand_item.symbol_overrides_by_character.default.hand
local walter_hand = hand_item.symbol_overrides_by_character.walter.hand
print("Wilson uses:", wilson_hand) -- "hand_wilson"
print("Walter uses:", walter_hand) -- "hand_walter"
end
Character Integration
Symbol Override System
The clothing system uses symbol overrides to replace character sprite elements:
- Base Character Symbols: Default character appearance sprites
- Clothing Symbols: Replacement sprites from clothing build files
- Character-Specific Overrides: Per-character customizations for unique looks
- Powerup Variants: Alternative sprites for enhanced character states
Visual Layering
Clothing items layer over character sprites using:
- Symbol Replacement: Direct substitution of character sprite symbols
- Symbol Hiding: Concealing base character elements that conflict with clothing
- Symbol Showing: Forcing visibility of specific character elements
- Layering Order: Proper visual stacking to maintain depth and appearance
Data Management
Auto-Generation
The clothing data is auto-generated by export_accountitems.lua:
-- AUTOGENERATED CODE BY export_accountitems.lua
CLOTHING = {
-- Generated clothing definitions...
}
Release Groups
Items are organized by release groups corresponding to game updates:
- Group 0: Base game items available from launch
- Group 1: Early content additions
- Group 3: Lunar New Year themed items
- Group 7: Seasonal event items
- Group 15: Halloween costume collections
- Group 64: General content updates
- Group 105: Woven variant items (crafted versions)
Related Modules
- Character Systems: Character customization and appearance management
- Components: Inventory and equipment component integration
- Prefabs: Character prefab integration with clothing systems
- UI Systems: Clothing selection and preview interfaces
- Networking: Cosmetic data synchronization between clients
Technical Notes
- Data Format: Pure Lua table structure for fast access and modification
- Auto-Generation: Clothing data is generated from game assets, not manually maintained
- Character Compatibility: All clothing items support all characters through symbol overrides
- Visual System: Integrates with game's sprite layering and animation systems
- Marketplace Integration: Supports Steam marketplace trading and valuation systems
Best Practices
Data Usage
- Use direct table lookups with known item IDs for best performance
- Cache clothing properties for frequently accessed items in UI systems
- Validate clothing data before applying visual changes to prevent errors
- Handle missing or invalid clothing gracefully with fallback defaults
Performance Optimization
- Minimize clothing data iteration in performance-critical rendering code
- Use clothing categories and tags for efficient filtering operations
- Cache symbol override calculations when applying multiple items
- Batch clothing changes when possible to reduce visual update overhead
Content Management
- Follow established naming conventions for new clothing items
- Maintain consistent rarity classifications across similar item types
- Document custom clothing properties clearly for mod developers
- Test clothing compatibility across all characters before release