Skip to main content

build.get_site_info

Overview

  • CALL THIS FIRST when you are about to build anything. It returns an aggregate summary of the current site - type, size, floor range, counts - plus a 'build_rules' block that states the conventions the rest of the build CLI assumes: which coordinate space x/y/z and yaw use, how doors and windows auto-align to walls, which field carries a storey's elevation (floor_height, not base_height), the default and preset wall heights, and the floor_height to use for the next floor up. Reading it once saves you from the mistakes those rules describe. Read 'coord_space' before placing anything: site coordinates are in CENTIMETRES, the origin (0,0) is the site's MINIMUM CORNER (not the centre), and the usable range is coord_space.min..coord_space.max, which equals 0..site_size. Note that 'site_half_extent' is the distance from the origin to the site centre, so it is HALF of site_size - using it as the full size confines everything to one quadrant. The wall grid snaps to 25cm. Works in both play mode (character must be inside a building) and build mode. This command AGGREGATES only. For per-object / per-wall / per-room enumeration use build.scan_objects, build.scan_walls and build.scan_floors with limit/offset. detail=floors adds a per-floor breakdown with up to 32 rooms per floor. NOTE: counts.floors is the number of allocated floor structures, which the engine grows on demand and never releases - it does not go back down after building.undo. Use floor_min/floor_max for the range of floors that actually contain something.

Metadata

FieldValue
DisplayGet Site Info
Categorybuild
AccessPublic
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
detailstringnosummarysummary (default) or floors
floor_levelintno—Restrict every count and the floors breakdown to a single floor level

Returns

  • Freeform result (shape is not fixed).

{ site_id: string, site_type: string, site_size: {x,y}, site_half_extent: {x,y}, coord_space: { origin: 'site_min_corner', units: 'cm', min: {x,y}, max: {x,y}, recommended_min: {x,y}, recommended_max: {x,y}, grid_unit: float }, build_rules: { coordinates: string, rotation: string, wall_mounted_objects: string, storey_elevation: string, rooms: string, default_wall_height: float, wall_height_presets: [float], next_floor_height: float|null, next_floor_level: int }, floor_min: int, floor_max: int, floor_level_limit: {min,max}, customizing_floor: int, counts: { floors, rooms, walls, objects, deletable_objects }, objects_by_floor: { "<floor_level>": int, ... }, on_build_mode: bool, prepared: bool, unable_build_mode: bool, author: string, floors?: [ { floor_level, room_count, wall_count, object_count, rooms_truncated, rooms: [ { room_index, node_count, center: {x,y} } ] } ] } - deeply nested and the 'floors' array only appears when detail=floors.

Usage

await inzoi.cli.execute('build.get_site_info', {
detail: 'summary', // optional
floor_level: 0, // optional
});