Agent Reference

Predicates

PredicateValue
True()always true
Equal( X, Y )true if and only if X is identical to Y
GreaterThanOrEqual( Number X, Number Y )true if and only if X is greater than or equal to Y
GreaterThan( Number X, Number Y )true if and only if X is greater than Y
LessThanOrEqual( Number X, Number Y )true if and only if X is less than or equal to Y
LessThan( Number X, Number Y )true if and only if X is less than Y
HasExports( Fleet X, Fleet Y )true if and only if there is some set of cargo that X is carrying and willing to export and Y is willing to import
HasExports( Fleet X, Fleet Y, FreightTypes Z )true if and only if there is some set of cargo matching type list Z that X is carrying and willing to export and Y is willing to import
HasTribute( Fleet X, Fleet Y )true if and only if there is some set of cargo that X is carrying and willing to export and Y is willing to import to satisfy a demand of Y’s faction
IsBehaviourTarget( Fleet X, String Y )true if and only if X is a target of a behaviour/service with name Y from another agent
IsFleetMemberOf( Fleet X, FleetList Y )true if and only if X is contained in list Y
IsHostile( Faction X, Faction Y )true if and only if X is hostile with Y
IsMobile( Fleet X )true if and only if X is a ship, even if it its warp engines are absent or disabled.
IsSystemMemberOf( System X, SystemList Y )true if and only if X is contained in list Y

Functions

FunctionTypeValue
?( Predicate p, Number X, Number Y )NumberTernary operator, X if p is true, otherwise Y.
Add( Number X, Number Y )NumberX + Y
Subtract( Number X, Number Y )NumberX – Y
Multiply( Number X, Number Y )NumberX * Y
Divide( Number X, Number Y )NumberX / Y
Max( Number X, Number Y )NumberMaximum of X and Y
Min( Number X, Number Y )NumberMinimum of X and Y
BehaviourTargetCount( Fleet X, String Y )NumberTotal number of behaviours/services of name Y that are targetting fleet X, excluding those of this agent.
FreightLoad( Fleet X )NumberTotal cargo carried in SCU by X
FreightSpace( Fleet X )NumberTotal free cargo capacity in SCU of X
FreightTypeLoad( Fleet X, FreightType Y )NumberTotal cargo of type Y carried in SCU by X
FreightTypeSpace( Fleet X, FreightType Y )NumberTotal free cargo capacity for type Y in SCU of X
FleetThreat( Fleet X )NumberA measure of the combat capabilities of a given fleet.
MiningOutputSpace( Fleet X, System Y, AsteroidBeltType Z )NumberTotal free cargo capacity in fleet X for resources acquired from asteroid belt type Z in system Y
ReplenishmentsDays( Fleet X )NumberNumber of days of replenishments stored in internal compartments in fleet X
SparesDays( Fleet X )NumberNumber of days of spare parts stored in internal compartments in fleet X
FleetLocation( Fleet X )SystemFleet X’s location
FactionAttitude( Faction X, Faction Y )AttitudeX’s attitude to Y (allied, neutral, hostile, unregulated)
Designation( Fleet X )Designationdesignation of X
FleetFaction( Fleet X )Factionfaction of X
GetFleet( FleetList X, Number Y )FleetFleet at index Y in list X (the first element is index zero)
GetSystem( SystemList X, Number Y )SystemSystem at index Y in list X (the first element is index zero)
ReverseFleetList( FleetList X )FleetListA FleetList containing the elements of X in reverse order
ReverseSystemList( SystemList X )SystemListA SystemList containing the elements of X in reverse order
RotateFleetList( FleetList X, Number Y )FleetListA FleetList that is a rotation of X by Y steps. A positive number shifts elements fowards, e.g. +1 will shift the tail of X to be the new head
RotateSystemList( SystemList X, Number Y )SystemListA SystemList that is a rotation of X by Y steps. A positive number shifts elements fowards, e.g. +1 will shift the tail of X to be the new head
ShuffleFleetList( FleetList X )FleetListA random permutation of X
ShuffleSystemList( SystemList X )SystemListA random permutation of X
SystemPrimaryStar( System X )OrbitableThe primary star of system X
TributeTimeElapsedPct( Faction X ) NumberPercentage of time elapsed of a demand from faction X.

Tasks

TaskDescription
Idle()Do nothing
AsteroidOrbit( System X, AsteroidBelt Y )Enter and orbit in belt Y in system X
CelestialOrbit( Orbitable X )Enter the canonical orbit around object X
FilamentOrbit( System X )Enter and orbit the filament field in system X
Give( Fleet X, FreightType Y, Volume Z )Transfer Z SCU of cargo type Y to X
Take( Fleet X, FreightType Y, Volume Z )Take Z SCU of cargo type Y from X
Rendezvous( Fleet X, Manifest Y, Manifest Z )Give items Z and take items Y from X
Import( Fleet X )Take the set of items that this fleet is willing to import and X is willing to export
Import( Fleet X, FreightTypes Y )Take the set of items of types in Y that this fleet is willing to import and X is willing to export
Export( Fleet X )Give the set of items that this fleet is willing to export and X is willing to import
Export( Fleet X, FreightTypes Y )Give the set of items of types in Y that this fleet is willing to export and X is willing to import
DeliverTribute( Fleet X )Give the set of items that this fleet is willing to export and X is willing to import to satisfy a demand of X’s faction
Intercept( Fleet X )Intercept X and engage in combat.
Jump( System X )Jump towards system X.
TransferPassengers( Fleet X )Drop off any passengers that desire to stay at fleet X, and collect any essential supplies that this fleet is willing to import and X is willing to export
Rearm( Fleet X )Import or export munitions as appropriate with fleet X