# Proper Door / Barrier Configuration

Sometimes doors or barriers may behave unexpectedly. In most cases, this is caused by the model not being properly assigned in the **doortuning** file. Below you will find a clear, step-by-step guide explaining how to configure it correctly.

For every MLO purchased from us, we provide detailed instructions in the **ReadMe** file. However, if the instructions are missing for any reason, please follow the guide below.

## Step 1 – Open the doortuning File

Open the file **`doortuning.ymt`** using any text editor.

<figure><img src="/files/7zGUE5ez1JIYBqEqUhC7" alt=""><figcaption></figcaption></figure>

## Step 2 – Add Your Door to ModelToTuneMapping

Scroll down to the bottom of the file until you reach the section:

```
ModelToTuneMapping
```

Copy one existing **`Item`** section and paste it below. The structure should match the existing formatting (as shown in the reference screenshot).

* Replace the door name in the **`ModelName`** field.
* The name specified in `ModelName` must exist in a `.ytyp` file.
  * If you are editing lore doors, they are automatically included in the appropriate file.

<figure><img src="/files/0aQvcNj7DImFdDG4rJWV" alt=""><figcaption></figcaption></figure>

## TuningName – Door Behavior Configuration

The **`TuningName`** section defines how the door behaves. Below is a detailed explanation of each parameter:

* **Name** – The configuration name (Named Tuning). This name is later assigned to a specific door model in `ModelToTuneMapping`.
* **AutoOpenVolumeOffset** – Offset of the auto-open detection point relative to the door pivot (X, Y, Z). Used when the trigger needs to be shifted from the model’s center.
* **Flags** – Additional behavioral flags (e.g., defining who can open the door automatically).
* **AutoOpenRadiusModifier** – Multiplier for the auto-open detection radius. Higher values allow players or vehicles to trigger the door from a greater distance.
* **AutoOpenRate** – Speed at which the door automatically opens once conditions are met.
* **AutoOpenCosineAngleBetweenThreshold** – Approach angle limitation. A value of `-1.0` disables angle restrictions (the door reacts from any direction).
* **AutoOpenCloseRateTaper** – Determines whether the door slows down gradually when closing (`true`) or closes at a constant speed (`false`).
* **UseAutoOpenTriggerBox** – Specifies whether a custom trigger box is used for auto-open detection.
* **CustomTriggerBox** – If set to `true`, manually defined `TriggerBoxMinMax` values will be used.
* **TriggerBoxMinMax** – Defines the minimum and maximum 3D coordinates of the custom detection zone.
* **BreakableByVehicle** – Determines whether the door can be destroyed by vehicle impact.
* **BreakingImpulse** – Physical impulse force applied when the door breaks.
* **ShouldLatchShut** – Defines whether the door latches after closing.
* **MassMultiplier** – Multiplier affecting the physical mass of the door.
* **WeaponImpulseMultiplier** – Multiplier for how strongly the door reacts to weapon impacts.
* **RotationLimitAngle** – Maximum rotation angle relative to the starting position.
* **TorqueAngularVelocityLimit** – Maximum angular velocity during movement.
* **StdDoorRotDir** – Standard door rotation direction (e.g., one-way or bidirectional).

<figure><img src="/files/nTI1wM4VtZY9wY4Uapbx" alt=""><figcaption></figcaption></figure>

## Final Step – Restart the Server

After completing the configuration, restart your server.\
If everything has been set correctly, the door should function as intended.

## If You Do Not Have a doortuning File

If your server does not include a `doortuning` file, we provide our version free of charge upon request via a support ticket.

Our `doortuning` file already includes configurations for all doors used in our MLOs, so there is no need to re-add them. Additionally, the file is fully editable, allowing you to:

* Add your own custom doors
* Adjust distances
* Modify mass and physical parameters
* Customize lore door behavior in GTA


---

# 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://octavista-development.gitbook.io/octavista-development/information/toturials/proper-door-barrier-configuration.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.
