Script reference

Globals

PropertyDescription
EngineInterface@ soil Globally accessible interface to game.
const uint STEPS_PER_SECOND Number of logic steps per second.
FunctionDescriptionParameters
void logScript(string) Writes one line of text to script.log
string int2str(int) Converts integer to string. - int. Number to converts to string
string flt2str(float,int) Converts floating point number to string. - float. Number to convert
- int. Number of digits after point.
uint randomUInt(uint) Generates random unsigned integer up to specified parameter. If you pass "4" as an argument, you can get 0,1,2 or 3. Use this version of function for things that affects game. WARNING: Do not use in GUI! Use random numbers only if you know what you're doing!
uint randomUIntASYNC(uint) Same as above. Use this version of function for things that do not affect game. WARNING: For GUI only! Use random numbers only if you know what you're doing!
string getShipTypeString(ShipType)
string getSubsystemTypeString(SubsystemType)
string getTurretTypeString(TurretType)
string getTurretRoleString(TurretRole)
string getOrderTypeString(OrderType)