Skip to main content

Skin Assets

Version History

Build VersionChange DateChange TypeDescription
6760422025-06-21stableCurrent 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 levels
  • backpack_labrat_blue - Colored laboratory backpack variants
  • chester_eyebone_horn_closed - Chester eyebone skin variations
  • lantern_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 portrait
  • bigportraits/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

ThemeDescriptionExample Items
ancientAncient civilization aestheticfence_ancient, armor_lunarplant_brave
circusCarnival and circus themedfiresuppressor_circus, tophat_circus
crystalCrystal and gem themedlantern_crystal, beebox_crystal
fantasyFantasy and magical themesfence_fantasy, heatrock_fantasy
formalElegant and formal attirebody_wilson_formal, hand_waxwell_formal
gothicDark gothic aestheticfence_gothic, lantern_gothic
iceWinter and ice themedbody_wilson_ice, feet_wolfgang_ice
lunarMoon and celestial themedbody_wilson_lunar, lunarplanthat_brave
nauticalOcean and sailing themedboat_nautical, anchor_nautical
natureNatural and plant themedbody_wilson_nature, slingshot_nature
piratePirate and seafaring themedbody_wilson_pirate, fishbox_pirate
roseRose and romantic themedfirestaff_rose, beargervest_rose
shadowDark and shadow themedbody_wilson_shadow, chester_eyebone_shadow
victorianVictorian era styledfence_victorian, body_wilson_victorian
yuleHoliday and Christmas themedbody_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:

  1. Game Startup: Engine processes the asset list during initialization
  2. Memory Allocation: Resources are allocated based on asset requirements
  3. Dynamic Loading: Some assets use dynamic loading for memory efficiency
  4. 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:

CategoryCountPurpose
INV_IMAGE200+Inventory UI display
DYNAMIC_ANIM6000+Character and item animations
PKGREF6000+Dynamic loading references
ATLAS_BUILD1000+Character portraits
DYNAMIC_ATLAS50+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:

  1. Source: export_accountitems.lua processes game asset definitions
  2. Update Trigger: New skins, items, or visual content additions
  3. Validation: Ensures all referenced assets exist and are accessible
  4. 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