Skip to content
skzk edited this page Nov 9, 2025 · 18 revisions

A node is a point with a position and rotation. Map items reference nodes to define their location in the map.

Structure

Field(s) Description
u64 uid The UID of the node.
fixed3 position The position of the node (global, not relative to the sector) multiplied by 256.
quaternion rotation The rotation of the node.
u64 backward_item_uid
u64 forward_item_uid

UIDs of the backward and forward items.

For polyline items such as roads, the backward item is the item "behind" the node and the forward item is the item "in front of" the node relative to the direction of the referenced items.

For prefabs, nodes with nothing attached to them hold the prefab as forward item. When a polyline item is attached to a prefab node, whether the prefab is the backward or forward item depends on the direction of the attached item. When another prefab is attached to a prefab node, the order is irrelevant unless one of the nodes is the origin, which must hold its prefab as the forward item.

For single node items or path items, the forward item is the item and the backward item is null.

u32 flags Flags:

Bit 0: Is red node
Bit 1: Is country border
Bit 2: Free rotation
Bit 3: Is curve locator
Bit 4: Player vehicle type change
Bit 5: Forward item: Truck
Bit 6: Forward item: Bus
Bit 7: Forward item: Car
Byte 1: Forward country ID
Byte 2: Backward country ID
Bit 26: Locked
Bit 28: Backward item: Truck
Bit 29: Backward item: Bus
Bit 30: Backward item: Car

Country IDs can be found in /def/country.

Clone this wiki locally