Structs Action Definitions

Version: 1.1.0 Category: actions Description: Complete catalog of all game actions/commands for AI agents


Action Categories

Category Actions
construction MsgStructBuild, MsgStructBuildInitiate, MsgStructBuildComplete
combat MsgStructAttack, MsgPlanetRaidComplete
resource MsgReactorAllocate, MsgReactorInfuse, MsgReactorDefuse, MsgReactorBeginMigration, MsgReactorCancelDefusion, MsgSubstationConnect, MsgSubstationCreate, MsgSubstationPlayerConnect, MsgStructOreMinerComplete, MsgStructOreRefineryComplete
economic MsgProviderCreate, MsgAgreementCreate, MsgOreMining, MsgOreRefining, MsgGeneratorAllocate
exploration MsgPlanetExplore
fleet MsgFleetMove
guild MsgGuildCreate, MsgGuildMembershipJoin, MsgGuildMembershipLeave, MsgGuildBankMint, MsgGuildBankRedeem
struct-management MsgStructActivate, MsgStructDeactivate, MsgStructStealthActivate, MsgStructStealthDeactivate, MsgStructDefenseSet, MsgStructDefenseClear, MsgStructMove

Common Requirements

Requirement Description
playerOnline Player must be online (not halted)
sufficientResources Player must have sufficient resources
sufficientCharge Struct must have sufficient charge
proofOfWork Action requires proof-of-work computation
validLocation Location must be valid and accessible
validTarget Target must be valid and attackable

Transaction Flow

  1. Build transaction with message(s)
  2. Sign transaction with player key
  3. Submit to POST /cosmos/tx/v1beta1/txs
  4. Transaction moves to ‘broadcast’ status
  5. On-chain validation occurs (checks requirements)
  6. Action succeeds OR fails based on validation
  7. Query game state to verify action actually occurred
  8. If action didn’t occur, check requirements and retry

IMPORTANT: Transaction status ‘broadcast’ does NOT mean action succeeded! Validation happens on-chain after broadcast. Always verify game state to confirm action occurred.

Common Validation Failures:

See patterns/validation-patterns.md for detailed validation patterns.


Construction Actions

MsgStructBuild

Required Fields: creator, structType, locationType, locationId Optional Fields: gridAttributes Follow-Up Action: MsgStructBuildComplete

Requirement Details
playerOnline true
sufficientResources true
validLocation true
commandShipOnline If building on planet: Command Ship must be built AND online in fleet. Check: query fleet for Command Ship struct, verify status is ‘online’.
fleetOnStation If building on planet: fleet must be ‘onStation’ (not ‘away’). Check: query fleet status.
sufficientPower Must have power capacity > struct passive draw. Check: query player power capacity vs struct requirements.

Transaction may broadcast but struct not created if requirements not met. Always verify game state after broadcast.

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructBuild",
        "creator": "structs1...",
        "structType": "1",
        "locationType": 1,
        "locationId": "1-1"
      }
    ]
  }
}

MsgStructBuildInitiate

Required Fields: creator, playerId, structTypeId, operatingAmbit, slot Follow-Up Action: MsgStructBuildComplete

Requirement Details
playerOnline true
sufficientResources true
validLocation true
sufficientPower true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructBuildInitiate",
        "creator": "structs1...",
        "playerId": "1-1",
        "structTypeId": "1",
        "operatingAmbit": 1,
        "slot": 1
      }
    ]
  }
}

MsgStructBuildComplete

Required Fields: creator, structId, hash, nonce

Requirement Details
playerOnline true
structInBuildingState true
proofOfWork true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructBuildComplete",
        "creator": "structs1...",
        "structId": "1-1",
        "hash": "proof-of-work-hash",
        "nonce": "proof-of-work-nonce"
      }
    ]
  }
}

Combat Actions

MsgStructAttack

Required Fields: creator, structId, targetId

Requirement Details
playerOnline true
sufficientCharge true
structOnline true
validTarget true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructAttack",
        "creator": "structs1...",
        "structId": "1-1",
        "targetId": "2-1"
      }
    ]
  }
}

MsgPlanetRaidComplete

Required Fields: creator, fleetId, planetId, hash, nonce

