Embedded or external textures for weapon models?
An embedded texture dictionary lives inside the .ydr; an external one is a separate .ytd, linked to the model by the archetype’s texture dictionary name (for weapons in weaponarchetypes.meta, usually the same name as the model). Embedded is self-contained; external lets several models share textures and lets you swap skins without touching the model. Missing textures usually mean the model looks for a dictionary that is not streamed.
A weapon model can carry its textures inside itself, or point to a separate texture dictionary. Both work, and add-on packs use both — which is why moving files around sometimes turns a gun pink. Knowing where the textures actually are makes retexturing and optimising much simpler.

#The two approaches
| Embedded (in .ydr) | External (.ytd) | |
|---|---|---|
| Files | One | Two (model + dictionary) |
| Skin swaps | Re-export the model | Replace only the .ytd |
| Sharing textures | No | Yes — several models can use one dictionary |
| Typical use | Small props, some add-on packs | Vanilla weapons, skin packs |
#How the model finds its textures
<Item type="CWeaponModelInfo__InitData">
<modelName>w_pi_mypistol</modelName>
<txdName>w_pi_mypistol</txdName>
<ptfxAssetName>NULL</ptfxAssetName>
<lodDist value="500.000000" />
</Item>txdName names the external texture dictionary. The game loads w_pi_mypistol.ytd and resolves the shader’s texture names inside it; embedded textures are found inside the model first. Details in weaponarchetypes.meta.
#Checking what a model uses
Open the .ydr in CodeWalker: if it has an embedded texture dictionary, the textures are listed with the model. Otherwise, look at the shader parameters for texture names and find the .ytd that contains them. Editing YTDs in CodeWalker covers the tools.
#Which to choose
- Selling or sharing skins: external
.ytd— buyers replace one file. - Attachments that share a material with the gun: external, one dictionary for all.
- A one-off prop that will never be retextured: embedded is fine.
- Never ship the same texture both embedded and external — you pay memory twice.
Questions
What is an embedded texture?
.ydr) instead of a separate .ytd texture dictionary.How does a weapon model know which .ytd to use?
txdName in its weaponarchetypes.meta entry names the texture dictionary.Why is my weapon pink after renaming files?
txdName or the texture names no longer match the streamed .ytd.Are embedded textures faster?
Ready to pick a map?
Twelve themes on three base map styles, $8 each, instant download.
Relevant to what you just read
The tool for this
Put your own artwork on 538 weapon models From $5, built in the browser, exported as a drop-in resource.
Look it up while you work
The reference tables this guide leans on, free and without an account.
- The map modding glossary38 terms — file formats, radar parts, framework words — each with a one-line answer first.