.#map


.#map in PC version of GTAV got extension .ymap wheres prefix y stands for win64pc/win64/x64/linux platform

By #maps you can place drawables, static cars, instanced grasses, occlusions or lod/distant lights
All can be done in two ways (at start of game or by script)
Below i will explain main entries in #map what they do and what they are, based on my research:

<name>

Simply - its name of #map

<parent>

Its used in LOD parenting and lod/distant lights parenting.
under parent you define name of parent #map (more in LOD parenting)

<flags value="0"/>

Here theres 4 options:
<flags value="0"/> #map loads at start game, normal drawables
<flags value="1"/> #map load by script, normal drawables
<flags value="2"/> #map load at start game, LOD drawables
<flags value="3"/> #map load by script, LOD drawables


<contentFlags value="0">

Its determines content of #map:
<contentFlags value="0"/> in #map with only timecycle modifiers
<contentFlags value="1"/> in #map drawables without collision
<contentFlags value="2"/> LOD
<contentFlags value="4"/> SLOD2+
<contentFlags value="8"/>interior (MLO)
<contentFlags value="16"/> SLOD
<contentFlags value="18"/> SLOD1 + LOD
<contentFlags value="20"/> SLOD4+SLOD3+SLOD2 or SLOD2 + SLOD3 or SLOD2
<contentFlags value="32"/> Occlusion
<contentFlags value="48"/> (32+16) occlusion with SLODS
<contentFlags value="50"/> (2+16+32) (LOD+SLOD1+occlusion)
<contentFlags value="64"/> physics (in #map at least one drawable with embedded collision)
<contentFlags value="73"/> MLO placement
<contentFlags value="128"/> LOD lights
<contentFlags value="256"/> distant lights
<contentFlags value="513"/> Critical
<contentFlags value="1024"/> instancedData (grass, props)
<contentFlags value="4161"/> ? (example imap 0x31A09850 - sppack_a1sup_frzwaterfall - contains orphan archetypes, its not in LOD parenting

<streamingExtentsMin/Max> and <entitiesExtentsMin/Max>

Its boundaries of #map.
entitiesExtentsMin/Max - contains min (lowest value from all props for x,y,z)
and max (highest value from all props for x,y,z)

streamingExtentsMin/Max - these values determines distance of visibility of props from that ymap

Too small values for above entries will make objects invisible or flickering on camera angle.


<entities>

Contains placement of all props (CEntityDef)

<flags value="0">

Flag (for entities not main flag for ymap!) determines how object will affect in game.

<guid value="0"/>

Its unique id used by scripts to indentify exact object. It can be generated by neos script in 3dsmax while exporting .ymap.xml

<position x="0" y="0" z="0"/>

Its simply x,y,z position of object in game.

<rotation x="0" y="0" z="0" w="1"/>

Game uses quaternions for rotation (x,y,z,w) but when needed rotation in euler (x,y,z) for 3dsmax for example theres online converter https://quaternions.online/

<scaleXY> and <scaleZ>

Its used to rescale entity

<parentIndex value="-1"/>

Its used in LOD parenting.
Its uses numbers (indexes) to tag parent for object (starts from 0 to upper numbers)
-1 means it has no parent.
More in LOD parenting

<lodDist value="1000"/>

Number in this value means how far will be visible object in game. In this example object will be visible until 1000 unit coord on any axis (x,y,z) if you will be at distance more than 1000 unit (on any direction x,y,z) then object will dissapear.

<childLodDist value="1000"/>

Same as above but for child (in LOD parenting)

<lodLevel>

LODTYPES_DEPTH_ORPHANHD (objects without any LODs)
LODTYPES_DEPTH_HD (objects with embedded LODs or without it - base for external)
LODTYPES_DEPTH_LOD
LODTYPES_DEPTH_SLOD1
LODTYPES_DEPTH_SLOD2
LODTYPES_DEPTH_SLOD3
LODTYPES_DEPTH_SLOD4

More in LOD parenting.


RDR3 uses SLOD4 level its placed in second level #map in direct order of placement: first SLOD4 then SLOD3 then SLOD2, parenting schema works same like in GTAV
In some first level imaps along with SLOD1+LOD are placed occludeModels Content Flags for these #maps is 50

<numChildren value="0"/>

Used in LOD parenting. Its definies how many childs are in chain for this object.

<groupId>0xA00FBCC5</groupId>

Interior groups in MLO placement ymaps used hash as of group
example: <groupId>0xA00FBCC5</groupId>

IG_ID_NONE <Id value="0"/> 0xA00FBCC5
IG_ID_METRO <Id value="1"/> 0xEC89C407
IG_ID_BACTUNNEL 0xF9CAA982
IG_ID_MILMINECAVE 0xCB00E735
IG_ID_HEARTTUNNEL 0x6836E8CA
IG_ID_Q0304TUNNEL 0xF2E7A761
IG_ID_L08TUNNEL2 0xCC75201F
IG_ID_J14TUNNEL 0xFBCEDD8C
IG_ID_J10TUNNEL 0x0A90AF26