Agent Reference
Predicates
Predicate | Value |
---|---|
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
Function | Type | Value |
---|---|---|
?( Predicate p, Number X, Number Y ) | Number | Ternary operator, X if p is true, otherwise Y. |
Add( Number X, Number Y ) | Number | X + Y |
Subtract( Number X, Number Y ) | Number | X – Y |
Multiply( Number X, Number Y ) | Number | X * Y |
Divide( Number X, Number Y ) | Number | X / Y |
Max( Number X, Number Y ) | Number | Maximum of X and Y |
Min( Number X, Number Y ) | Number | Minimum of X and Y |
BehaviourTargetCount( Fleet X, String Y ) | Number | Total number of behaviours/services of name Y that are targetting fleet X, excluding those of this agent. |
FreightLoad( Fleet X ) | Number | Total cargo carried in SCU by X |
FreightSpace( Fleet X ) | Number | Total free cargo capacity in SCU of X |
FreightTypeLoad( Fleet X, FreightType Y ) | Number | Total cargo of type Y carried in SCU by X |
FreightTypeSpace( Fleet X, FreightType Y ) | Number | Total free cargo capacity for type Y in SCU of X |
FleetThreat( Fleet X ) | Number | A measure of the combat capabilities of a given fleet. |
MiningOutputSpace( Fleet X, System Y, AsteroidBeltType Z ) | Number | Total free cargo capacity in fleet X for resources acquired from asteroid belt type Z in system Y |
ReplenishmentsDays( Fleet X ) | Number | Number of days of replenishments stored in internal compartments in fleet X |
SparesDays( Fleet X ) | Number | Number of days of spare parts stored in internal compartments in fleet X |
FleetLocation( Fleet X ) | System | Fleet X’s location |
FactionAttitude( Faction X, Faction Y ) | Attitude | X’s attitude to Y (allied, neutral, hostile, unregulated) |
Designation( Fleet X ) | Designation | designation of X |
FleetFaction( Fleet X ) | Faction | faction of X |
GetFleet( FleetList X, Number Y ) | Fleet | Fleet at index Y in list X (the first element is index zero) |
GetSystem( SystemList X, Number Y ) | System | System at index Y in list X (the first element is index zero) |
ReverseFleetList( FleetList X ) | FleetList | A FleetList containing the elements of X in reverse order |
ReverseSystemList( SystemList X ) | SystemList | A SystemList containing the elements of X in reverse order |
RotateFleetList( FleetList X, Number Y ) | FleetList | A 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 ) | SystemList | A 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 ) | FleetList | A random permutation of X |
ShuffleSystemList( SystemList X ) | SystemList | A random permutation of X |
SystemPrimaryStar( System X ) | Orbitable | The primary star of system X |
TributeTimeElapsedPct( Faction X ) | Number | Percentage of time elapsed of a demand from faction X. |
Tasks
Task | Description |
---|---|
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 |