Structs Power

Procedure

  1. Assess power state — Query player: structsd query structs player [id]. Compute: availablePower = (capacity + capacitySecondary) - (load + structsLoad). If load + structsLoad > capacity + capacitySecondary, player goes OFFLINE (cannot act). Player passive draw: 25,000 mW.
  2. Create substation — First create allocation from reactor/generator: allocation-create [source-id] [power] --allocation-type static|dynamic|automated|provider-agreement TX_FLAGS. Then: structsd tx structs substation-create [owner-id] [allocation-id] TX_FLAGS.
  3. Connect powersubstation-allocation-connect [substation-id] [allocation-id] to add source. substation-allocation-disconnect to remove.
  4. Connect playerssubstation-player-connect [substation-id] [player-id] to draw power. substation-player-disconnect to remove.
  5. Migrate playerssubstation-player-migrate [source-substation-id] [dest-substation-id] [player-id,player-id2,...] TX_FLAGS.
  6. Manage allocations — Update: allocation-update [allocation-id] [new-power]. Delete: allocation-delete [allocation-id].
  7. Delete substationsubstation-delete [substation-id] (disconnect allocations/players first).

Commands Reference

Action Command
Substation create structsd tx structs substation-create [owner-id] [allocation-id]
Substation delete structsd tx structs substation-delete [substation-id]
Allocation connect structsd tx structs substation-allocation-connect [substation-id] [allocation-id]
Allocation disconnect structsd tx structs substation-allocation-disconnect [substation-id] [allocation-id]
Player connect structsd tx structs substation-player-connect [substation-id] [player-id]
Player disconnect structsd tx structs substation-player-disconnect [substation-id] [player-id]
Player migrate structsd tx structs substation-player-migrate [src-substation-id] [dest-substation-id] [player-ids]
Allocation create structsd tx structs allocation-create [source-id] [power] --allocation-type [type]
Allocation update structsd tx structs allocation-update [allocation-id] [power]
Allocation delete structsd tx structs allocation-delete [allocation-id]

TX_FLAGS: --from [key-name] --gas auto --gas-adjustment 1.5 -y

Verification

Error Handling

See Also