Skip to content

RedM Doorhashes ​

Doorhashes are unique identifiers used to make doors from YMAPs or YTYPs interactable within RedM. This guide will walk you through the process of adding custom doors to your server's doorhashes.lua.

Prerequisites ​

To follow this guide, you will need:

  • Access to your server's YMAP or YTYP files.
  • A tool to get coordinates (e.g., Spooner).
  • The RDR2 Hasher Tool.

1. Modifying the YMAP/YTYP File ​

To make a door usable, you must add an <extensions> block to the corresponding CEntityDef in your YMAP or YTYP file.

Example XML Structure ​

Locate your door archetype (e.g., p_door06x) and insert the extensions as shown below:

xml
<Item type="CEntityDef">
  <archetypeName>p_door06x</archetypeName>
  <flags value="1572865"/> <!-- Important: Door flag -->
  <position x="1.378032" y="-2.114014" z="-1.714352"/>
  <rotation w="0.000000" x="0.000000" y="-0.000000" z="-1.000000"/>
  <!-- ... other properties ... -->
  <extensions>
    <Item type="CExtensionDefDoor">
      <name>p_door06x</name>
      <offsetPosition x="0" y="0" z="0" />
      <!-- Default opening parameters -->
      <enableLimitAngle value="true" />
      <startsLocked value="false" />
      <canBreak value="false" />
      <audioHash>ismdclsa_0x725d11b6</audioHash>
    </Item>
    <Item type="SSxlGTA_0xDB12012B">
      <name>p_door06x</name>
      <offsetPosition x="0" y="0" z="0" />
      <Id>my_custom_door_name</Id> <!-- Enter a unique name here -->
    </Item>
  </extensions>
</Item>

TIP

The <Id> value is what identifies your door. Choose a unique name like saloon_front_door_left.


2. Generating the Doorhash ID ​

Once you have defined an <Id> in your XML file, you need to convert that name into a decimal hash.

TIP

Use the Doorhash Creator tool to convert your Door ID into a hex and decimal hash. The Lua row shows a ready-to-use template — replace ModelHash, ModelName, and the coordinates with your actual values from Spooner.

Example Conversion:

  • ID: my_door
  • Hex: 9FC43DA6
  • Decimal: 2680438182

3. Implementation in doorhashes.lua ​

The final step is to add the door data to your script's configuration.

WARNING

Crucial: Do NOT use the coordinates from your YMAP or YTYP file. Instead, use a tool like Spooner to get the exact world coordinates and the model hash of the door in-game.

Format ​

lua
[DecimalHash] = {DecimalHash, ModelHash, "ModelName", x, y, z},

Example ​

Using our my_door example from above:

lua
[2680438182] = {2680438182, -807564273, "p_door06x", -1391.54, -2041.56, 41.0},

Video Tutorial ​

For a visual demonstration of this process, watch the following tutorial:

Watch on YouTube