编程

structs-building

试用

管理 Structs 建筑全周期:从发起建造、计算 PoW(自动激活),到移动、布防、隐身切换与发电机注入。

它能做什么

覆盖建筑全流程:检查前置条件,发起建造(struct-build-initiate),后台运行 PoW 计算(struct-build-compute)至建筑自动激活,再按需执行移动、布防、隐身与注能。每条命令都明确安全等级——Command Ship、Starfighter、Ore Extractor、Refinery 等短时建造属常规操作;World Engine、Ore Bunker、PDC 等长 PoW 项目与发电机注入需先升级处理。统一使用 `-D 3` 让哈希几乎瞬时完成、零 CPU 浪费;强制同一签名密钥同一时刻只跑一个 compute,避免 sequence 冲突。还附带 D=3 下的建造时长表(Command Ship 约 17 分钟,到 World Engine 约 6.4 小时),以及覆盖 charge、power、slot、ambit 和节点连接等问题的错误排查表。

什么时候用它

  • 建造 Command Ship、Starfighter、Ore Extractor 或 Refinery
  • 批量发起多个建造计划,再统一启动 compute 后台任务
  • 设置或解除建筑之间的防御关系
  • 向发电机注入 Alpha Matter(不可逆)

技能文档

Structs Building

Important: Entity IDs containing dashes (like 1-42, 5-10) are misinterpreted as flags by the CLI parser. All transaction commands in this skill use -- before positional arguments to prevent this.

Safety

See SAFETY.md for the trust contract. In this skill:

  • struct-build-initiate (Tier 0 for cheap structs; Tier 1 for long PoW like World Engine, Ore Bunker, PDC) — short builds (Command Ship, Starfighter, Ore Extractor, Refinery) are routine; anything > 1 hour to D=3 is a battle order.
  • struct-build-compute (Tier 1 + expedition) — "The build hashes for up to ~6.4 hours and auto-activates on completion." Log the PID to memory/jobs/; recall with kill if needed. On reconnect, walk the four-state flow in awareness/async-operations before launching anything new.
  • struct-generator-infuse (Tier 2 — irreversible) — "Alpha Matter is annihilated in the conversion. The energy is yours; the matter is gone. There is no defusion. And the generator is raidable — if it falls, the infused matter falls with it." Always escalate, regardless of autonomy. Confirm the generator's defense posture before infusing.
  • struct-deactivate of revenue-bearing structs (Tier 1) — taking an Extractor or Refinery offline halts your resource pipeline.

Procedure

  1. Check requirements — Player online, sufficient Alpha Matter, valid slot (0-3 per ambit), Command Ship online, fleet on station (for planet builds). Query player, planet, fleet.

  2. Initiate build (CLI prompts for confirmation — review struct type, slot, ambit, and Alpha cost):

    structsd tx structs struct-build-initiate --from [key-name] --gas auto --gas-adjustment 1.5 -- [player-id] [struct-type-id] [operating-ambit] [slot]
    

    The [operating-ambit] argument must be a lowercase string: "space", "air", "land", or "water" (not a bitmask number).

  3. Proof-of-work — Build compute is an expedition that auto-activates the struct when the proof lands (this is why -y is present below).

    Approval Block — confirm before launching, especially for long-PoW structs (Ore Bunker, PDC, World Engine):

    • struct-id matches the build you just initiated
    • You have power headroom for the struct to auto-activate (load + struct's power-draw < capacity)
    • You will tolerate the auto-activation landing 17 min – 6.4 hrs from now even if game state shifts

    Launch in a background terminal:

    structsd tx structs struct-build-compute -D 3 --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id]
    

    This calculates the hash, auto-submits complete, and the struct auto-activates. No separate activation step needed.

  4. Optional — Move, set defense, or activate stealth as needed.

Auto-activation: Structs automatically activate after build-complete. Use struct-activate only to re-activate a struct that was previously deactivated with struct-deactivate.

Compute vs Complete

struct-build-compute is a helper that performs proof-of-work and automatically submits struct-build-complete with the hash results. The struct then auto-activates. You only need struct-build-complete if you computed the hash through external tools and want to submit it manually.

The -D Flag

The -D flag (range 1-64) tells compute to wait until difficulty drops to the specified level before starting the hash. Difficulty decreases logarithmically as the struct ages. Use -D 3 — at D=3, the hash is trivially instant and zero CPU is wasted. Lower values wait longer but burn no compute on hard hashes.

Charge Costs

Every action consumes charge. Charge accumulates passively at 1 per block (~6 sec/block).

ActionCharge CostWait Time
Build complete8~48 seconds
Move8~48 seconds
Activate (re-activation only)1~6 seconds
Defend change1~6 seconds
Primary weapon1-20Varies by struct

If you get a "required charge X but player had Y" error, wait for charge to accumulate. See knowledge/mechanics/building for the complete charge table.

Expected Build Times

Time from initiation until compute completes (assuming 6 sec/block, D=3):

