Skip to content

Documentation# Expert Facts

GitHub Action edited this page Feb 26, 2021 · 2 revisions

Protocol Documentation

Table of Contents

Top

protos/expert/fact/fact.proto

Fact request and response definitions for use with Expert API subsystem ExecuteCommandList call.

AttackSoldierCount

Retrieve the amount of player's land military units designated as attackers.

AttackSoldierCountResult

Response for the AttackSoldierCount fact.

Field Type Label Description
result int32 number of player's land military units designated as attackers

AttackWarboatCount

Retrieve the amount of player's naval military units designated as attackers.

AttackWarboatCountResult

Response for the AttackWarboatCount fact.

Field Type Label Description
result int32 number of player's naval military units designated as attackers

BuildingAvailable

Check whether a building of certain type is available. This does not check if the player has the resources to build it.

Field Type Label Description
inConstBuildingId int32 building type to check

BuildingAvailableResult

Response for the BuildingAvailable fact.

Field Type Label Description
result bool whether the given building type is available

BuildingCount

BuildingCountResult

Field Type Label Description
result int32

BuildingCountTotal

BuildingCountTotalResult

Field Type Label Description
result int32

BuildingTypeCount

Field Type Label Description
inConstBuildingId int32

BuildingTypeCountResult

Field Type Label Description
result int32

BuildingTypeCountTotal

Field Type Label Description
inConstBuildingId int32

BuildingTypeCountTotalResult

Field Type Label Description
result int32

CanAffordBuilding

Field Type Label Description
inConstBuildingId int32

CanAffordBuildingResult

Field Type Label Description
result bool

CanAffordCompleteWall

Field Type Label Description
inConstPerimeter int32
inConstWallId int32

CanAffordCompleteWallResult

Field Type Label Description
result bool

CanAffordResearch

Field Type Label Description
inConstTechId int32

CanAffordResearchResult

Field Type Label Description
result bool

CanAffordUnit

Field Type Label Description
inConstUnitId int32

CanAffordUnitResult

Field Type Label Description
result bool

CanBuild

Field Type Label Description
inConstBuildingId int32

CanBuildGate

Field Type Label Description
inConstPerimeter int32

CanBuildGateResult

Field Type Label Description
result bool

CanBuildGateWithEscrow

Field Type Label Description
inConstPerimeter int32

CanBuildGateWithEscrowResult

Field Type Label Description
result bool

CanBuildResult

Field Type Label Description
result bool

CanBuildWall

Field Type Label Description
inConstPerimeter int32
inConstWallId int32

CanBuildWallResult

Field Type Label Description
result bool

CanBuildWallWithEscrow

Field Type Label Description
inConstPerimeter int32
inConstWallId int32

CanBuildWallWithEscrowResult

Field Type Label Description
result bool

CanBuildWithEscrow

Field Type Label Description
inConstBuildingId int32

CanBuildWithEscrowResult

Field Type Label Description
result bool

CanBuyCommodity

Field Type Label Description
inConstCommodity int32

CanBuyCommodityResult

Field Type Label Description
result bool

CanResearch

Field Type Label Description
inConstTechId int32

CanResearchResult

Field Type Label Description
result bool

CanResearchWithEscrow

Field Type Label Description
inConstTechId int32

CanResearchWithEscrowResult

Field Type Label Description
result bool

CanSellCommodity

Field Type Label Description
inConstCommodity int32

CanSellCommodityResult

Field Type Label Description
result bool

CanSpy

CanSpyResult

Field Type Label Description
result bool

CanSpyWithEscrow

CanSpyWithEscrowResult

Field Type Label Description
result bool

CanTrain

Field Type Label Description
inConstUnitId int32

CanTrainResult

Field Type Label Description
result bool

CanTrainWithEscrow

Field Type Label Description
inConstUnitId int32

CanTrainWithEscrowResult

Field Type Label Description
result bool

