Start the adjustor at full power (works only when run inside a cockpit or under remote control)
Stops the adjustor (works only when run inside a cockpit or under remote control)
Checks if the adjustor is active
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the state of the adjustor
Set the exhaust thrust of the adjustor
| Name | Type | Description |
|---|---|---|
| thrust | number | The adjustor thrust in newtons (limited by the maximum thrust) |
Returns the current exhaust thrust of the adjustor
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal exhaust thrust the adjustor can deliver
| Name | Type | Description |
|---|---|---|
| number |
Returns the adjustor exhaust thrust direction in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the adjustor torque axis in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the adjustor exhaust thrust direction in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the adjustor torque axis in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the current lift of the airfoil
| Name | Type | Description |
|---|---|---|
| number |
Gives the maximum lift that the airfoil can generate, under optimal conditions.
| Name | Type | Description |
|---|---|---|
| number |
Returns the current drag of the airfoil
| Name | Type | Description |
|---|---|---|
| number |
The ratio between lift and drag, depending of the aerodynamic profile of the airfoil
| Name | Type | Description |
|---|---|---|
| number |
Returns the minimal lift the airfoil can deliver at the moment (can be higher than zero),
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal lift the aifoil can deliver at the moment, which might depend on
| Name | Type | Description |
|---|---|---|
| number |
Returns the ratio between the current maximum lift and the optimal maximum lift
| Name | Type | Description |
|---|---|---|
| number |
Returns the airfoil lift direction in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the airfoil torque axis in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the airfoil lift direction in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the adjustor torque axis in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Checks if the airfoil is stalled
| Name | Type | Description |
|---|---|---|
| integer |
Returns the airfoil stall angle
| Name | Type | Description |
|---|---|---|
| number |
Returns the minimum angle to produce the maximum lift of the airfoil
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximum angle to produce the maximum lift of the airfoil
| Name | Type | Description |
|---|---|---|
| number |
Activate the anti-gravity generator
Deactivate the anti-gravity generator
Returns the state of activation of the anti-gravity generator
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the anti-gravity generator
Returns the strength of the anti-gravitational field
| Name | Type | Description |
|---|---|---|
| number |
Returns the current rate of compensation of the gravitational field
| Name | Type | Description |
|---|---|---|
| number |
Returns the current power of the gravitational field
| Name | Type | Description |
|---|---|---|
| number |
Returns the number of pulsors linked to the anti-gravity generator
| Name | Type | Description |
|---|---|---|
| integer |
Set the target altitude for the anti-gravity field. Cannot be called from onFlush
| Name | Type | Description |
|---|---|---|
| altitude | number | The target altitude in meters. It will be reached with a slow acceleration (not instantaneous) |
Returns the target altitude defined for the anti-gravitational field
| Name | Type | Description |
|---|---|---|
| number |
Returns the current base altitude of the anti-gravitational field
| Name | Type | Description |
|---|---|---|
| number |
Emitted when we started or stopped the shield generator
| Name | Type | Description |
|---|---|---|
| active | integer | 1 if the element was activated, 0 otherwise |
Emitted when the shield absorbed incoming damage
| Name | Type | Description |
|---|---|---|
| hitpoints | number | Damage the shield absorbed |
| rawHitpoints | number | Total damage without taking resistances into account |
Emitted when the shield hit points reached 0 due to damage
Emitted when the shield hit points were fully restored
Emitted when the shield enters lockdown
Emitted when the shield exits the lockdown
Activate the shield
Deactivate the shield
Toggle the state of the shield
Returns the activation state of the shield
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current hit points of the shield
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal hit points of the shield
| Name | Type | Description |
|---|---|---|
| number |
Returns distribution of resistance pool over resistance types
| Name | Type | Description |
|---|---|---|
| resistances | table | Resistance to damage type {antimatter, electromagnetic, kinetic, thermic} |
Distribute the resistance pool according to damage type
| Name | Type | Description |
|---|---|---|
| antimatter | number | Antimatter damage resistance |
| electromagnetic | number | Electromagnetic damage resistance |
| kinetic | number | Kinetic damage resistance |
| thermic | number | Thermic damage resistance |
| Name | Type | Description |
|---|---|---|
| integer |
Returns time after which adjusting resistances is possible again
| Name | Type | Description |
|---|---|---|
| number |
Returns maximal cooldown between adjusting resistances
| Name | Type | Description |
|---|---|---|
| number |
Returns total resistance pool that may be distributed
| Name | Type | Description |
|---|---|---|
| number |
Returns the remaining amount of the resistance pool that can be distributed
| Name | Type | Description |
|---|---|---|
| number |
Returns ratio per damage type of recent weapon impacts after applying resistance
| Name | Type | Description |
|---|---|---|
| stress | table | Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic} |
Returns ratio per damage type of recent weapon impacts without resistance
| Name | Type | Description |
|---|---|---|
| stress | table | Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic} |
Returns stress, that is the total hit points of recent weapon impacts after applying resistance
| Name | Type | Description |
|---|---|---|
| number |
Returns stress, that is the total hit points of recent weapon impacts without resistance
| Name | Type | Description |
|---|---|---|
| number |
Returns whether the base shield is currently in lockdown
| Name | Type | Description |
|---|---|---|
| integer |
Returns the remaining time of the base shield lockdown
| Name | Type | Description |
|---|---|---|
| number |
Returns the hour since midnight of the preferred lockdown exit
| Name | Type | Description |
|---|---|---|
| integer |
Set hour since midnight for the preferred lockdown exit
| Name | Type | Description |
|---|---|---|
| hour | integer | Preferred lockdown exit hour UTC |
| Name | Type | Description |
|---|---|---|
| integer |
Start the brake at full power (works only when run inside a cockpit or under remote control)
Stops the brake (works only when run inside a cockpit or under remote control)
Checks if the brake is active
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the state of the brake
Set the thrust of the brake. Note that brakes can generate a force only in the movement opposite direction
| Name | Type | Description |
|---|---|---|
| thrust | number | The brake thrust in newtons (limited by the maximum thrust) |
Returns the current thrust of the brake
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal thrust the brake can deliver in principle, under optimal conditions.
| Name | Type | Description |
|---|---|---|
| number |
Returns the minimal thrust the brake can deliver at the moment (can be more than zero),
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal thrust the brake can deliver at the moment, which might depend on
| Name | Type | Description |
|---|---|---|
| number |
Returns the ratio between the current maximum thrust and the optimal maximum thrust
| Name | Type | Description |
|---|---|---|
| number |
Returns the brake thrust direction in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the brake thrust direction in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Emitted when the construct becomes docked
| Name | Type | Description |
|---|---|---|
| id | integer | The parent id |
Emitted when the construct is undocked
| Name | Type | Description |
|---|---|---|
| id | integer | The previous parent id |
Emitted when a player or surrogate boards the construct
| Name | Type | Description |
|---|---|---|
| id | integer | The id of the boarding player |
Emitted when a player enters a VR Station
| Name | Type | Description |
|---|---|---|
| id | integer | The id of the boarding player |
Emitted when another construct docks this construct
| Name | Type | Description |
|---|---|---|
| id | integer | The id of the docking construct |
Emitted when the PvP timer started or elapsed
| Name | Type | Description |
|---|---|---|
| active | boolean | 1 if the timer started, false when the timer elapsed |
Returns the name of the construct
| Name | Type | Description |
|---|---|---|
| string |
Returns the construct unique ID
| Name | Type | Description |
|---|---|---|
| integer |
Returns the owner entity
| Name | Type | Description |
|---|---|---|
| entity | table | The owner entity table with fields {[int] id, [bool] isOrganization} describing the owner. Use system.getPlayerName(id) and system.getOrganization(id) to retrieve info about it |
Returns the creator entity
| Name | Type | Description |
|---|---|---|
| entity | integer | The owner entity table with fields {[int] id, [bool] isOrganization} describing the owner. Use system.getPlayerName(id) and system.getOrganization(id) to retrieve info about it |
Checks if the construct is currently warping
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current warp state
| Name | Type | Description |
|---|---|---|
| state | integer | The current warp state index (Idle = 1, Engage = 2, Align = 3, Spool = 4, Accelerate = 5, Cruise = 6, Decelerate = 7, Stopping = 8, Disengage = 9) |
Checks if the construct is in PvP zone
| Name | Type | Description |
|---|---|---|
| integer |
Returns the distance between the construct and the nearest safe zone
| Name | Type | Description |
|---|---|---|
| distance | number | The distance to the nearest safe zone border in meters. Positive value if the construct is outside of any safe zone |
Returns the current construct PvP timer state
| Name | Type | Description |
|---|---|---|
| time | number | The remaining time of the PvP timer, or 0.0 if elapsed |
Returns the mass of the construct
| Name | Type | Description |
|---|---|---|
| number |
Returns the inertial mass of the construct, calculated as 1/3 of the trace of the inertial tensor
| Name | Type | Description |
|---|---|---|
| number |
Returns the inertial tensor of the construct
| Name | Type | Description |
|---|---|---|
| table |
Returns the position of the center of mass of the construct, in local construct coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the position of the center of mass of the construct, in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the construct's cross sectional surface in the current direction of movement
| Name | Type | Description |
|---|---|---|
| value | number | The construct's surface exposed in the current direction of movement in meters square |
Returns the size of the building zone of the construct
| Name | Type | Description |
|---|---|---|
| table |
Returns the size of the bounding box of the construct
| Name | Type | Description |
|---|---|---|
| table |
Returns the position of the center of bounding box of the construct in local construct coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the max speed along current moving direction
| Name | Type | Description |
|---|---|---|
| value | number | The max speed along current moving direction in m/s |
Returns the max angular speed
| Name | Type | Description |
|---|---|---|
| value | number | The max angular speed in rad/s |
Returns the max speed per axis
| Name | Type | Description |
|---|---|---|
| value | table | The max speed along axes {x, -x, y, -y, z, -z} in m/s |
Returns the construct max kinematics parameters in both atmo and space range, in newtons. Kinematics
| Name | Type | Description |
|---|---|---|
| taglist | string | Comma (for union) or space (for intersection) separated list of tags. You can set tags directly on the engines in the right-click menu |
| CRefAxis | table | Axis along which to compute the max force (in construct reference) |
| Name | Type | Description |
|---|---|---|
| value | table | The kinematics parameters in Newtons in the order: atmoRange.FMaxPlus, atmoRange.FMaxMinus, spaceRange.FMaxPlus, spaceRange.FMaxMinus |
Returns the current braking force generated by construct brakes
| Name | Type | Description |
|---|---|---|
| value | number | The current braking force in Newtons |
Returns the maximum braking force that can currently be generated by the construct brakes
| Name | Type | Description |
|---|---|---|
| value | number | The maximum braking force in Newtons |
Returns the world position of the construct
| Name | Type | Description |
|---|---|---|
| value | table | The xyz world coordinates of the construct center position in meters |
The construct's linear velocity, relative to its parent, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Relative linear velocity vector, in construct local coordinates in m/s |
The construct's linear velocity, relative to its parent, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Relative linear velocity vector, in world coordinates in m/s |
The construct's absolute linear velocity, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Absolute linear velocity vector, in construct local coordinates in m/s |
The construct's absolute linear velocity, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Absolute linear velocity vector, in world coordinates in m/s |
The construct's linear acceleration, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Linear acceleration vector, in construct local coordinates in m/s2 |
The construct's linear acceleration, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Linear acceleration vector, in world coordinates in m/s2 |
The construct's angular velocity, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Angular velocity vector, in construct local coordinates in rad/s |
The construct's angular velocity, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Angular velocity vector, in world coordinates in rad/s |
The construct's angular acceleration, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Angular acceleration vector, in construct local coordinates in rad/s2 |
The construct's angular acceleration, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Angular acceleration vector, in world coordinates in rad/s2 |
Returns the acceleration generated by air resistance
| Name | Type | Description |
|---|---|---|
| value | table | The xyz world acceleration generated by air resistance |
Returns the acceleration torque generated by air resistance
| Name | Type | Description |
|---|---|---|
| value | table | The xyz world acceleration torque generated by air resistance |
Returns the speed at which your construct will suffer damage due to friction with the air
| Name | Type | Description |
|---|---|---|
| value | number | The construct speed to get damages due to friction in m/s |
Returns the forward vector of the construct coordinates system
| Name | Type | Description |
|---|---|---|
| value | table | The forward vector of the construct coordinates system. It's a static value equal to (0,1,0) |
Returns the right vector of the construct coordinates system
| Name | Type | Description |
|---|---|---|
| value | table | The right vector of the construct coordinates system. It's a static value equal to (1,0,0) |
Returns the up direction vector of the construct coordinates system
| Name | Type | Description |
|---|---|---|
| value | table | The up vector of the construct coordinates system.. It's a static value equal to (0,0,1) |
Returns the forward direction vector of the construct, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The forward direction vector of the construct, in world coordinates |
Returns the right direction vector of the construct, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The right direction vector of the construct, in world coordinates |
Returns the up direction vector of the construct, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The up direction vector of the construct, in world coordinates |
Returns the local id of the current active orientation unit (core unit or gyro unit)
| Name | Type | Description |
|---|---|---|
| value | integer | local id of the current active orientation unit (core unit or gyro unit) |
Returns the forward direction vector of the active orientation unit, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Forward direction vector of the active orientation unit, in construct local coordinates |
Returns the right direction vector of the active orientation unit, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Right direction vector of the active orientation unit, in construct local coordinates |
Returns the up direction vector of the active orientation unit, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Up direction vector of the active orientation unit, in construct local coordinates |
Returns the forward direction vector of the active orientation unit, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Forward direction vector of the active orientation unit, in world coordinates |
Returns the right direction vector of the active orientation unit, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Right direction vector of the active orientation unit, in world coordinates |
Returns the up direction vector of the active orientation unit, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | Up direction vector of the active orientation unit, in world coordinates |
Returns the id of the parent construct of our active construct
| Name | Type | Description |
|---|---|---|
| integer |
Returns the id of the nearest constructs, on which the construct can dock
| Name | Type | Description |
|---|---|---|
| integer |
Returns the list of ids of nearby constructs, on which the construct can dock
| Name | Type | Description |
|---|---|---|
| table |
Returns the position of the construct's parent when docked in local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The position of the construct's parent in local coordinates |
Returns the position of the construct's parent when docked in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The position of the construct's parent in world coordinates |
Returns the construct's parent forward direction vector, in local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The construct's parent forward direction vector, in local coordinates |
Returns the construct's parent right direction vector, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The construct's parent right direction vector, in construct local coordinates |
Returns the construct's parent up direction vector, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The construct's parent up direction vector, in construct local coordinates |
Returns the construct's parent forward direction vector, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The construct's parent forward direction vector, in world coordinates |
Returns the construct's parent right direction vector, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The construct's parent right direction vector, in world coordinates |
Returns the construct's parent up direction vector, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The construct's parent up direction vector, in world coordinates |
Returns the list of player IDs on board the construct
| Name | Type | Description |
|---|---|---|
| table |
Returns the list of player ids on board the construct inside a VR Station
| Name | Type | Description |
|---|---|---|
| table |
Checks if the given player is on board in the construct
| Name | Type | Description |
|---|---|---|
| id | integer | The player id |
| Name | Type | Description |
|---|---|---|
| integer |
Returns 1 if the given player is boarded to the construct inside a VR Station
| Name | Type | Description |
|---|---|---|
| id | integer | The player id |
| Name | Type | Description |
|---|---|---|
| integer |
Returns the mass of the given player or surrogate if it is on board the construct
| Name | Type | Description |
|---|---|---|
| id | integer | The player id |
| Name | Type | Description |
|---|---|---|
| number |
Returns the mass of the given player if in VR station on board the construct
| Name | Type | Description |
|---|---|---|
| id | integer | The player id |
| Name | Type | Description |
|---|---|---|
| number |
Returns the list of IDs of constructs docked to the construct
| Name | Type | Description |
|---|---|---|
| table |
Checks if the given construct is docked to the construct
| Name | Type | Description |
|---|---|---|
| id | integer | The construct id |
| Name | Type | Description |
|---|---|---|
| integer |
Returns the mass of the given construct if it is docked to the construct
| Name | Type | Description |
|---|---|---|
| id | integer | The construct id |
| Name | Type | Description |
|---|---|---|
| number |
Sets the docking mode
| Name | Type | Description |
|---|---|---|
| mode | integer | The docking mode (Manual = 1, Automatic = 2, Semi-automatic = 3) |
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current docking mode
| Name | Type | Description |
|---|---|---|
| mode | integer | The docking mode (Manual = 1, Automatic = 2, Semi-automatic = 3) |
Sends a request to dock to the given construct. Limited to piloting controllers
| Name | Type | Description |
|---|---|---|
| id | integer | The parent construct id |
| Name | Type | Description |
|---|---|---|
| integer |
Sends a request to undock the construct. Limited to piloting controllers
| Name | Type | Description |
|---|---|---|
| integer |
Sends a request to deboard a player or surrogate with the given id
| Name | Type | Description |
|---|---|---|
| id | integer | The player id |
| Name | Type | Description |
|---|---|---|
| integer |
Sends a request to undock a construct with the given id
| Name | Type | Description |
|---|---|---|
| id | integer | The construct id |
| Name | Type | Description |
|---|---|---|
| integer |
Sends a request to interrupt the surrogate session of a player with the given id
| Name | Type | Description |
|---|---|---|
| id | integer | The player id |
| Name | Type | Description |
|---|---|---|
| integer |
Emitted when the container content is updated(storage update or after a manual request made with updateContent())
Returns the mass of the container element(as if it were empty).
| Name | Type | Description |
|---|---|---|
| number |
Returns the container content mass(the sum of the mass of all items it contains).
| Name | Type | Description |
|---|---|---|
| number |
Returns the container content volume(the sum of the volume of all items it contains).
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximum volume of the container.
| Name | Type | Description |
|---|---|---|
| number |
Returns a table describing the contents of the container, as a pair itemId and quantity per slot.
| Name | Type | Description |
|---|---|---|
| content | table | The content of the container as a table with fields {[int] id, [float] quantity} per slot |
Send a request to get an update of the content of the container, limited to one call allowed per 30 seconds.
| Name | Type | Description |
|---|---|---|
| time | number | If the request is not yet possible, returns the remaining time to wait for. |
Emitted when the timer with the tag 'tag' is ticking
| Name | Type | Description |
|---|---|---|
| tag | string | The tag of the timer that just ticked (see setTimer to set a timer with a given tag) |
Stops the Control Unit's Lua code and exits. Warning: calling this might cause your ship to fall from the sky,
Set up a timer with a given tag in a given period. This will start to trigger the 'onTimer' event with
| Name | Type | Description | ||
|---|---|---|---|---|
| tag | string | The tag of the timer, as a | string | , which will be used in the 'onTimer' event to identify this particular timer |
| period | number | The period of the timer, in seconds. The time resolution is limited by the framerate here, so you cannot set arbitrarily fast timers |
Stop the timer with the given tag
| Name | Type | Description | ||
|---|---|---|---|---|
| tag | string | The tag of the timer to stop, as a | string |
Returns the ambient atmospheric density
| Name | Type | Description |
|---|---|---|
| density | number | The atmospheric density(between 0 and 1) |
Returns the influence rate of the nearest planet
| Name | Type | Description |
|---|---|---|
| rate | number | The planet influence rate(between 0 and 1) |
Checks if the control unit is protected by DRM
| Name | Type | Description |
|---|---|---|
| integer |
Check if the construct is remote controlled
| Name | Type | Description |
|---|---|---|
| integer |
Automatically assign the engines within the taglist
| Name | Type | Description |
|---|---|---|
| taglist | string | Comma (for union) or space (for intersection) separated list of tags. You can set tags directly on the engines in the right-click menu |
| acceleration | table | The desired acceleration expressed in world coordinates in m/s2 |
| angularAcceleration | table | The desired angular acceleration expressed in world coordinates in rad/s2 |
| keepForceCollinearity | boolean | Forces the resulting acceleration vector to be collinear to the acceleration parameter |
| keepTorqueCollinearity | boolean | Forces the resulting angular acceleration vector to be collinear to the angular acceleration parameter |
| priority1SubTags | string | Comma (for union) or space (for intersection) separated list of tags of included engines to use as priority 1 |
| priority2SubTags | string | Comma (for union) or space (for intersection) separated list of tags of included engines to use as priority 2 |
| priority3SubTags | string | Comma (for union) or space (for intersection) separated list of tags of included engines to use as priority 3 |
| toleranceRatioToStopCommand | number | When going through with priorities, if we reach a command that is achieved within this tolerance, we will stop there |
Sets the thrust values for all engines in the tag list
| Name | Type | Description |
|---|---|---|
| taglist | string | Comma separated list of tags. You can set tags directly on the engines in the right-click menu |
| thrust | number | The desired thrust in newtons (note that for boosters, any non zero value here will set them to 100%) |
Returns the total thrust values of all engines in the tag list
| Name | Type | Description |
|---|---|---|
| taglist | string | Comma separated list of tags. You can set tags directly on the engines in the right-click menu |
| Name | Type | Description |
|---|---|---|
| The | table | total thrust in newtons |
Set the value of throttle in the cockpit, which will be displayed in the cockpit widget when flying
| Name | Type | Description |
|---|---|---|
| axis | integer | Longitudinal = 0, lateral = 1, vertical = 2 |
| commandValue | number | In 'by throttle', the value of the throttle position: -1 = full reverse, 1 = full forward. Or In 'By Target Speed', the value of the target speed in km/h |
Get the value of throttle in the cockpit
| Name | Type | Description |
|---|---|---|
| axis | integer | Longitudinal = 0, lateral = 1, vertical = 2 |
| Name | Type | Description |
|---|---|---|
| value | number | In travel mode, return the value of the throttle position: -1 = full reverse, 1 = full forward or in cruise mode, return the value of the target speed |
Set the properties of an axis command
| Name | Type | Description |
|---|---|---|
| axis | integer | Longitudinal = 0, lateral = 1, vertical = 2 |
| commandType | integer | By throttle = 0, by target speed = 1, hidden = 2 |
| targetSpeedRanges | table | This is to specify the cruise control target speed ranges (for now, only for the longitudinal axis) in m/s |
Returns the current control mode. The mode is set by clicking the UI button or using the associated keybinding
| Name | Type | Description |
|---|---|---|
| The | integer | current control mode (for now, only 2 are available, 0 and 1) |
Cancel the current master mode in use
Check if a mouse control scheme is selected
| Name | Type | Description |
|---|---|---|
| integer |
Check if the mouse control direct scheme is selected
| Name | Type | Description |
|---|---|---|
| integer |
Check if the mouse control virtual joystick scheme is selected
| Name | Type | Description |
|---|---|---|
| integer |
The ground engines will stabilize to this altitude within their limits
| Name | Type | Description |
|---|---|---|
| targetAltitude | number | The stabilization target altitude in m |
Return the ground engines' stabilization altitude
| Name | Type | Description |
|---|---|---|
| Stab | number | altitude in m or 0 if none is set |
The ground engines will behave like regular engine
Returns ground engine stabilization altitude capabilities (lower and upper ranges)
| Name | Type | Description |
|---|---|---|
| range | table | Stabilization altitude capabilities for the least powerful engine and the most powerful engine |
Return the current throttle value
| Name | Type | Description |
|---|---|---|
| value | number | Throttle value between -100 and 100 |
Set the label of a control mode buttons shown in the control unit widget
| Name | Type | Description |
|---|---|---|
| modeId | integer | The control mode: 0=Travel Mode, 1=Cruise Control by default |
| label | string | The display name of the control mode, displayed on the widget button |
Checks if any landing gear is deployed
| Name | Type | Description |
|---|---|---|
| or | 0 | 1 1 if any landing gear is deployed |
Deploy a end
Retract all landing gears
Check construct lights status
| Name | Type | Description |
|---|---|---|
| integer |
Turn on the construct headlights
Turn off the construct headlights
Emitted when core unit stress changed
| Name | Type | Description |
|---|---|---|
| stress | number | Difference to previous stress value |
Returns the list of all the local IDs of the Elements of this construct
| Name | Type | Description |
|---|---|---|
| table |
Returns the name of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| string |
Returns the class of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| string |
Returns the display name of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| string |
Returns the item ID of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current level of hit points of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximum level of hit points of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| number |
Returns the mass of the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| number |
Returns the position of the Element, identified by its local ID, in construct local coordinates.
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| table |
Returns the up direction vector of the Element, identified by its local ID, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| table |
Returns the right direction vector of the Element, identified by its local ID, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| table |
Returns the forward direction vector of the Element, identified by its local ID, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| table |
Returns the list of tags associated to the Element, identified by its local ID
| Name | Type | Description |
|---|---|---|
| localId | integer | The local ID of the Element |
| Name | Type | Description |
|---|---|---|
| string |
Returns the altitude above sea level, with respect to the closest planet (0 in space)
| Name | Type | Description |
|---|---|---|
| number |
Returns the local gravity intensity
| Name | Type | Description |
|---|---|---|
| number |
Returns the local gravity vector in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the vertical unit vector along gravity, in world coordinates (0 in space)
| Name | Type | Description |
|---|---|---|
| table |
Returns the id of the current close stellar body
| Name | Type | Description |
|---|---|---|
| integer |
Returns the core's current stress, destroyed when reaching max stress
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal stress the core can bear before it gets destroyed
| Name | Type | Description |
|---|---|---|
| number |
Returns the core's current stress to max stress ratio
| Name | Type | Description |
|---|---|---|
| number |
Spawns a number sticker in the 3D world, with coordinates relative to the construct
| Name | Type | Description | ||
|---|---|---|---|---|
| nb | integer | The | number | to display 0 to 9 |
| x | number | The x-coordinate in the construct in meters. 0 = center | ||
| y | number | The y-coordinate in the construct in meters. 0 = center | ||
| z | number | The z-coordinate in the construct in meters. 0 = center | ||
| orientation | string | Orientation of the | number | . Possible values are "front", "side" |
| Name | Type | Description |
|---|---|---|
| integer |
Spawns an arrow sticker in the 3D world, with coordinates relative to the construct
| Name | Type | Description |
|---|---|---|
| x | number | The x-coordinate in the construct in meters. 0 = center |
| y | number | the y-coordinate in the construct in meters. 0 = center |
| z | number | The z-coordinate in the construct in meters. 0 = center |
| orientation | string | Orientation of the arrow. Possible values are "up", "down", "north", "south", "east", "west" |
| Name | Type | Description |
|---|---|---|
| integer |
Delete the referenced sticker
| Name | Type | Description |
|---|---|---|
| index | integer | Index of the sticker to delete |
| Name | Type | Description |
|---|---|---|
| integer |
Move the referenced sticker
| Name | Type | Description |
|---|---|---|
| index | integer | Index of the sticker to move |
| x | number | The x-coordinate in the construct in meters. 0 = center |
| y | number | The y-coordinate in the construct in meters. 0 = center |
| z | number | The z-coordinate in the construct in meters. 0 = center |
| Name | Type | Description |
|---|---|---|
| integer |
Rotate the referenced sticker.
| Name | Type | Description |
|---|---|---|
| index | integer | Index of the sticker to rotate |
| angle_x | number | Rotation along the x-axis in degrees |
| angle_y | number | Rotation along the y-axis in degrees |
| angle_z | number | Rotation along the z-axis in degrees |
| Name | Type | Description |
|---|---|---|
| integer |
Returns the index of the current active output plug
| Name | Type | Description |
|---|---|---|
| integer |
Returns the maximum index of the counter
| Name | Type | Description |
|---|---|---|
| integer |
Moves the next counter index
Sets the counter index
| Name | Type | Description |
|---|---|---|
| index | integer | The index of the plug to activate |
Clear the Databank
Returns the number of keys that are stored inside the Databank
| Name | Type | Description |
|---|---|---|
| integer |
Returns all the keys in the Databank
| Name | Type | Description |
|---|---|---|
| value | table | The key list, as a list of string |
Returns 1 if the key is present in the Databank, 0 otherwise
| Name | Type | Description |
|---|---|---|
| key | string | The key used to store a value |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the key exists and 0 otherwise |
Remove the given key if the key is present in the Databank
| Name | Type | Description |
|---|---|---|
| key | string | The key used to store a value |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the key has been successfully removed, 0 otherwise |
Stores a string value at the given key
| Name | Type | Description | ||
|---|---|---|---|---|
| key | string | The key used to store the value | ||
| val | string | The value, as a | string |
Returns value stored in the given key as a string
| Name | Type | Description |
|---|---|---|
| key | string | The key used to retrieve the value |
| Name | Type | Description |
|---|---|---|
| value | string | The value as a string |
Stores an integer value at the given key
| Name | Type | Description | ||
|---|---|---|---|---|
| key | string | The key used to store the value | ||
| val | integer | The value, as an | integer |
Returns value stored in the given key as an integer
| Name | Type | Description |
|---|---|---|
| key | string | The key used to retrieve the value |
| Name | Type | Description |
|---|---|---|
| value | integer | The value as an integer |
Stores a floating number value at the given key
| Name | Type | Description | ||
|---|---|---|---|---|
| key | string | The key used to store the value | ||
| val | number | The value, as a floating | number |
Returns value stored in the given key as a floating number
| Name | Type | Description |
|---|---|---|
| key | string | The key used to retrieve the value |
| Name | Type | Description |
|---|---|---|
| value | number | The value as a floating number |
Emitted when a player enters in the detection zone
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the player. Use system.getPlayerName(id) to retrieve its name |
Emitted when a player leaves in the detection zone
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the player. Use system.getPlayerName(id) to retrieve its name |
Returns the detection zone radius
| Name | Type | Description |
|---|---|---|
| number |
Returns the list of ids of the players in the detection zone
| Name | Type | Description |
|---|---|---|
| table |
Open the door
Close the door
Return the opening status of the door
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the door
Show the element widget in the in-game widget stack
Hide the element widget in the in-game widget stack
Returns the widget type compatible with the element data
| Name | Type | Description |
|---|---|---|
| string |
Returns the element data as JSON
| Name | Type | Description |
|---|---|---|
| string |
Returns the element data ID
| Name | Type | Description |
|---|---|---|
| string |
Returns the element name
| Name | Type | Description |
|---|---|---|
| string |
Returns the class of the Element
| Name | Type | Description |
|---|---|---|
| string |
Returns the mass of the element (includes the included items' mass when the Element is a Container)
| Name | Type | Description |
|---|---|---|
| number |
Returns the element item ID (to be used with system.getItem() function to get information about the element).
| Name | Type | Description |
|---|---|---|
| integer |
Returns the unique local ID of the element
| Name | Type | Description |
|---|---|---|
| integer |
Returns the element integrity between 0 and 100
| Name | Type | Description |
|---|---|---|
| number |
Returns the element's current hit points (0 = destroyed)
| Name | Type | Description |
|---|---|---|
| number |
Returns the element's maximal hit points
| Name | Type | Description |
|---|---|---|
| number |
Returns the element's remaining number of restorations
| Name | Type | Description |
|---|---|---|
| integer |
Returns the element's maximal number of restorations
| Name | Type | Description |
|---|---|---|
| integer |
Returns the position of the Element in construct local coordinates.
| Name | Type | Description |
|---|---|---|
| table |
Returns the bounding box dimensions of the element.
| Name | Type | Description |
|---|---|---|
| table |
Returns the position of the center of bounding box of the element in local construct coordinates.
| Name | Type | Description |
|---|---|---|
| table |
Returns the up direction vector of the Element in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the right direction vector of the Element in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the forward direction vector of the Element in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the up direction vector of the Element in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the right direction vector of the Element in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the forward direction vector of the Element in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Set the value of a signal in the specified IN plug of the Element.
| Name | Type | Description |
|---|---|---|
| plug | string | The plug name, in the form of IN-SIGNAL-index |
| state | integer | The plug signal state |
Returns the value of a signal in the specified IN plug of the Element.
| Name | Type | Description |
|---|---|---|
| plug | string | The plug name, in the form of IN-SIGNAL-index |
| Name | Type | Description |
|---|---|---|
| value | integer | The plug signal state |
Returns the value of a signal in the specified OUT plug of the Element.
| Name | Type | Description |
|---|---|---|
| plug | string | The plug name, in the form of IN-SIGNAL-index |
| Name | Type | Description |
|---|---|---|
| value | integer | The plug signal state |
Emitted when the emitter successfully sent a message
| Name | Type | Description |
|---|---|---|
| channel | string | The channel name |
| message | string | The transmitted message |
Send a message on the given channel, limited to one transmission per frame and per channel
| Name | Type | Description |
|---|---|---|
| channel | string | The channel name, limited to 64 characters. The message will not be sent if it exceeds this |
| message | string | The message to be transmitted, truncated to 512 characters in case of overflow |
Returns the emitter range
| Name | Type | Description |
|---|---|---|
| number |
Returns the obstruction ratio of the engine exhaust by Elements and Voxels.
| Name | Type | Description |
|---|---|---|
| number |
Returns the tags of the engine
| Name | Type | Description |
|---|---|---|
| string |
Set the tags of the engine
| Name | Type | Description | ||
|---|---|---|---|---|
| tags | string | The CSV | string | of the tags |
| ignore | boolean | : True to ignore the default engine tags |
Checks if the engine is ignoring default tags
| Name | Type | Description |
|---|---|---|
| 1 | integer | if the engine ignores default engine tags |
Emitted when a firework has just been fired
Fire the firework
Set the delay before the launched Fireworks explodes
| Name | Type | Description |
|---|---|---|
| delay | number | The delay before explosion in seconds (maximum 5s) |
Returns the delay before the launched Fireworks explodes
| Name | Type | Description |
|---|---|---|
| number |
Set the speed at which the firework will be launched (impacts its altitude, depending on the local gravity).
| Name | Type | Description |
|---|---|---|
| speed | number | The launch speed in m/s (maximum 200m/s) |
Returns the speed at which the firework will be launched
| Name | Type | Description |
|---|---|---|
| number |
Set the type of launched firework (will affect which firework is picked in the attached Container)
| Name | Type | Description |
|---|---|---|
| type | integer | The type index of the firework (Ball = 1, Ring = 2, Palmtree = 3, Shower = 4) |
Returns the type of launched firework
| Name | Type | Description |
|---|---|---|
| integer |
Set the color of the launched firework (will affect which firework is picked in the attached Container)
| Name | Type | Description |
|---|---|---|
| color | integer | The color index of the firework (Blue = 1, Gold = 2, Green = 3, Purple = 4, Red = 5, Silver = 6) |
Returns the color of the launched firework
| Name | Type | Description |
|---|---|---|
| integer |
Deploys the forcefield
Retracts the forcefield
Checks if the forcefield is deployed
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the forcefield
Start the engine at full power (works only when run inside a cockpit or under remote control)
Stops the engine (works only when run inside a cockpit or under remote control)
Checks if the engine is active
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the state of the engine
Set the thrust of the engine
| Name | Type | Description |
|---|---|---|
| thrust | number | The engine thrust in newtons (limited by the maximum thrust) |
Returns the current thrust of the engine
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal thrust the engine can deliver in principle, under optimal conditions.
| Name | Type | Description |
|---|---|---|
| number |
Returns the minimal thrust the engine can deliver at the moment (can be more than zero),
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal thrust the engine can deliver at the moment, which might depend on
| Name | Type | Description |
|---|---|---|
| number |
Returns the ratio between the current maximum thrust and the optimal maximum thrust
| Name | Type | Description |
|---|---|---|
| number |
Checks if the torque generation is enabled on the engine
| Name | Type | Description |
|---|---|---|
| integer |
Sets the torque generation state on the engine
| Name | Type | Description |
|---|---|---|
| state | boolean |
Returns the engine thrust direction in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the engine torque axis in construct local coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the engine exhaust thrust direction in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the engine torque axis in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Checks if the engine out of fuel
| Name | Type | Description |
|---|---|---|
| integer |
Returns the item ID of the fuel currently used by the engine
| Name | Type | Description |
|---|---|---|
| integer |
Returns the local ID of the fueltank linked to the engine
| Name | Type | Description |
|---|---|---|
| integer |
Checks if the engine linked to a functional Fuel Tank (not broken or colliding)?
| Name | Type | Description |
|---|---|---|
| integer |
Returns the engine fuel consumption rate per newton of thrust delivered per second
| Name | Type | Description |
|---|---|---|
| number |
Returns the ratio between the current fuel rate and the theoretical nominal fuel rate
| Name | Type | Description |
|---|---|---|
| number |
Returns the current fuel consumption rate
| Name | Type | Description |
|---|---|---|
| number |
Returns the T50; the time needed for the engine to reach 50% of its maximal thrust (all engines
| Name | Type | Description |
|---|---|---|
| number |
Selects this gyro as the main gyro used for ship orientation
Deselects this gyro as the main gyro used for ship orientation, using the Core Unit instead
Toggle the activation state of the gyro
Returns the activation state of the gyro
| Name | Type | Description |
|---|---|---|
| integer |
The pitch value relative to the gyro orientation and the local gravity
| Name | Type | Description |
|---|---|---|
| pitch | number | The pitch angle in degrees, relative to the gyro orientation and the local gravity |
The roll value relative to the gyro orientation and the local gravity
| Name | Type | Description |
|---|---|---|
| roll | number | The roll angle in degrees, relative to the gyro orientation and the local gravity |
Emitted when the Industry Unit has started a new production process
| Name | Type | Description |
|---|---|---|
| id | integer | The product item id |
| quantity | number | The product quantity |
Emitted when the Industry Unit has completed a run
| Name | Type | Description |
|---|---|---|
| id | integer | The product item id |
| quantity | number | The product quantity |
Emitted when the industry status has changed
| Name | Type | Description |
|---|---|---|
| status | integer | The status of the industry can be (Stopped = 1, Running = 2, Jammed missing ingredient = 3, Jammed output full = 4, Jammed no output container = 5, Pending = 6) |
Emitted when the schematic bank content is updated(bank update or after a manual request made with updateBank())
Start the production, and it will run unless it is stopped or the input resources run out
Start maintaining the specified quantity. Resumes production when the quantity in the output Container is too low, and pauses production when it is equal or higher
| Name | Type | Description |
|---|---|---|
| quantity | integer | Quantity to maintain inside output containers |
Start the production of numBatches and then stop
| Name | Type | Description |
|---|---|---|
| numBatches | integer | Number of batches to run before unit stops |
Stop the production of the industry unit
| Name | Type | Description |
|---|---|---|
| force | boolean | (optional by default false) True if you want to force the production to stop immediately |
| allowLoss | boolean | (optional by default false) True if you want to allow the industry unit to lose components when recovering in use components |
Get the count of completed cycles since the player started the unit
| Name | Type | Description |
|---|---|---|
| integer |
Returns the efficiency of the industry
| Name | Type | Description |
|---|---|---|
| number |
Returns the time elapsed in seconds since the player started the unit for the latest time
| Name | Type | Description |
|---|---|---|
| number |
Returns the list of items required to run the selected output product.
| Name | Type | Description |
|---|---|---|
| outputs | table | Returns the list of products |
Returns the list of id of the items currently produced.
| Name | Type | Description |
|---|---|---|
| outputs | table | The first entry in the table is always the main product produced |
Set the item to produce from its id
| Name | Type | Description |
|---|---|---|
| itemId | integer | The item id of the item to produce |
| Name | Type | Description |
|---|---|---|
| success | integer | The result of the operation 0 for a sucess, -1 if the industry is running |
Send a request to get an update of the content of the schematic bank, limited to one call allowed per 30 seconds
| Name | Type | Description |
|---|---|---|
| time | number | If the request is not yet possible, returns the remaining time to wait for |
Returns a table describing the contents of the schematic bank, as a pair itemId and quantity per slot
| Name | Type | Description |
|---|---|---|
| content | table | The content of the schematic bank as a table with fields {[int] id, [float] quantity} per slot |
Deploys the landing gear
Retracts the landing gear
Checks if the landing gear is deployed
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the landing gear
Emitted when a laser hit the detector
Emitted when all lasers stop hitting the detector
Checks if any laser is hitting the detector
| Name | Type | Description |
|---|---|---|
| integer |
Activates the laser emitter
Deactivates the laser emitter
Toggle the laser emitter
Checks if the laser emitter is active
| Name | Type | Description |
|---|---|---|
| integer |
Solve the 3D linear system M*x=c0 where M is defined by its column vectors c1,c2,c3
| Name | Type | Description |
|---|---|---|
| c1 | table | The first column of the matrix M |
| c2 | table | The second column of the matrix M |
| c3 | table | The third column of the matrix M |
| c0 | table | The target column vector of the system |
| Name | Type | Description |
|---|---|---|
| value | table | The vec3 solution of the above system |
Solve the 2D linear system M*x=c0 where M is defined by its column vectors c1,c2
| Name | Type | Description |
|---|---|---|
| c1 | table | The first column of the matrix M |
| c2 | table | The second column of the matrix M |
| c0 | table | The target column vector of the system |
| Name | Type | Description |
|---|---|---|
| value | table | The vec2 solution of the above system |
Returns the position of the given point in world coordinates system, on the game screen
| Name | Type | Description |
|---|---|---|
| worldPos | table | : The world position of the point |
| Name | Type | Description |
|---|---|---|
| value | table | The position in percentage (between 0 and 1) of the screen resolution as vec3 with {x, y, depth} |
Switches the light on
Switches the light off
Checks if the light is on
| Name | Type | Description |
|---|---|---|
| integer |
Toggle the state of the light
Set the light color in RGB. Lights can use HDR color values above 1.0 to glow.
| Name | Type | Description |
|---|---|---|
| r | number | The red component, between 0.0 and 1.0, up to 5.0 for HDR colors. |
| g | number | The green component, between 0.0 and 1.0, up to 5.0 for HDR colors. |
| b | number | The blue component, between 0.0 and 1.0, up to 5.0 for HDR colors. |
Returns the light color in RGB
| Name | Type | Description |
|---|---|---|
| color | table | A vec3 for the red, blue and green components of the light, with values between 0.0 and 1.0, up to 5.0. |
Returns the blinking state of the light
| Name | Type | Description |
|---|---|---|
| state | boolean | True to enable light blinking |
Checks if the light blinking is enabled
| Name | Type | Description |
|---|---|---|
| integer |
Returns the light 'on' blinking duration
| Name | Type | Description |
|---|---|---|
| number |
Set the light 'on' blinking duration
| Name | Type | Description |
|---|---|---|
| time | number | The duration of the 'on' blinking in seconds |
Returns the light 'off' blinking duration
| Name | Type | Description |
|---|---|---|
| number |
Set the light 'off' blinking duration
| Name | Type | Description |
|---|---|---|
| time | number | The duration of the 'off' blinking in seconds |
Returns the light blinking time shift
| Name | Type | Description |
|---|---|---|
| number |
Set the light blinking time shift
| Name | Type | Description |
|---|---|---|
| shift | number | The time shift of the blinking |
Emitted when the button is pressed
Emitted when the button is released
Switches the switch on
Switches the switch off
Toggle the switch
Checks if the switch is active
| Name | Type | Description |
|---|---|---|
| integer |
Emitted when the mining unit is calibrated.
| Name | Type | Description |
|---|---|---|
| oreId | integer | The item ID of the ore extracted during the calibration process |
| amount | number | Amount of ore extracted during the calibration process |
| rate | number | The new calibration rate after calibration process |
Emitted when the mining unit started a new extraction process.
| Name | Type | Description |
|---|---|---|
| oreId | number | The item ID of the ore mined during the extraction process |
Emitted when the mining unit complete a batch.
| Name | Type | Description |
|---|---|---|
| oreId | number | The item ID of the ore mined during the extraction process |
| amount | number | Amount of ore mined |
Emitted when the mining unit status is changed.
| Name | Type | Description |
|---|---|---|
| status | integer | The status of the mining unit can be (Stopped = 1, Running = 2, Jammed output full = 3, Jammed no output container = 4) |
Emitted when the mining unit stopped the extraction process.
Returns the current state of the mining unit
| Name | Type | Description |
|---|---|---|
| state | integer | The status of the mining unit can be (Stopped = 1, Running = 2, Jammed output full = 3, Jammed no output container = 4) |
Returns the remaining time of the current batch extraction process.
| Name | Type | Description |
|---|---|---|
| number |
Returns the item ID of the currently selected ore.
| Name | Type | Description |
|---|---|---|
| integer |
Returns the list of available ore pools
| Name | Type | Description |
|---|---|---|
| pool | table | A list of tables composed with {[int] oreId, [float] available, [float] maximum); |
Returns the base production rate of the mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the efficiency rate of the mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the calibration rate of the mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the optimal calibration rate of the mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the current production rate of the mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the territory's adjacency bonus to the territory of the mining unit. Note: This value is updated only when a new batch is started.
| Name | Type | Description |
|---|---|---|
| number |
Returns the position of the last calibration excavation, in world coordinates.
| Name | Type | Description |
|---|---|---|
| table |
Returns the ID of the last player who calibrated the mining unit.
| Name | Type | Description |
|---|---|---|
| integer |
Returns the time in seconds since the last calibration of the mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the item ID of the ore extracted during the last calibration excavation.
| Name | Type | Description |
|---|---|---|
| integer |
Returns the volume of ore extracted during the last calibration excavation.
| Name | Type | Description |
|---|---|---|
| number |
Emitted when the plasma extractor started a new extraction process
Emitted when the plasma extractor complete a batch
Emitted when the plasma extractor status is changed
| Name | Type | Description |
|---|---|---|
| status | integer | The status of the plasma extractor can be (Stopped = 1, Running = 2, Jammed output full = 3, Jammed no output container = 4) |
Emitted when the plasma extractor stopped the extraction process
Returns the current status of the plasma extractor
| Name | Type | Description |
|---|---|---|
| status | integer | The status of the plasma extractor can be (Stopped = 1, Running = 2, Jammed output full = 3, Jammed no output container = 4) |
Returns the remaining time of the current batch extraction process.
| Name | Type | Description |
|---|---|---|
| number |
Returns the list of available plasma pools
| Name | Type | Description |
|---|---|---|
| pool | table | A list of tables composed with {[int] oreId, [float] available, [float] maximum); |
Emitted when the player parent change
| Name | Type | Description |
|---|---|---|
| oldId | integer | The previous parent construct ID |
| newId | integer | The new parent construct ID |
Returns the player name
| Name | Type | Description |
|---|---|---|
| value | string | The player name |
Return the ID of the player
| Name | Type | Description |
|---|---|---|
| value | integer | The ID of the player |
Returns the player mass
| Name | Type | Description |
|---|---|---|
| value | number | The mass of the player in kilograms |
Returns the player's nanopack content mass
| Name | Type | Description |
|---|---|---|
| value | number | The player's nanopack content mass in kilograms |
Returns the player's nanopack content volume
| Name | Type | Description |
|---|---|---|
| value | number | The player's nanopack content volume in liters |
Returns the player's nanopack maximum volume
| Name | Type | Description |
|---|---|---|
| value | number | The player's nanopack maximum volume in liters |
Returns the list of organization IDs of the player
| Name | Type | Description |
|---|---|---|
| value | table | The list of organization IDs |
Returns the position of the player, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The position in construct local coordinates |
Returns the position of the player, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The position in world coordinates |
Returns the position of the head of the player's character, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The position of the head in construct local coordinates |
Returns the position of the head of the player's character, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The position of the head in world coordinates |
Returns the velocity vector of the player, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The velocity vector in construct local coordinates |
Returns the velocity vector of the player, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The velocity vector in world coordinates |
Returns the absolute velocity vector of the player, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The velocity absolute vector in world coordinates |
Returns the forward direction vector of the player, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The forward direction vector in construct local coordinates |
Returns the right direction vector of the player, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The right direction vector in construct local coordinates |
Returns the up direction vector of the player, in construct local coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The up direction vector in construct local coordinates |
Returns the forward direction vector of the player, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The forward direction vector in world coordinates |
Returns the right direction vector of the player, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The right direction vector in world coordinates |
Returns the up direction vector of the player, in world coordinates
| Name | Type | Description |
|---|---|---|
| value | table | The up direction vector in world coordinates |
Returns the id of the planet the player is located on
| Name | Type | Description |
|---|---|---|
| value | integer | The id of the planet, 0 if none |
Returns the identifier of the construct to which the player is parented
| Name | Type | Description |
|---|---|---|
| value | integer | The id of the construct, 0 if none |
Checks if the player is seated
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the player is seated |
Returns the local id of the seat on which the player is sitting
| Name | Type | Description |
|---|---|---|
| value | integer | The local id of the seat, or 0 is not seated |
Checks if the player is parented to the given construct
| Name | Type | Description |
|---|---|---|
| id | integer | The construct id |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the player is parented to the given construct |
Checks if the player is currently sprinting
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the player is sprinting |
Checks if the player's jetpack is on
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the player's jetpack is on |
Returns the state of the headlight of the player
| Name | Type | Description |
|---|---|---|
| 1 | integer | if the player has his headlight on |
Set the state of the headlight of the player
| Name | Type | Description |
|---|---|---|
| state | boolean | : True to turn on headlight |
Freezes the player movements, liberating the associated movement keys to be used by the script.
| Name | Type | Description |
|---|---|---|
| state | boolean | 1 freeze the character, 0 unfreeze the character |
Checks if the player movements are frozen
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the player is frozen, 0 otherwise |
Checks if the player has DRM autorization to the control unit
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the player has DRM autorization on the control unit |
Emitted when the pressure tile is pressed
Emitter when the pressure tile is released
Checks if the pressure tile is down
| Name | Type | Description |
|---|---|---|
| integer |
Emitted when a Construct enters the scan range of the radar
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
Emitted when a construct leaves the range of the radar
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
Emitted when a construct is identified
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
Returns 1 if the radar is not broken, works in the current environment and is not used by another control unit
| Name | Type | Description |
|---|---|---|
| state | integer | 1 if the radar is operational, otherwise: 0 = broken, -1 = bad environment, -2 = obstructed, -3 = already in use |
Returns the scan range of the radar
| Name | Type | Description |
|---|---|---|
| value | number | The scan range |
Returns ranges to identify a target based on its core size
| Name | Type | Description |
|---|---|---|
| ranges | table | The list of float values for ranges in meters as { xsRange, sRange, mRange, lRange } |
Returns the list of construct IDs in the scan range
| Name | Type | Description |
|---|---|---|
| table |
Returns the list of identified construct IDs
| Name | Type | Description |
|---|---|---|
| table |
Returns the ID of the target construct
| Name | Type | Description |
|---|---|---|
| integer |
Returns the distance to the given construct
| Name | Type | Description |
|---|---|---|
| number |
Returns 1 if the given construct is identified
| Name | Type | Description |
|---|---|---|
| integer |
Returns 1 if the given construct was abandoned
| Name | Type | Description |
|---|---|---|
| integer |
Returns the core size of the given construct
| Name | Type | Description |
|---|---|---|
| size | string | The core size name; can be 'XS', 'S', 'M', 'L', 'XL' |
Returns the threat rate your construct is for the given construct
| Name | Type | Description |
|---|---|---|
| threat | integer | The threat rate index (None = 1, Identified = 2, Threatened and identified = 3, Threatened = 4, Attacked = 5), can be -1 if the radar is not operational |
Returns the threat rate the given construct is for your construct
| Name | Type | Description |
|---|---|---|
| threat | string | The threat rate index (None = 1, Identified = 2, Threatened and identified = 3, Threatened = 4, Attacked = 5), can be -1 if the radar is not operational |
Returns whether the target has an active Transponder with matching tags
| Name | Type | Description |
|---|---|---|
| integer |
Returns a table with id of the owner entity (player or organization) of the given construct, if in range and if active transponder tags match for owned dynamic constructs.
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| entity | table | A table with fields {[int] id, [bool] isOrganization} describing the owner. Use system.getPlayerName(id) and system.getOrganization(id) to retrieve info about it |
Return the size of the bounding box of the given construct, if in range
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| table |
Return the kind of the given construct
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| kind | integer | The kind index of the construct (Universe = 1, Planet = 2,Asteroid = 3,Static = 4,Dynamic = 5,Space = 6,Alien = 7) |
Returns the position of the given construct in construct local coordinates, if active transponder tags match for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| table |
Returns the position of the given construct in world coordinates, if in range and if active transponder tags match for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| table |
Returns the velocity vector of the given construct in construct local coordinates, if identified and if active transponder tags match for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| table |
Returns the velocity vector of the given construct in world coordinates, if identified and if active transponder tags match for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| table |
Returns the mass of the given construct, if identified for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| mass | number | The mass of the construct in kilograms |
Return the name of the given construct, if defined
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| string |
Returns a table of working elements on the given construction, if identified for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| info | table | A table with fields : {[float] weapons, [float] radars, [float] antiGravity, [float] atmoEngines, [float] spaceEngines, [float] rocketEngines} with values between 0.0 and 1.0. Exceptionally antiGravity and rocketEngines are always 1.0 if present, even if broken |
Returns the speed of the given construct, if identified for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| speed | number | The speed of the construct relative to the universe in meters per second |
Returns the angular speed of the given construct to your construct, if identified for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| speed | number | The angular speed of the construct relative to our construct in radians per second |
Returns the radial speed of the given construct to your construct, if identified for owned dynamic constructs
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the construct |
| Name | Type | Description |
|---|---|---|
| speed | number | The radial speed of the construct relative to our construct in meters per second |
Emitted when a message is received on any channel defined on the element
| Name | Type | Description |
|---|---|---|
| channel | string | The channel; can be used as a filter |
| message | string | The message received |
Returns the receiver range
| Name | Type | Description |
|---|---|---|
| number |
Checks if the given channel exists in the receiver channels list
| Name | Type | Description | ||
|---|---|---|---|---|
| channel | string | The channels list as Lua | table |
| Name | Type | Description |
|---|---|---|
| integer |
Set the channels list
| Name | Type | Description | ||
|---|---|---|---|---|
| channels | table | The channels list as Lua | table |
| Name | Type | Description |
|---|---|---|
| 1 | integer | if the channels list has been successfully set |
Returns the channels list
| Name | Type | Description |
|---|---|---|
| channels | table | The channels list as Lua table |
Emitted when the player starts a click on the screen
| Name | Type | Description |
|---|---|---|
| x | number | X-coordinate of the click in percentage (between 0 and 1) of the screen width |
| y | number | Y-coordinate of the click in percentage (between 0 and 1) the screen height |
Emitted when the player releases a click on the screen
| Name | Type | Description |
|---|---|---|
| x | number | X-coordinate of the click in percentage (between 0 and 1) of the screen width |
| y | number | Y-coordinate of the click in percentage (between 0 and 1) the screen height |
Emitted when the output of the screen is changed
| Name | Type | Description | ||
|---|---|---|---|---|
| output | string | The output | string | of the screen |
Switch on the screen
Switch off the screen
Checks if the screen is on
| Name | Type | Description |
|---|---|---|
| 1 | integer | if the screen is on |
Toggle the state of the screen
Displays the given text at the given coordinates in the screen, and returns an ID to move it later
| Name | Type | Description |
|---|---|---|
| x | number | Horizontal position, as a percentage (between 0 and 100) of the screen width |
| y | number | Vertical position, as a percentage (between 0 and 100) of the screen height |
| fontSize | number | Text font size, as a percentage of the screen width |
| text | string | The text to display |
| Name | Type | Description |
|---|---|---|
| integer |
Displays the given text centered in the screen with a font to maximize its visibility
| Name | Type | Description |
|---|---|---|
| text | string | The text to display |
Set the whole screen HTML content (overrides anything already set)
| Name | Type | Description |
|---|---|---|
| html | string | The HTML content to display |
Set the screen render script, switching the screen to native rendering mode
| Name | Type | Description |
|---|---|---|
| script | string | The Lua render script |
Defines the input of the screen rendering script, which will be automatically defined during the execution of Lua
| Name | Type | Description | ||
|---|---|---|---|---|
| input | string | A | string | that can be retrieved by calling getInput in a render script |
Set the screen render script output to the empty string
Get the screen render script output
| Name | Type | Description |
|---|---|---|
| value | string | The contents of the last render script setOutput call, or an empty string |
Displays the given HTML content at the given coordinates in the screen, and returns an ID to move it later
| Name | Type | Description |
|---|---|---|
| x | number | Horizontal position, as a percentage (between 0 and 100) of the screen width |
| y | number | Vertical position, as a percentage (between 0 and 100) of the screen height |
| html | string | The HTML content to display, which can contain SVG html elements to make drawings |
| Name | Type | Description |
|---|---|---|
| integer |
Displays SVG code (anything that fits within a
| Name | Type | Description |
|---|---|---|
| svg | string | The SVG content to display, which fits inside a 1920x1080 canvas |
Update the html element with the given ID (returned by addContent) with a new HTML content
| Name | Type | Description | ||
|---|---|---|---|---|
| id | integer | An | integer | ID that is used to identify the html element in the screen. Methods such as addContent return the ID that you can store to use later here |
| html | string | The HTML content to display, which can contain SVG html elements to make drawings |
Delete the html element with the given ID (returned by addContent)
| Name | Type | Description | ||
|---|---|---|---|---|
| id | integer | An | integer | ID that is used to identify the html element in the screen. Methods such as addContent return the id that you can store to use later here |
Update the visibility of the html element with the given ID (returned by addContent)
| Name | Type | Description | ||
|---|---|---|---|---|
| id | integer | An | integer | ID that is used to identify the html element in the screen. Methods such as addContent return the ID that you can store to use later here |
| state | boolean | true to show the content, false to hide |
Move the html element with the given id (returned by addContent) to a new position in the screen
| Name | Type | Description | ||
|---|---|---|---|---|
| id | integer | An | integer | id that is used to identify the html element in the screen. Methods such as addContent return the ID that you can store to use later here |
| x | number | Horizontal position, as a percentage (between 0 and 100) of the screen width | ||
| y | number | Vertical position, as a percentage (between 0 and 100) of the screen height |
Returns the x-coordinate of the position point at in the screen
| Name | Type | Description |
|---|---|---|
| x | number | The x-position as a percentage (between 0 and 1) of screen width; -1 if nothing is point at |
Returns the y-coordinate of the position point at in the screen
| Name | Type | Description |
|---|---|---|
| y | number | The y-position as a percentage (between 0 and 1) of screen height; -1 if nothing is point at |
Returns the state of the mouse click
| Name | Type | Description |
|---|---|---|
| 1 | integer | if the mouse is pressed, otherwise 0 |
Clear the screen
Emitted when we started or stopped the shield generator
| Name | Type | Description |
|---|---|---|
| active | integer | 1 if the element was activated, 0 otherwise |
Emitted when the shield absorbed incoming damage
| Name | Type | Description |
|---|---|---|
| hitpoints | number | Damage the shield absorbed |
| rawHitpoints | number | Total damage without taking resistances into account |
Emitted when venting started, stopped or restored some hitpoints
| Name | Type | Description |
|---|---|---|
| active | integer | 1 when venting is active, 0 otherwise |
| restoredHitpoints | number | Hitpoints restored since the last venting step |
Emitted when the shield hit points reached 0 due to damage
Emitted when the shield hit points were fully restored
Activate the shield
Deactivate the shield
Toggle the state of the shield
Returns the activation state of the shield
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current hit points of the shield
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximal hit points of the shield
| Name | Type | Description |
|---|---|---|
| number |
Activate shield venting to restore hit points
| Name | Type | Description |
|---|---|---|
| state | integer | 1 if venting started, 0 if an error occurred |
Stop shield venting
| Name | Type | Description |
|---|---|---|
| state | integer | 1 if venting stopped, 0 if an error occurred |
Check whether venting is in progress
| Name | Type | Description |
|---|---|---|
| state | integer | 1 if venting is ongoing, 0 otherwise |
Returns time after which venting is possible again
| Name | Type | Description |
|---|---|---|
| value | number | Remaining seconds of the venting cooldown |
Returns maximal cooldown between venting
| Name | Type | Description |
|---|---|---|
| value | number | Maximal seconds of the venting cooldown |
Returns distribution of resistance pool over resistance types
| Name | Type | Description |
|---|---|---|
| resistances | table | Resistance to damage type {antimatter, electromagnetic, kinetic, thermic} |
Distribute the resistance pool according to damage type
| Name | Type | Description |
|---|---|---|
| antimatter | number | Antimatter damage resistance |
| electromagnetic | number | Electromagnetic damage resistance |
| kinetic | number | Kinetic damage resistance |
| thermic | number | Thermic damage resistance |
| Name | Type | Description |
|---|---|---|
| integer |
Returns time after which adjusting resistances is possible again
| Name | Type | Description |
|---|---|---|
| number |
Returns maximal cooldown between adjusting resistances
| Name | Type | Description |
|---|---|---|
| number |
Returns total resistance pool that may be distributed
| Name | Type | Description |
|---|---|---|
| number |
Returns the remaining amount of the resistance pool that can be distributed
| Name | Type | Description |
|---|---|---|
| number |
Returns ratio per damage type of recent weapon impacts after applying resistance
| Name | Type | Description |
|---|---|---|
| stress | table | Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic} |
Returns ratio per damage type of recent weapon impacts without resistance
| Name | Type | Description |
|---|---|---|
| stress | table | Stress ratio due to damage type {antimatter, electromagnetic, kinetic, thermic} |
Returns stress, that is the total hit points of recent weapon impacts after applying resistance
| Name | Type | Description |
|---|---|---|
| number |
Returns stress, that is the total hit points of recent weapon impacts without resistance
| Name | Type | Description |
|---|---|---|
| number |
Emitted when the space mining unit started a new extraction process.
| Name | Type | Description |
|---|---|---|
| oreId | number | The item ID of the ore mined during the extraction process |
Emitted when the space mining unit complete a batch.
| Name | Type | Description |
|---|---|---|
| oreId | number | The item ID of the ore mined during the extraction process |
| amount | number | Amount of ore mined |
Emitted when the space mining unit status is changed.
| Name | Type | Description |
|---|---|---|
| status | integer | The status of the space mining unit can be |
Emitted when the space mining unit stopped the extraction process.
Returns the current state of the space mining unit
| Name | Type | Description |
|---|---|---|
| state | integer | The status of the space mining unit can be (Stopped = 1, Running = 2, Jammed output full = 3, Jammed no output container = 4) |
Returns the remaining time of the current batch extraction process.
| Name | Type | Description |
|---|---|---|
| number |
Returns the item ID of the currently selected ore.
| Name | Type | Description |
|---|---|---|
| integer |
Returns the list of available ore pools
| Name | Type | Description |
|---|---|---|
| pool | table | A list of tables composed with {[int] oreId, [float] available, [float] maximum); |
Returns the base production rate of the space mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the efficiency rate of the space mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the calibration rate of the space mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the optimal calibration rate of the space mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the current production rate of the space mining unit.
| Name | Type | Description |
|---|---|---|
| number |
Returns the distance to the first object detected in the direction of the thrust
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximum functional distance from the ground
| Name | Type | Description |
|---|---|---|
| number |
Emitted when an action starts
| Name | Type | Description | ||
|---|---|---|---|---|
| action | string | The action name, represented as a | string | taken among the set of predefined Lua-available actions (you can check the drop down list to see what is available) |
Emitted when an action stops
| Name | Type | Description | ||
|---|---|---|---|---|
| action | string | The action name, represented as a | string | taken among the set of predefined Lua-available actions (you can check the drop down list to see what is available) |
Emitted at each update as long as the action is maintained
| Name | Type | Description | ||
|---|---|---|---|---|
| action | string | The action name, represented as a | string | taken among the set of predefined Lua-available actions (you can check the drop down list to see what is available) |
Game update event. This is equivalent to a timer set at 0 seconds, as updates will go as fast as the FPS can go
Physics update. Do not use to put anything else by a call to updateICC on your Control Unit, as many functions are
A new message has been entered in the Lua tab of the chat, acting like a command line interface
| Name | Type | Description |
|---|---|---|
| text | string | The message entered |
Emitted when the player changes the camera mode.
| Name | Type | Description | ||
|---|---|---|---|---|
| mode | integer | The camera mode, represented by an | integer | (First Person View = 1, Look Around Construct View = 2, Follow Construct View = 3) |
Return the currently key bound to the given action. Useful to display tips.
| Name | Type | Description | ||
|---|---|---|---|---|
| actionName | string | The action name, represented as a | string | taken among the set of predefined Lua-available actions (you can check the drop down list to see what is available) |
| Name | Type | Description |
|---|---|---|
| value | string | The key associated to the given action name |
Control the display of the Control Unit custom screen, where you can define customized display information in HTML.
| Name | Type | Description |
|---|---|---|
| bool | boolean | True to show the screen, false to hide the screen |
Set the content of the Control Unit custom screen with some HTML code.
| Name | Type | Description |
|---|---|---|
| content | string | The HTML content you want to display on the screen widget. You can also use SVG here to make drawings. |
Create an empty panel.
| Name | Type | Description |
|---|---|---|
| label | string | The title of the panel |
| Name | Type | Description |
|---|---|---|
| value | string | The panel ID, or "" on failure |
Destroy the panel.
| Name | Type | Description |
|---|---|---|
| panelId | string | The panel ID |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 on success, 0 on failure. |
Create an empty widget and add it to a panel.
| Name | Type | Description |
|---|---|---|
| panelId | string | The panel ID |
| type | string | Widget type, determining how it will display data attached to ID |
| Name | Type | Description |
|---|---|---|
| value | string | The widget ID, or "" on failure. |
Destroy the widget.
| Name | Type | Description |
|---|---|---|
| widgetId | string | The widget ID |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 on success, 0 on failure. |
Create data.
| Name | Type | Description |
|---|---|---|
| dataJson | string | The data fields as JSON |
| Name | Type | Description |
|---|---|---|
| value | string | The data ID, or "" on failure. |
Destroy the data.
| Name | Type | Description |
|---|---|---|
| dataId | string | The data ID |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 on success, 0 on failure. |
Update JSON associated to data.
| Name | Type | Description |
|---|---|---|
| dataId | string | The data ID |
| dataJson | string | The data fields as JSON |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 on success, 0 on failure. |
Add data to widget.
| Name | Type | Description |
|---|---|---|
| dataId | string | The data ID |
| widgetId | string | The widget ID |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 on success, 0 on failure. |
Remove data from widget.
| Name | Type | Description |
|---|---|---|
| dataId | string | The data ID |
| widgetId | string | The widget ID |
| Name | Type | Description |
|---|---|---|
| value | integer | 1 on success, 0 on failure. |
Return the current value of the mouse wheel
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the mouse wheel |
Return the current value of the mouse delta X
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the mouse delta X |
Return the current value of the mouse delta Y
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the mouse delta Y |
Return the current value of the mouse pos X
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the mouse pos X |
Return the current value of the mouse pos Y
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the mouse pos Y |
Return the value of mouse sensitivity game setting
| Name | Type | Description |
|---|---|---|
| value | number | Sensitivity setting value |
Return the current value of the screen height
| Name | Type | Description |
|---|---|---|
| value | integer | The current value of the screen height |
Return the current value of the screen width
| Name | Type | Description |
|---|---|---|
| value | integer | The current value of the screen width |
Return the current value of the player's horizontal field of view
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the player's horizontal field of view |
Return the current value of the player's vertical field of view
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the player's vertical field of view |
Returns the active camera mode.
| Name | Type | Description |
|---|---|---|
| mode | integer | 1: First Person View, 2: Look Around Construct View, 3: Follow Construct View |
Checks if the active camera is in first person view.
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if the camera is in first person view. |
Returns the position of the camera, in construct local coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera position in construct local coordinates. |
Returns the position of the camera, in world coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera position in world coordinates. |
Returns the forward direction vector of the active camera, in world coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera forward direction vector in world coordinates. |
Returns the right direction vector of the active camera, in world coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera right direction vector in world coordinates. |
Returns the up direction vector of the active camera, in world coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera up direction vector in world coordinates. |
Returns the forward direction vector of the active camera, in construct local coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera forward direction vector in construct local coordinates. |
Returns the right direction vector of the active camera, in construct local coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera right direction vector in construct local coordinates. |
Returns the up direction vector of the active camera, in construct local coordinates.
| Name | Type | Description |
|---|---|---|
| value | table | Camera up direction vector in construct local coordinates. |
Return the current value of the mouse wheel (for the throttle speedUp/speedDown action)
| Name | Type | Description |
|---|---|---|
| value | number | The current input |
Return the mouse input for the ship control action (forward/backward)
| Name | Type | Description |
|---|---|---|
| value | number | The current input |
Return the mouse input for the ship control action (yaw right/left)
| Name | Type | Description |
|---|---|---|
| value | number | The current input |
Return the mouse input for the ship control action (right/left)
| Name | Type | Description |
|---|---|---|
| value | number | The current value of the mouse delta Y |
Lock or unlock the mouse free look.
| Name | Type | Description |
|---|---|---|
| state | boolean | true to lock and false to unlock |
Return the lock state of the mouse free look
| Name | Type | Description |
|---|---|---|
| value | integer | 1 when locked and 0 when unlocked |
Return the current time since the arrival of the Arkship on September 30th, 2017
| Name | Type | Description |
|---|---|---|
| value | number | Time in seconds |
Return the current time since January 1st, 1970.
| Name | Type | Description |
|---|---|---|
| value | number | Time in seconds |
Return the time offset between local timezone and UTC
| Name | Type | Description |
|---|---|---|
| value | number | Time in seconds |
Return the locale in which the game is currently running
| Name | Type | Description |
|---|---|---|
| value | string | The locale, currently one of "en-US", "fr-FR", or "de-DE" |
Return delta time of action updates (to use in ActionLoop)
| Name | Type | Description |
|---|---|---|
| value | number | The delta time in seconds |
Return the name of the given player, if in range of visibility or broadcasted by a transponder
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the player |
| Name | Type | Description |
|---|---|---|
| value | string | The name of the player |
Return the world position of the given player, if in range of visibility
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the player |
| Name | Type | Description |
|---|---|---|
| value | table | The coordinates of the player in world coordinates |
Return the item table corresponding to the given item ID.
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the item |
| Name | Type | Description |
|---|---|---|
| value | table | An item table with fields: {[int] id, [string] name, [string] displayName, [string] locDisplayName, [string] displayNameWithSize, [string] locDisplayNameWithSize, [string] description, [string] locDescription, [string] type, [number] unitMass, [number] unitVolume, [integer] tier, [string] scale, [string] iconPath, [table] schematics, [table] products} |
Returns a list of recipes producing the given item from its id.
| Name | Type | Description |
|---|---|---|
| itemId | integer | The ID of the item |
| Name | Type | Description |
|---|---|---|
| value | table | A list of recipe table with field: {[int] id, [int] tier,[double] time, [bool] nanocraftable, [table] products:{{[int] id, [double] quantity},...}, [table] ingredients:{{[int] id, [double] quantity},...}} |
Returns the corresping organization to the given organization id, if known, e.g. broadcasted by a transponder
| Name | Type | Description |
|---|---|---|
| id | integer | The ID of the organization |
| Name | Type | Description |
|---|---|---|
| value | table | A table containing information about the given organization {[string] name, [string] tag} |
Return the player's world position as a waypoint string, starting with '::pos' (only in explicit runs)
| Name | Type | Description |
|---|---|---|
| value | string | The waypoint as a string |
Set a waypoint at the destination described by the waypoint string, of the form '::pos{...}' (only in explicit runs)
| Name | Type | Description | ||
|---|---|---|---|---|
| waypointStr | string | The waypoint as a | string | |
| notify | boolean | (Optional) True to display a notification on waypoint change |
Clear the active destination waypoint. (only in explicit runs)'
| Name | Type | Description |
|---|---|---|
| notify | boolean | (Optional) True to display a notification about the waypoint's clearing |
Set the visibility of the helper top menu.
| Name | Type | Description |
|---|---|---|
| show | boolean | True to show the top helper menu, false to hide the top helper menu |
Play a sound file from your audio folder (located in "My documents/NQ/DualUniverse/audio"). Only one sound can be played at a time.
| Name | Type | Description |
|---|---|---|
| filePath | string | Relative path to audio folder (.mp3, .wav) |
Checks if a sound is playing
| Name | Type | Description |
|---|---|---|
| value | integer | 1 if a sound is playing |
Stop the current playing sound
Print the given string in the Lua chat channel
| Name | Type | Description |
|---|---|---|
| msg | string |
Emits a raycast from the telemeter, returns a raycastHit object
| Name | Type | Description |
|---|---|---|
| hit | table | A table with fields : {[bool] hit, [float] distance, [vec3] point} |
Returns telemeter raycast origin in local construct coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns telemeter raycast origin in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns telemeter raycast axis in local construct coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns telemeter raycast axis in world coordinates
| Name | Type | Description |
|---|---|---|
| table |
Returns the max distance from which an obstacle can be detected (default is 100m)
| Name | Type | Description |
|---|---|---|
| number |
Emitted when the transponder is started or stopped
| Name | Type | Description |
|---|---|---|
| active | integer | 1 if the element was activated, 0 otherwise |
Activate the transponder
Deactivate the transponder
Toggle the state of the transponder
Checks if the transponder is active
| Name | Type | Description |
|---|---|---|
| integer |
Set the tags list with up to 8 entries. Returns 1 if the application was successful, 0 if the tag
| Name | Type | Description | ||
|---|---|---|---|---|
| tags | table | List of up to 8 transponder tag | string | s |
| Name | Type | Description |
|---|---|---|
| integer |
Returns the tag list
| Name | Type | Description |
|---|---|---|
| tags | table | List of up to 8 transponder tag strings |
Initiate the warp jump process
Returns the current status of the warp drive
| Name | Type | Description |
|---|---|---|
| status | integer | The current status of the warp drive (NoWarpDrive = 1, Broken = 2, Warping = 3, ParentWarping = 4, NotAnchored = 5, WarpCooldown = 6, PvPCooldown = 7, MovingChild = 8, NoContainer = 9, PlanetTooClose = 10, DestinationNotSet = 11, DestinationTooClose = 12, DestinationTooFar = 13, NotEnoughWarpCells = 14, Ready = 15) |
Returns the distance to the current warp destination
| Name | Type | Description |
|---|---|---|
| number |
Returns the construct ID of the current warp destination
| Name | Type | Description |
|---|---|---|
| integer |
Returns the name of the current warp destination construct
| Name | Type | Description |
|---|---|---|
| string |
Returns the local id of the container linked to the warp drive
| Name | Type | Description |
|---|---|---|
| integer |
Returns the quantity of warp cells available in the linked container
| Name | Type | Description |
|---|---|---|
| integer |
Returns the quantity of warp cells required to warp to the warp destination set
| Name | Type | Description |
|---|---|---|
| integer |
Emitted when the weapon start reloading
| Name | Type | Description |
|---|---|---|
| ammoId | integer | The item id of the ammo |
Emitted when the weapon has reloaded
| Name | Type | Description |
|---|---|---|
| ammoId | integer | The item id of the ammo |
Emitted when the weapon has missed its target
| Name | Type | Description |
|---|---|---|
| targetId | integer | The construct id of the target |
Emitted when the weapon target has been destroyed
| Name | Type | Description |
|---|---|---|
| targetId | integer | The construct id of the target |
Emitted when an element on the weapon target has been destroyed
| Name | Type | Description |
|---|---|---|
| targetId | integer | The construct id of the target |
| itemId | integer | The item id of the destroyed element |
Emitted when the weapon has hit
| Name | Type | Description |
|---|---|---|
| targetId | integer | The construct id of the target |
| damage | number | The damage amount dealt by the hit |
Returns the item id of the currently equipped ammo
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current amount of remaining ammunition
| Name | Type | Description |
|---|---|---|
| integer |
Returns the maximum amount of ammunition the weapon can carry
| Name | Type | Description |
|---|---|---|
| integer |
Checks if the weapon is out of ammo
| Name | Type | Description |
|---|---|---|
| integer |
Returns 1 if the weapon is not broken and compatible with the construct size
| Name | Type | Description |
|---|---|---|
| state | integer | 1 if the weapon is operational, otherwise 0 = broken, -1 = incompatible size |
Returns the current weapon status
| Name | Type | Description |
|---|---|---|
| status | integer | The current status of the weapon (Idle = 1, Firing = 2, Reloading = 3, Unloading = 4) |
Returns the local id of the container linked to the weapon
| Name | Type | Description |
|---|---|---|
| integer |
Returns the current hit probability of the weapon for the current target
| Name | Type | Description |
|---|---|---|
| number |
Returns the base weapon damage
| Name | Type | Description |
|---|---|---|
| number |
Returns the optimal aim cone
| Name | Type | Description |
|---|---|---|
| number |
Returns the optimal distance to target
| Name | Type | Description |
|---|---|---|
| number |
Returns the maximum distance to target
| Name | Type | Description |
|---|---|---|
| number |
Returns the optimal tracking rate
| Name | Type | Description |
|---|---|---|
| number |
Returns the magazine volume
| Name | Type | Description |
|---|---|---|
| number |
Returns the weapon cycle time
| Name | Type | Description |
|---|---|---|
| number |
Returns the weapon reload time
| Name | Type | Description |
|---|---|---|
| number |
Returns the weapon unload time
| Name | Type | Description |
|---|---|---|
| number |
Returns the id of the current target construct of the weapon
| Name | Type | Description |
|---|---|---|
| integer |