StructType IDBuild DifficultyWait to D=3
Command Ship1200~17 min
Starfighter3250~20 min
Ore Extractor14700~57 min
Ore Refinery15700~57 min
PDC192,880~3.7 hr
Ore Bunker183,600~4.6 hr
World Engine225,000~6.4 hr

Initiate early, compute later. The age clock starts at initiation. Batch-initiate all planned builds, then launch compute in background terminals. Do other things while waiting. See awareness/async-operations.

One key, one compute at a time. Never run two concurrent *-compute jobs with the same signing key. Both jobs may reach the target difficulty simultaneously and submit transactions with conflicting sequence numbers — one fails silently, leaving the struct stuck in build status. Use separate signing keys for separate players, and sequence compute jobs for the same player.

Commands Reference

ActionCLI Command
Initiate buildstructsd tx structs struct-build-initiate --from [key-name] --gas auto --gas-adjustment 1.5 -- [player-id] [struct-type-id] [operating-ambit] [slot] (operating-ambit = space/air/land/water, lowercase string)
Build compute (PoW + auto-complete + auto-activate)structsd tx structs struct-build-compute -D 3 --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] (documented -y exception — auto-submits later)
Build complete (manual, rarely needed)structsd tx structs struct-build-complete --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id]
Build cancelstructsd tx structs struct-build-cancel --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id]
Re-activate (only after deactivation)structsd tx structs struct-activate --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id]
Deactivatestructsd tx structs struct-deactivate --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id]
Movestructsd tx structs struct-move --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id] [new-ambit] [new-slot] [new-location]
Set defensestructsd tx structs struct-defense-set --from [key-name] --gas auto --gas-adjustment 1.5 -- [defender-struct-id] [protected-struct-id]
Clear defensestructsd tx structs struct-defense-clear --from [key-name] --gas auto --gas-adjustment 1.5 -- [defender-struct-id]
Stealth onstructsd tx structs struct-stealth-activate --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id]
Stealth offstructsd tx structs struct-stealth-deactivate --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id]
Generator infuse (Tier 2, irreversible)structsd tx structs struct-generator-infuse --from [key-name] --gas auto --gas-adjustment 1.5 -- [struct-id] [amount]

Limits: 1 PDC per player, 1 Command Ship per player. Command Ship must be in fleet. Generator infusion is IRREVERSIBLE.

TX_FLAGS (interactive — the CLI prompts you to confirm): --from [key-name] --gas auto --gas-adjustment 1.5

TX_FLAGS_APPROVED (only after commander approval; suppresses the prompt): TX_FLAGS plus -y. See SAFETY.md "The -y Rule." struct-build-compute is the documented -y exception — it auto-activates the struct when the proof lands, with no shell attached.

Requires: structsd on PATH and a configured signing key.

Verification

  • structsd query structs struct [id] — status = Online (or Built/Offline if not activated)
  • Struct appears in planet/fleet struct list

Error Handling

ErrorCauseFix
"required charge X but player had Y"Not enough charge accumulatedWait ~48s (8 blocks) between build actions
"insufficient resources"Not enough Alpha MatterMine and refine ore first; check balance with structsd query structs player [id]
"power overload"Capacity too low for struct to go onlineDeactivate non-essential structs or increase capacity (see structs-energy skill)
"fleet not on station"Fleet is away from planetWait for fleet return or fleet-move back
"Command Ship required"Command Ship offline or not builtBuild or re-activate Command Ship first
"invalid slot"Slot already occupiedCheck existing structs on planet; slots are 0-3 per ambit
"invalid ambit"Struct type doesn't support chosen ambitCheck possibleAmbit bit-flags for the struct type
Connection refused on port 26657No local node; remote node not configuredSet node in ~/.structs/config/client.toml or use --node flag (see TOOLS.md)

See Also

相关技能

Manages planets and fleet in Structs — evaluating and exploring planets, claiming/relocating, fleet movement and composition, evacuation, and the onStation-vs-away state. Use when discovering or claiming a planet, your planet is depleting, relocating, moving the fleet, checking fleet status, or deciding fleet composition for offense/defense. Covers the raid-clock implications of fleet position.

带新智能体完成 Structs 从密钥创建到首批建筑上线的入驻流程。

39 次安装

Intelligence gathering in Structs — scouting players, planets, guilds, and the galaxy before you act. Use when assessing a raid target, checking a planet's defenses and Command Ship status, profiling an opponent, surveying the galaxy, or refreshing competitive intel. Persists findings to memory/intel/ so they survive context resets.

Runs the Alpha Matter production pipeline in Structs — mine ore, refine it to Alpha Matter, then put the Alpha to work. Use when mining or refining, starting or scheduling a mine→refine cycle, protecting stored ore, scaling output, deciding what to do with refined Alpha, or handling a planet running out of ore. Mining ~17h and refining ~34h are background expeditions; ore is stealable until refined.

在 Structs 中扩容能源:反应堆与发电机灌注,加上协议买卖电力。

37 次安装

从命令行规划并执行 Structs 的突袭、结构攻击与舰队防御。

37 次安装