Requirement Details
playerOnline true
fleetAway true
fleetFirstInLine true
proofOfWork true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgPlanetRaidComplete",
        "creator": "structs1...",
        "fleetId": "1-1",
        "planetId": "2-1",
        "hash": "proof-of-work-hash",
        "nonce": "proof-of-work-nonce"
      }
    ]
  }
}

Resource Actions

MsgReactorAllocate

Required Fields: creator, reactorId, destinationId, amount

Requirement Details
playerOnline true
sufficientEnergy true
validDestination true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgReactorAllocate",
        "creator": "structs1...",
        "reactorId": "1-1",
        "destinationId": "2-1",
        "amount": "1000000"
      }
    ]
  }
}

MsgReactorInfuse

This action abstracts validation delegation. When used for staking, it delegates validation stake to a validator. Reactor staking is managed at the player level, not reactor level.

Required Fields: creator, reactorId, amount

Requirement Details
playerOnline true
reactorExists true
sufficientAlphaMatter true

Conversion Rate: 1 gram Alpha Matter (1,000,000 micrograms) = 1,000 watts energy (1,000,000 milliwatts). Code reference: x/structs/types/keys.go (ReactorFuelToEnergyConversion = 1).

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgReactorInfuse",
        "creator": "structs1...",
        "reactorId": "1-1",
        "amount": "1000000"
      }
    ]
  }
}

MsgReactorDefuse

This action abstracts validation undelegation. Reactor staking is managed at the player level, not reactor level.

Required Fields: creator, reactorId, amount

Requirement Details
playerOnline true
reactorExists true
sufficientFuel true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgReactorDefuse",
        "creator": "structs1...",
        "reactorId": "1-1",
        "amount": "1000000"
      }
    ]
  }
}

MsgReactorBeginMigration

Required Fields: creator, reactorId

Requirement Details
playerOnline true
reactorExists true
hasActiveDelegation true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgReactorBeginMigration",
        "creator": "structs1...",
        "reactorId": "3-1"
      }
    ]
  }
}

MsgReactorCancelDefusion

Required Fields: creator, reactorId

Requirement Details
playerOnline true
reactorExists true
inUndelegationPeriod true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgReactorCancelDefusion",
        "creator": "structs1...",
        "reactorId": "3-1"
      }
    ]
  }
}

MsgSubstationConnect

Required Fields: creator, substationId, structId

Requirement Details
playerOnline true
validSubstation true
validStruct true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgSubstationConnect",
        "creator": "structs1...",
        "substationId": "1-1",
        "structId": "2-1"
      }
    ]
  }
}

MsgSubstationCreate

Required Fields: creator, planetId

Requirement Details
playerOnline true
planetOwned true
validLocation true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgSubstationCreate",
        "creator": "structs1...",
        "planetId": "2-1"
      }
    ]
  }
}

MsgSubstationPlayerConnect

Required Fields: creator, substationId

Effects: Player gains capacitySecondary from the substation’s connectionCapacity.

Requirement Details
playerOnline true
substationExists true
validConnection true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgSubstationPlayerConnect",
        "creator": "structs1...",
        "substationId": "1-1"
      }
    ]
  }
}

MsgStructOreMinerComplete

Required Fields: creator, structId, proof, nonce

Requirement Details
playerOnline true
structOnline true
planetHasOre true
sufficientCharge Charge >= structType.OreMiningCharge
proofOfWork HashBuildAndCheckDifficulty with OreMiningDifficulty (14000)

Effects: StoredOreIncrement(1) – fixed 1 ore per operation.

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructOreMinerComplete",
        "creator": "structs1...",
        "structId": "1-1",
        "proof": "proof-of-work-hash",
        "nonce": "proof-of-work-nonce"
      }
    ]
  }
}

MsgStructOreRefineryComplete

Required Fields: creator, structId, proof, nonce

Requirement Details
playerOnline true
structOnline true
hasStoredOre true
sufficientCharge Charge >= structType.OreRefiningCharge
proofOfWork HashBuildAndCheckDifficulty with OreRefiningDifficulty (28000)

Effects:

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructOreRefineryComplete",
        "creator": "structs1...",
        "structId": "1-1",
        "proof": "proof-of-work-hash",
        "nonce": "proof-of-work-nonce"
      }
    ]
  }
}

