5. .ytyp in detail
<CMapTypes>
<extensions/>
<archetypes>
<Item type="CBaseArchetypeDef">
<lodDist value="500.00000000"/>
<flags value="32"/>
<specialAttribute value="0"/>
<bbMin x="-1.5" y="-0.5" z="0.0"/>
<bbMax x="1.5" y="0.5" z="1.0"/>
<bsCentre x="0.0" y="0.0" z="0.5"/>
<bsRadius value="1.7"/>
<hdTextureDist value="250.00000000"/>
<name>my_prop_01</name>
<textureDictionary>my_props</textureDictionary>
<clipDictionary/>
<drawableDictionary/>
<physicsDictionary>my_props</physicsDictionary>
<assetType>ASSET_TYPE_DRAWABLE</assetType>
<assetName>my_prop_01</assetName>
<extensions/>
</Item>
</archetypes>
<name>my_props</name>
<dependencies/>
<compositeEntityTypes/>
</CMapTypes>
Archetype types
| Type | Use |
|---|---|
CBaseArchetypeDef |
Ordinary props, buildings, map geometry |
CTimeArchetypeDef |
Time-dependent visibility. Adds timeFlags (see below) |
CMloArchetypeDef |
Interiors (MLO). Adds rooms, portals, entities, entitySets, timecycleModifiers |
assetType (verified enum, rage__fwArchetypeDef__eAssetType)
| Value | Int | Meaning |
|---|---|---|
ASSET_TYPE_UNINITIALIZED |
0 | |
ASSET_TYPE_FRAGMENT |
1 | .yft |
ASSET_TYPE_DRAWABLE |
2 | .ydr |
ASSET_TYPE_DRAWABLEDICTIONARY |
3 | inside a .ydd, set drawableDictionary to the ydd name |
ASSET_TYPE_ASSETLESS |
4 | MLO / no geometry of its own |
Archetype flags (bitmask)
Every row in the previous version of this table was wrong except 2 and 32. Corrected against Dekurwinator's research. CodeWalker stores flags as a raw uint with no named enum, so there is no authoritative source better than this.
| Hex | Dec | Name |
|---|---|---|
0x00000001 |
1 | FLAG_WET_ROAD_REFLECTION |
0x00000002 |
2 | FLAG_DONT_FADE |
0x00000004 |
4 | FLAG_DRAW_LAST |
0x00000008 |
8 | FLAG_PROP_CLIMBABLE_BY_AI |
0x00000010 |
16 | FLAG_SUPPRESS_HD_TXDS |
0x00000020 |
32 | FLAG_IS_FIXED: static, won't interact with dynamic objects |
0x00000040 |
64 | FLAG_DONT_WRITE_ZBUFFER |
0x00000080 |
128 | FLAG_TOUGHFORBULLETS |
0x00000100 |
256 | FLAG_IS_GENERIC |
0x00000200 |
512 | FLAG_HAS_ANIM |
0x00000400 |
1024 | FLAG_HAS_UVANIM |
0x00000800 |
2048 | FLAG_SHADOW_ONLY |
0x00001000 |
4096 | FLAG_DAMAGE_MODEL |
0x00002000 |
8192 | FLAG_DONT_CAST_SHADOWS |
0x00004000 |
16384 | FLAG_CAST_TEXTURE_SHADOWS |
0x00008000 |
32768 | FLAG_DONT_COLLIDE_WITH_FLYER |
0x00010000 |
65536 | FLAG_IS_TREE |
0x00020000 |
131072 | FLAG_IS_TYPE_OBJECT: dynamic, mostly archetypes with a skeleton |
0x00040000 |
262144 | FLAG_OVERRIDE_PHYSICS_BOUNDS |
0x00080000 |
524288 | FLAG_AUTOSTART_ANIM |
0x00100000 |
1048576 | FLAG_HAS_PRE_REFLECTED_WATER_PROXY |
0x00200000 |
2097152 | FLAG_HAS_DRAWABLE_PROXY_FOR_WATER_REFLECTIONS |
0x00400000 |
4194304 | FLAG_DOES_NOT_PROVIDE_AI_COVER |
0x00800000 |
8388608 | FLAG_DOES_NOT_PROVIDE_PLAYER_COVER |
0x01000000 |
16777216 | FLAG_IS_LADDER_DEPRECATED |
0x02000000 |
33554432 | FLAG_HAS_CLOTH |
0x04000000 |
67108864 | FLAG_DOOR_PHYSICS: required to enable door specialAttributes |
0x08000000 |
134217728 | FLAG_IS_FIXED_FOR_NAVIGATION |
0x10000000 |
268435456 | FLAG_DONT_AVOID_BY_PEDS |
0x20000000 |
536870912 | FLAG_USE_AMBIENT_SCALE: this is the "don't glow at night" flag |
0x40000000 |
1073741824 | FLAG_IS_DEBUG |
0x80000000 |
2147483648 | FLAG_HAS_ALPHA_SHADOW |
32 (static prop) is the sane default. Every real ytyp generator ships <flags value="32"/> as its baseline.
π‘ specialAttribute
The SA_* names are GTA IV IDE special attributes, a different system entirely. GTA V's specialAttribute is a small enum, mostly door behaviour. Door values need FLAG_DOOR_PHYSICS (67108864) set.
Enum, not a bitfield β engine-confirmed. RAGE calls these model attributes and tests them for equality, never with a mask: pModel->GetAttributes() == MODEL_ATTRIBUTE_IS_BENDABLE_PLANT. Six of the names below appear verbatim in engine code (IS_LADDER, IS_TRAFFIC_LIGHT, IS_BENDABLE_PLANT, IS_RAIL_CROSSING_DOOR, NOISY_AND_DEFORMABLE_BUSH, IS_RAIL_CROSSING_LIGHT), and there is no attribute name in the engine that this table is missing. The numeric mapping is still community research; the names and the enum shape are not.
| Value | Name |
|---|---|
| 0 | Special functions disabled |
| 2 | IS_LADDER |
| 3 | IS_TRAFFIC_LIGHT |
| 4 | IS_BENDABLE_PLANT |
| 5 | IS_GARAGE_DOOR: up/down 90Β° |
| 6 | MLO_WATER_LEVEL |
| 7 | IS_NORMAL_DOOR: pushed by player |
| 8 | IS_SLIDING_DOOR: slides leftβright on approach |
| 9 | IS_BARRIER_DOOR |
| 10 | IS_SLIDING_DOOR_VERTICAL |
| 11 | NOISY_BUSH |
| 12 | IS_RAIL_CROSSING_DOOR |
| 13 | NOISY_AND_DEFORMABLE_BUSH |
| 14 | SINGLE_AXIS_ROTATION |
| 15 | HAS_DYNAMIC_COVER_BOUND |
| 16 | RUMBLE_ON_LIGHT_COLLISION_WITH_VEHICLE |
| 17 | IS_RAIL_CROSSING_LIGHT |
| 27 | IS_DEBUG |
| 28 | RUBBISH |
| 29 | RUBBISH_ONLY_ON_BIN_DAY |
| 30 | CLOCK |
| 31 | IS_TREE_DEPRECATED |
| 32 | IS_STREET_LIGHT |
1, 18-26 are unused. Ladder is 2, not 1. Street light is 32, not 31.
CTimeArchetypeDef timeFlags
Bits 1-24 map to hours 00:00-23:00 (bit 1 = midnight, bit 24 = 23:00). Bit 25 = ALLOW_VANISH_WHILST_VIEWED. Bit 32 = always on (24/7).
physicsDictionary
Name of the .ybn container (the rpf-internal collision dictionary), not the individual bound. Wrong value β prop with no collision. If collision is embedded in the .ydr, match it to the ytyp name or leave blank depending on setup.
MLO specifics (CMloArchetypeDef)
<Item type="CMloArchetypeDef">
<name>my_interior</name>
<assetType>ASSET_TYPE_ASSETLESS</assetType>
<assetName>my_interior</assetName>
<mloFlags value="0"/>
<rooms>
<Item>
<name>limbo</name>
<bbMin x="-100" y="-100" z="-100"/>
<bbMax x="100" y="100" z="100"/>
<blend value="1.0"/>
<timecycleName>int_mall</timecycleName>
<secondaryTimecycleName/>
<flags value="0"/>
<portalCount value="0"/>
<floorId value="0"/>
<exteriorVisibiltyDepth value="-1"/>
<attachedObjects/>
</Item>
</rooms>
<portals>
<Item>
<roomFrom value="0"/>
<roomTo value="1"/>
<flags value="0"/>
<mirrorPriority value="0"/>
<opacity value="0"/>
<audioOcclusion value="0"/>
<corners>
<Item x="0" y="0" z="0"/>
<Item x="1" y="0" z="0"/>
<Item x="1" y="0" z="2"/>
<Item x="0" y="0" z="2"/>
</corners>
<attachedObjects/>
</Item>
</portals>
<entities/>
<entitySets/>
<timeCycleModifiers/>
</Item>
Portal gotchas:
- Exactly 4 corners, wound consistently, must be coplanar.
roomFrom/roomToare indices into<rooms>. Room 0 =limbo= exterior.- Portals to limbo make the interior visible from outside; set
exteriorVisibiltyDepthon rooms that need to see out. - Portal count per room must be recalculated (CodeWalker does it).
MLO portal flags
| Value | Meaning |
|---|---|
| 1 | One way |
| 2 | MLO link |
| 4 | Mirror |
| 8 | Disables timecycle modifier |
| 16 | Mirror using expensive shaders |
| 32 | Low LOD only |
| 64 | Hide when doors closed |
| 128 | Mirror can see directional |
| 256 | Mirror using portal traversal |
| 512 | Mirror floor |
| 1024 | Mirror can see exterior view |
| 2048 | Water surface |
| 4096 | Water surface extend to horizon |
| 8192 | Use light bleed |
MLO room flags
| Value | Meaning |
|---|---|
| 1 | Freeze vehicles |
| 2 | Freeze peds |
| 4 | No direct light |
| 8 | No exterior light |
| 16 | Force freeze |
| 32 | Reduce vehicle population by 66% while player is in room |
| 64 | Reduce ped population by 66% while player is in room |
| 128 | Force direct light on |
| 256 | Don't render exterior |
| 512 | Mirror potentially visible |
6. .ymap in detail
<CMapData>
<name>my_map</name>
<parent/>
<flags value="0"/>
<contentFlags value="65"/>
<streamingExtentsMin x="100" y="-350" z="0"/>
<streamingExtentsMax x="200" y="-250" z="60"/>
<entitiesExtentsMin x="140" y="-310" z="18"/>
<entitiesExtentsMax x="160" y="-290" z="24"/>
<entities>
<Item type="CEntityDef">
<archetypeName>my_prop_01</archetypeName>
<flags value="32"/>
<guid value="0"/>
<position x="150.0" y="-300.0" z="20.0"/>
<rotation x="0" y="0" z="0" w="1"/>
<scaleXY value="1"/>
<scaleZ value="1"/>
<parentIndex value="-1"/>
<lodDist value="500"/>
<childLodDist value="0"/>
<lodLevel>LODTYPES_DEPTH_ORPHANHD</lodLevel>
<numChildren value="0"/>
<priorityLevel>PRI_REQUIRED</priorityLevel>
<extensions/>
<ambientOcclusionMultiplier value="255"/>
<artificialAmbientOcclusion value="255"/>
<tintValue value="0"/>
</Item>
</entities>
<containerLods/>
<boxOccluders/>
<occludeModels/>
<physicsDictionaries/>
<instancedData>
<ImapLink/>
<PropInstanceList/>
<GrassInstanceList/>
</instancedData>
<timeCycleModifiers/>
<carGenerators/>
<LODLightsSOA/>
<DistantLODLightsSOA/>
<block>
<version value="0"/>
<flags value="0"/>
<name>my_map</name>
<exportedBy>Blanco</exportedBy>
<owner/>
<time/>
</block>
</CMapData>
CMapData <flags>
| Value | Meaning |
|---|---|
| 0 | Loads at game start, normal drawables |
| 1 | Loaded by script (Menyoo/CodeWalker/native REQUEST_IPL) |
| 2 | Loads at start, LOD drawables |
| 3 | Loaded by script, LOD drawables |
π‘ gtamods still records CMapData <flags> as "unknown"; the mapping above is community-derived but consistent in practice (Community RE, not untested folklore).
CMapData <contentFlags> (bitmask)
| Bit | Value | Meaning |
|---|---|---|
| 0 | 1 | HD entities |
| 1 | 2 | LOD entities |
| 2 | 4 | SLOD2 / SLOD3 |
| 3 | 8 | Interior (MLO placement) |
| 4 | 16 | SLOD1 |
| 5 | 32 | Occlusion |
| 6 | 64 | Physics (embedded collision present) |
| 7 | 128 | LOD lights |
| 8 | 256 | Distant lights |
| 9 | 512 | Critical |
| 10 | 1024 | Instanced data (grass/props) |
Common values:
1: props, no collision65(1+64): props with embedded collision β most add-on prop ymaps73(1+8+64): MLO placement ymap2: LOD only18(2+16): LOD + SLOD150(2+16+32): LOD + SLOD1 + occlusion1088(64+1024): instanced grass
FiveM auto-patches a missing bit 3 if it finds a CMloInstanceDef without it, and logs a warning. Don't rely on it.
CodeWalker: Tools β Auto-calculate flags/extents. Just use this.
Extents
entitiesExtentsMin/Max: AABB tightly containing all entities.streamingExtentsMin/Max: the box that must be on-screen for the ymap to stream in. Must be β₯ entities extents, usually padded by the largestlodDist.- Too-small streaming extents = props pop in/out or vanish when you look away. Single most common "my map is flickering" bug.
CEntityDef fields
| Field | Notes |
|---|---|
archetypeName |
Must match a <name> in a loaded ytyp |
flags |
Entity-level bitmask. Not the same as ytyp flags. See table below |
guid |
Usually 0; unique ID for script refs |
rotation |
Quaternion, stored inverted (conjugate) relative to what you'd expect. CodeWalker handles this; hand-editing does not |
parentIndex |
LOD parent (see below) |
lodDist |
Distance at which this entity stops rendering / switches to its LOD |
childLodDist |
Distance at which its children stop rendering |
lodLevel |
See below |
numChildren |
Count of entities pointing at this one via parentIndex |
priorityLevel |
PRI_REQUIRED 0, PRI_OPTIONAL_HIGH 1, PRI_OPTIONAL_MEDIUM 2, PRI_OPTIONAL_LOW 3 |
tintValue |
Vegetation tint palette index (row in the tint ytd) |
ambientOcclusionMultiplier |
0-255 |
<Item type="CMloInstanceDef"> adds groupId, floorId, defaultEntitySets, numExitPortals, MLOInstflags.
CEntityDef flags (bitmask)
| Hex | Dec | Name |
|---|---|---|
0x00000001 |
1 | FLAG_FULLMATRIX: allow full rotation |
0x00000002 |
2 | FLAG_STREAM_LOWPRIORITY |
0x00000004 |
4 | FLAG_DONT_INSTANCE_COLLISION: disable embedded collision |
0x00000008 |
8 | FLAG_ATTACH_LOD_IS_IN_PARENT_MAPDATA β see parentIndex |
0x00000010 |
16 | FLAG_ADOPTME |
0x00000020 |
32 | FLAG_IS_FIXED: static entity |
0x00000040 |
64 | FLAG_IS_INTERIOR_LOD |
0x00008000 |
32768 | FLAG_DRAWABLELODUSEALTFADE |
0x00010000 |
65536 | FLAG_UNDERWATER |
0x00020000 |
131072 | FLAG_DOESNOTTOUCHWATER |
0x00040000 |
262144 | FLAG_DOESNOTSPAWNPEDS |
0x00080000 |
524288 | FLAG_LIGHTS_CAST_STATIC_SHADOWS |
0x00100000 |
1048576 | FLAG_LIGHTS_CAST_DYNAMIC_SHADOWS |
0x00200000 |
2097152 | FLAG_LIGHTS_IGNORE_DAY_NIGHT_SETTINGS |
0x00400000 |
4194304 | FLAG_DONT_RENDER_IN_SHADOWS |
0x00800000 |
8388608 | FLAG_ONLY_RENDER_IN_SHADOWS |
0x01000000 |
16777216 | FLAG_DONT_RENDER_IN_REFLECTIONS |
0x02000000 |
33554432 | FLAG_ONLY_RENDER_IN_REFLECTIONS |
0x04000000 |
67108864 | FLAG_DONT_RENDER_IN_WATER_REFLECTIONS |
0x08000000 |
134217728 | FLAG_ONLY_RENDER_IN_WATER_REFLECTIONS |
0x10000000 |
268435456 | FLAG_DONT_RENDER_IN_MIRROR_REFLECTIONS |
0x20000000 |
536870912 | FLAG_ONLY_RENDER_IN_MIRROR_REFLECTIONS |
128-16384 and 1073741824+ are unused.
Known combos:
1572864(524288 + 1048576) = lights cast static and dynamic shadows. Standard for doors, gates, ladders. This is the shadow pair, not a "common for scripted" flag.1572866(+2) = security gates (up/down).
parentIndex
Which entity list parentIndex indexes depends on entity flag bit 3 (value 8, FLAG_ATTACH_LOD_IS_IN_PARENT_MAPDATA).
- Flag 8 clear (default):
parentIndexindexes the entity array of the same ymap. CodeWalker:alldefs[pind]. - Flag 8 set:
parentIndexindexes the entity array of the ymap named in<parent>. CodeWalker resolves this inConnectToParent()viapymap.AllEntities[pind].
CodeWalker exposes exactly this: public bool LodInParentYmap => ((_CEntityDef.flags >> 3) & 1) > 0;. Dekurwinator's independently-derived flag name for bit 3 is FLAG_ATTACH_LOD_IS_IN_PARENT_MAPDATA, two sources, same conclusion.
Resolution is flag-dependent: not always the same ymap, and not always the parent ymap.
Either way it's a zero-based array index, not a name or hash. Insert an entity mid-list and every index after it shifts.
CodeWalker additionally rejects a parent as invalid (treats the entity as a root) when the parent's lodLevel is numerically β€ the child's, or when an ORPHANHD parent has a non-ORPHANHD child.
lodLevel (verified enum, rage__eLodType)
| Name | Int |
|---|---|
LODTYPES_DEPTH_HD |
0 |
LODTYPES_DEPTH_LOD |
1 |
LODTYPES_DEPTH_SLOD1 |
2 |
LODTYPES_DEPTH_SLOD2 |
3 |
LODTYPES_DEPTH_SLOD3 |
4 |
LODTYPES_DEPTH_ORPHANHD |
5 |
LODTYPES_DEPTH_SLOD4 |
6 |
Note the numbering: ORPHANHD is 5, between SLOD3 and SLOD4. That's why CodeWalker's p.lodLevel <= d.lodLevel root check needs the extra ORPHANHD special case.
π‘ Render mask (drawable visibility)
A drawable's renderMask byte controls which render passes it appears in. It is a bitfield in the low 5 bits, with bits 5 to 7 always set, so the value never drops below 224: renderMask = 224 + (enabled bits). 255 renders in everything; 224 in nothing.
| Bit | Value | Pass |
|---|---|---|
| 0 | 1 | Drawable (normal geometry) |
| 1 | 2 | Shadow |
| 2 | 4 | Specular shaders |
| 3 | 8 | Mirror |
| 4 | 16 | Water reflection |
Example: 253 = 224 + 1 + 4 + 8 + 16, so drawable, spec, mirror, and water are on and shadow is off. The 32 possible combinations run 224 to 255. Flag research by kirill_mapper (komarovs_mappers team). Still π‘ after a 2026-08-15 check: the field is real and CodeWalker names it RenderMaskFlags, a u16 at DrawableModel + 0x2C whose low byte GIMS EVO calls "Mask", but nothing in available RAGE source assigns the bits β the bucket masks in rmcore are a different mechanism. Recorded so the next person does not re-search the same places.
LOD parenting
Chain is HD β LOD β SLOD1 β SLOD2 β SLOD3 (β SLOD4).
- Each level typically lives in a separate ymap, linked via
<parent>inCMapData, and then every child entity needs flag bit 3 set, or the index resolves against the wrong list. numChildrenon the parent must equal the actual count of children pointing at it.- Terminal entity:
parentIndex = -1. lodDistmust increase up the chain: HD 100 β LOD 300 β SLOD1 700 β SLOD2 1500 β SLOD3 5000+.- For LOD models glowing at night: set
FLAG_USE_AMBIENT_SCALE(536870912) on the archetype. The old "drop the green vertex-paint channel" advice is a vertex-colour workaround for the same symptom; the flag is the actual mechanism.
If you just want a prop to exist: LODTYPES_DEPTH_ORPHANHD, parentIndex -1, numChildren 0, childLodDist 0. Done.
Other ymap sections
boxOccluders: cheap box occlusion volumes. Position as int16 (cm), size in cm,iCosZ/iSinZfor rotation.occludeModels: mesh-based occluders.carGenerators: parked-car spawn points.carModel,popGroup,flags,perpendicularLength,livery.timeCycleModifiers: named timecycle region volumes;percentage,range,startHour/endHour.LODLightsSOA/DistantLODLightsSOA: structure-of-arrays light data.numStreetLightsmust matchpositionscount or FiveM patches/warns.instancedData.GrassInstanceList: batched grass. Position packed as uint16 relative to a batch AABB, plus normal, colour, scale, pad.containerLods: grouping for streamed container LODs.physicsDictionaries: list of.ybndictionary names this ymap needs loaded.
Cargen flags
| Value | Meaning |
|---|---|
| 1 | Force spawn |
| 2 | Ignore density |
| 4 | Police |
| 8 | Firetruck |
| 16 | Ambulance |
| 32 | During day |
| 64 | During night |
| 128 | Align left |
| 256 | Align right |
| 512 | SP enable |
| 1024 | MP enable |
| 2048 | Low priority |
| 4096 | Prevent entry |
π‘ Light flags (ydr/ymap lights)
Bit index β meaning: 1 INTERIOR_ONLY, 2 EXTERIOR_ONLY, 3 DISABLE_IN_CUTSCENE, 4 VEHICLE, 5 FX, 6 TEXTURE_PROJECTION, 7 CAST_SHADOWS, 8 CAST_STATIC_SHADOWS, 9 CAST_DYNAMIC_SHADOWS, 10 CALC_FROM_SUNLIGHT, 11 ENABLE_BUZZING, 12 FORCE_BUZZING, 13 VOLUME_DRAWING, 14 NO_SPECULAR, 15 INT_AND_EXT, 16 ONLY_CORONA, 17 DONT_RENDER_IN_REFLECTION, 18 ONLY_RENDER_IN_REFLECTION, 19 USE_CULLPLANE, 20 USE_VOL_OUTER_COLOUR, 21 CAST_HIGHER_RES_SHADOW, 22 CAST_ONLY_LOWRES_SHADOWS, 23 ADD_TO_VIP_LOD_LIGHTS, 24 DONT_LIGHT_ALPHA, 25 SHADOWS_IF_POSSIBLE, 26 CUTSCENE, 27 MOVING_LIGHT_SOURCE, 28 USE_VEHICLE_TWIN, 29 FORCE_MEDIUM_LOD_LIGHT, 30 CORONA_ONLY_LOD_LIGHT.
Checked against engine source (2026-08-15). RAGE's own LIGHTFLAG_* set has 28 names, and 21 of the 30 above match one exactly once renames are allowed (CAST_STATIC_SHADOWS β CAST_STATIC_GEOM_SHADOWS, VOLUME_DRAWING β DRAW_VOLUME, INT_AND_EXT β BOTH_INTERIOR_AND_EXTERIOR, ONLY_CORONA β CORONA_ONLY, DONT_RENDER_IN_REFLECTION β NOT_IN_REFLECTION, CALC_FROM_SUNLIGHT β CALC_FROM_SUN, DISABLE_IN_CUTSCENE β DONT_USE_IN_CUTSCENE). Nine have no counterpart in the engine code available: VEHICLE, ENABLE_BUZZING, FORCE_BUZZING, ONLY_RENDER_IN_REFLECTION, USE_CULLPLANE, ADD_TO_VIP_LOD_LIGHTS, SHADOWS_IF_POSSIBLE, FORCE_MEDIUM_LOD_LIGHT, CORONA_ONLY_LOD_LIGHT β treat those nine as the least certain. Seven engine flags are missing from this list (CAUSTIC, DELAY_RENDER, SOFT_SHADOWS, USE_FADEDIST_AS_FADEVAL, ALREADY_TESTED_FOR_OCCLUSION, HIGH_PRIORITY, USE_AS_PED_ONLY), but at least three of those are runtime-only rather than asset bits β HIGH_PRIORITY and USE_AS_PED_ONLY are stashed in CLightAttr's padding fields on PC, not in m_flags.
The header that assigns the bit numbers is not available, so the ordering above is still community research. One behavioural note that is engine-confirmed: the deferred lighting path switches on exact flag combinations to choose a render pass, so some pairs select a whole pass rather than composing independently.
7. _manifest.ymf
Tells the streamer which ytyps an ymap depends on. Without it: random missing-archetype behaviour, especially in MP/FiveM.
<CPackFileMetaData>
<MapDataGroups/>
<HDTxdBindingArray/>
<imapDependencies>
<Item>
<imapName>my_map</imapName>
<itypName>my_props</itypName>
<packFileName/>
</Item>
</imapDependencies>
<imapDependencies_2>
<Item>
<imapName>my_map</imapName>
<manifestFlags/>
<itypDepArray>
<Item>my_props</Item>
</itypDepArray>
</Item>
</imapDependencies_2>
<itypDependencies_2/>
<Interiors/>
</CPackFileMetaData>
β
Fill both forms: imapDependencies (one pair per imapβityp) and
imapDependencies_2 (array form). Template1 and the working pack ship both forms.
CodeWalker: Tools β Generate Manifest. Always regenerate after adding ymaps/ytyps.
8. Collision (.ybn)
| Bound type | Use |
|---|---|
BoundBox |
Cheapest. Crates, walls |
BoundSphere |
Cheapest |
BoundCapsule |
Poles, pipes |
BoundCylinder |
|
BoundDisc |
Wheels |
BoundGeometry |
Arbitrary triangle mesh |
BoundBVH |
Geometry + BVH acceleration β what you want for large static meshes |
BoundComposite |
Container of children with transforms β top level of every ybn |
Per-poly material (materials.dat / materialfx.dat) drives footsteps, tyre marks, bullet decals, destructibility. CONCRETE, TARMAC, GRASS_LONG, METAL, WATER, STAIR_*.
Per-poly flags: NONE, STAIRS, NOT_CLIMBABLE, SEE_THROUGH, SHOOT_THROUGH, NOT_COVER, WALKABLE_PATH, NO_CAM_COLLISION, SHOOT_THROUGH_FX, NO_DECAL, NO_NAVMESH, NO_RAGDOLL, VEHICLE_WHEEL, NO_PTFX, TOO_STEEP_FOR_PLAYER, NO_NETWORK_SPAWN, NO_CAM_COLLISION_ALLOW_CLIPPING.
Collision include-flags
General objects/terrain: Flags 1: Map Animal, Map Cover, Map Dynamic, Map Vehicle, Map Weapon. Flags 2: Animal, Animal Ragdoll, Forklift Forks, Glass, Object, Ped, Plant, Projectile, Ragdoll, Test AI, Test Camera, Test Script, Test Vehicle Wheel, Test Weapon, Vehicle BVH, Vehicle Not BVH.
Water: Flags 1: Map River. Flags 2: Test AI, Test Camera, Test Script, Test Vehicle Wheel, Test Weapon.
For stairs, add the stairs flag to Flags 1, but not to ground, or it changes the player's movement animation.
Unk VertOffset is the collision margin, and it is a parameter rather than two magic numbers. RAGE sets it on every geometry bound with SetMarginAndShrink(DEFAULT_GEOM_MARGIN) where DEFAULT_GEOM_MARGIN = 0.04f: the margin is how far collision detection expands beyond the surface, and the stored vertices are shrunk inward by it, hence "vertex offset". The shrink cannot exceed the bound's own half-extent, so it is clamped β margin = min(margin, sizeX, sizeY, sizeZ), which CodeWalker mirrors. That is why thin or simple bounds carry a smaller value. The commonly quoted 0.002 and 0.02 are observations of that clamp, not rules; copy the value from a comparable stock bound rather than picking one.
Embedded vs standalone
Neither respects scaleXY/scaleZ from the ymap. Entity scale applies to the drawable only, never to collision. Scale a tree in the ymap and its collision stays original size either way. Standalone .ybn just gives you a bound you can pre-scale at export.