Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

playerSetupValidation

Agent-facing validation for authored player setups. A player-spawn scene is built from PlayerSpawn entities (each naming a PlayerPrototype subtree to instantiate on join) and PlayerPrototype roots (marked PrototypeOnly, carrying a Camera in their subtree and a body field naming the entity to adopt). checkEntity inspects one such entity and returns human-readable messages that name what is wrong and what to do about it; checkScene validates the scene's player intent against its PlayerSpawn / Camera counts; checkActiveScene runs both across the live active-layer scene and returns a flat { entity, message } list — the queryable surface an agent reads to see what to fix.

checkActiveScene answers for the settled scene: it holds while a scene load or a mode-flip transition is rebuilding the live tree, then judges what the rebuild lands on. Each PlayerSpawn's prototype resolves wherever the materialisation holds it — the live entity in edit, and in play, where the loader keeps authored prototype subtrees out of the scene, the captured authored template each joining player is cloned from — so the same rules run over the same authored structure in both modes, and a prototype removed from a scene that materialises prototypes reads as the missing reference it is.

Location: src/lua/lib/modules/api/engine/playerSetupValidation.module