Economic Actions

MsgProviderCreate

Required Fields: creator, rate, policy

Requirement Details
playerOnline true
validRate true
validPolicy true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgProviderCreate",
        "creator": "structs1...",
        "rate": {},
        "policy": {}
      }
    ]
  }
}

MsgAgreementCreate

Required Fields: creator, providerId, terms

Requirement Details
playerOnline true
validProvider true
validTerms true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgAgreementCreate",
        "creator": "structs1...",
        "providerId": "1-1",
        "terms": {}
      }
    ]
  }
}

MsgOreMining

Required Fields: creator, structId, hash, nonce

Requirement Details
playerOnline true
structOnline true
oreExtractorBuilt true
planetHasOre true
sufficientCharge true
proofOfWork true

Security: Alpha Ore can be stolen by other players. Refine to Alpha Matter for security.

Costs:

Cost Value
buildDraw 500,000 milliwatts
passiveDraw 500,000 milliwatts
miningCharge 20
miningDifficulty 14,000

Result: Alpha Ore amount extracted (grams). Ore is stealable.

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgOreMining",
        "creator": "structs1...",
        "structId": "1-1",
        "hash": "proof-of-work-hash",
        "nonce": "proof-of-work-nonce"
      }
    ]
  }
}

MsgOreRefining

Required Fields: creator, structId, hash, nonce

Requirement Details
playerOnline true
structOnline true
oreRefineryBuilt true
hasAlphaOre true
sufficientCharge true
proofOfWork true

Security: Alpha Matter cannot be stolen once refined. This secures your resources.

Costs:

Cost Value
buildDraw 500,000 milliwatts
passiveDraw 500,000 milliwatts
refiningCharge 20
refiningDifficulty 28,000

Conversion: 1 gram Alpha Ore = 1 gram Alpha Matter.

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgOreRefining",
        "creator": "structs1...",
        "structId": "1-1",
        "hash": "proof-of-work-hash",
        "nonce": "proof-of-work-nonce"
      }
    ]
  }
}

MsgGeneratorAllocate

Required Fields: creator, generatorId, destinationType, destinationId, alphaMatterAmount

Requirement Details
playerOnline true
generatorActive true
sufficientAlphaMatter true
validDestination true

Generator Types:

Generator Rate Formula Risk
Field Generator 2 Energy (kW) = Alpha Matter (grams) x 2 high
Continental Power Plant 5 Energy (kW) = Alpha Matter (grams) x 5 high
World Engine 10 Energy (kW) = Alpha Matter (grams) x 10 high

Energy Properties: Energy is ephemeral – must be consumed immediately upon production, cannot be stored. Energy is shared across all Structs connected to the same power source.

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgGeneratorAllocate",
        "creator": "structs1...",
        "generatorId": "1-1",
        "destinationType": 1,
        "destinationId": "2-1",
        "alphaMatterAmount": "100000000"
      }
    ]
  }
}

Note: alphaMatterAmount is in micrograms (100 grams = 100,000,000 micrograms).


Exploration Actions

MsgPlanetExplore

Required Fields: creator

Requirement Details
playerOnline true
currentPlanetEmpty Current planet must have 0 ore remaining (all ore mined). Check: query current planet attributes for ore amount, must be 0.

Transaction may broadcast but planet ownership unchanged if current planet has ore remaining. Always verify game state after broadcast.

Result:

Planet Starting Properties:

Property Value
maxOre 5
spaceSlots 4
airSlots 4
landSlots 4
waterSlots 4
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgPlanetExplore",
        "creator": "structs1..."
      }
    ]
  }
}

Fleet Actions

MsgFleetMove

Required Fields: creator, fleetId, destinationType, destinationId

Requirement Details
playerOnline true
commandShipOnline Command Ship must be online in fleet
validDestination Destination must exist and be accessible

Fleet Status:

Status Description Can Build Can Raid
onStation Fleet is at planet Yes No
away Fleet is away from planet No Yes
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgFleetMove",
        "creator": "structs1...",
        "fleetId": "1-1",
        "destinationType": 1,
        "destinationId": "2-1"
      }
    ]
  }
}

Guild Actions

MsgGuildCreate

Required Fields: creator Optional Fields: endpoint, primaryReactorId, entrySubstationId

