Skip to main content

Skins Definitions Data

Version History

Build VersionChange DateChange TypeDescription
6760422025-06-21stableCurrent version

Overview

The skins_defs_data.lua file contains auto-generated skin definitions and configurations for Don't Starve Together's inventory system. This file is automatically generated by the export_accountitems.lua script and provides the complete mapping of cosmetic skins to their assets, linking relationships, and organizational structures.

Usage Example

-- File is automatically loaded during game initialization
-- Defines skin asset builds, item pairings, and skin sets

-- Example of how the system works (read-only data):
local function GetSkinBuild(skin_id)
-- The system uses these definitions internally
-- to map skin IDs to their visual assets
end

Core Functions

TheInventory:ClearSkinsDataset()

Status: stable

Description: Clears the existing skin dataset before loading new definitions. Called at the beginning of the file to ensure a clean state.

Usage:

TheInventory:ClearSkinsDataset()

Purpose:

  • Resets any previously loaded skin data
  • Prepares the inventory system for fresh skin definitions
  • Ensures consistency across game builds

TheInventory:AddRestrictedBuildFromLua(build, skin_id, flag)

Status: stable

Description: Registers a skin build with the inventory system, defining the visual assets and restrictions for each cosmetic variation.

Parameters:

  • build (string): Asset build name for the skin's visual representation
  • skin_id (string): Unique identifier for the skin item
  • flag (boolean): Restriction flag (typically false for standard skins)

Example:

-- Character skin registrations
TheInventory:AddRestrictedBuildFromLua("wilson_formal", "wilson_formal", false)
TheInventory:AddRestrictedBuildFromLua("willow_ancient", "willow_ancient", false)

-- Item skin registrations
TheInventory:AddRestrictedBuildFromLua("spear_rose", "spear_rose", false)
TheInventory:AddRestrictedBuildFromLua("armor_grass_woven", "armor_grass_woven", false)

-- Companion skin registrations
TheInventory:AddRestrictedBuildFromLua("chester_snow", "chester_snow", false)
TheInventory:AddRestrictedBuildFromLua("glommer_flower", "glommer_flower", false)

TheInventory:AddSkinSetInput(emote_id, set_index, skin_id)

Status: stable

Description: Associates skins with coordinated emote sets, enabling themed collections that work together visually.

Parameters:

  • emote_id (string): Identifier for the emote or action
  • set_index (number): Index within the emote set (0-based)
  • skin_id (string): Skin component to include in the set

Example:

-- Gladiator emote set for multiple characters
TheInventory:AddSkinSetInput("emote_fistshake", 0, "wilson_gladiator")
TheInventory:AddSkinSetInput("emote_fistshake", 0, "body_wilson_gladiator")
TheInventory:AddSkinSetInput("emote_fistshake", 1, "willow_gladiator")
TheInventory:AddSkinSetInput("emote_fistshake", 1, "body_willow_gladiator")

-- Sleep emote set with matching bedrolls
TheInventory:AddSkinSetInput("emote_sleepy", 0, "body_pj_blue_agean")
TheInventory:AddSkinSetInput("emote_sleepy", 0, "bedroll_furry_quilt_blue_frost")

Status: stable

Description: Creates linking relationships between related skins, such as item variants that share visual themes or companion pets with their containers.

Parameters:

  • linked_skin (string): Skin that depends on or relates to the base skin
  • base_skin (string): Primary skin that the linked skin references

Example:

-- Abigail flower links to Abigail ghost forms
TheInventory:AddSkinLinkInput("abigail_flower_ancient", "abigail_ancient")
TheInventory:AddSkinLinkInput("abigail_flower_formal", "abigail_formal")

-- Chest variants linking to base versions
TheInventory:AddSkinLinkInput("chester_eyebone_horn", "chester_horn")
TheInventory:AddSkinLinkInput("chester_eyebone_mystical", "chester_mystical")

-- Item skin relationships
TheInventory:AddSkinLinkInput("armor_dragonfly_fangedcollar", "armor_wood_fangedcollar")
TheInventory:AddSkinLinkInput("boat_grass_pirate_item", "boat_grass_pirate")

TheInventory:AddFreeItemForEveryone(skin_id)

Status: stable

Description: Marks specific skins as free items available to all players without purchase requirements.

Parameters:

  • skin_id (string): Skin identifier to make freely available

Example:

-- Free beefalo clothing sets
TheInventory:AddFreeItemForEveryone("beefalo_horn_war")
TheInventory:AddFreeItemForEveryone("beefalo_head_war")
TheInventory:AddFreeItemForEveryone("beefalo_body_war")

-- Free loading screens
TheInventory:AddFreeItemForEveryone("loading_dst10_signed")
TheInventory:AddFreeItemForEveryone("record_creepyforest")

TheSim:AddTextureToStreamingGroup(group_id, texture_path)

Status: stable

Description: Assigns skin textures to streaming groups for optimized loading and memory management.

Parameters:

  • group_id (number): Streaming group identifier for organization
  • texture_path (string): Full path to the texture asset

