GitHub
GitHub - kitsupanic/sbox-mcp-plus
Contribute to kitsupanic/sbox-mcp-plus development by creating an account on GitHub.
x_open_scene
list_scenes reports them.set_component, save_scene, undo) targets the active scene. Worse, an edit aimed at a background scene mutates the object but the dirty flag lands on the active tab — the background scene reloads from disk on focus and the edit is silently lost. Upstream: issue #11637, PR #11638 (open).play_stop first.
x_create_scene
.scene path beneath scenes/diagnostics/. The optional name defaults to the destination file name.
x_editor_status
editor_status reports the game scene handle, not the active editor tab — while editing it returns a placeholder name ("Scene") and a null path, and its dirty flag can describe a different scene than its name. Upstream: issue #11639, PR #11640 (closed unmerged).x_editor_status reads SceneEditorSession.Active — the same source list_scenes uses — so the two always agree.editor_status still reports them correctly — use both.
x_set_network_mode
Never, Object, or Snapshot by GUID. Refuses play mode and missing/background objects, records one undo step, and returns the resulting mode.
x_camera_screenshot
camera_screenshot — camera (a CameraComponent id, its game object's id, or empty for the scene's main camera), width, height, includeUi — so it's a drop-in swap.camera_screenshot renders every Razor text label as a flat gray rectangle at any size other than the live viewport's. Upstream: issue #11585. Engine root cause: CameraComponent.ResizeUI relayouts each screen panel for the offscreen size but omits RootPanel.BuildDescriptors(), so labels resized by that relayout release their text texture while the render descriptors still point at the dead one — ScreenshotService has the correct sequence (PreLayout/CalculateLayout/PostLayout/BuildDescriptors).x_camera_screenshot sidesteps it by capturing at exactly the current screen size, where the relayout changes no panel's size and no texture is released, then downscaling the capture to the requested dimensions. In edit mode there is no game viewport, so no live screen-size UI exists whose text textures a relayout could destroy, and it renders directly at the requested size — full detail, no resize step. Either way it works wherever camera_screenshot does.
x_camera_look_at
Rotation.LookAt rather than requiring callers to derive Euler angles. Arguments are camera (a CameraComponent or camera game-object GUID), target (x,y,z), and optional up (x,y,z, default 0,0,1). The camera must belong to the active editor scene.x_network_status — read the active session and privacy-limited connection rows.x_network_start_hosting — start hosting through the supported editor path.x_network_disconnect — disconnect without terminating owned clients.x_network_spawn_instance — launch a fixed local client in a private Windows Job Object. No arbitrary executable, environment, working directory, or arguments.x_network_instances — list only clients launched by this library during the current hotload lifetime.x_network_terminate_instance — terminate an owned process tree using its PID and exact LaunchedAt token. Default mode requests a graceful close before forcing the private job; abrupt=true skips directly to forced termination.x_network_migrate_to_new_instance — currently refuses before launching anything. Installed engine build 26.09.08e selects migration successors through Steam lobby membership, which synthetic local clients cannot satisfy, and exposes no supported targeted-handoff API.LogDirectory identifies the shared engine log root; there is intentionally no instance-log tool because shared logs cannot be attributed safely to one child.editor_status is still broken while this library only routes around it — a library can't patch engine-assembly tools. Until upstream fixes it, trust x_editor_status or list_scenes.IsActive, not editor_status's scene fields.x_open_scene can't target a never-saved scene by path (it has no resource path yet) — use its name.x_camera_screenshot output detail is capped at the live viewport's resolution in play mode: it captures there and resizes, so a requested size larger than the viewport is interpolation, not extra detail. Aspect ratio still follows the requested size. Edit mode renders at the requested size directly and isn't capped.