KATA 5 OF 8 · ASSET LAYER
Everything so far reused vanilla art and worked server-side. This kata crosses a line: you bring your own art. The reward is a mod that looks like yours; the cost is that every player now has to install it - assets do not push from a server to clients. Knowing exactly where that line is matters more than the art itself.
A real custom icon for the resourceReinforcedPlank item from Kata 3 (fully doable today), plus an honest map of the AssetBundle workflow for custom models and sounds, which needs Unity.
Custom art lives in a Resources/ folder at the root of your mod (a sibling of Config/ and ModInfo.xml). Two things go here: loose icon PNGs in an atlas folder, and Unity AssetBundles for everything heavier.
Item icons must be exact, or the game rejects them:
Resources/UIAtlases/ItemIconAtlas/<iconName>.png. (The old A17 /ItemIcons/ path is wrong on modern builds - use the atlas path.)Name the file after the icon you want, then point your item at it. Revisit Kata 3's item and change the icon line from the reused vanilla icon to your own:
<!-- in Config/items.xml -->
<property name="CustomIcon" value="reinforcedPlank" /> <!-- matches reinforcedPlank.png, no extension -->
<!-- and drop CustomIconTint, since your PNG already has the colours you want -->
So your mod folder becomes:
ReinforcedPlank/
ModInfo.xml
Config/
items.xml recipes.xml Localization.txt
Resources/
UIAtlases/
ItemIconAtlas/
reinforcedPlank.png (116x80, ARGB32)
On load, the game folds your PNG into the in-memory item-icon atlas, and CustomIcon="reinforcedPlank" resolves to it.
Anything beyond a 2D icon - a custom block mesh, a weapon model, a sound - ships as a Unity AssetBundle (a .unity3d file) placed in Resources/. The honest summary of the workflow, because this is a genuinely bigger task than XML:
.unity3d in your mod's Resources/, then reference a prefab inside it from a block or item's mesh property, using the modfolder syntax (roughly #@modfolder(YourModName):Resources/yourBundle.unity3d?YourPrefab).This is a real specialty - do not expect to learn Unity in one kata. The takeaway here is where bundles live and how the XML points at them; building the bundle itself is a Unity skill you layer on top.
This is the single most important thing in this kata: icons and AssetBundles do not get pushed from a server to clients. A server-side XML mod (Kata 4) just works for anyone who joins. An asset mod requires every player to install the same files locally, or they see missing icons and pink ("missing texture") models. So:
Resources/ folder with content, it is a "client mod." Share the exact same ZIP with every player, and they install it in their own Mods/ folder.CustomIcon to its name, restart.Resources/UIAtlases/ItemIconAtlas/ on A18+; the older /ItemIcons/ path silently does nothing.Next: Kata 6 - UI Mods with XUi. Assets change what the world looks like; XUi changes what the interface looks like - and it is the layer V3.0 reworked the most.