CcPlayersBuildingCount

Currently unimplemented in AoC version.

Field Type Label Description
inPlayerAnyPlayer int32

CcPlayersBuildingCountResult

Currently unimplemented in AoC version.

Field Type Label Description
result int32

CcPlayersBuildingTypeCount

Currently unimplemented in AoC version.

Field Type Label Description
inPlayerAnyPlayer int32
inConstBuildingId int32

CcPlayersBuildingTypeCountResult

Currently unimplemented in AoC version.

Field Type Label Description
result int32

CcPlayersUnitCount

Currently unimplemented in AoC version.

Field Type Label Description
inPlayerAnyPlayer int32

CcPlayersUnitCountResult

Currently unimplemented in AoC version.

Field Type Label Description
result int32

CcPlayersUnitTypeCount

Currently unimplemented in AoC version.

Field Type Label Description
inPlayerAnyPlayer int32
inConstUnitId int32

CcPlayersUnitTypeCountResult

Currently unimplemented in AoC version.

Field Type Label Description
result int32

CheatsEnabled

CheatsEnabledResult

Field Type Label Description
result bool

CivSelected

CivSelectedResult

Field Type Label Description
result int32

CivilianPopulation

CivilianPopulationResult

Field Type Label Description
result int32

CommodityBuyingPrice

Field Type Label Description
inConstCommodity int32

CommodityBuyingPriceResult

Field Type Label Description
result int32

CommoditySellingPrice

Field Type Label Description
inConstCommodity int32

CommoditySellingPriceResult

Field Type Label Description
result int32

CurrentAge

CurrentAgeResult

Field Type Label Description
result int32

CurrentAgeTime

CurrentAgeTimeResult

Field Type Label Description
result int32

CurrentScore

CurrentScoreResult

Field Type Label Description
result int32

DeathMatchGame

DeathMatchGameResult

Field Type Label Description
result bool

DefendSoldierCount

DefendSoldierCountResult

Field Type Label Description
result int32

DefendWarboatCount

DefendWarboatCountResult

Field Type Label Description
result int32

Difficulty

DifficultyResult

Field Type Label Description
result int32

Doctrine

Field Type Label Description
inConstValue int32

DoctrineResult

Field Type Label Description
result bool

DropsiteMinDistance

Field Type Label Description
inConstResource int32

DropsiteMinDistanceResult

Field Type Label Description
result int32

EndingAge

Only available in DE.

EndingAgeResult

Only available in DE.

Field Type Label Description
result int32

EnemyBuildingsInTown

EnemyBuildingsInTownResult

Field Type Label Description
result bool

EnemyCapturedRelics

EnemyCapturedRelicsResult

Field Type Label Description
result bool

EscrowAmount

Field Type Label Description
inConstResource int32

EscrowAmountResult

Field Type Label Description
result int32

EventDetected

Field Type Label Description
inConstEventType int32
inConstEventId int32

EventDetectedResult

Field Type Label Description
result bool

False

FalseResult

Field Type Label Description
result bool

FeCanBuildAtPoint

Only available in DE.

Field Type Label Description
param1 int32
param2 int32
param3 int32
param4 int32

FeCanBuildAtPointResult

Only available in DE.

Field Type Label Description
result bool

FeSubGameType

Only available in DE.

FeSubGameTypeResult

Only available in DE.

Field Type Label Description
result int32

FoodAmount

FoodAmountResult

Field Type Label Description
result int32

GameTime

GameTimeResult

Field Type Label Description
result int32

GameType

GameTypeResult

Field Type Label Description
result int32

GateCount

Field Type Label Description
inConstPerimeter int32

GateCountResult

Field Type Label Description
result int32

Goal

Field Type Label Description
inConstGoalId int32

GoalList

Custom fact. Retrieve all goals as a list starting from index 0.

GoalListResult

Response for the GoalList fact.

Field Type Label Description
result sint32 repeated all goals as a list starting from index 0

