<!-- fivemad.com, Markdown source of https://fivemad.com/docs/tools/ytyp-creator -->
> Source: https://fivemad.com/docs/tools/ytyp-creator
> Section: Tools
> Tags: ytyp, archetypes, props, CodeWalker, DLC_ITYP_REQUEST
> Tool: https://fivemad.com/tools/ytyp-creator
> Last updated: 2026-09-24
> Site map for assistants: https://fivemad.com/llms.txt

# YTYP Creator

Build a .ytyp archetype file for custom props: drop CodeWalker model XML, get measured bounds, pick flags and lodDist, then convert and stream it.

The YTYP Creator writes the `CMapTypes` XML that declares your custom props to the game (one `CBaseArchetypeDef` or `CTimeArchetypeDef` per model). Drop the CodeWalker XML exports of your `.ydr`, `.yft` or `.ydd` models and it measures the bounds, fills in the texture dictionary and checks everything against the 33,071 game prop archetypes. It is for map makers and anyone who streams their own props.

## What it is for

A model in `stream/` is not a spawnable prop on its own. The game needs an archetype for it: a name, a draw distance, a bounding box and sphere for culling, the texture and physics dictionaries and a set of flags. That archetype lives in a `.ytyp`. Without one you get the classic problems: `CreateObject` does nothing, `IsModelValid` returns false, the prop is invisible in your ymap, or it vanishes at the edges of the screen because the bounds are wrong.

Typical uses:

- You exported a prop from Blender (Sollumz) or ZModeler and need a ytyp for it.
- You have a pack of 200 props and do not want to type 200 bounding boxes by hand.
- You want to copy the settings of a game prop (a door, a bin, a bench) onto your own model.
- You got a ytyp from someone else and want to check it, rename things or fix flags.

## Quick start

1. In CodeWalker's RPF Explorer, right click your model (`.ydr`, `.yft` or `.ydd`) and choose **Export XML**. Do the same for its `.ytd`.
2. Set **Name** in the **Ytyp** panel. This is also the file name: `stream/<name>.ytyp`.
3. In **Add archetypes**, stay on the **Files** tab, pick **Flags for new archetypes** and **lodDist for new archetypes (m)**, then drop the `.ydr.xml` files together with the `.ytd.xml` files.
4. Each model becomes one row in **Archetypes**. Open a row with the arrow button (**Edit all fields**) to see the notes and every field.
5. Fix whatever the issue list in the right column points out. Click an issue to jump to the archetype it is about.
6. In **Export**, download `<name>.ytyp.xml` from the **XML** tab.
7. Convert it to a binary `.ytyp` in CodeWalker (steps in the **Convert** tab), put it in `stream/` and add the `data_file` line from the **Resource** tab.
8. `ensure` the resource and reconnect.

## Adding archetypes

The **Add archetypes** panel has three tabs.

### Files

Drop zone for CodeWalker model exports. Accepted files:

| File | What happens |
|---|---|
| `.ydr.xml` | One archetype, `assetType` `ASSET_TYPE_DRAWABLE`. |
| `.yft.xml` | One archetype, `assetType` `ASSET_TYPE_FRAGMENT`. |
| `.ydd.xml` | One archetype per drawable in the dictionary, `assetType` `ASSET_TYPE_DRAWABLEDICTIONARY`, `drawableDictionary` set to the `.ydd` name. |
| `.ytd.xml` | Not an archetype. The texture names are read so `textureDictionary` can be matched and checked. |
| `.ytyp.xml` | Opened for editing. It replaces the current list (Undo brings the old one back). |

Binary files (`.ydr`, `.yft`, `.ydd`, `.ytd`, `.ytyp` without `.xml`) are refused with a message telling you to export them to XML first. Everything is read in the browser, nothing is uploaded.

The archetype name is the file name, lowercased, without the extension. `my_bench.ydr.xml` becomes `my_bench`. For a `.ydd`, each entry uses its own drawable name.

**Bounds.** The bounding box is filled in from the model, in model space with GTA axes (Z up), the same way game archetypes store them. The bounding sphere follows the rule every game prop follows: centre of the box, radius half the box diagonal. Open the row to read a note on where the bounds came from. If the model export has no geometry and no stored bounds, the box stays at zero and you type it yourself.

**textureDictionary.** Drop the model's `.ytd.xml` together with the model and the field is set to that dictionary. HD companions (`name+hi.ytd`, `name+hidr.ytd`) count as the base `name.ytd`. If you drop exactly one `.ytd`, every model without a better match uses it. If no dropped `.ytd` fits and the model needs outside textures, the field is set to the model name and a note tells you to rename it if your textures live elsewhere. Models with only embedded textures get an empty field. Textures the model needs that are missing from the chosen `.ytd` are listed in the notes, because those would render white.