Example:

-- Wolfgang skin textures organized by streaming groups
TheSim:AddTextureToStreamingGroup(0, "anim/dynamic/wolfgang_ancient.zip:wolfgang_ancient--atlas-0.tex")
TheSim:AddTextureToStreamingGroup(1, "anim/dynamic/wolfgang_combatant.zip:wolfgang_combatant--atlas-0.tex")
TheSim:AddTextureToStreamingGroup(2, "anim/dynamic/wolfgang_cook.zip:wolfgang_cook--atlas-0.tex")

Skin Categories

Character Skins

Description: Cosmetic variations for playable characters affecting their visual appearance.

Pattern: [character]_[theme]

Examples:

-- Base character skins
TheInventory:AddRestrictedBuildFromLua("wilson_formal", "wilson_formal", false)
TheInventory:AddRestrictedBuildFromLua("willow_ancient", "willow_ancient", false)
TheInventory:AddRestrictedBuildFromLua("wolfgang_gladiator", "wolfgang_gladiator", false)

-- Character body parts for detailed customization
TheInventory:AddRestrictedBuildFromLua("body_wilson_formal", "body_wilson_formal", false)
TheInventory:AddRestrictedBuildFromLua("hand_wilson_formal", "hand_wilson_formal", false)
TheInventory:AddRestrictedBuildFromLua("legs_wilson_formal", "legs_wilson_formal", false)

Item Skins

Description: Cosmetic variants for tools, weapons, armor, and other craftable items.

Categories:

  • Tools: Axes, pickaxes, shovels, hammers
  • Weapons: Spears, staffs, swords
  • Armor: Protective equipment with visual modifications
  • Structures: Buildings and constructions
  • Containers: Storage items and chests

Examples:

-- Tool skins
TheInventory:AddRestrictedBuildFromLua("axe_feathered", "axe_feathered", false)
TheInventory:AddRestrictedBuildFromLua("pickaxe_northern", "pickaxe_northern", false)

-- Weapon skins
TheInventory:AddRestrictedBuildFromLua("spear_rose", "spear_rose", false)
TheInventory:AddRestrictedBuildFromLua("batbat_fantasy", "batbat_fantasy", false)

-- Armor skins
TheInventory:AddRestrictedBuildFromLua("armor_grass_woven", "armor_grass_woven", false)
TheInventory:AddRestrictedBuildFromLua("armor_marble_chainmail", "armor_marble_chainmail", false)

Beefalo Clothing

Description: Cosmetic modifications for beefalo mounts with complete outfit sets.

Components:

  • head: Head decoration and accessories
  • body: Body covering and ornamentation
  • feet: Hoof modifications and footwear
  • horn: Horn decorations and modifications
  • tail: Tail accessories and styling

Examples:

-- War-themed beefalo set
TheInventory:AddRestrictedBuildFromLua("beefalo_head_war", "beefalo_head_war", false)
TheInventory:AddRestrictedBuildFromLua("beefalo_body_war", "beefalo_body_war", false)
TheInventory:AddRestrictedBuildFromLua("beefalo_feet_war", "beefalo_feet_war", false)
TheInventory:AddRestrictedBuildFromLua("beefalo_horn_war", "beefalo_horn_war", false)
TheInventory:AddRestrictedBuildFromLua("beefalo_tail_war", "beefalo_tail_war", false)

-- Formal beefalo set
TheInventory:AddRestrictedBuildFromLua("beefalo_head_formal", "beefalo_head_formal", false)
TheInventory:AddRestrictedBuildFromLua("beefalo_body_formal", "beefalo_body_formal", false)

Companion Skins

Description: Visual modifications for companion creatures like Chester, Glommer, and critters.

Types:

  • Chester Variants: Different chest appearances and themes
  • Glommer Skins: Butterfly companion modifications
  • Critter Skins: Small companion creature variations
  • Pet Accessories: Additional decorative elements

Examples:

-- Chester variations
TheInventory:AddRestrictedBuildFromLua("chester_snow", "chester_snow", false)
TheInventory:AddRestrictedBuildFromLua("chester_mystical", "chester_mystical", false)

-- Glommer modifications
TheInventory:AddRestrictedBuildFromLua("glommer_flower", "glommer_flower", false)
TheInventory:AddRestrictedBuildFromLua("glommerflower_fantasy", "glommerflower_fantasy", false)

-- Critter skins
TheInventory:AddRestrictedBuildFromLua("glomling_puft", "glomling_puft", false)
TheInventory:AddRestrictedBuildFromLua("dragonling_bat", "dragonling_bat", false)

Emote Sets

Coordinated Themes

Emote sets group related skins that work together for specific actions or themes:

Gladiator Set (emote_fistshake):

-- All characters get gladiator-themed skins for the fistshake emote
TheInventory:AddSkinSetInput("emote_fistshake", 0, "wilson_gladiator")
TheInventory:AddSkinSetInput("emote_fistshake", 1, "willow_gladiator")
TheInventory:AddSkinSetInput("emote_fistshake", 2, "wolfgang_gladiator")

