# Drawable Dictionary (.ydd)

The Drawable Dictionary is a container that holds a collection of drawables. Its primary use is for storing LOD models, ped components, ped props, mesh minimaps and instanced props.

It is recommended that you read the Drawable documentation page before creating a Drawable Dictionary, as it consists of drawables.

{% content-ref url="<https://github.com/Sollumz/wiki/blob/main/documentation/drawables.ydr>" %}
<https://github.com/Sollumz/wiki/blob/main/documentation/drawables.ydr>
{% endcontent-ref %}

### File Layout

```
Drawable Dictionary
    Drawable#1
        ShaderGroup
        Skeleton (sometimes, mostly seen on ped components)
        DrawableModelsHigh
        DrawableModelsMed
        …
    Drawable#2
    Drawable#3
    Drawable#4
    Drawable#5
    …
```

For the hierarchy, several drawables exist as regular game-ready assets, but all of them share one parent drawable dictionary object.

### Blender Hierarchy

<div align="left" data-full-width="false"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2Fgit-blob-521ae13a68ac44f4240bbd0fb1996a4dd0422169%2Fdrawable_dictionary_hierarchy_in_blender.jpg?alt=media" alt=""><figcaption><p>Example Drawable Dictionay object</p></figcaption></figure></div>

In Blender, Drawable Dictionaries comprises a parent object and one or more drawable objects in its hierarchy.

### Limitation

Some features of Drawable objects cannot be inherited by Drawable Dictionaries. For example, the embedded collision **cannot function** when the drawable is in a drawable dictionary.

Furthermore, CodeWalker cannot identify the real name of a drawable in drawable dictionaries unless a nametable with resolved names is loaded. Thus, it is recommended to create a nametable whenever utilizing a drawable dictionary in your project to facilitate your own and others' modding processes.

### Archetype Definition

{% hint style="info" %}
A Drawable Dictionary does not have its own archetype definition.
{% endhint %}

When creating the archetype definition for a drawable in a drawable dictionary, it is necessary to fill the correct name of your drawable dictionary in the "Drawable Dictionary" blank to ensure it workds within the game.

For instance, if we have the drawable dictionary `my_ydd` and the drawable `my_ydr` in the scene. Then you should fill in "Drawable Dictionary" in the archetype as shown in the picture below:

<div align="left" data-full-width="false"><figure><img src="https://4252508569-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcRAM9lBHCqq3QodZ420I%2Fuploads%2Fgit-blob-71ebe32a48422d65d06e89f09871b7090de2c38b%2Fdrawable_dictionary_archetype_in_blender.jpg?alt=media" alt=""><figcaption><p>Fill the "Drawable Dictionary" with the name of your drawable dictionary</p></figcaption></figure></div>

{% hint style="info" %}
If you use the "Auto-Create From Selected" function, the "Drawable Dictionary" will be filled in automatically.
{% endhint %}