Requirement Details
playerOnline true
notInGuild Player must not already be in a guild. Check: query player.guildId, must be null or empty.
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgGuildCreate",
        "creator": "structs1..."
      }
    ]
  }
}

MsgGuildMembershipJoin

Required Fields: creator, guildId

Requirement Details
playerOnline true
notInGuild Player must not already be in a guild
guildExists Guild must exist. Check: query guild by ID.
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgGuildMembershipJoin",
        "creator": "structs1...",
        "guildId": "0-1"
      }
    ]
  }
}

MsgGuildMembershipLeave

Required Fields: creator

Requirement Details
playerOnline true
inGuild Player must be in a guild. Check: query player.guildId, must not be null or empty.
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgGuildMembershipLeave",
        "creator": "structs1..."
      }
    ]
  }
}

MsgGuildBankMint

Required Fields: creator, guildId, amount

Requirement Details
playerOnline true
inGuild Player must be in the guild
guildPermission Player must have permission to mint tokens. Trust-based system – no technical safeguards against revocation or inflation.
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgGuildBankMint",
        "creator": "structs1...",
        "guildId": "0-1",
        "amount": "1000000"
      }
    ]
  }
}

MsgGuildBankRedeem

Required Fields: creator, guildId, amount

Requirement Details
playerOnline true
inGuild Player must be in the guild
sufficientTokens Player must have sufficient guild tokens
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgGuildBankRedeem",
        "creator": "structs1...",
        "guildId": "0-1",
        "amount": "1000000"
      }
    ]
  }
}

Struct Management Actions

MsgStructActivate

Required Fields: creator, structId

Requirement Details
playerOnline true
structBuilt true
structOffline true
sufficientCharge Charge >= structType.ActivateCharge
sufficientPower Available capacity >= structType.PassiveDraw

Effects:

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructActivate",
        "creator": "structs1...",
        "structId": "1-1"
      }
    ]
  }
}

MsgStructDeactivate

Required Fields: creator, structId

Requirement Details
structBuilt true
structOnline true
ownerOffline Owner must be offline (halted)

Effects:

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructDeactivate",
        "creator": "structs1...",
        "structId": "1-1"
      }
    ]
  }
}

MsgStructStealthActivate

Required Fields: creator, structId

Requirement Details
playerOnline true
structCommandable true
structNotHidden true
hasStealthSystem Struct must have stealth system
sufficientCharge Charge >= structType.StealthActivateCharge

Effects:

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructStealthActivate",
        "creator": "structs1...",
        "structId": "1-1"
      }
    ]
  }
}

MsgStructStealthDeactivate

Required Fields: creator, structId

Requirement Details
playerOnline true
structCommandable true
structHidden true
hasStealthSystem true

Effects: Removes hidden status from struct.

{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructStealthDeactivate",
        "creator": "structs1...",
        "structId": "1-1"
      }
    ]
  }
}

MsgStructDefenseSet

Required Fields: creator, defenderStructId, protectedStructId

Requirement Details
playerOnline true
defenderExists true
protectedExists true
sameAmbit Defender and protected must be in same ambit for full blocking
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructDefenseSet",
        "creator": "structs1...",
        "defenderStructId": "1-1",
        "protectedStructId": "2-1"
      }
    ]
  }
}

MsgStructDefenseClear

Required Fields: creator, defenderStructId

Requirement Details
playerOnline true
defenderExists true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructDefenseClear",
        "creator": "structs1...",
        "defenderStructId": "1-1"
      }
    ]
  }
}

MsgStructMove

Required Fields: creator, structId, locationType, ambit, slot

Requirement Details
playerOnline true
structBuilt true
validLocation true
{
  "body": {
    "messages": [
      {
        "@type": "/structs.structs.MsgStructMove",
        "creator": "structs1...",
        "structId": "1-1",
        "locationType": 1,
        "ambit": 1,
        "slot": 1
      }
    ]
  }
}

Verification

Field Value
Verified true
Verified By GameCodeAnalyst
Verified Date 2025-01-XX
Method code-analysis
Confidence high
Total Actions 30
Verified Actions 30
Percentage 100%
Note All documented actions verified against codebase. Additional actions exist in proto file but not yet documented.