Skin Assets
Version History
| Build Version | Change Date | Change Type | Description |
|---|---|---|---|
| 676042 | 2025-06-21 | stable | Current version |
Overview
The skin_assets.lua file contains comprehensive asset loading definitions for character skins and themed items in Don't Starve Together. This file is automatically generated by the export_accountitems.lua script and ensures that all necessary visual assets for the skin system are properly loaded during game initialization.
Usage Example
-- Access skin assets for loading
local skin_assets = require("skin_assets")
-- Assets are automatically loaded during game initialization
-- Individual asset lookup (for reference)
local function find_character_assets(character_name)
local character_assets = {}
for _, asset in ipairs(skin_assets) do
if string.find(asset.file, character_name) then
table.insert(character_assets, asset)
end
end
return character_assets
end
-- Example: Find all Wilson skin assets
local wilson_assets = find_character_assets("wilson")
Asset Structure
The file returns a single array table containing Asset() function calls that define resource loading requirements:
{
Asset("ASSET_TYPE", "file_path", optional_size),
Asset("ASSET_TYPE", "file_path", optional_size),
-- ... thousands of asset definitions
}
Asset Types
INV_IMAGE Assets
Inventory image assets for themed items and character equipment:
Asset("INV_IMAGE", "item_skin_name")
Examples:
abigail_flower_ancient_level0- Abigail's flower at different power levelsbackpack_labrat_blue- Colored laboratory backpack variantschester_eyebone_horn_closed- Chester eyebone skin variationslantern_crystal_lit- Lit state for crystal lantern skin
DYNAMIC_ATLAS Assets
Dynamic atlas definitions for UI elements and portraits:
Asset("DYNAMIC_ATLAS", "path/to/atlas.xml")
Asset("PKGREF", "path/to/texture.tex")
Examples:
images/playerportrait_playerportrait_bg_none.xml- Default portrait background- UI elements for character customization screens
DYNAMIC_ANIM Assets
Character and item animation asset pairs:
Asset("DYNAMIC_ANIM", "anim/dynamic/skin_name.zip")
Asset("PKGREF", "anim/dynamic/skin_name.dyn")
Pattern: Each skin animation requires both a .zip file (animation data) and a .dyn file (dynamic reference).
ATLAS_BUILD Assets
High-resolution portrait builds for character selection:
Asset("ATLAS_BUILD", "bigportraits/character_theme.xml", 192)
Examples:
bigportraits/wilson_formal.xml- Wilson's formal attire portraitbigportraits/wanda_steampunk.xml- Wanda's steampunk theme portrait
All portrait assets use a consistent 192-pixel resolution.
Asset Categories
Character Skin Assets
Body Part Animations
Character costume pieces organized by body part:
-- Body costumes
Asset("DYNAMIC_ANIM", "anim/dynamic/body_wilson_formal.zip")
-- Hand accessories
Asset("DYNAMIC_ANIM", "anim/dynamic/hand_wilson_formal.zip")
-- Leg pieces
Asset("DYNAMIC_ANIM", "anim/dynamic/legs_wilson_formal.zip")
-- Feet accessories
Asset("DYNAMIC_ANIM", "anim/dynamic/feet_wilson_formal.zip")
Full Character Skins
Complete character appearance overhauls:
-- Base character skin
Asset("DYNAMIC_ANIM", "anim/dynamic/wilson_formal.zip")
-- Ghost form variants
Asset("DYNAMIC_ANIM", "anim/dynamic/ghost_wilson_build.zip")
-- Portrait assets
Asset("ATLAS_BUILD", "bigportraits/wilson_formal.xml", 192)
Item Skin Assets
Equipment and Tools
Themed versions of game items:
-- Weapon skins
Asset("DYNAMIC_ANIM", "anim/dynamic/firestaff_rose.zip")
Asset("DYNAMIC_ANIM", "anim/dynamic/hambat_nautical.zip")
-- Utility items
Asset("DYNAMIC_ANIM", "anim/dynamic/lantern_crystal.zip")
Asset("DYNAMIC_ANIM", "anim/dynamic/backpack_heart.zip")
-- Inventory images for UI display
Asset("INV_IMAGE", "lantern_crystal_lit")
Asset("INV_IMAGE", "backpack_heart")
Structures and Buildings
Cosmetic variants for player-built structures:
-- Fencing themes
Asset("DYNAMIC_ANIM", "anim/dynamic/fence_victorian.zip")
Asset("DYNAMIC_ANIM", "anim/dynamic/fence_gate_gothic.zip")
-- Fire pits and furnaces
Asset("DYNAMIC_ANIM", "anim/dynamic/firepit_lava.zip")
Asset("DYNAMIC_ANIM", "anim/dynamic/dragonflyfurnace_crystal.zip")
-- Storage containers
Asset("DYNAMIC_ANIM", "anim/dynamic/treasurechest_cupid.zip")
Asset("DYNAMIC_ANIM", "anim/dynamic/icebox_crystal.zip")
Companion and Pet Assets
Skins for player companions and pets:
-- Abigail (Wendy's ghost companion)
Asset("DYNAMIC_ANIM", "anim/dynamic/abigail_formal.zip")
Asset("INV_IMAGE", "abigail_flower_formal_level2")
-- Chester variants
Asset("INV_IMAGE", "chester_eyebone_horn_closed")
Asset("INV_IMAGE", "chester_eyebone_mystical_shadow")
-- Pet accessories
Asset("INV_IMAGE", "bernie_cat_dead")
Asset("INV_IMAGE", "hutch_fishbowl_fantasy_dead")
Theme Collections
Common Theme Categories
| Theme | Description | Example Items |
|---|---|---|
ancient | Ancient civilization aesthetic | fence_ancient, armor_lunarplant_brave |
circus | Carnival and circus themed | firesuppressor_circus, tophat_circus |
crystal | Crystal and gem themed | lantern_crystal, beebox_crystal |
fantasy | Fantasy and magical themes | fence_fantasy, heatrock_fantasy |
formal | Elegant and formal attire | body_wilson_formal, hand_waxwell_formal |
gothic | Dark gothic aesthetic | fence_gothic, lantern_gothic |
ice | Winter and ice themed | body_wilson_ice, feet_wolfgang_ice |
lunar | Moon and celestial themed | body_wilson_lunar, lunarplanthat_brave |
nautical | Ocean and sailing themed | boat_nautical, anchor_nautical |
nature | Natural and plant themed | body_wilson_nature, slingshot_nature |
pirate | Pirate and seafaring themed | body_wilson_pirate, fishbox_pirate |
rose | Rose and romantic themed | firestaff_rose, beargervest_rose |
shadow | Dark and shadow themed | body_wilson_shadow, chester_eyebone_shadow |
victorian | Victorian era styled | fence_victorian, body_wilson_victorian |
yule | Holiday and Christmas themed | body_wilson_yule, winterhat_yule |
Character-Specific Themes
Unique Character Themes:
walter- Scout and adventure themes (bandaged,detective,survivor)wanda- Time-related themes (steampunk,bishop,western)warly- Culinary themes (chef,candyman,fisherman)wickerbottom- Scholarly themes (ornate,spiderwitch,lightninggoat)wormwood- Plant-based themes (cactus,mushroom,pumpkin)
Asset Loading Process
Automatic Loading
Assets are automatically loaded during game initialization:
- Game Startup: Engine processes the asset list during initialization
- Memory Allocation: Resources are allocated based on asset requirements
- Dynamic Loading: Some assets use dynamic loading for memory efficiency
- Package References: PKGREF assets enable runtime dynamic loading
Asset Dependencies
Many assets come in related pairs or groups:
-- Animation pair (required together)
Asset("DYNAMIC_ANIM", "anim/dynamic/wilson_formal.zip")
Asset("PKGREF", "anim/dynamic/wilson_formal.dyn")
-- Multi-state items (different visual states)
Asset("INV_IMAGE", "lantern_crystal") -- Unlit state
Asset("INV_IMAGE", "lantern_crystal_lit") -- Lit state
-- Level progression items
Asset("INV_IMAGE", "abigail_flower_formal_level0") -- Level 0
Asset("INV_IMAGE", "abigail_flower_formal_level2") -- Level 2
Asset("INV_IMAGE", "abigail_flower_formal_level3") -- Level 3
Performance Considerations
Memory Management
The asset system uses several optimization strategies:
- Dynamic Loading: PKGREF assets load only when needed
- Shared Resources: Common base assets are reused across themes
- Atlas Optimization: UI elements are packed into texture atlases
- Resolution Targeting: Portrait assets use consistent 192px resolution
Asset Count Statistics
Approximate asset counts by category:
| Category | Count | Purpose |
|---|---|---|
| INV_IMAGE | 200+ | Inventory UI display |
| DYNAMIC_ANIM | 6000+ | Character and item animations |
| PKGREF | 6000+ | Dynamic loading references |
| ATLAS_BUILD | 1000+ | Character portraits |
| DYNAMIC_ATLAS | 50+ | UI atlas definitions |
Integration Points
This asset system integrates with:
- Skin System: Provides visual resources for character customization
- Inventory System: Supplies item imagery for UI display
- Animation System: Loads character and item animations
- Portrait System: Character selection and profile images
- Memory Management: Dynamic loading and resource allocation
Auto-Generation
This file is automatically generated and should not be manually edited:
- Source:
export_accountitems.luaprocesses game asset definitions - Update Trigger: New skins, items, or visual content additions
- Validation: Ensures all referenced assets exist and are accessible
- Optimization: Removes unused assets and optimizes loading order
Development Usage
Asset Verification
Developers can verify asset loading:
-- Check if specific asset exists in the list
local function has_skin_asset(asset_type, file_path)
for _, asset in ipairs(skin_assets) do
if asset.type == asset_type and asset.file == file_path then
return true
end
end
return false
end
-- Validate character skin completeness
local function validate_character_skin(character, theme)
local required_assets = {
"DYNAMIC_ANIM", -- Character animation
"ATLAS_BUILD" -- Portrait image
}
for _, asset_type in ipairs(required_assets) do
local asset_path = string.format("%s_%s", character, theme)
if not has_skin_asset(asset_type, asset_path) then
return false, "Missing " .. asset_type .. " for " .. asset_path
end
end
return true
end
Related Modules
skin_affinity_info: Character-skin association mappingskin_gifts: Gift system integration for skin itemsprefabskins: Skin application and management systemplayerprofile: Player customization persistencemod_tools: Asset validation and debugging utilities