@alpaca-software/40kdc-data
    Preparing search index...

    Interface Piece

    One terrain piece placed on the board. Geometry comes from a catalog template or an inline footprint (if both are present, footprint is authoritative and template is provenance).

    This interface was referenced by 0KdcBundledSchemas's JSON-Schema via the definition "piece".

    interface Piece {
        id?: string;
        name?: string;
        piece_type?: "area" | "feature";
        template?: string;
        footprint?:
            | { type: "rectangle"; width: number; height: number }
            | { type: "right-triangle"; width: number; height: number }
            | { type: "polygon"; points: [Vec2, Vec2, Vec2, ...Vec2[]] };
        position: Vec21;
        rotation_degrees?: number;
        mirror?: "none" | "horizontal" | "vertical";
        parent_area_id?: string;
        floor?: number;
        height_inches?: number;
        terrain_area_keywords?: TerrainAreaKeyword[];
        link_group?: string;
        objective_role?: "home" | "expansion" | "center";
        is_objective?: boolean;
        objective?: { position?: Vec22; control_range_inches?: number };
        keystones?: {
            edge: "left" | "right" | "top" | "bottom";
            ref:
                | { kind: "vertex"; index: number }
                | { kind: "face"; side: "min-x" | "max-x" | "min-y" | "max-y" };
        }[];
    }
    Index

    Properties

    id?: string

    Kebab-case identifier

    name?: string
    piece_type?: "area" | "feature"

    An area is a gameplay terrain zone (the 11e 'terrain area'); a feature is physical scenery (walls, containers, pipes) placed on an area.

    template?: string

    Kebab-case identifier

    footprint?:
        | { type: "rectangle"; width: number; height: number }
        | { type: "right-triangle"; width: number; height: number }
        | { type: "polygon"; points: [Vec2, Vec2, Vec2, ...Vec2[]] }

    Inline geometry, standing in for or overriding a template footprint. Authoritative when present.

    Type Declaration

    • { type: "rectangle"; width: number; height: number }
    • { type: "right-triangle"; width: number; height: number }
    • { type: "polygon"; points: [Vec2, Vec2, Vec2, ...Vec2[]] }
    position: Vec21
    rotation_degrees?: number

    Clockwise rotation about the centroid in the y-down board frame. Absent or 0 means the template's natural orientation.

    mirror?: "none" | "horizontal" | "vertical"

    Reflection applied in the centroid-local frame before rotation: horizontal negates local x (left-right flip), vertical negates local y.

    parent_area_id?: string

    Kebab-case identifier

    floor?: number

    Ruin floor this piece occupies (0 = ground level).

    height_inches?: number

    Height of the piece in inches; overrides the template default. Gates Plunging Fire (a piece 3" or taller confers +1 BS on ground-level targets).

    terrain_area_keywords?: TerrainAreaKeyword[]

    Terrain-area keywords this piece's area carries; overrides the template default.

    link_group?: string

    Pieces sharing a link_group value are linked terrain — treated as a single terrain feature (and, where an objective sits among them, a single objective).

    objective_role?: "home" | "expansion" | "center"

    Designates this terrain area — or, when link_group'd, the union of linked areas (one objective for the set) — as carrying an objective of the given 11e role: home (inside a deployment zone), center (board middle), or expansion (no-man's-land). Implies is_objective.

    is_objective?: boolean

    Whether this piece carries an objective marker.

    objective?: { position?: Vec22; control_range_inches?: number }

    Objective-marker metadata. Only meaningful when is_objective is true.

    Type Declaration

    • Optionalposition?: Vec22
    • Optionalcontrol_range_inches?: number

      Range from the marker within which models contribute to control.

    keystones?: {
        edge: "left" | "right" | "top" | "bottom";
        ref:
            | { kind: "vertex"; index: number }
            | { kind: "face"; side: "min-x" | "max-x" | "min-y" | "max-y" };
    }[]

    Measurement keystones: the author-selected dimension lines a reference card prints so a player can place this piece with a tape measure (board edge → a feature of the placed piece). Only the selection is stored — the distance is always DERIVED from the resolved geometry by the shared keystone resolver (pinned by the conformance corpus), so a keystone can never disagree with the layout. Vertex indices follow the resolver's pinned vertex order; re-authoring a template's footprint invalidates them, so review keystones when geometry changes.

    Type Declaration

    • edge: "left" | "right" | "top" | "bottom"

      The board edge the measurement runs from, in the y-down board frame (left/right pin x against board width; top/bottom pin y against board height).

    • ref:
          | { kind: "vertex"; index: number }
          | { kind: "face"; side: "min-x" | "max-x" | "min-y" | "max-y" }

      Which feature of the placed piece the measurement reaches: a footprint vertex (by resolver vertex order) or an axis-aligned bounding face of the placed footprint.