Structs Reconnaissance
Procedure
- 1. Query entities — All via
structsd query structs [subcommand] [args]:
- Self:
address [your-address] — resolves your address to a player ID. A result of
1-0 means no player exists for that address.
- Players:
player [id],
player-all
- Planets:
planet [id],
planet-all,
planet-all-by-player [player-id],
planet-attribute [planet-id] [type],
planet-attribute-all
- Structs:
struct [id],
struct-all,
struct-attribute [id] [type],
struct-type [id],
struct-type-all
- Fleets:
fleet [id],
fleet-all,
fleet-by-index [index]
- Guilds:
guild [id],
guild-all,
guild-membership-application [id],
guild-membership-application-all
- Energy:
reactor [id],
reactor-all,
infusion [id],
infusion-all,
infusion-all-by-destination [dest-id],
provider [id],
provider-all,
agreement [id],
agreement-all,
agreement-all-by-provider [provider-id]
- Power:
allocation [id],
allocation-all,
allocation-all-by-source [source-id],
allocation-all-by-destination [dest-id],
substation [id],
substation-all
- Grid:
grid [id],
grid-all
- Block:
block-height
- 2. Assess targets — For players: structs, power capacity, fleet status (onStation = can build; away = raiding). For planets: ore remaining, defense structs, shield. For guilds: members, Central Bank status.
- Identify vulnerabilities — Unrefined ore stockpile, power near capacity, undefended planet, fleet away (raiding).
- Persist intelligence — After gathering, update:
-
memory/intel/players/{player-id}.md — Player dossier (profile, behavior, vulnerabilities, relationship)
-
memory/intel/guilds/{guild-id}.md — Guild profile (members, bank status, strengths, weaknesses)
-
memory/intel/territory.md — Planet ownership, ore, defense levels
-
memory/intel/threats.md — Threat board ranked by severity
Commands Reference
| Entity | Query Command |
|---|
| Address → Player | INLINECODE41 (returns player ID; 1-0 = nonexistent) |
| Player |
structsd query structs player [id],
player-all |
| Planet |
structsd query structs planet [id],
planet-all,
planet-all-by-player [player-id] |
| Planet attribute |
structsd query structs planet-attribute [planet-id] [type],
planet-attribute-all |
| Struct |
structsd query structs struct [id],
struct-all,
struct-attribute [id] [type] |
| Struct type |
structsd query structs struct-type [id],
struct-type-all |
| Fleet |
structsd query structs fleet [id],
fleet-all,
fleet-by-index [index] |
| Guild |
structsd query structs guild [id],
guild-all |
| Membership app |
structsd query structs guild-membership-application [id],
guild-membership-application-all |
| Reactor |
structsd query structs reactor [id],
reactor-all |
| Infusion |
structsd query structs infusion [id],
infusion-all,
infusion-all-by-destination [dest-id] |
| Provider |
structsd query structs provider [id],
provider-all |
| Agreement |
structsd query structs agreement [id],
agreement-all,
agreement-all-by-provider [provider-id] |
| Allocation |
structsd query structs allocation [id],
allocation-all,
allocation-all-by-source,
allocation-all-by-destination |
| Substation |
structsd query structs substation [id],
substation-all |
| Grid |
structsd query structs grid [id],
grid-all |
| Block height |
structsd query structs block-height |
Verification
- - Re-query entity after action to confirm state change.
- Cross-reference: player → planet → struct → fleet for full picture.
- Block height confirms chain sync.
Error Handling
- - Entity not found: ID may be invalid or entity destroyed. Try
-all variants to discover current IDs. - Stale data: Query
block-height; re-run queries if chain has progressed. - Missing intel files: Create
memory/intel/players/, memory/intel/guilds/ if absent. Follow formats in memory/intel/README.
Intelligence Persistence Loop
- 1. Run reconnaissance queries for target(s).
- Parse results: owner, structs, power, shield, fleet status, guild.
- Write/update memory/intel/players/, memory/intel/guilds/ per README formats.
- Update memory/intel/territory.md with planet ownership table.
- Update memory/intel/threats.md with ranked threats and response notes.
- Include "Last Updated" date in each file.
PostgreSQL Queries (Advanced)
If the Guild Stack is running locally, all reconnaissance queries can be done in < 1 second via PostgreSQL instead of CLI. This is essential for combat automation, real-time threat monitoring, and galaxy-wide scouting.
Example -- find all players with stealable ore, ranked by amount:
CODEBLOCK0
Example -- enemy fleet composition at a planet:
CODEBLOCK1
Important: The structs.grid table is key-value, not columnar. See knowledge/infrastructure/database-schema for the grid pattern and more query examples.
For setup: structs-guild-stack skill
See Also
Structs 侦察
流程
- 1. 查询实体 — 全部通过 structsd query structs [子命令] [参数] 执行:
- 自身:address [你的地址] — 将你的地址解析为玩家ID。结果为 1-0 表示该地址没有对应玩家。
- 玩家:player [ID],player-all
- 星球:planet [ID],planet-all,planet-all-by-player [玩家ID],planet-attribute [星球ID] [类型],planet-attribute-all
- 结构:struct [ID],struct-all,struct-attribute [ID] [类型],struct-type [ID],struct-type-all
- 舰队:fleet [ID],fleet-all,fleet-by-index [索引]
- 公会:guild [ID],guild-all,guild-membership-application [ID],guild-membership-application-all
- 能量:reactor [ID],reactor-all,infusion [ID],infusion-all,infusion-all-by-destination [目标ID],provider [ID],provider-all,agreement [ID],agreement-all,agreement-all-by-provider [提供者ID]
- 电力:allocation [ID],allocation-all,allocation-all-by-source [来源ID],allocation-all-by-destination [目标ID],substation [ID],substation-all
- 网格:grid [ID],grid-all
- 区块:block-height
- 2. 评估目标 — 针对玩家:结构、电力容量、舰队状态(onStation = 可建造;away = 正在掠夺)。针对星球:剩余矿石、防御结构、护盾。针对公会:成员、中央银行状态。
- 识别弱点 — 未精炼矿石库存、电力接近容量上限、无防御星球、舰队外出(掠夺中)。
- 持久化情报 — 收集后,更新:
-
memory/intel/players/{玩家ID}.md — 玩家档案(个人资料、行为、弱点、关系)
-
memory/intel/guilds/{公会ID}.md — 公会档案(成员、银行状态、优势、劣势)
-
memory/intel/territory.md — 星球所有权、矿石、防御等级
-
memory/intel/threats.md — 按严重程度排序的威胁面板
命令参考
| 实体 | 查询命令 |
|---|
| 地址 → 玩家 | structsd query structs address [地址](返回玩家ID;1-0 = 不存在) |
| 玩家 |
structsd query structs player [ID],player-all |
| 星球 | structsd query structs planet [ID],planet-all,planet-all-by-player [玩家ID] |
| 星球属性 | structsd query structs planet-attribute [星球ID] [类型],planet-attribute-all |
| 结构 | structsd query structs struct [ID],struct-all,struct-attribute [ID] [类型] |
| 结构类型 | structsd query structs struct-type [ID],struct-type-all |
| 舰队 | structsd query structs fleet [ID],fleet-all,fleet-by-index [索引] |
| 公会 | structsd query structs guild [ID],guild-all |
| 入会申请 | structsd query structs guild-membership-application [ID],guild-membership-application-all |
| 反应堆 | structsd query structs reactor [ID],reactor-all |
| 注入 | structsd query structs infusion [ID],infusion-all,infusion-all-by-destination [目标ID] |
| 提供者 | structsd query structs provider [ID],provider-all |
| 协议 | structsd query structs agreement [ID],agreement-all,agreement-all-by-provider [提供者ID] |
| 分配 | structsd query structs allocation [ID],allocation-all,allocation-all-by-source,allocation-all-by-destination |
| 变电站 | structsd query structs substation [ID],substation-all |
| 网格 | structsd query structs grid [ID],grid-all |
| 区块高度 | structsd query structs block-height |
验证
- - 操作后重新查询实体以确认状态变更。
- 交叉引用:玩家 → 星球 → 结构 → 舰队以获取完整图景。
- 区块高度确认链同步状态。
错误处理
- - 实体未找到:ID可能无效或实体已被销毁。尝试使用 -all 变体来发现当前ID。
- 数据过时:查询 block-height;如果链已推进,重新运行查询。
- 缺少情报文件:如果不存在,创建 memory/intel/players/、memory/intel/guilds/。遵循 memory/intel/README 中的格式。
情报持久化循环
- 1. 对目标执行侦察查询。
- 解析结果:所有者、结构、电力、护盾、舰队状态、公会。
- 根据 README 格式写入/更新 memory/intel/players/、memory/intel/guilds/。
- 使用星球所有权表更新 memory/intel/territory.md。
- 使用排序后的威胁和响应备注更新 memory/intel/threats.md。
- 在每个文件中包含最后更新日期。
PostgreSQL 查询(高级)
如果公会栈(Guild Stack)在本地运行,所有侦察查询可以通过 PostgreSQL 在 < 1 秒 内完成,无需使用 CLI。这对于战斗自动化、实时威胁监控和全星系侦察至关重要。
示例 — 查找所有拥有可窃取矿石的玩家,按数量排序:
sql
SELECT p.id, p.guildid, COALESCE(gore.val, 0) as ore
FROM structs.player p
JOIN structs.grid gore ON gore.objectid = p.id AND gore.attribute_type = ore
WHERE g_ore.val > 0
ORDER BY g_ore.val DESC;
示例 — 星球上的敌方舰队组成:
sql
SELECT s.id, st.classabbreviation, s.operatingambit, st.unit_defenses
FROM structs.struct s
JOIN structs.struct_type st ON st.id = s.type
JOIN structs.fleet f ON f.id = s.location_id
WHERE f.locationid = 2-105 AND s.isdestroyed = false AND s.location_type = fleet;
重要提示:structs.grid 表是键值结构,而非列式结构。有关网格模式及更多查询示例,请参见 knowledge/infrastructure/database-schema。
设置方法:structs-guild-stack 技能
参见