Skip to content
STRUCTS.AICODEX
structstestnet-111 structsd v0.23.0 ✓ facts and rules verified 2026-11-27

Raid

WAR · ACTION ON A PLANET (2-) BY A FLEET (9-)

A raid sends your fleet to another player’s planet to take their stored ore. It is the only way ore changes hands by force, and the only thing a raid can take. This page reads at five depths; stop at the one you need.

Story

Ore is the one thing in the galaxy that can still be taken. Refined Alpha belongs to whoever refined it, bound to them by the shared record; no fleet can pry it loose. But ore, freshly torn from a world and not yet refined, belongs to whoever holds it. So the raiders come in the hours between the mine and the refinery.

A world defends itself through its Command Ship. While that ship is home and powered, a raider can work at the shields for as long as it likes and never break through. Let the ship fall, or send the fleet away, or let the power fail, and the shields become a clock, and the clock runs down.

Rules

WHAT A RAID TAKESR.raid.loot

A raid takes only the defender's stored (unrefined) ore. Its settlement never takes refined Alpha, the vault, the account, or generator fuel. Fighting during a raid can still destroy structs, and a generator that is destroyed for any reason (combat, trashing, or its planet's depletion) loses its fuel.

Source: x/structs/keeper/msg_server_planet_raid_complete.go:128-131 · all rules
WHEN A RAID CAN COMPLETER.raid.gate

A raid can complete only while the defender is vulnerable: no fleet, the fleet off station, or no Command Ship, a destroyed one, or an offline one. While the fleet is on station with an online Command Ship, raid completion is rejected however much work the raider does. The shield number sets the raid's proof-of-work difficulty (a timer), not whether it can complete.

Source: x/structs/keeper/planet_cache.go:186-215 (IsDefenderCommandStructVulnerable) · all rules

Observed, not a chain rule: across recorded raids the median time from initiated to shieldsVulnerable was about 2 minutes, and every defender who won returned fire within about 2 minutes. Plan on roughly four minutes to respond (defense).

THE REAL DEFENSE: REFINE IN PARALLELR.refine.parallel

Launch the refine compute together with the mine compute. A refinery ages while it holds no ore; ore is checked when the refine completes, and a refine that lands with no stored ore is rejected.

Source: x/structs/keeper/struct_cache.go:568-588 (CanOreRefine: HasStoredOre at completion) · all rules

Moves

Move Command Tier
Move your fleet to the target structsd tx structs fleet-move --from [key] --gas auto --gas-adjustment 1.5 -- [fleet-id] [destination-planet-id] 1 (unscouted destination)
Do the raid’s proof-of-work and complete it structsd tx structs planet-raid-compute -D 3 --from [key] --gas auto --gas-adjustment 1.5 -y -- [fleet-id] (background, after an Approval Block) 1
Submit a proof you computed elsewhere structsd tx structs planet-raid-complete --from [key] --gas auto --gas-adjustment 1.5 -- [fleet-id] [proof] [nonce] 1
Defend: assign a defender to your Command Ship structsd tx structs struct-defense-set --from [key] --gas auto --gas-adjustment 1.5 -- [defender-struct-id] [command-ship-id] routine (needs PermPlay on the owner)

Before raiding, scout: scripts/scout.sh [planet-id] gives a go/no-go from the target’s Command Ship and fleet status. A GO is a hypothesis; re-scout right before committing work. Under attack yourself: under attack. Full procedures: structs-combat.

Data

Machine

A raid’s settlement is one transaction, MsgPlanetRaidComplete. The chain checks the raider’s proof against the planet’s shield-derived difficulty and the defender’s vulnerability at that block, then moves the defender’s entire storedOre to the raider and sends the fleet home. There is no partial loot and no refund path: the amount is whatever stored ore holds at that block. The planet’s shield value is the proof’s difficulty range, so a higher shield means a longer raid, not an impossible one. The vulnerability check is IsDefenderCommandStructVulnerable; when it fails, completion is rejected with shields_active. Source: x/structs/keeper/msg_server_planet_raid_complete.go, planet_cache.go.