**physicsDictionary.** Models with embedded collision get the archetype name here (what Sollumz writes too). Models without collision, and `.ydd` entries, leave it empty.

The two fields under the drop zone set the defaults for dropped models and for **Add empty**:

| Field | What it does | Default |
|---|---|---|
| Flags for new archetypes | Flag preset given to new rows. | `32` (Static) |
| lodDist for new archetypes (m) | Draw distance given to new rows. | `100` |

Both are remembered in your browser. When `.ytd` files have been dropped, a line lists the texture dictionaries seen with a **forget** link to clear them.

### Game prop

Search the 33,071 game prop archetypes by name (type at least 2 characters, underscores and spaces are the same). Each result shows a picture, the source ytyp, lod, flags and the size in metres. **Add** copies all the values.

By default the copy is named `<name>_custom` with a note telling you to rename it to your model and point `textureDictionary` at your `.ytd`. Tick **Keep the game name** only when you really want to re-declare the game prop itself, for example to make it spawnable everywhere.

### Import

Open a `.ytyp.xml` (button **Open .ytyp.xml**) or paste the XML and press **Load pasted XML**. It replaces the list. What is kept:

- `CBaseArchetypeDef` and `CTimeArchetypeDef` items become editable rows.
- Interior (`CMloArchetypeDef`) archetypes and items of unknown types are kept as raw XML and written back unchanged. The Ytyp panel shows how many.
- Archetype `extensions` (particles, audio, spawn points, doors) are kept as raw XML on their row.
- Non empty root blocks (`extensions`, `dependencies`, `compositeEntityTypes`) are kept as they are.
- A bounding sphere that does not follow the box rule is kept exactly, and "Sphere from box" is turned off for that row.
- Unknown fields inside an archetype are dropped, with a warning naming them.

## Archetype fields

Each row shows the name, the asset type (`ydr`, `yft`, `ydd`), the size in metres, and quick inputs for **lodDist**, **txd** and **flags**. The buttons on the right are **Edit all fields**, **Duplicate** (adds `<name>_copy` right below) and **Delete**. The Ytyp panel has **Undo** (last add, delete or import, up to 40 steps) and **Clear** (removes every archetype, undo works). The whole document is saved in your browser, so a reload keeps your work.

The expanded row has these fields:

| Field | Meaning | Default |
|---|---|---|
| Type | `CBaseArchetypeDef` or `CTimeArchetypeDef`. Time archetypes only show during the hours you tick. | `CBaseArchetypeDef` |
| `assetType` | `ASSET_TYPE_DRAWABLE` (.ydr), `ASSET_TYPE_FRAGMENT` (.yft), `ASSET_TYPE_DRAWABLEDICTIONARY` (.ydd), `ASSET_TYPE_ASSETLESS` (no model, MLOs), `ASSET_TYPE_UNINITIALIZED`. | from the file |
| `assetName` | Leave empty and the name is written again, like every game prop. | empty |
| `drawableDictionary` | Only for `.ydd` models: the `.ydd` name without extension. | empty |
| `textureDictionary` | The `.ytd` with the textures, without extension. | see above |
| `physicsDictionary` | Game props point at a shared physics dictionary. For a custom model with its collision inside, use the archetype name or leave it empty. | see above |
| `clipDictionary` | The `.ycd` with the animation or UV animation. Needs flag 512 or 1024. | empty |
| `specialAttribute` | Marks doors, bushes, traffic lights and a few others. | `0` |
| lodDist (m) | How far away the model is drawn. A ymap entity can override it (`-1` there means use this value). | `100` |
| hdTextureDist (m) | Where `+hi.ytd` / `+hidr.ytd` HD textures load. Keep it at or below lodDist. | `5` |
| bbMin / bbMax | The box used for culling and returned by `GetModelDimensions`. 6 decimals. | measured |
| Sphere from box | On: `bsCentre` and `bsRadius` are calculated from the box. Off: type them yourself. | on |
| flags | Number input, preset dropdown and one checkbox per bit. | `32` |
| timeFlags | Only for time archetypes. | `32505919` |

### specialAttribute values

`0` None, `3` Traffic light, `4` Unknown 4, `5` Garage door, `6` MLO water level, `7` Normal door, `8` Sliding door, `9` Barrier door, `10` Sliding door vertical, `11` Noisy bush, `12` Rail crossing barrier, `13` Noisy deformable bush, `14` Single axis rotation, `15` Dynamic cover bound, `16` Rumble on vehicle collision, `17` Rail crossing light, `30` Clock, `32` Street light. `1`, `2` (ladder) and `31` (tree) are listed as deprecated.

