Every docs URL answers with Markdown when you add .md. Site map: llms.txt
Imap Toggler
Find RDR2 imaps (ymaps) by clicking the map, by name or by hash, see which only load when a script asks, and copy Lua that loads or removes them.
Documentația este deocamdată în engleză.
The Imap Toggler lists every imap (ymap) RDR2 ships, 7,516 of them, with the area its entities cover drawn on the map. Click a spot to see which imaps sit there, or search by name or hash, tick the ones you want and copy Lua that loads them, removes them or toggles them with a chat command.
What it is for
An imap is a piece of the world: a house, a camp, a pile of props, a burnt or a rebuilt version of a building. 2,639 of the game’s imaps only stream when a script asks for them, so if you want one of those in your RedM world, your resource has to request it. The reverse also works: remove an imap that is loaded and its contents are gone.
The hard part is knowing which imap holds the thing you are looking at. This tool answers that from the map.
Quick start
- Zoom in on the place you care about. Once you are close enough, each imap shows as a box (only the script loaded ones while Only imaps loaded by script is ticked).
- Click the spot. The list on the right now holds only the imaps whose box covers that point, smallest first.
- Click a name in the list to fly to it and open its details.
- Tick the box in front of each imap you want. They collect in the Set panel.
- Pick Load, Remove or Toggle command and copy the code.
Finding an imap
| Control | What it does | Default |
|---|---|---|
| Name or hash | Search box. See the table below for what it matches. | empty |
| Only imaps loaded by script | Limits the list (and the boxes on the map) to the 2,639 imaps that only load when a script asks. Untick it to include the 4,877 that load with the world. | on |
| Click on the map | Keeps only the imaps whose box covers that point, smallest first. The point shows as Covering x, y with an x button to clear it. | none |
The search and the map click work together, so you can click a spot and then type to narrow it.
| You type | It matches |
|---|---|
Part of a name, lockdown |
Every imap whose name contains it |
A hex hash, 89648C4A or 0x89648C4A |
That imap. Write all 8 digits when you leave out 0x. |
A decimal hash, -1989899190 or 2305068106 |
That imap, signed or unsigned |
The list shows at most 200 rows and says how many more there are. Each row is tagged script (loads only when asked) or always (loads with the world).
The map
- Boxes appear once you zoom in. Orange boxes only load when a script asks, faint white ones load with the world.
- Imaps in your set are green.
- The imap you opened is white.
- The white dot is the point you clicked.
The box is where the imap’s entities sit, rounded to the metre. It is not a streaming radius.
Details
Clicking a name opens its card:
| Field | What it shows |
|---|---|
| Hash | Hex and signed decimal, for example 0x89648C4A / -1989899190 |
| Loaded | only when a script asks or with the world |
| Extents | The x, y box and the z range of its entities |
| Contents | How many entities it places, plus instanced plants and rocks when it has any |
| Parent | The imap it hangs off, when it has one |
Add to the set / Remove from the set does the same as the tick box.
The code
The Set panel turns your picks into one table of signed hashes with each name in a comment, and a loop over it. Clear empties the set.
| Mode | What the code does |
|---|---|
| Load | Requests every imap in the set that is not active yet |
| Remove | Removes every imap in the set that is active |
| Toggle command | Registers an /imaps command that removes each imap if it is active and requests it if not |
The natives are called by hash with Citizen.InvokeNative, each one named in a comment. With VAL_02_LOCKDOWN_BANK and its parent in the set, Load gives:
local imaps = {
-1989899190, -- VAL_02_LOCKDOWN_BANK
84505049, -- val_02_lockdown_bank_lod
}
for _, imap in ipairs(imaps) do
-- IS_IPL_ACTIVE_HASH (0xD779B9B910BD3B7C), REQUEST_IPL_HASH (0x59767C5A7A9AE6DA)
if not Citizen.InvokeNative(0xD779B9B910BD3B7C, imap) then
Citizen.InvokeNative(0x59767C5A7A9AE6DA, imap)
end
endand Toggle command gives:
local imaps = {
-1989899190, -- VAL_02_LOCKDOWN_BANK
84505049, -- val_02_lockdown_bank_lod
}
RegisterCommand("imaps", function()
for _, imap in ipairs(imaps) do
-- IS_IPL_ACTIVE_HASH (0xD779B9B910BD3B7C)
if Citizen.InvokeNative(0xD779B9B910BD3B7C, imap) then
Citizen.InvokeNative(0x5A3E5CF7B4014B96, imap) -- REMOVE_IPL_HASH
else
Citizen.InvokeNative(0x59767C5A7A9AE6DA, imap) -- REQUEST_IPL_HASH
end
end
end, false)These are client natives, so the code goes in a client script and runs on each player’s game.
Names and hashes
5,124 imaps have a known name. The other 2,392 (about a third) are listed by hash, as 0x.... That matters more than it sounds with the default filter on: of the 2,639 imaps that only load on request, 2,083 are known only by hash.
A missing name does not stop you. The natives take the hash, and the code always writes the hash, so an unnamed imap loads and unloads exactly like a named one. The name is only there to help you recognise it.
Tips
- Click the spot, then look at the smallest boxes first. The list is sorted that way because a small imap is usually the specific thing you clicked on, while the big ones cover a whole area.
- Many imaps name a Parent, often the
_lodimap of the same name (VAL_02_LOCKDOWN_BANKhangs offval_02_lockdown_bank_lod). When you load one, look at its parent too and add it to the set if it belongs with it. - Names that come in a family (
VAL_02_LOCKDOWN_BANK,_GUN,_HOTEL,_LAW) are easiest to collect with a search for the shared part. - Use Toggle command while you are testing, then switch to Load for the resource you ship.
Limitations
- There is no picture of what an imap contains. You get its position, entity count and parent; checking what it looks like happens in game.
- The box covers the imap’s entities only, rounded to the metre. An imap with a single prop has a box a metre or two wide and is easy to miss on the map until you click its spot.
- Imaps with no known name can only be found by clicking the map or by their hash.
- The site cannot check the result in game. Some imaps are meant to be loaded together or in place of another state, and the tool does not know those pairings.