π² GRID SYSTEM
This is a developer / integration reference. It covers the builder commands and the exports you use to place props from your own resources. The in-game builder commands are a dev-time tool and are disabled by default β see Builder Commands.
The Grid System places props on an invisible, snapping grid inside a zone you define. You use it in two phases:
- Build time β lay a scene out by hand with the in-game editor and capture every prop's position.
- Runtime β replay that captured layout from a script with the placement exports, with no editor and no UI.
Core concepts
- Zone β a rectangular area defined by four corner coordinates plus a maximum stacking height. A zone can sit on the ground or be attached to a vehicle so its props move with it. Every prop position is stored relative to its zone.
- Zone-local coordinates β prop positions are given in meters relative to the zone, not world
coordinates:
xβ distance along the edge from cornerΒ 1 β cornerΒ 2yβ distance along the edge from cornerΒ 1 β cornerΒ 4zβ height above the zone floor These are exactly the values the editor reports and the placement exports expect. Because they are relative, a captured layout can be re-placed at any zone, anywhere in the map.
- Prop catalog β only models registered in
gridProps(ground) orgridPropsVehicle(vehicle) inconfigs/c.config.luacan be placed. Each entry defines the prop's bounding size and offsets. Register your own models at runtime withAddGridProp/AddGridPropVehicle(see Exports). - Ownership & lifetime β a zone is owned by a player; the zone and its props live while that
player is connected and are removed when they disconnect. Choose the owner when creating the zone
(
RequestCreateZone(..., ownerServerId)) or reassign it later (SetZoneOwner). - Streaming β placed props are streamed in and out automatically based on how close players are to the zone, so a large scene has no cost for players who are far away.
The build β capture β replay workflow
Enable the builder tools
Set Config.Commands = true in configs/sh.config.lua (dev server only) and restart the resource.
Create a zone
Run /createzone <uid> where you want the scene. Edit the corner coordinates in the /createzone
command (configs/c.commands.lua) to your own location first.
Place each prop by hand
Run /spawnpropgrid <model> <uid> and position the prop with the editor controls, then press
Enter to place it. Repeat for every prop.
Capture the layout
Run /dumpzoneprops <uid>. This prints a copy-pasteable Lua block of every prop's model, local
position, and rotation, with a data = nil slot on each line to fill in.
Replay it in production
Paste the captured block into your own resource and place it with PlaceGridProps (no editor, no
commands needed). See Exports.