### Flag presets

| Preset | Value | Used for |
|---|---|---|
| Static | `32` | Fixed prop that never moves. Simple and safe for custom props. |
| Vanilla static prop | `549584928` | Static, dynamic, no AI or player cover, ambient scale (`prop_wait_bench_01`). |
| Vanilla physics prop | `549584896` | Dynamic, no cover, ambient scale. Bins, cones, crates. |
| Dynamic + ambient scale | `537001984` | The most common non zero value in game ytyps. |
| Ambient scale only | `536870912` | Interior furniture and fixed decoration. |
| No flags | `0` | The most common value, mostly map furniture. |
| No shadows | `8192` | LOD models, emissive and light props. |
| Door | `604110848` | Door physics, dynamic, ambient scale. Pair with specialAttribute `7`. |
| UV animated | `1024` | Animated UVs from the clipDictionary (screens, water, scrolling signs). |

The bit checkboxes cover all 32 bits with CodeWalker's names, for example `2` Don't fade, `4` Draw last, `32` Static, `512` Has anim (YCD), `1024` UV anims (YCD), `2048` Shadow only, `8192` Don't cast shadows, `16384` Cast texture shadows, `65536` Double-sided rendering, `131072` Dynamic, `524288` Auto start anim, `4194304` No AI cover, `8388608` No player cover, `67108864` Enable door physics, `536870912` Use ambient scale.

### Time archetypes

Switch **Type** to `CTimeArchetypeDef` and a 24 hour grid appears. Bit 0 is 00:00 to 01:00, bit 23 is 23:00 to 24:00 (game time). Presets: **Night 19:00 to 06:00** (`33030207`), **Night 20:00 to 06:00** (`32505919`), **Day 06:00 to 20:00** (`1048512`), **Always** (`16777215`). The checkbox **16777216 Allow vanish whilst viewed** lets the model switch while it is on screen.

## Checks

The right column lists problems as you edit. Errors and warnings mark the row number in amber.

| Severity | Check |
|---|---|
| Error | Ytyp has no name; archetype without a name; duplicate archetype names; empty or invalid numbers; lodDist of 0 or less; negative hdTextureDist; bbMin larger than bbMax; zero size box (gets culled, invisible); file extension in a name or dictionary (`my_prop.ytd`); time archetype with no hours ticked. |
| Warning | Ytyp name with capitals or symbols (shows the sanitised name); ytyp name equal to a game ytyp; archetype name with characters other than lowercase a-z, 0-9, `_` and `-`; names over 63 characters; same name as a game prop; lodDist under 15 m; hdTextureDist larger than lodDist; manual sphere smaller than the box; no textureDictionary while the model needs outside textures; drawableDictionary and assetType disagree; assetName differs from name on a `.ydr`; animation flag without clipDictionary. |
| Info | textureDictionary not among the dropped `.ytd` files (and not a game txd); clipDictionary without an animation flag; door specialAttribute without flag `67108864`; embedded textures; lodDist above 1500 m; more than 3000 archetypes in one ytyp. |

Name clash checks run once the game archetype list has loaded.

## Output

### The XML

The **XML** tab shows `<name>.ytyp.xml` in the same layout CodeWalker exports. For a bench prop it looks like this:

```xml title="fivemad_props.ytyp.xml"
<?xml version="1.0" encoding="UTF-8"?>
<CMapTypes>
 <extensions />
 <archetypes>
  <Item type="CBaseArchetypeDef">
   <lodDist value="60" />
   <flags value="32" />
   <specialAttribute value="0" />
   <bbMin x="-1.5877" y="-0.4547" z="0.0047" />
   <bbMax x="1.5877" y="0.4468" z="0.4543" />
   <bsCentre x="0" y="-0.00395" z="0.2295" />
   <bsRadius value="1.6656836" />
   <hdTextureDist value="5" />
   <name>my_bench</name>
   <textureDictionary>my_bench</textureDictionary>
   <clipDictionary />
   <drawableDictionary />
   <physicsDictionary>my_bench</physicsDictionary>
   <assetType>ASSET_TYPE_DRAWABLE</assetType>
   <assetName>my_bench</assetName>
   <extensions />
  </Item>
 </archetypes>
 <name>fivemad_props</name>
 <dependencies />
 <compositeEntityTypes itemType="CCompositeEntityType" />
</CMapTypes>
```

If you type a hash instead of a name (`0x1234ABCD` or a plain number), it is written as `hash_1234ABCD`, the way CodeWalker writes unknown names. Time archetypes get a `<timeFlags value="..." />` line after `<extensions />`.

