# Prop Setup

The example prop used in this article is `prop_container_05a.yft`

<div align="center"><figure><img src="/files/G0yYchbKqMvSgbAyjBzQ" alt=""><figcaption><p>prop_container_05a.yft</p></figcaption></figure></div>

### Fragment Hierarchy

<div align="left"><figure><img src="/files/AzGRaFVcPAT3aozxVVW8" alt=""><figcaption><p>prop_container_05a Blender hierarchy</p></figcaption></figure></div>

### Prop Rigging

You'll also notice that each Drawable Model is rigged using a Child Of constraint instead of vertex groups.

<div align="left"><figure><img src="/files/J1cGYmSghbAUDtctnCq1" alt=""><figcaption><p>prop_container_05a.mesh</p></figcaption></figure></div>

This is the case for all props. Typically each Drawable Model for a prop corresponds to a particular separable part of the Fragment. Notice there is a Drawable Model for the latch, each door, and the container itself.

### Skeleton Setup

This matches up with the bone hierarchy.

<div align="left"><figure><img src="/files/Gpnf28Mj0kiPrzYSgW5q" alt=""><figcaption><p>prop_container_05a.skel</p></figcaption></figure></div>

Each bone is parented to `Prop_Container_05a` and is thus affected by that bone. Every skeleton in the game engine always has one root bone that all the other bones are parented to.

{% hint style="warning" %}
If you attempt to add multiple top-level bones (bones with no parent) you will run into issues. Make sure there is a single "root" bone that all other bones are parented to!
{% endhint %}

Notice, too, that each bone has `Use Physics` enabled. This means that each of those parts will have physics in-game and will separate from each other.&#x20;

<div align="left"><figure><img src="/files/fPrIIUzQh2uB1W9q2zVa" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
In this case, the doors don't actually "separate" from the mesh, but fling open instead. This is because the `Strength` bone physics property is set to -1. When set to another value (i.e. 100) you'll notice that the parts will separate.
{% endhint %}

<div align="left"><figure><img src="/files/j8OTYwSlytAqUjfbdAiJ" alt=""><figcaption><p>With Strength set to 100 for both doors</p></figcaption></figure></div>

### Collisions

As mentioned before, each bone with physics enabled must have an associated collision. However, there can be multiple collisions for a single bone. Notice for this prop, there is a single collision for the latch and the doors, but the container itself is comprised of 5 box collisions.

<div align="left"><figure><img src="/files/pspEoGOht6keZ5pGJuTD" alt=""><figcaption><p>prop_container_05a.col</p></figcaption></figure></div>

{% hint style="info" %}
You will notice that a lot of vanilla collisions will use bound shapes wherever possible. This is typically preferred over using a bound mesh as it is much more performant. **Keep collisions as simple as possible.**
{% endhint %}

Each of these collision objects is linked to a bone via a Child Of Constraint.

<div align="left"><figure><img src="/files/e93qlG2cNLwgOMsWxsxl" alt=""><figcaption><p>Prop_CDoor_L.col constraints panel</p></figcaption></figure></div>

Each collision also has its mass set in the `Object Properties > Sollumz > Physics` panel.

<div align="left"><figure><img src="/files/jmE8GIqNEtM3SyFnBk2m" alt=""><figcaption><p>Object Properties > Sollumz > Physics</p></figcaption></figure></div>

### Quick Note on YTYP Flags

{% hint style="info" %}
In order for physics to work for your prop in-game, make sure the YTYP archetype has the "Dynamic" flag enabled!
{% endhint %}

<div align="left"><figure><img src="/files/taDNJ9SIKmNGuWVoiqvL" alt=""><figcaption><p>Archetype Definition > Archetypes > crate > Flags</p></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sollumz.org/documentation/fragments.yft/prop-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
