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.
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.
- Initiate build —
structsd tx structs struct-build-initiate --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [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). - Proof-of-work —
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. - 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
INLINECODE12 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).
| Action | Charge Cost | Wait Time |
|---|
| Build complete | 8 | ~48 seconds |
| Move |
8 | ~48 seconds |
| Activate (re-activation only) | 1 | ~6 seconds |
| Defend change | 1 | ~6 seconds |
| Primary weapon | 1-20 | Varies 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):
| Struct | Type ID | Build Difficulty | Wait to D=3 |
|---|
| Command Ship | 1 | 200 | ~17 min |
| Starfighter |
3 | 250 | ~20 min |
| Ore Extractor | 14 | 700 | ~57 min |
| Ore Refinery | 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 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
| Action | CLI Command |
|---|
| Initiate build | INLINECODE18 (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] |
| Build complete (manual, rarely needed) |
structsd tx structs struct-build-complete --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] |
| Build cancel |
structsd tx structs struct-build-cancel --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] |
| Re-activate (only after deactivation) |
structsd tx structs struct-activate --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] |
| Deactivate |
structsd tx structs struct-deactivate --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] |
| Move |
structsd tx structs struct-move --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] [new-ambit] [new-slot] [new-location] |
| Set defense |
structsd tx structs struct-defense-set --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [defender-struct-id] [protected-struct-id] |
| Clear defense |
structsd tx structs struct-defense-clear --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [defender-struct-id] |
| Stealth on |
structsd tx structs struct-stealth-activate --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] |
| Stealth off |
structsd tx structs struct-stealth-deactivate --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] |
| Generator infuse |
structsd tx structs struct-generator-infuse --from [key-name] --gas auto --gas-adjustment 1.5 -y -- [struct-id] [amount] |
Limits: 1 PDC per player, 1 Command Ship per player. Command Ship must be in fleet. Generator infusion is IRREVERSIBLE. Common tx flags: --from [key-name] --gas auto --gas-adjustment 1.5 -y.
Verification
- -
structsd query structs struct [id] — status = Online (or Built/Offline if not activated) - Struct appears in planet/fleet struct list
Error Handling
| Error | Cause | Fix |
|---|
| "required charge X but player had Y" | Not enough charge accumulated | Wait ~48s (8 blocks) between build actions |
| "insufficient resources" |
Not enough Alpha Matter | Mine and refine ore first; check balance with
structsd query structs player [id] |
| "power overload" | Capacity too low for struct to go online | Deactivate non-essential structs or increase capacity (see
structs-energy skill) |
| "fleet not on station" | Fleet is away from planet | Wait for fleet return or
fleet-move back |
| "Command Ship required" | Command Ship offline or not built | Build or re-activate Command Ship first |
| "invalid slot" | Slot already occupied | Check existing structs on planet; slots are 0-3 per ambit |
| "invalid ambit" | Struct type doesn't support chosen ambit | Check
possibleAmbit bit-flags for the struct type |
| Connection refused on port 26657 | No local node; remote node not configured | Set
node in
~/.structs/config/client.toml or use
--node flag (see TOOLS.md) |
See Also
结构体建造
重要提示:包含连字符的实体ID(如1-42、5-10)会被CLI解析器误判为标志位。本技能中的所有交易命令均在位置参数前使用--以防止此问题。
操作流程
- 1. 检查条件 — 玩家在线、Alpha物质充足、有效槽位(每个领域0-3)、指挥舰在线、舰队就位(用于行星建造)。查询玩家、行星、舰队。
- 发起建造 — structsd tx structs struct-build-initiate --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [玩家ID] [结构体类型ID] [操作领域] [槽位]。[操作领域]参数必须为小写字符串:space、air、land或water(非位掩码数字)。
- 工作量证明 — structsd tx structs struct-build-compute -D 3 --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID]。此命令计算哈希值,自动提交完成,结构体自动激活。无需单独的激活步骤。
- 可选操作 — 根据需要移动、设置防御或激活隐身。
自动激活:结构体在建造完成后自动激活。仅当结构体先前通过struct-deactivate停用时,才使用struct-activate重新激活。
计算与完成
struct-build-compute是一个辅助命令,执行工作量证明并自动提交struct-build-complete及哈希结果。随后结构体自动激活。仅当您通过外部工具计算哈希值并希望手动提交时,才需要使用struct-build-complete。
-D标志
-D标志(范围1-64)指示计算命令等待难度降至指定级别后再开始哈希计算。难度随结构体老化呈对数下降。使用-D 3 — 在D=3时,哈希计算瞬间完成,零CPU浪费。较低值等待时间更长,但不会在困难哈希上消耗计算资源。
充能消耗
每个动作消耗充能。充能以每区块1点的速度被动累积(约6秒/区块)。
8 | ~48秒 |
| 激活(仅重新激活) | 1 | ~6秒 |
| 防御变更 | 1 | ~6秒 |
| 主武器 | 1-20 | 因结构体而异 |
如果出现需要充能X但玩家仅有Y的错误,请等待充能累积。完整充能表请参见knowledge/mechanics/building。
预期建造时间
从发起至计算完成的时间(假设6秒/区块,D=3):
| 结构体 | 类型ID | 建造难度 | 等待至D=3 |
|---|
| 指挥舰 | 1 | 200 | ~17分钟 |
| 星际战斗机 |
3 | 250 | ~20分钟 |
| 矿石提取器 | 14 | 700 | ~57分钟 |
| 矿石精炼厂 | 15 | 700 | ~57分钟 |
| PDC | 19 | 2,880 | ~3.7小时 |
| 矿石掩体 | 18 | 3,600 | ~4.6小时 |
| 世界引擎 | 22 | 5,000 | ~6.4小时 |
尽早发起,稍后计算。 老化计时从发起时开始。批量发起所有计划建造,然后在后台终端启动计算。等待期间可处理其他事务。参见awareness/async-operations。
一个密钥,一次计算。 切勿使用同一签名密钥同时运行两个*-compute任务。两个任务可能同时达到目标难度并提交交易,导致序列号冲突——其中一个静默失败,使结构体卡在建造状态。不同玩家使用不同的签名密钥,同一玩家按顺序执行计算任务。
命令参考
| 动作 | CLI命令 |
|---|
| 发起建造 | structsd tx structs struct-build-initiate --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [玩家ID] [结构体类型ID] [操作领域] [槽位](操作领域 = space/air/land/water,小写字符串) |
| 建造计算(PoW + 自动完成 + 自动激活) |
structsd tx structs struct-build-compute -D 3 --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 建造完成(手动,极少需要) | structsd tx structs struct-build-complete --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 取消建造 | structsd tx structs struct-build-cancel --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 重新激活(仅停用后) | structsd tx structs struct-activate --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 停用 | structsd tx structs struct-deactivate --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 移动 | structsd tx structs struct-move --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] [新领域] [新槽位] [新位置] |
| 设置防御 | structsd tx structs struct-defense-set --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [防御者结构体ID] [被保护结构体ID] |
| 清除防御 | structsd tx structs struct-defense-clear --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [防御者结构体ID] |
| 开启隐身 | structsd tx structs struct-stealth-activate --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 关闭隐身 | structsd tx structs struct-stealth-deactivate --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] |
| 发生器注入 | structsd tx structs struct-generator-infuse --from [密钥名称] --gas auto --gas-adjustment 1.5 -y -- [结构体ID] [数量] |
限制:每位玩家1个PDC,每位玩家1艘指挥舰。指挥舰必须在舰队中。发生器注入不可逆。常用交易标志:--from [密钥名称] --gas auto --gas-adjustment 1.5 -y。
验证
- - structsd query structs struct [ID] — 状态 = Online(若未激活则为Built/Offline)
- 结构体出现在行星/舰队结构体列表中
错误处理
| 错误 | 原因 | 修复 |
|---|
| 需要充能X但玩家仅有Y | 充能累积不足 | 在建造动作间等待约48秒(8个区块) |
| 资源不足 |
Alpha物质不够 | 先采矿和精炼矿石;使用structsd query structs player [ID]检查余额 |
| 功率过载 | 容量不足以使结构体上线 | 停用非必需结构体或增加容量(参见structs-energy技能) |
| 舰队未就位 | 舰队远离行星 | 等待舰队返回或使用fleet-move返回 |
| 需要指挥舰 | 指挥舰离线或未建造 | 先建造或重新激活指挥舰 |
| 无效槽位 | 槽位已被占用 | 检查行星上现有结构体;每个领域槽位为0-3 |
| 无效领域 | 结构体类型不支持所选领域 | 检查结构体类型的possibleAmbit位标志 |
| 端口26657连接被拒绝 | 无本地节点;远程节点未配置 | 在~/.structs/config/client.toml中设置node或使用--node标志(参见TOOLS.md) |
参见