GoalResult

Field Type Label Description
result sint32

GoldAmount

GoldAmountResult

Field Type Label Description
result int32

HoldKohRuin

HoldKohRuinResult

Field Type Label Description
result bool

HoldRelics

HoldRelicsResult

Field Type Label Description
result bool

HousingHeadroom

HousingHeadroomResult

Field Type Label Description
result int32

IdleFarmCount

IdleFarmCountResult

Field Type Label Description
result int32

MapSize

MapSizeResult

Field Type Label Description
result int32

MapType

MapTypeResult

Field Type Label Description
result int32

MilitaryPopulation

MilitaryPopulationResult

Field Type Label Description
result int32

ModMapDimensions

ModMapDimensionsResult

Field Type Label Description
width int32
height int32

ModMapTiles

ModMapTilesResult

Field Type Label Description
mapWidth int32
mapHeight int32
tiles Tile repeated

PlayerComputer

Field Type Label Description
inPlayerAnyPlayer int32

PlayerComputerResult

Field Type Label Description
result bool

PlayerHuman

Field Type Label Description
inPlayerAnyPlayer int32

PlayerHumanResult

Field Type Label Description
result bool

PlayerInGame

Field Type Label Description
inPlayerAnyPlayer int32

PlayerInGameResult

Field Type Label Description
result bool

PlayerNumber

Field Type Label Description
inPlayerAnyPlayer int32

PlayerNumberResult

Field Type Label Description
result bool

PlayerResigned

Field Type Label Description
inPlayerAnyPlayer int32

PlayerResignedResult

Field Type Label Description
result bool

PlayerValid

Field Type Label Description
inPlayerAnyPlayer int32

PlayerValidResult

Field Type Label Description
result bool

PlayersAchievements

Field Type Label Description
param1 int32
param2 int32
param3 int32
param4 int32

PlayersAchievementsResult

Field Type Label Description
result bool

PlayersBuildingCount

Field Type Label Description
inPlayerAnyPlayer int32

PlayersBuildingCountResult

Field Type Label Description
result int32

PlayersBuildingTypeCount

Field Type Label Description
inPlayerAnyPlayer int32
inConstBuildingId int32

PlayersBuildingTypeCountResult

Field Type Label Description
result int32

PlayersCiv

Field Type Label Description
inPlayerAnyPlayer int32

PlayersCivResult

Field Type Label Description
result int32

PlayersCivilianPopulation

Field Type Label Description
inPlayerAnyPlayer int32

PlayersCivilianPopulationResult

Field Type Label Description
result int32

PlayersCurrentAge

Field Type Label Description
inPlayerAnyPlayer int32

PlayersCurrentAgeResult

Field Type Label Description
result int32

PlayersCurrentAgeTime

Field Type Label Description
inPlayerAnyPlayer int32

PlayersCurrentAgeTimeResult

Field Type Label Description
result int32

PlayersMilitaryPopulation

Field Type Label Description
inPlayerAnyPlayer int32

PlayersMilitaryPopulationResult

Field Type Label Description
result int32

PlayersPopulation

Field Type Label Description
inPlayerAnyPlayer int32

PlayersPopulationResult

Field Type Label Description
result int32

PlayersScore

Field Type Label Description
inPlayerAnyPlayer int32

PlayersScoreResult

Field Type Label Description
result int32

PlayersStance

Field Type Label Description
inPlayerAnyPlayer int32
inConstESPlayerStance int32

PlayersStanceResult

Field Type Label Description
result bool

PlayersTribute

Field Type Label Description
inPlayerAnyPlayer int32
inConstResource int32

PlayersTributeMemory

Field Type Label Description
inPlayerAnyPlayer int32
inConstResource int32

PlayersTributeMemoryResult

Field Type Label Description
result int32

PlayersTributeResult

Field Type Label Description
result int32

PlayersUnitCount

