I Thought It Was Just a Full Skin Resource Pack, but It Practically Rebuilt the Entire DST Skin System
I recently came across an open-sourced, no-longer-maintained full skin mod for Don't Starve Together. At first, I assumed projects like this all worked more or less the same way: bundle the official skin assets into the mod directory, tweak a few tables, and call it done once things "show up" in-game.
But after actually reading through the repository, my assessment completely changed.
This is not an ordinary resource pack. More accurately, it's a runtime skin injection system. Rather than simply importing official skins, it replicates the way Don't Starve Together's skin system originally works as closely as possible, then adds an extra layer on top — a custom_ namespace and a set of runtime Hooks — so that local skins participate in name lookups, icon lookups, ownership checks, entity spawning, and re-skinning flows just like official skins would.
What It Actually Does Isn't "Adding Skins" — It's "Taking Over the Skin System"
The most noteworthy aspect of this project is that it doesn't bypass the official skin framework to build a completely independent system from scratch. Instead, it follows the official structure as closely as possible, inserting its own runtime overrides only where necessary.
For example, in modmain.lua, the mod first defines the detection and stripping logic for the custom_ prefix. The key here isn't just "adding a prefix to names" — it's establishing a stable mapping relationship:
- Official skin:
wilson_formal - Mod skin:
custom_wilson_formal
Once this mapping is established, everything else falls into place. At runtime, the mod can recognize custom_wilson_formal as its own skin, and whenever it needs to call official data, it can strip it back to wilson_formal to look up names, descriptions, icons, and rarity.
In other words, custom_ is not a decorative prefix — it's the entry point of the entire system.
It Didn't Copy Official Text — It Stole the Official Query Capability
What really made me think this project was "interesting" was the set of proxy logic in skinloader/skinloader.lua.
This file doesn't maintain a massive localization text table, nor does it copy out the entire set of official icon names and rarity strings. What it does is more direct: it intercepts query functions.
It wraps the following global functions with a proxy layer:
GetSkinDescriptionGetSkinNameGetSkinInvIconNameGetModifiedRarityStringForItemGetColorForItem
If the incoming item has a custom_ prefix, it strips the prefix first, then passes the request back to the official function.
The result is that the mod doesn't need to maintain a huge pile of display-layer data. When the game queries custom_wilson_formal, it ultimately gets the name