Allocation Entity Schema

Version: 1.0.0 Category: economic Entity: Allocation Endpoint: /structs/allocation/{id}


Description

Allocation entity definition – extracted from game-state.json for context window optimization. See schemas/formats.md for format specifications.

Properties

Field Type Format Pattern Required Description
id string entity-id ^6-[0-9]+$ Yes Unique allocation identifier in format type-index (e.g., 6-1 for allocation type 6, index 1). Type 6 = Allocation.
allocationType string Yes Allocation type: static, dynamic, automated, or provider-agreement.
sourceId string Yes Source ID (reactor, provider, etc.).
destinationId string Yes Destination ID (player, struct, etc.).
controller string entity-id ^1-[0-9]+$ Yes PlayerId of the controlling player.
amount string Yes Allocation amount (string representation of integer).
gridAttributes object No Grid position and attributes. Accepts additional properties.

Relationships

Allocations link a source entity to a destination entity. Both source and destination can be different entity types.

Source

Entity Schema
Reactor schemas/entities/reactor.md
Provider schemas/entities/provider.md

Destination

Entity Schema
Player schemas/entities/player.md
Struct schemas/entities/struct.md

Verification

Attribute Value
Verified Yes
Verified By GameCodeAnalyst
Verified Date 2025-01-XX
Method code-analysis
Confidence high

Verified Fields: id, sourceId, destinationId, amount

Code Reference: x/structs/types/allocation.pb.go, x/structs/keeper/allocation_cache.go

Database Reference: structs.allocation table (columns: id, allocation_type, source_id, destination_id, controller)

Note: controller is a PlayerId (e.g., 1-42), not an address. The locked column has been removed.