Field Type Label Description
inPlayerAnyPlayer int32

PlayersUnitCountResult

Field Type Label Description
result int32

PlayersUnitTypeCount

Field Type Label Description
inPlayerAnyPlayer int32
inConstUnitId int32

PlayersUnitTypeCountResult

Field Type Label Description
result int32

Population

PopulationCap

PopulationCapResult

Field Type Label Description
result int32

PopulationHeadroom

PopulationHeadroomResult

Field Type Label Description
result int32

PopulationResult

Field Type Label Description
result int32

RandomNumber

RandomNumberResult

Field Type Label Description
result int32

RegicideGame

RegicideGameResult

Field Type Label Description
result bool

ResearchAvailable

Field Type Label Description
inConstTechId int32

ResearchAvailableResult

Field Type Label Description
result bool

ResearchCompleted

Field Type Label Description
inConstTechId int32

ResearchCompletedResult

Field Type Label Description
result bool

ResourceFound

Field Type Label Description
inConstResource int32

ResourceFoundResult

Field Type Label Description
result bool

SharedGoal

Field Type Label Description
inConstSharedGoalId int32
inConstValue int32

SharedGoalResult

Field Type Label Description
result bool

SheepAndForageTooFar

SheepAndForageTooFarResult

Field Type Label Description
result bool

SoldierCount

SoldierCountResult

Field Type Label Description
result int32

StanceToward

Field Type Label Description
inPlayerAnyPlayer int32
inConstESPlayerStance int32

StanceTowardResult

Field Type Label Description
result bool

StartingAge

StartingAgeResult

Field Type Label Description
result int32

StartingResources

StartingResourcesResult

Field Type Label Description
result int32

StoneAmount

StoneAmountResult

Field Type Label Description
result int32

StrategicNumber

Field Type Label Description
inConstSnId int32

StrategicNumberList

Custom fact. Retrieve all strategic numbers as a list.

StrategicNumberListResult

Response for the StrategicNumberList custom fact.

Field Type Label Description
result int32 repeated list of all strategic numbers

StrategicNumberResult

Field Type Label Description
result int32

TauntDetected

Field Type Label Description
inPlayerAnyPlayer int32
inConstTauntId int32

TauntDetectedResult

Field Type Label Description
result bool

Tile

Field Type Label Description
x int32
y int32
height int32
terrain int32
visibility int32

TimerTriggered

Field Type Label Description
inConstTimerId int32

TimerTriggeredResult

Field Type Label Description
result bool

TownUnderAttack

TownUnderAttackResult

Field Type Label Description
result bool

TraceFact

Field Type Label Description
param int32

TraceFactResult

Field Type Label Description
result bool

True

TrueResult

Field Type Label Description
result bool

UnitAvailable

Field Type Label Description
inConstUnitId int32

UnitAvailableResult

Field Type Label Description
result bool

UnitCount

UnitCountResult

Field Type Label Description
result int32

UnitCountTotal

UnitCountTotalResult

Field Type Label Description
result int32

UnitTypeCount

Field Type Label Description
inConstUnitId int32

UnitTypeCountResult

Field Type Label Description
result int32

UnitTypeCountTotal

Field Type Label Description
inConstUnitId int32

UnitTypeCountTotalResult

Field Type Label Description
result int32

UpAlliedGoal

Field Type Label Description
inPlayerComputerAllyPlayer int32
inGoalId int32

UpAlliedGoalResult

Field Type Label Description
result int32

UpAlliedResourceAmount

Field Type Label Description
inPlayerAllyPlayer int32
inConstResourceAmount int32

UpAlliedResourceAmountResult

Field Type Label Description
result int32

UpAlliedResourcePercent

Field Type Label Description
inPlayerAllyPlayer int32
inConstResourceAmount int32

UpAlliedResourcePercentResult

Field Type Label Description
result int32

UpAlliedSn