Sleep Set (emote_sleepy):

-- Pajama themes with matching bedrolls
TheInventory:AddSkinSetInput("emote_sleepy", 0, "body_pj_blue_agean")
TheInventory:AddSkinSetInput("emote_sleepy", 0, "bedroll_furry_quilt_blue_frost")

Western Set (emote_tiphat):

-- Western-themed character skins for hat-tipping
TheInventory:AddSkinSetInput("emote_tiphat", 0, "wanda_western")
TheInventory:AddSkinSetInput("emote_tiphat", 1, "wathgrithr_western")

Skin Linking System

Relationship Types

Parent-Child Relationships:

-- Abigail's flower controls her ghost appearance
TheInventory:AddSkinLinkInput("abigail_flower_ancient", "abigail_ancient")
TheInventory:AddSkinLinkInput("abigail_flower_formal", "abigail_formal")

Item Variant Relationships:

-- Different armor materials sharing the same style
TheInventory:AddSkinLinkInput("armor_dragonfly_fangedcollar", "armor_wood_fangedcollar")
TheInventory:AddSkinLinkInput("armor_dragonfly_roman", "armor_wood_roman")

Container-Content Relationships:

-- Chester's eyebone matches his appearance
TheInventory:AddSkinLinkInput("chester_eyebone_horn", "chester_horn")
TheInventory:AddSkinLinkInput("chester_eyebone_mystical", "chester_mystical")

Asset Streaming Organization

Streaming Groups

Textures are organized into numbered groups for efficient loading:

Group 0: Ancient theme skins Group 1: Combat/Gladiator theme skins
Group 2: Cooking/Chef theme skins Group 3: Formal theme skins

Example Organization:

-- Wolfgang ancient skins in group 0
TheSim:AddTextureToStreamingGroup(0, "anim/dynamic/wolfgang_ancient.zip:wolfgang_ancient--atlas-0.tex")
TheSim:AddTextureToStreamingGroup(0, "anim/dynamic/wolfgang_mighty_ancient.zip:wolfgang_mighty_ancient--atlas-0.tex")

-- Wolfgang combat skins in group 1
TheSim:AddTextureToStreamingGroup(1, "anim/dynamic/wolfgang_combatant.zip:wolfgang_combatant--atlas-0.tex")
TheSim:AddTextureToStreamingGroup(1, "anim/dynamic/wolfgang_mighty_combatant.zip:wolfgang_mighty_combatant--atlas-0.tex")

Security and Validation

Signature Validation

The file includes cryptographic signatures to ensure data integrity:

TheInventory:ValidateWithSignature("4a57af8288567d39848c3028c0430cdd8b790b7f...")

Purpose:

  • Prevents unauthorized modification of skin data
  • Ensures consistency across different game clients
  • Validates that skin definitions match expected values

Protection Guards

Engine Change Protection:

if TheInventory.AddFreeItemForEveryone == nil then
-- Fallback validation for older engine versions
else
-- Modern engine with free item support
end

Auto-Generation Process

Source: export_accountitems.lua

Generation Steps:

  1. Clear existing skin dataset
  2. Process skin asset definitions from game data
  3. Generate restricted build registrations
  4. Create skin set associations for emotes
  5. Establish skin linking relationships
  6. Configure free item availability
  7. Organize texture streaming groups
  8. Apply cryptographic validation

Update Frequency: Generated with each game build containing skin changes

Integration Points

Inventory System

The definitions integrate with the game's inventory system to:

  • Display available skins in character selection
  • Apply visual changes when skins are equipped
  • Manage skin ownership and acquisition
  • Handle skin preview and inspection

Asset Pipeline

Works with the game's asset system to:

  • Load appropriate texture and animation files
  • Stream skin assets efficiently during gameplay
  • Manage memory usage for large skin collections
  • Support dynamic loading of cosmetic content

Performance Considerations

Memory Management

Streaming Groups: Skins are organized into groups that can be loaded/unloaded based on relevance

Lazy Loading: Only assets for equipped or previewed skins are fully loaded

Texture Compression: Skin textures use optimized formats for reduced memory footprint

Network Optimization

Lightweight Definitions: Only essential data is networked between players

Client-Side Assets: Visual assets are stored locally, only IDs are synchronized

Batch Updates: Multiple skin changes are bundled for efficient network transmission

Common Usage Patterns

Checking Skin Availability

-- The system uses these definitions to determine what skins exist
local function IsSkinDefined(skin_id)
-- Internal system checks against registered builds
return TheInventory:IsValidSkinId(skin_id)
end
-- System can find linked skins for compatibility
local function GetLinkedSkin(base_skin)
-- Uses the linking data to find related items
return TheInventory:GetLinkedSkinId(base_skin)
end

Emote Set Discovery

-- System identifies which skins work together for emotes
local function GetEmoteSetSkins(emote_id, character_index)
-- References the skin set input data
return TheInventory:GetSkinsForEmoteSet(emote_id, character_index)
end