### Converting to binary

Browsers cannot write the binary ytyp format, so CodeWalker does the last step (also shown in the **Convert** tab):

1. Download `<name>.ytyp.xml` next to your models. Keep the double extension, CodeWalker reads the file type from it.
2. Open CodeWalker's **RPF Explorer**, then **File, Open Folder** on that folder.
3. Turn on **Edit mode**, then **Edit, Import XML** (or drag the file into the window).
4. CodeWalker writes `<name>.ytyp`. Put it in `stream/` and keep the `.xml` out of it.
5. Add the `data_file` line, `ensure` the resource and reconnect.

### Resource layout

The **Resource** tab builds a folder layout from your archetypes (model files by asset type, each `.ytd`, each `.ycd`) and this manifest:

```lua title="fxmanifest.lua"
fx_version 'cerulean'
game 'gta5'

name 'fivemad_props'
description 'Custom props declared in fivemad_props.ytyp'

-- Everything in stream/ (.ydr, .yft, .ydd, .ytd, .ytyp) is streamed on its own.
-- This line registers the archetypes when the resource starts, so the models
-- are valid everywhere (CreateObject, ymaps, map editors), not only near a ymap
-- that happens to depend on the ytyp.
data_file 'DLC_ITYP_REQUEST' 'stream/fivemad_props.ytyp'
```

```text
fivemad_props/
├── fxmanifest.lua
└── stream/
    ├── fivemad_props.ytyp
    ├── my_bench.ydr
    └── my_bench.ytd
```

```cfg title="server.cfg"
ensure fivemad_props
```

`DLC_ITYP_REQUEST` is the resource version of the game's `PERMANENT_ITYP_FILE`: the archetypes stay registered while the resource runs. Without it a ytyp only loads when a ymap that depends on it is loaded nearby.

## Examples

Check the archetype is registered and spawn the prop:

```lua title="client.lua"
local model = `my_bench`

RegisterCommand('bench', function()
    if not IsModelValid(model) then
        print('my_bench is not registered, check the data_file line and the ytyp name')
        return
    end
    RequestModel(model)
    while not HasModelLoaded(model) do Wait(0) end

    local ped = PlayerPedId()
    local pos = GetOffsetFromEntityInWorldCoords(ped, 0.0, 2.0, 0.0)
    local obj = CreateObject(model, pos.x, pos.y, pos.z, true, false, false)
    PlaceObjectOnGroundProperly(obj)
    FreezeEntityPosition(obj, true)
    SetModelAsNoLongerNeeded(model)
end)
```

`GetModelDimensions(model)` returns the `bbMin` and `bbMax` you set here, which is a quick way to confirm the right ytyp is loaded.

## Common mistakes

- **Prop is invisible.** The ytyp is still XML, the `data_file` line is missing, or the archetype name does not match the model file name. For a `.ydr` the game finds the model by the archetype name, not by assetName.
- **White or purple textures.** `textureDictionary` does not match the `.ytd` name, or the `.ytd` is not streamed.
- **Prop disappears at screen edges.** Bounds are too small. Drop the model XML again to measure them.
- **Same name as a game prop.** Your archetype replaces or duplicates the game one. Give custom props their own prefix.
- **Ytyp named like a game ytyp.** Two files with one name fight each other. Pick a unique name for the ytyp too.
- **Changes do not show.** Reconnect. Archetypes are registered when the resource starts.
- **Animated prop does not animate.** Set `clipDictionary` and flag `512` (skeletal) or `1024` (UV). Add `524288` Auto start anim to start the clip on spawn.

> [!TIP]
> Keep the model file, the archetype name and the name you spawn identical and lowercase. Almost every "prop does not load" report comes down to one of the three being different.

## Limitations

- It writes XML only. The binary `.ytyp` comes from CodeWalker.
- Interiors (MLO archetypes) are passed through untouched, not edited. Use CodeWalker for those.
- Archetype extensions are kept from imports but cannot be created or edited here.
- Bounds come from the high detail mesh. If your lower LODs are bigger than the high LOD, widen the box by hand.
- Everything runs in your browser. Model files are read locally, nothing is uploaded. Your list is saved in browser storage.

## Related tools

- [YMAP Builder](/docs/tools/ymap-builder) to place your new props in the world
- [Objects List](/docs/tools/objects-list) to look up game props and their sizes
- [Texture Editor](/docs/tools/texture-editor) for the `.ytd`
- [YTD Optimizer](/docs/tools/ytd-optimizer) to shrink oversized texture dictionaries
- [fxmanifest Generator](/docs/tools/fxmanifest-generator)
- [joaat Hash Calculator](/docs/tools/hash-calculator)