Field Type Label Description
inPlayerComputerAllyPlayer int32
inSnId int32

UpAlliedSnResult

Field Type Label Description
result int32

UpAttackerClass

UpAttackerClassResult

Field Type Label Description
result int32

UpBuildingTypeInTown

Type operator parameter is currently ignored in AoC version.

Field Type Label Description
inConstBuildingId int32
inGoalBuildingId int32
inSnBuildingId int32

UpBuildingTypeInTownResult

Field Type Label Description
result int32

UpCanBuild

Field Type Label Description
inGoalEscrowState int32
inConstBuildingId int32
inGoalBuildingId int32
inSnBuildingId int32

UpCanBuildLine

Field Type Label Description
inGoalEscrowState int32
inGoalPoint int32
inConstBuildingId int32
inGoalBuildingId int32
inSnBuildingId int32

UpCanBuildLineResult

Field Type Label Description
result bool

UpCanBuildResult

Field Type Label Description
result bool

UpCanResearch

Field Type Label Description
inGoalEscrowState int32
inConstTechId int32
inGoalTechId int32
inSnTechId int32

UpCanResearchResult

Field Type Label Description
result bool

UpCanSearch

Field Type Label Description
inConstSearchSource int32

UpCanSearchResult

Field Type Label Description
result bool

UpCanTrain

Field Type Label Description
inGoalEscrowState int32
inConstUnitId int32
inGoalUnitId int32
inSnUnitId int32

UpCanTrainResult

Field Type Label Description
result bool

UpDefenderCount

UpDefenderCountResult

Field Type Label Description
result int32

UpEnemyBuildingsInTown

UpEnemyBuildingsInTownResult

Field Type Label Description
result int32

UpEnemyUnitsInTown

UpEnemyUnitsInTownResult

Field Type Label Description
result int32

UpEnemyVillagersInTown

UpEnemyVillagersInTownResult

Field Type Label Description
result int32

UpGaiaTypeCount

Field Type Label Description
inConstResource int32

UpGaiaTypeCountResult

Field Type Label Description
result int32

UpGaiaTypeCountTotal

Field Type Label Description
inConstResource int32

UpGaiaTypeCountTotalResult

Field Type Label Description
result int32

UpGroupSize

Field Type Label Description
inConstGroupId int32
inGoalGroupId int32
inSnGroupId int32

UpGroupSizeResult

Field Type Label Description
result int32

UpIdleUnitCount

Field Type Label Description
inConstIdleType int32

UpIdleUnitCountResult

Field Type Label Description
result int32

UpObjectData

Field Type Label Description
inConstObjectData int32

UpObjectDataList

Custom fact. Retrieve current target object's all data values as a list.

UpObjectDataListResult

Response for the UpObjectDataList custom fact.

Field Type Label Description
result int32 repeated list of all current target object's data values

UpObjectDataResult

Field Type Label Description
result int32

UpObjectTargetData

Field Type Label Description
inConstObjectData int32

UpObjectTargetDataResult

Field Type Label Description
result int32

UpObjectTypeCount

Field Type Label Description
inConstObjectId int32
inGoalObjectId int32
inSnObjectId int32

UpObjectTypeCountResult

Field Type Label Description
result int32

UpObjectTypeCountTotal

Field Type Label Description
inConstObjectId int32
inGoalObjectId int32
inSnObjectId int32

UpObjectTypeCountTotalResult

Field Type Label Description
result int32

UpPathDistance

Field Type Label Description
inGoalPoint int32
inConstStrict int32

UpPathDistanceResult

Field Type Label Description
result int32

UpPendingObjects

Field Type Label Description
inConstObjectId int32
inGoalObjectId int32
inSnObjectId int32

UpPendingObjectsResult

Field Type Label Description
result int32

UpPendingPlacement

Field Type Label Description
inConstBuildingId int32
inGoalBuildingId int32
inSnBuildingId int32

UpPendingPlacementResult

