Inspect individual units and zones
The Mod API provides a startup opt-in for the shared world inspectors:
context.registerWorldInspection(new WorldInspection(true, true));
The first flag enables unit inspection, the second zone inspection. An optional third flag (new WorldInspection(true, true, true)) enables structural construction sampling after unit picking and before zone picking. Its two-argument constructor keeps sampling off. Sampling accepts placed walls, roofs and stairs that are selectable in the ordinary build catalog; it excludes crafted furniture and raw terrain. Each mod may register once;
enabled registrations combine additively. The host owns picking, rendering and validated tool
selection. This is a typed native feature, not an arbitrary drawing callback.
Middle-click picks the frontmost visible living unit, then the zone at the picked terrain surface. Middle-drag continues camera panning. Blueprint workshop sampling keeps its existing controls. Disabling the last provider removes the inspectors after restarting the game.
Citizens, soldiers and heroes have Overview and Happiness tabs, plus Relationships when an active mod declares an affinity provider or returns affinity data. The overview shows needs, equipment, progression, inventory, effects and derived stats; creatures show their own combat stats. Relationships come from the existing directed affinity projections. Rows with both values zero are omitted; one-way feelings display the neutral counterpart. Rows sort by outgoing affinity descending, with stable name and provider tie-breaks. No relationship is fabricated when an enabled mod does not supply it.
Zone inspectors offer unlocked workstations associated through requiredZoneId or floor
requirements. Normal biome, discovery and campaign gates apply, and availability is checked again
on click. Enlarge selects the zone build tool; Shrink selects Destroy. Workstation selection uses
normal placement costs, orientation and validity checks. Missing subjects become inert, and
campaign spectator mode disables construction controls.
Stockpile and stable inspectors also expose the shared Gate and Fence tools. The selected tool remains active across eligible zones until cancelled; it resolves each edge's current owner with indexed tile lookups and uses the viewport's shared visibility. Manage zone replaces the inspector with the same management panel as the sign, including stock filters, stable animal controls, or residence assignments. Middle-clicking a sign inspects its zone as well.
As a shared world-integrity rule, zone-floor destruction checks dependent footprints and work positions at both order creation and execution. Its retained placeable index updates only for the changed object, including rotation and removal; it does not rebuild terrain or scan every object for each selected tile. Stockpile-zone tile destruction uses the same protection.
See the Town Inspector example. It compiles only
against the public API and includes all thirteen language catalogs. Its about/screenshots are
native HUD renders from demonstration states.