# weaponarchetypes.meta: tying a weapon model to its textures

> What weaponarchetypes.meta does: modelName, txdName, ptfxAssetName and lodDist for the gun and its components, and why mismatches give invisible weapons.

Source: https://fam-tools.com/guides/fivem-weaponarchetypes-meta · FAM Tools · published 2026-09-11 · updated 2026-09-11 · about 8 min

**Short answer.** Each `<Item>` in weaponarchetypes.meta lists a `modelName` (the .ydr name without extension), a `txdName` (the .ytd name without extension that holds its textures), a `ptfxAssetName` (usually `NULL`) and a `lodDist`. Every model the weapon and its components use needs an entry, and the names must match the streamed files exactly.

## Key points

- One entry per model: the gun and each component model.
- `modelName` = the .ydr file name; `txdName` = the .ytd file name (both without extension).
- Wrong `txdName` → the model loads without textures (white or pink).
- Missing entry → the model may not be drawn at all.
- `lodDist` is the draw distance; 300–500 is typical for weapons.

weaponarchetypes.meta is the shortest weapon meta file and the one most often behind “my weapon is invisible” or “my weapon is white”. It tells the game, for each model the weapon uses — the gun, every magazine, every suppressor — which texture dictionary to read its textures from and from how far away to draw it.

## A real example

*weaponarchetypes.meta*

```xml
<CWeaponModelInfo__InitDataList>
  <InitDatas>
    <Item>
      <modelName>w_ar_myrifle</modelName>
      <txdName>w_ar_myrifle</txdName>
      <ptfxAssetName>NULL</ptfxAssetName>
      <lodDist value="500"/>
    </Item>
    <Item>
      <modelName>w_ar_myrifle_mag1</modelName>
      <txdName>w_ar_myrifle</txdName>
      <ptfxAssetName>NULL</ptfxAssetName>
      <lodDist value="300"/>
    </Item>
  </InitDatas>
</CWeaponModelInfo__InitDataList>
```

Here the rifle and its magazine share one texture dictionary, `w_ar_myrifle.ytd`. That is common: several models can read from the same dictionary, which keeps the texture count down.

## The four fields

| Field | Must match | If wrong |
| --- | --- | --- |
| `modelName` | A streamed `.ydr` (gun) or component model | The model is not registered; it may be invisible |
| `txdName` | A streamed `.ytd` containing the textures the model asks for | The model draws with missing textures |
| `ptfxAssetName` | A particle asset, or `NULL` | Usually harmless; leave `NULL` unless the model needs particles |
| `lodDist` | — | Too low: the weapon disappears at short range in other players’ hands |

## How it connects to your textures

A model asks for textures by name; `txdName` tells it which dictionary to search. If you retexture a weapon and rename the dictionary, update `txdName` too. If textures come out pink or missing, the problem is either this name or the texture names inside the .ytd — see [pink weapon textures](https://fam-tools.com/guides/fivem-weapon-pink-textures) and [.ytd texture dictionaries](https://fam-tools.com/guides/ytd-texture-dictionary).

> **Embedded textures** — Some models carry their textures embedded inside the .ydr instead of a separate .ytd. Those still need an archetype entry, but a skin change then means editing the model itself — see [embedded vs external textures](https://fam-tools.com/guides/fivem-embedded-vs-external-textures).

## lodDist and other players

You always see your own weapon up close. `lodDist` matters for everyone else: it is how far away other players can still see the weapon in your hands or on your back. A value of a few hundred metres is enough; very high values make every weapon in the area draw from far away for no benefit.

## Questions

### What does weaponarchetypes.meta do?

It registers each weapon model and component model, and tells the game which texture dictionary each uses and how far away to draw it.

### Why is my addon weapon white or pink?

The model cannot find its textures: `txdName` does not match the streamed .ytd, or the texture names inside the .ytd differ from what the model expects.

### Do attachments need entries in weaponarchetypes.meta?

Yes, every component model (magazines, suppressors, scopes) needs its own entry.

### Which data_file loads weaponarchetypes.meta?

`data_file 'WEAPON_METADATA_FILE' 'path/weaponarchetypes.meta'`.

## Related

- https://fam-tools.com/guides/fivem-weapons-meta-explained
- https://fam-tools.com/guides/fivem-weapon-pink-textures
- https://fam-tools.com/guides/ytd-texture-dictionary
- https://fam-tools.com/guides/fivem-embedded-vs-external-textures