Field Type Label Description
result bool

UpPlayerDistance

Field Type Label Description
inPlayerAnyPlayer int32

UpPlayerDistanceResult

Field Type Label Description
result int32

UpPlayersInGame

Field Type Label Description
inConstPlayerStance int32

UpPlayersInGameResult

Field Type Label Description
result int32

UpPointContains

Field Type Label Description
inGoalPoint int32
inConstObjectId int32
inGoalObjectId int32
inSnObjectId int32

UpPointContainsResult

Field Type Label Description
result bool

UpPointDistance

Field Type Label Description
inGoalPoint1 int32
inGoalPoint2 int32

UpPointDistanceResult

Field Type Label Description
result int32

UpPointElevation

Field Type Label Description
inGoalPoint int32

UpPointElevationResult

Field Type Label Description
result int32

UpPointExplored

Field Type Label Description
inGoalPoint int32

UpPointExploredResult

Field Type Label Description
result int32

UpPointTerrain

Field Type Label Description
inGoalPoint int32

UpPointTerrainResult

Field Type Label Description
result int32

UpPointZone

Field Type Label Description
inGoalPoint int32

UpPointZoneResult

Field Type Label Description
result int32

UpProjectileDetected

Field Type Label Description
inConstProjectileType int32

UpProjectileDetectedResult

Field Type Label Description
result int32

UpProjectileTarget

Field Type Label Description
inConstProjectileType int32

UpProjectileTargetResult

Field Type Label Description
result int32

UpRemainingBoarAmount

UpRemainingBoarAmountResult

Field Type Label Description
result int32

UpResearchStatus

Field Type Label Description
inConstTechId int32
inGoalTechId int32
inSnTechId int32

UpResearchStatusResult

Field Type Label Description
result int32

UpResourceAmount

Field Type Label Description
inConstResourceAmount int32

UpResourceAmountResult

Field Type Label Description
result int32

UpResourcePercent

Field Type Label Description
inConstResourceAmount int32

UpResourcePercentResult

Field Type Label Description
result int32

UpSearchObjectIdList

Custom fact. Retrieve a list of object IDs in the specified search source. Note that if there is no target object set before calling this function, it may set one itself.

Field Type Label Description
inConstSearchSource int32

UpSearchObjectIdListResult

Response for the UpSearchObjectIdList custom fact.

Field Type Label Description
result int32 repeated list of objects' IDs that are in a specified search source

UpTimerStatus

Field Type Label Description
inConstTimerId int32

UpTimerStatusResult

Field Type Label Description
result int32

UpTrainSiteReady

Field Type Label Description
inConstUnitId int32
inGoalUnitId int32
inSnUnitId int32

UpTrainSiteReadyResult

Field Type Label Description
result bool

UpUnitTypeInTown

Field Type Label Description
inConstUnitId int32
inGoalUnitId int32
inSnUnitId int32

UpUnitTypeInTownResult

Field Type Label Description
result int32

UpVillagerTypeInTown

Field Type Label Description
inConstUnitId int32
inGoalUnitId int32
inSnUnitId int32

UpVillagerTypeInTownResult

Field Type Label Description
result int32

VictoryCondition

Field Type Label Description
inConstVictory int32

VictoryConditionResult

Field Type Label Description
result bool

WallCompletedPercentage

Currently unimplemented in AoC version.

Field Type Label Description
inConstPerimeter int32

WallCompletedPercentageResult

Currently unimplemented in AoC version.

Field Type Label Description
result int32

WallInvisiblePercentage

Currently unimplemented in AoC version.

Field Type Label Description
inConstPerimeter int32

WallInvisiblePercentageResult

Currently unimplemented in AoC version.

Field Type Label Description
result int32

WarboatCount

WarboatCountResult

Field Type Label Description
result int32

WoodAmount

WoodAmountResult

Field Type Label Description
result int32

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)
Clone this wiki locally