Skip to content

base, aux and snd

skzk edited this page Aug 13, 2024 · 19 revisions

The .base, .aux and .snd files contain the items and nodes of a sector. The structure of all three files is identical; the only difference is which item types they contain.

Item types

.base contains the following item types:
Bus Stop, City, Company, Cut Plane, Cutscene, Ferry, Fuel Pump, Garage, Map Area, Map Overlay, Prefab, Road, Service, Sign (if it has a traffic rule), Traffic Area, Trajectory, Trigger, Visibility Area.

.aux contains the following item types:
Animated Model, Bezier Patch, Buildings, Camera Path, Camera Point, Compound, Curve, Environment Area, Far Model, Gate, Hinge, Hookup, Model, Mover, Sign (if it doesn't have a traffic rule), Terrain, Walker.

.snd contains the following item types:
Sound

The .snd file is optional; .base and .aux must be present even if only one of them contains items.

Structure

Field(s) Description
Header See Header.
u32 item_count
array_struct items
Contains the items of the sector. Each entry starts with a k-DOP item followed by item-specific data.
u32 node_count
array_struct nodes
Contains the nodes of the items in this file.
u32 vis_area_child_count
array_u64 uids

If there are any items in the file which are parented by a visibility area, and that area is set to "Show objects" (items are only rendered if the camera is inside the area), those items' UIDs are cached here.

The UID reference is written to the sector of the items, not the area.

Each item's UID will only be written once, even if it is parented by multiple areas.

Determining the sector of an item

Which sector a map item should be written to is determined by the center point of its nodes. For example, a Road item going from (-15, 0, 35) to (35, 0, -15) will have a center point of (10, 0, 10) and therefore belongs to sector (0, 0), despite the fact that neither of its nodes fall in that sector.

Clone this wiki locally