Texturesbeginner9 min readupdated 11 Sept 2026

Editing .ytd files with CodeWalker

The short answer

Open the .ytd in CodeWalker, export the textures you want to change, edit them at the same size, save them as DDS with the right compression and mipmaps, then use Replace on each texture (the name must stay identical) and save the dictionary. Weapons often have a +hi.ytd high-detail dictionary as well — edit both. Stream the .ytd in a resource and restart it.

Every weapon skin ends the same way: new textures going into a .ytd texture dictionary. CodeWalker is free, handles DDS import and export, and is the tool most FiveM texture artists use for it. The editing is simple; the details that matter are names, sizes and formats.

Editing .ytd files with CodeWalker — illustrated with a FiveM-compatible minimap render

#Step 1: open and export

  1. Open CodeWalker’s RPF Explorer (or open the loose file) and double-click the .ytd.
  2. The texture list shows each texture’s name, size and format — note them.
  3. Export the textures you will edit (DDS keeps the original data; PNG is easier to paint on).

#Step 2: edit

Paint at the same resolution (or a power-of-two change you intend), and save as DDS with a suitable format and a full mip chain. Formats: DDS formats; mipmaps: mipmaps explained.

#Step 3: replace and save

  1. Select the texture in the dictionary and choose Replace, then pick your DDS.
  2. Check the name in the list is unchanged — the model looks textures up by name.
  3. Save the .ytd (to a new file first, keeping the original).

#The +hi dictionary

Many weapons come with a high-detail model (_hi.ydr) and texture dictionary (+hi.ytd) that the game uses up close, for example in first person. If you only edit the normal .ytd, the skin appears in third person and vanishes when you aim in first person. Edit both.

#Step 4: stream it

Resource layout
my_weapon_skins/
  fxmanifest.lua
  stream/
    w_pi_pistol.ytd
    w_pi_pistol+hi.ytd

Files in stream/ are streamed automatically. Restart the resource and reconnect if the old texture is cached. Pink or checkerboard textures mean a name mismatch — see pink weapon textures.

Share this guideXRedditFacebook

Questions

How do I edit a YTD file?
Open it in CodeWalker, export the textures, edit them, and replace each one with a DDS of the same name, then save.
Why is my retexture only visible in third person?
The weapon also has a +hi.ytd used up close. Replace the textures there too.
Can I change texture sizes?
Yes, keep them power-of-two; the UVs still map correctly.
Why does my weapon turn pink after editing?
A texture name changed or a texture is missing. Names must match exactly.

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.