Structs Building

Building turns Alpha Matter into capability: extractors/refineries (production), generators (power), and combat/defense structs. The mechanics are simple — initiate, prove the work, it auto-activates — so the skill that matters is deciding what to build, in what order, with the power to run it. Every online struct draws power continuously; build something you can’t power and it can’t come online.

Conventions (TX_FLAGS, -- rule, the -D 3 PoW policy, the per-player charge bar, one-tx-at-a-time) are in conventions.md.

When to use it

Decisions

Build-order by phase (beginner default):

  1. Command Ship (if you don’t have one online) — required for all planet ops and your raid shield. Build in fleet, not on the planet.
  2. Ore Extractor → Ore Refinery — start the production pipeline (structs-production).
  3. Power — a Reactor infusion or a Field Generator so the above stays online (structs-energy).
  4. Defense before your first big refine — at least one shield struct; keep the Command Ship online.
  5. Expand — more defense (Ore Bunkers/OSGs are unlimited now), then military.

Always pre-check power. Before initiating, confirm availableCapacity ≥ struct.buildDraw + struct.passiveDraw. Use scripts/power-budget.sh [player-id] --type [struct-type-id] to project headroom-after-activation in one call. If it won’t fit, raise capacity first or the struct will materialize but never come online.

Advanced considerations:

Procedure

  1. Pre-check — player online; enough Alpha; valid open slot (0-3 per ambit, correct ambit for the type); for planet builds: Command Ship online and fleet onStation. Run scripts/power-budget.sh to confirm headroom.
  2. Initiate (CLI prompts — review type, ambit, slot, Alpha cost). [operating-ambit] is a lowercase string space/air/land/water, not a bitmask:
    structsd tx structs struct-build-initiate TX_FLAGS -- [player-id] [struct-type-id] [operating-ambit] [slot]
    
  3. Compute (expedition, auto-completes + auto-activates) — this is the documented -y exception.

    Approval Block — struct id matches the build; you have power headroom for it to auto-activate; you accept the auto-activation landing minutes-to-hours later even if state shifts.

    nohup structsd tx structs struct-build-compute -D 3 --from [key] --gas auto --gas-adjustment 1.5 -y -- [struct-id] \
      > memory/jobs/build-[struct-id].log 2>&1 & echo $! > memory/jobs/build-[struct-id].pid
    
  4. Then move / set defense / stealth as needed (below). No separate activate step — build-complete auto-activates. struct-activate is only for re-activating something you deactivated.

struct-build-compute performs the PoW and auto-submits struct-build-complete; you only call struct-build-complete directly if you hashed externally.

v0.18.0 struct catalog (the numbers that drive decisions)

Full table: knowledge/entities/struct-types. Key current values:

Group HP Build limit / player Notes
Command Ship 6 1 movable; required for planet ops; build in fleet
Other fleet combat (IDs 2-13) 3 unlimited ambit-locked; Battleship primary is armour-piercing
Ore Extractor / Refinery 6 1 each the production pipeline
Orbital Shield Generator 6 unlimited shield-only → stack it
Ore Bunker 6 unlimited shields + protects stored ore
Jamming Satellite / PDC 6 1 each shield + active defense
Field Generator 8 1 armour (DR 1); 2 kW/g
Continental Power Plant 10 1 armour (DR 1); 5 kW/g
World Engine 10 1 armour (DR 1); 10 kW/g

Charge costs (from your per-player bar): build-initiate 8, activate 2, defense-change 1, Command Ship move 3, stealth activate 2. Full charge table and PoW decay times: knowledge/mechanics/building.

Build times (initiation → D=3 complete, ~6 s/block)

Struct Type ID Build Diff Wait to D=3
Command Ship 1 200 ~17 min
Starfighter 3 250 ~20 min
Ore Extractor / Refinery 14 / 15 700 ~57 min
PDC 19 2,880 ~3.7 hr
Ore Bunker 18 3,600 ~4.6 hr
World Engine 22 5,000 ~6.4 hr

Initiate early, compute later — the age clock starts at initiation. Batch-initiate, then compute in the background. One compute at a time per key (two concurrent computes on the same key collide on sequence numbers — one fails silently). Different keys run in parallel.

Manage existing structs

Commands reference

Action CLI Command
Initiate structsd tx structs struct-build-initiate TX_FLAGS -- [player-id] [type-id] [ambit] [slot]
Compute (PoW + complete + activate) structsd tx structs struct-build-compute -D 3 TX_FLAGS_APPROVED -- [struct-id]
Complete (manual, rare) structsd tx structs struct-build-complete TX_FLAGS -- [struct-id]
Cancel structsd tx structs struct-build-cancel TX_FLAGS -- [struct-id]
Activate / Deactivate structsd tx structs struct-activate \| struct-deactivate TX_FLAGS -- [struct-id]
Move (CMD ship) structsd tx structs struct-move TX_FLAGS -- [cmd-ship-id] [ambit] [slot] [location]
Defense set / clear structsd tx structs struct-defense-set \| struct-defense-clear TX_FLAGS -- [defender-id] [protected-id]
Stealth on / off structsd tx structs struct-stealth-activate \| struct-stealth-deactivate TX_FLAGS -- [struct-id]
Generator infuse (Tier 2) structsd tx structs struct-generator-infuse TX_FLAGS -- [struct-id] [amount]

TX_FLAGS / TX_FLAGS_APPROVED per conventions.md. Requires structsd on PATH and a signing key.

Verification

Errors

Error Cause Fix
“required charge X but player had Y” Per-player charge bar too low Wait; space actions by their cost (see conventions)
“insufficient resources” Not enough Alpha Matter Mine + refine first (structs-production)
“power overload” / won’t go online Capacity < load + draw Raise capacity or deactivate something (structs-energy)
“fleet not on station” Fleet away Recall via fleet-move
“Command Ship required” CMD ship offline/missing Build or re-activate it first
“invalid slot” / “invalid ambit” Slot taken or wrong ambit Slots 0-3 per ambit; check the type’s possibleAmbit

See also