Metadata

Overview

Metadata classes store runtime data attached to each cluster and room rectangle. They extend UCAbstractRectangleMetadata from CCOREUMODULE.

UCClusterMetadata

Attached to each cluster FCRectangle during finalization.

Name Description
tag Cluster tag inherited from FCRoomMakerStruct::mainTag
fogOfWar FCRectangle representing the fog of war zone (computed from cluster bounds)
roomMakerStruct Pointer to the source FCRoomMakerStruct configuration
specificTopography Optional UCNoisator for per-cluster terrain noise
specificShiftTopography Optional UCNoisator for per-cluster shift noise
recalculateAll Recomputes the fog of war rectangle from the cluster bounds
metaMargeForBetterWorldEasing Static helper that expands cluster bounds for smoother world easing
// UCClusterMetadata is created during finalize_sync for each cluster.
// fogOfWar is computed from the cluster bounds with a 5% overflow:
// a = (2*origin.a + origin.b) / 3, b = (2*origin.b + origin.a) / 3
// then expanded by overflow factor.

// metaMargeForBetterWorldEasing doubles the cluster extent:
// a_out = a + (a - b), b_out = b + (b - a)
// This ensures smooth terrain easing around cluster boundaries.

// Per-cluster noise is optional:
if (cMd->roomMakerStruct->clusterSpecificNoise) {
    UCNoisator::instanciate(this, noisator, seed,
        cMd->roomMakerStruct->clusterSpecificNoise->fastNoiseStruct,
        cMd->roomMakerStruct->clusterSpecificNoise->noiseStructArray);
    cMd->specificTopography = noisator;
}

UCRoomMetadata

Attached to each room FCRectangle during finalization.

Name Description
tag Room tag inherited from FCRoomDetailStruct::mainTag
consumed Whether the room interaction has been consumed (default false)
doorArray Array of FCRectangleDoor representing door positions where corridors intersect the room
roomDetailStruct Pointer to the source FCRoomDetailStruct configuration
cluster Pointer to the parent cluster FCRectangle
orderOnLongestPath Room index on the longest MST path (-1 if not on the path)
getCluster BlueprintCallable function returning the parent cluster as a copy
consume Marks the room as consumed if canOnlyBeConsumedOnce is true
// UCRoomMetadata is created during finalize_sync for each room.
// Doors are computed by intersecting MST corridor edges with the room rectangle.

UCRoomMetadata* meta = roommaker->retrieveRoomMetadata(room);

// Access door positions:
for (const FCRectangleDoor& door : meta->doorArray) {
    FVector2D doorPos = door.intersection;
    // door.rectangleEdge is the room edge intersected
    // door.mstEdgeIndex is the corridor edge index
}

// Check room ordering on longest path:
if (meta->orderOnLongestPath >= 0) {
    // room is on the longest path, ordered by index
}

// Check consumption state:
if (!meta->consumed) {
    // room can still trigger interactions
}

FCRectangleDoor

Represents a door where a corridor intersects a room edge.

Name Description
intersection FVector2D position where the corridor crosses the room boundary
rectangleEdge FCEdge of the room rectangle that is intersected
mstEdgeIndex Index of the MST corridor edge creating this door