Every docs URL answers with Markdown when you add .md. Site map: llms.txt
Door Finder
Find any RDR2 door on the map, get its door hash and position, and copy it as a vorp_doorlocks or rsg-doorlock config entry or as Lua that locks it.
Deze docs zijn voorlopig in het Engels.
The Door Finder shows every door RDR2 registers with its door system on the map: 1,901 doors with 1,846 different door hashes. Click a door to get its hash, position and heading, and copy it as a Config.Doors entry for vorp_doorlocks, a Config.DoorList entry for rsg-doorlock, or Lua that locks it.
What it is for
Every door lock resource needs the door’s hash, and RDR2 does not work it out at runtime: each door in the world carries its own hash. Normally you would stand at the door in game with a debug script. Here you find the door on the map, check it is the right one, and paste the entry.
Quick start
- The map opens on Valentine, close enough to see the doors. Pan to the building you want, or search for it.
- Click a door. Its hash, position and heading show on the right.
- Hold Shift and click more doors to select several, for example both leaves of a double door.
- Pick the output tab: vorp_doorlocks, rsg-doorlock or Lua.
- Copy the code and set the permissions or jobs to your own.
On the map
| Marker | Meaning |
|---|---|
| Blue dot | A door placed by a map file (a gate, a shed, a house front). |
| Orange dot | A door that belongs to an interior. |
| White dot | A door you have selected. |
Zoom in and every door also gets a short bar showing which way it faces, which is how you tell the two leaves of a double door apart.
Click selects the door nearest to the pointer (within a few pixels) and drops the rest of the selection. Shift click adds a door to the selection, or takes it out again if it was already in.
Search and filters
| Control | What it does | Default |
|---|---|---|
| Search box | Matches part of the door’s model name or interior name, or a whole door hash: decimal (signed or unsigned) or 8 digit hex, with or without 0x. |
empty |
| All / Map files / Interiors | Show every door, only the 786 placed by map files, or only the 1,115 inside interiors. | All |
The line under the chips says how many doors match. While the search box has text, up to 100 matching doors are listed under it with their interior name (or their x, y when they are outside); click one to select it and fly to it. The filters apply to the map too, so a search also thins out the markers.
You can link to a search with ?q= or straight to a door with ?door=<hash>.
The door panel
| Field | What it shows |
|---|---|
| Name | The door’s model name. 173 doors have no known model name and show model 0x... with the model hash instead. |
| Door hash | The hash in decimal, with a copy button, and in hex. This is the number door lock resources want. |
| Position | x, y, z of the door, with a vector3 copy button. |
| Heading | The door’s heading in degrees. |
| Model hash | The model’s hash in hex. |
| Interior | The interior the door belongs to, linking to it in the Interiors tool. |
Two notes can appear under it:
- The map file that places this door is only loaded when a script asks for it. 353 doors are like this. Until something loads that map file, the door is not in the world, so locking it does nothing.
- The game places this interior n times, so this hash is at n places. A few interiors (a riverboat, some shacks) are placed more than once, and their doors carry the same hash in every copy. 110 doors are like this, so check the position in your config is the copy you mean.
With more than one door selected the panel just says how many, and the outputs cover all of them.
The outputs
The examples below are the two front doors of the Valentine bank (p_door_val_bank00_lx and p_door_val_bank00_rx), selected together.
vorp_doorlocks
Entries for Config.Doors in vorp_doorlocks’ config.lua, keyed by door hash. Set Permissions to one of your Config.Permissions groups.
[2642457609] = {
Pos = vector3(-309.05, 779.73, 117.73),
Name = "p_door_val_bank00_lx",
DoorState = 1, -- 0 open, 1 closed
Permissions = false, -- or a Config.Permissions entry
BreakAble = false,
Difficulty = 3,
Alert = false,
},
[3886827663] = {
Pos = vector3(-306.88, 780.12, 117.73),
Name = "p_door_val_bank00_rx",
DoorState = 1, -- 0 open, 1 closed
Permissions = false, -- or a Config.Permissions entry
BreakAble = false,
Difficulty = 3,
Alert = false,
},rsg-doorlock
Entries for Config.DoorList in rsg-doorlock’s config.lua. Every entry starts with authorizedJobs = { 'police' }: put your own job names there. textCoords is the door position one metre up, and objYaw is the heading written from -180 to 180.
{ -- p_door_val_bank00_lx
authorizedJobs = { 'police' },
doorid = 2642457609,
objCoords = vector3(-309.05, 779.73, 117.73),
textCoords = vector3(-309.05, 779.73, 118.73),
objYaw = 10.1,
locked = true,
distance = 2.0
},
{ -- p_door_val_bank00_rx
authorizedJobs = { 'police' },
doorid = 3886827663,
objCoords = vector3(-306.88, 780.12, 117.73),
textCoords = vector3(-306.88, 780.12, 118.73),
objYaw = -169.9,
locked = true,
distance = 2.0
},Lua
A client script that registers the doors with the door system (when the game has not already) and locks them:
local doors = {
2642457609, -- p_door_val_bank00_lx at -309.0, 779.7
3886827663, -- p_door_val_bank00_rx at -306.9, 780.1
}
CreateThread(function()
for _, door in ipairs(doors) do
-- _ADD_DOOR_TO_SYSTEM_NEW (0xD99229FE93B46286)
if not Citizen.InvokeNative(0xC153C43EA202C8C1, door) then -- IS_DOOR_REGISTERED_WITH_SYSTEM
Citizen.InvokeNative(0xD99229FE93B46286, door, true, true, false, 0, 0, false)
end
-- DOOR_SYSTEM_SET_DOOR_STATE (0x6BAB9442830C7F53): 1 locks it, 0 unlocks it
Citizen.InvokeNative(0x6BAB9442830C7F53, door, 1)
end
end)Change the 1 in the last call to 0 to unlock instead.
Tips
- Double doors are two doors with two hashes. Shift click both leaves, or one side stays open.
- Not sure you have the right building? Pick Interiors and search for the interior name (
val_bank,rho_sheriff), then check the doors that are left. - A door hash from someone’s config can be pasted into the search box to see which door it is and where.
Common mistakes
- Only half of a double door locks. You copied one leaf. Select both.
- The lock does nothing. Check for the note about a map file that only loads when a script asks. That door is not there until the map file is loaded.
- Everyone can open the door. The vorp_doorlocks entries come with
Permissions = falseand the rsg-doorlock entries with thepolicejob. Set them to your own before you use them.
Limitations
- The door lists come from the game’s own map and interior files. Doors that a script spawns at runtime are not in them.
- The position is the door entity’s own position, as the game places it. Move rsg-doorlock’s
textCoordsyourself if the text should sit somewhere else. - The tool does not check your door lock resource’s config format beyond the entries it writes. If your fork of vorp_doorlocks or rsg-doorlock uses other field names, rename them.