Structs Energy

Every online struct draws power continuously, and load > capacity = offline = you cannot act. Energy is therefore the substrate of everything: no power, no mining, no building, no defense. This skill is “I need power / I’m offline / how do I budget power” — raising your own capacity (infusion), distributing it (substations/allocations), and recovering from overload. Earning from energy (running providers, selling, the flywheel) lives in structs-commerce.

Conventions (TX_FLAGS, -- rule, charge bar, one-tx-at-a-time) are in conventions.md.

Denomination footgun: infusion amounts must carry the ualpha suffix — 60000000ualpha, not 60000000. Missing denom = failed tx.

When to use it

Decisions

“I need more capacity” decision tree

Have Alpha Matter?
├── Yes → Infuse a reactor   → safest, immediate, reversible (cooldown), 1g ≈ 1 kW − commission   [default]
│         or Infuse a generator → 2-10 kW/g but IRREVERSIBLE and raidable (only with defense in place)
└── No  → Buy capacity via an agreement from a provider → ongoing cost; see structs-commerce

Beginner default: infuse your guild’s reactor. Capacity rises automatically — no substation wiring needed for your own use. Pick the lowest commission you can.

Reactor vs generator: reactor is the safe default (reversible via a defusion cooldown, not raidable). Generators give far more kW per gram but the Alpha is annihilated (no defusion) and a raided generator takes the infused matter with it — only infuse generators you can defend (and they’re now armoured + higher HP in v0.18.0, but still a target). Decisions live in playbooks/situations/resource-rich.

“Am I about to go offline?”

Online requires (load + structsLoad) ≤ (capacity + capacitySecondary). Player passive draw is 25,000 mW; each online struct adds its passiveDraw. Before building, confirm headroom — scripts/power-budget.sh [player-id] --type [struct-type-id] projects headroom-after-activation in one call. If you’re already offline, that’s an emergency (recovery below).

Power math

availablePower = (capacity + capacitySecondary) - (load + structsLoad)
online         = (load + structsLoad) <= (capacity + capacitySecondary)

Units are milliwatts (1 W = 1,000 mW; 1 ualpha = 1 mW).

Worked load budget

Command Ship (50,000 mW) + Ore Extractor (500,000) + Ore Refinery (500,000) + player passive (25,000) = 1,075,000 mW of structsLoad. To keep all online you need capacity + capacitySecondary ≥ 1,075,000. Infusing ~1,120,000 ualpha into a 4%-commission reactor nets ~1,075,000 mW to you — just enough; leave a margin.

Procedure — raise your own capacity (reactor infusion)

  1. Check capacity: structsd query structs player [id].
  2. Pick a reactor and read its commission and validator address: structsd query structs reactor [id] (the validator field, structsvaloper1... — the command takes the validator address, not the reactor ID).
  3. Infuse (CLI prompts — review validator, commission, amount):
    structsd tx structs reactor-infuse [your-address] [validator-address] [amount]ualpha TX_FLAGS
    

    reactor-infuse is Tier 1 — commission is locked permanently for that infusion. Defusion (reactor-defuse [reactor-id]) starts a cooldown before Alpha returns; reactor-cancel-defusion re-stakes.

  4. Verify: re-query player; capacity increased.

Procedure — generator infusion (Tier 2, irreversible)

Only with defense in place. Approval Block: struct id is your generator (type 20/21/22, online); amount is annihilated on success (no defusion); generator’s defense posture is sound (shield up, defenders/PDC, no inbound fleet); --from owns it.

structsd tx structs struct-generator-infuse [struct-id] [amount]ualpha TX_FLAGS

Rates: Field Generator 2 kW/g, Continental Power Plant 5 kW/g, World Engine 10 kW/g.

Procedure — distribute power (substations & allocations)

For pooling power across structs/players (e.g. a guild powering members). Cascading deletes can knock players offline mid-operation — these are Tier 2.

  1. Create an allocation from your source: structsd tx structs allocation-create --allocation-type static|dynamic|automated TX_FLAGS -- [source-id] [power] (--controller [player-id] optional). Automated allocations auto-grow with capacity — one per source.
  2. Create a substation: structsd tx structs substation-create TX_FLAGS -- [owner-id] [allocation-id].
  3. Connect/disconnect sources: substation-allocation-connect|disconnect -- [substation-id] [allocation-id].
  4. Connect/disconnect players: substation-player-connect|disconnect -- [substation-id] [player-id].
  5. Migrate players: substation-player-migrate -- [src-sub] [dest-sub] [player-id,...].

Offline recovery (emergency)

  1. Free power nowstruct-deactivate non-essential structs until load + structsLoad ≤ capacity + capacitySecondary. Keep the Command Ship online if at all possible (offline CMD ship makes your planet raidable).
  2. Raise capacity — infuse a reactor (fastest) or open an agreement.
  3. Reactivate in priority order: Command Ship → defense → production.
  4. Note: a player on a substation pool can show capacity=0 while structs run fine — structsLoad > 0 is the real “functioning” signal, not capacity > 0.

Commands reference

Action Command
Reactor infuse structsd tx structs reactor-infuse [your-addr] [validator-addr] [amount]ualpha TX_FLAGS
Reactor defuse / cancel structsd tx structs reactor-defuse \| reactor-cancel-defusion TX_FLAGS -- [reactor-id]
Reactor migrate structsd tx structs reactor-begin-migration [player-addr] [src-val] [dest-val] [amount] TX_FLAGS
Generator infuse (Tier 2) structsd tx structs struct-generator-infuse [struct-id] [amount]ualpha TX_FLAGS
Allocation create / update / delete structsd tx structs allocation-create --allocation-type [t] TX_FLAGS -- [source-id] [power] (and allocation-update/allocation-delete -- [allocation-id] ...)
Substation create / delete structsd tx structs substation-create \| substation-delete TX_FLAGS -- ...
Substation allocation connect/disconnect structsd tx structs substation-allocation-connect \| disconnect TX_FLAGS -- [sub-id] [alloc-id]
Substation player connect/disconnect/migrate structsd tx structs substation-player-connect \| disconnect \| migrate TX_FLAGS -- ...
Query player power structsd query structs player [id]
Query reactor structsd query structs reactor [id]
Query substation / allocations structsd query structs substation [id] / allocation-all-by-source [id]

TX_FLAGS per conventions.md; power ops cascade, so default to interactive even on routine ones. Requires structsd on PATH and a signing key.

Verification

Errors

See also