İçeriğe geç

Texture Editörü

Bir CodeWalker .ytd XML export'unu DDS dosyalarıyla birlikte aç, her texture'ı ve kanalı önizle, PNG ya da JPG ile değiştir, ikinin kuvvetine boyutlandır, sıkıştırmayı seç (DXT1, DXT5, mümkünse BC7) ve yeni DDS dosyalarını ve içe aktarmaya hazır .ytd XML'ini dışa aktar.

Bu araç ve notları şimdilik İngilizce.

Config ve KodTexture, YTD, İndirDokümanları oku

Open a .ytd

  1. Drop the .ytd from your resource's stream folder on the editor, or use Choose files. You can drop several dictionaries (or a whole folder) at once and switch between them.
  2. Replace, rename, add or delete textures.
  3. Export .ytd saves a new dictionary with the same name. Put it back in stream/ and restart the resource.

Texture settings the editor does not touch (usage flags, extra flags) are kept as they were. Game files inside an .rpf have to be extracted first (CodeWalker or OpenIV); a .ytd that is still encrypted is rejected with a message.

Or use the CodeWalker XML export

  1. In CodeWalker's RPF Explorer, right click the .ytd and pick Export XML. You get name.ytd.xml plus a folder name/ with one DDS per texture.
  2. Drop the XML and the folder on the editor together (or pick the parent folder with Choose folder).
  3. XML + DDS zip gives the same layout back for CodeWalker's Import XML.

Everything stays in your browser. Nothing is uploaded. Vehicles usually have two dictionaries:name.ytd and name+hi.ytd (the close up versions). Clothing has one .ytd per drawable variation, likejbib_diff_000_a_uni.ytd.

Replacing a texture

  • Drop a PNG, JPG, WebP or DDS on a tile or on the big preview, or use Replace image.
  • Size "Same" keeps the size of the texture you replace, so UVs and the rest of the dictionary stay as they were. The result is always a power of two, capped by Max size. Fit decides what happens when the aspect ratio differs: stretch, pad with transparency, or crop.
  • Format "Keep" reuses the format of the old texture. A DDS you drop is used as is, without re-encoding.
  • The preview shows the compressed result, so what you see is what the game gets. Check alpha with the RGBA and A buttons.
  • Revert brings back the file you opened. Deleting a texture can be undone until the next delete.

Which format to pick

FormatMemoryUse it for
DXT10.5 byte / pxMost diffuse, spec and normal maps without alpha. Cutout alpha (fences, leaves) works too, it is on or off.
DXT51 byte / pxSoft alpha: glass, decals, hair, fades. Cleaner normal maps at twice the cost.
ATI2 (BC5)1 byte / pxTwo channel data. Stores only X and Y of a normal, test in game before you ship it.
ATI1 (BC4)0.5 byte / pxOne channel masks.
A8R8G8B84 bytes / pxOnly when compression artifacts are not acceptable, like small UI or script render targets.

BC7 textures are shown and written back untouched. This tool does not encode BC7; re-encoding one turns it into one of the formats above.

Build missing mips adds a mip chain to a texture that has none and leaves the full size level as it was.

Put it back into the game

  1. Export .ytd and copy the file into your resource's stream folder with the exact same name as the one you replace.
  2. Restart the resource (or the server). Clients download the new file on join.
  3. Going through CodeWalker instead: extract the XML + DDS zip, then Import XML in the RPF Explorer and pick the .ytd.xml.
my_car/
  fxmanifest.lua
  stream/
    mycar.yft
    mycar.ytd        <- the rebuilt dictionary
    mycar+hi.ytd

FiveM streams everything in stream/ automatically, no files or data_file entry is needed for a.ytd. For clothing, keep the file names your addon pack uses.

Texture memory and server warnings

The memory column is the GPU size of the texture with its mips, the same number the game streams. A .ytd file on disk is smaller because resources are compressed, but in memory it is the full size. FXServer prints a memory warning for every streamed file above 16 MiB of physical memory and calls it oversized above 48 MiB, and players on weaker PCs get textures that pop in late or stay blurry. The usual fixes, biggest win first:

  • Drop 4096 textures to 2048 and 2048 ones to 1024 where nobody looks closely. Each step cuts the memory by 4.
  • Use DXT1 instead of DXT5 when the alpha is fully opaque (the editor tells you when that is the case). Half the memory.
  • Never ship A8R8G8B8 for normal textures, it is 8x DXT1.
  • Keep full mip chains. Without mips the game always keeps the biggest level loaded and the texture shimmers at distance.
  • Split a huge dictionary: shared textures in one .ytd, or move close up detail into the +hi dictionary for vehicles.