Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
BEx2 - Instance-specific paths — same name, different art
Updated a week agoInstance-specific paths — same name, different art
Sprites · extra. The fifth sprite path, for one rare collision. Skip this unless Stitchwork has actually warned you about a duplicate collection name — if it hasn't, you don't need it.
You'll be able to: aim a replacement at one specific sprite collection when two of them share the same name but hold different art.
The collision
The game can hold two completely separate tk2dSpriteCollectionData objects that carry the same .name. A real example: Slab Prisoner Cln Data exists both in Assets/Collections/ and again under Assets/Collections/Hornet NPCs/ — same name, different sheets.
Your normal path keys off that name:
Sprites/{CollectionName}/{MaterialName}/{SpriteName}.png
So a file there applies to every collection with that name. Usually that's exactly right — you want both copies reskinned the same way, and you do nothing special. This page is only for the case where the two need different art.
How you'll know
You don't go looking for this — Stitchwork tells you. The first time you ship files for a name-colliding collection, the log prints:
[SpriteLoader] Duplicate collection name 'Slab Prisoner Cln Data' (instanceId …).
Use the vanilla texture name as the folder/file name to target this instance
specifically: Sprites/{name}/{texName}/... or Spritesheets/{name}/{texName}.png
(texture names logged per material below when vanilla is first captured).
The {texName} you need is in the lines just after it — Stitchwork logs each material's vanilla texture name as it captures the backup. That raw texture name is unique per instance, which is what makes it a usable discriminator when the collection name and material aren't.
The warning only fires when you've actually shipped files for that collection — no pack content, no nag. If you never see it, there's no collision to resolve.
The path
Swap the material folder for the vanilla texture name:
Sprites/{CollectionName}/{VanillaTextureName}/{SpriteName}.png ← individual
Spritesheets/{CollectionName}/{VanillaTextureName}.png ← whole atlas
Worked example — reskin only the Hornet NPCs copy, whose atlas captured as prisoner_b:
Sprites/Slab Prisoner Cln Data/prisoner_b/idle0000.png
The other copy (a different vanilla texture name) is untouched.
Priority — it composes with the normal path
Resolution tries the instance-specific path first, then falls back to the material path:
{CollectionName}/{VanillaTextureName}/{SpriteName}.png— this instance only{CollectionName}/{MaterialName}/{SpriteName}.png— any instance with that name
So you can ship both: a material-path file as the default for every copy, and an instance-specific file that overrides just the one that needs to differ. The specific one wins for its instance; everyone else takes the default.
Worth remembering
- Names match the dump, case-insensitively — same rule as every sprite path (B7). Copy the texture name exactly as the log prints it.
- If you're unsure whether you need this, you don't. It exists for a genuine same-name/different-art clash and nothing else. The plain individual path (B1) is the answer 99% of the time.
- Same idea, whole-atlas. The
Spritesheets/{Coll}/{texName}.pngform disambiguates a ported full-sheet the same way — see Porting Prior Work.
You can now resolve the one path collision Stitchwork can't guess for you — and recognise that the warning in your log is an instruction, not an error. Back to the map: Sprite Paths Reference.
Pages
- A-0 Wikis
- A1 - Getting Started
- A2 - Installing Packs
- A3 - The Pack Manager
- A4 - How Stitchwork Works
- A5 - When Something Looks Wrong
- AEx1 - Conditional Activation
- B0 - Choosing a Workflow
- B1 - Starting a Skin Pack
- B2 - Finding Any Sprite
- B3 - Porting Prior Work — Spritesheets & CKC
- B4 - Texture2D (T2D) Sprites
- B5 - Bigger Art — Anchors
- B6 - Animation Canvas Workflow
- B7 - Sprite Paths Reference
- B8 - The Animation Controller
- BEx1 - Reused frames — one sprite, many animations
- BEx2 - Instance-specific paths — same name, different art
- BEx3 - Appliqué: Per-Clip Art
- C1 - Text & Dialogue
- D1 - Audio
- E1 - Video
- F1 - Priority & Conflicts
- F2 - Distributing Your Pack
- G1 - Dumping & Full Dump
- G2 - Companion Mods
- G3 - Hotkeys
- G4 - Pack Folder Structure
- G5 - Testing With Savestates (DebugMod)
- G6 - Troubleshooting