Jump to content

[Lua] [API] Element public members and return values of some functions


hdparm

Recommended Posts

OUTDATED. NOT UPDATED SINCE v0.23.0

 

This is the result of running the globals dumping script in-game on constructs that had various elements attached to them.

 

Some exposed functions were called with pcall. The first value indicates whether the call was successful, the second is the actual function return value. All functions that return a vector return it as a table, not as a vec3 structure. Usually such functions will be called like this: local worldGravity = vec3(core.getWorldGravity()). Boolean values are returned as a number 0 or 1, and not as true or false.

 

Element events are not listed here, as they cannot be detected by the dump.lua script. See the codex in-game (press F1) or outside the game (C:\ProgramData\Dual Universe\Game\documentation\web_codex.html) for event and function descriptions and other information.

 

Anti-Gravity Generator

r0.21.0

Spoiler
activate()                                        function
deactivate()                                      function
export                                            table
    [same functions]
getBaseAltitude()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1000.0
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"antiGPower\":0.0,\"antiGravityField\":0.0,\"baseAltitude\":1000.0,\"helperId\":\"antigravity_generator\",\"name\":\"Anti-gravity generator s [115]\",\"showError\":true,\"type\":\"antigravity_generator\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e26454643"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "AntiGravityGeneratorUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 43117.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 115
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 27134.86
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 43117.0
getSignalIn(plug)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "antigravity_generator"
hide()                                            function
load()                                            function
setBaseAltitude(altitude)                         function
setSignalIn(plug,state)                           function
show()                                            function
toggle()                                          function
unit                                              table
    [reference to self]

 

 

Control unit

r0.23.0

Programming board exposes fewer functions compared to cockpit and seat. The control unit has references to linked elements, which are also available as local variables in each event handler. Event handlers defined in the script editor also get placed inside it. Here the control unit is a hovercraft seat that has 2 linked fuel tanks, a radar and a core.

Spoiler
activateGroundEngineAltitudeStabilization(targetAltitude)function
cancelCurrentControlMasterMode()                  function
computeGroundEngineAltitudeStabilizationCapabilities()function
container_1                                       table
    [slot skipped]
container_1_storageAcquired0()                    function
container_2                                       table
    [slot skipped]
container_2_storageAcquired1()                    function
core                                              table
    [slot skipped]
deactivateGroundEngineAltitudeStabilization()     function
exit()                                            function
export                                            table
    [same functions]
extendLandingGears()                              function
getAtmosphereDensity()                            function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.95623350143433
getAxisCommandValue(axis)                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getClosestPlanetInfluence()                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.99895399808884
getControlMasterModeId()                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"acceleration\":0.50619516735319114,\"airDensity\":0.95623338222503662,\"airResistance\":0.0,\"atmoThrust\":0.00014579699209048473,\"controlData\":{\"axisData\":[{\"commandType\":3,\"commandValue\":0.0,\"speed\":-0.00059204552254432088},{\"commandType\":3,\"commandValue\":0.0,\"speed\":-0.00063838141543701458},{\"commandType\":3,\"commandValue\":0.0,\"speed\":0.004704873184698281}],\"currentMasterMode\":0,\"masterModeData\":[{\"name\":\"Travel mode\"},{\"name\":\"Cruise control\"}]},\"controlMasterModeId\":0,\"currentBrake\":0.0,\"elementId\":\"125945574\",\"helperId\":\"cockpit\",\"maxBrake\":103066.64692163467,\"name\":\"Hovercraft seat controller [13]\",\"showHasBrokenFuelTank\":false,\"showOutOfFuel\":false,\"showOverload\":false,\"showScriptError\":false,\"showSlowDown\":false,\"spaceThrust\":0.0,\"speed\":0.0,\"type\":\"cockpit\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e125945574"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "CockpitHovercraftUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 187.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 13
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 110.33
getMasterPlayerId()                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 19884
getMasterPlayerRelativeOrientation()              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -6.9388939039072e-18
            2                                     number: -1.2939841813852e-34
            3                                     number: 1.8648277366751e-17
            4                                     number: 0.99999994039536
getMasterPlayerRelativePosition()                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 1.4551915228367e-11
            3                                     number: -7.2759576141834e-12
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 187.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getOwnerRelativePosition()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: -7.2759576141834e-12
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getSurfaceEngineAltitudeStabilization()           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 2.7814272029656e-309
getThrottle()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.013892558403313
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "cockpit"
hide()                                            function
isAnyHeadlightSwitchedOn()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isAnyLandingGearExtended()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isMouseControlActivated()                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isMouseDirectControlActivated()                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isMouseVirtualJoystickActivated()                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isRemoteControlled()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
library                                           table
    [slot skipped]
load()                                            function
retractLandingGears()                             function
setAxisCommandValue(axis,commandValue)            function
setEngineCommand(taglist,acceleration,angularAcceleration,keepForceCollinearity,keepTorqueCollinearity,priority1SubTags,priority2SubTags,priority3SubTags,toleranceRatioToStopCommand)function
setEngineThrust(taglist,thrust)                   function
setTimer(timerTagId,period)                       function
setupAxisCommandProperties(axis,commandType,targetSpeedRanges)function
setupControlMasterModeProperties(controlMasterModeId,displayName)function
show()                                            function
stopTimer(timerTagId)                             function
switchOffHeadlights()                             function
switchOnHeadlights()                              function
system                                            table
    [slot skipped]
system_update3()                                  function
unit                                              table
    [reference to self]
unit_start2()                                     function

 


Core

r0.23.0

Static cores have fewer functions compared to dynamic cores.

Spoiler
deleteSticker(index)                              function
export                                            table
    [same functions]
g(msg)                                            function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 9.8703393936157
getAcceleration()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.092927996997833
            2                                     number: -0.12095261412066
            3                                     number: -0.26272056748706
getAltitude()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 131.81586503958
getAngularAcceleration()                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.19598469883495
            2                                     number: 0.13982050177954
            3                                     number: 0.42124429014364
getAngularVelocity()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.00060177720116674
            2                                     number: -0.00050638859084623
            3                                     number: 0.0036456087650444
getConstructCrossSection()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 17.758344233496
getConstructIMass()                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 22275.2109375
getConstructId()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1689995
getConstructMass()                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 8008.9468954468
getConstructOrientationForward()                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -8.7422797889758e-08
            2                                     number: 1.0
            3                                     number: 1.5099581673894e-07
getConstructOrientationRight()                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 1.0
            2                                     number: 8.7422783678903e-08
            3                                     number: 8.7422783678903e-08
getConstructOrientationUp()                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -8.7422769468049e-08
            2                                     number: -1.5099581673894e-07
            3                                     number: 1.0
getConstructWorldOrientationForward()             function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.94565159710239
            2                                     number: 0.32505265646375
            3                                     number: -0.0091522976175477
getConstructWorldOrientationRight()               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.24943131689739
            2                                     number: -0.70640615230704
            3                                     number: 0.66240048915111
getConstructWorldOrientationUp()                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.20868387885866
            2                                     number: 0.6286960371085
            3                                     number: 0.74912774873347
getConstructWorldPos()                            function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -31582.296008487
            2                                     number: 89508.567087636
            3                                     number: -43139.211176399
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"altitude\":131.81517441188043,\"gravity\":9.8703393936157227,\"helperId\":\"core\",\"name\":\"Dynamic core unit xs [1]\",\"type\":\"core\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e125945573"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "CoreUnitDynamic"
getElementHitPoints(uid)                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementHitPointsById(localId)                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementIdList()                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 80
            10                                    number: 81
            11                                    number: 104
            12                                    number: 14
            13                                    number: 95
            14                                    number: 94
            15                                    number: 96
            16                                    number: 85
            17                                    number: 92
            18                                    number: 98
            19                                    number: 91
            2                                     number: 101
            20                                    number: 90
            21                                    number: 106
            22                                    number: 89
            23                                    number: 88
            24                                    number: 99
            25                                    number: 87
            26                                    number: 74
            27                                    number: 73
            28                                    number: 72
            29                                    number: 71
            3                                     number: 93
            30                                    number: 69
            31                                    number: 70
            32                                    number: 75
            33                                    number: 97
            34                                    number: 76
            35                                    number: 77
            36                                    number: 78
            37                                    number: 79
            38                                    number: 82
            39                                    number: 83
            4                                     number: 103
            40                                    number: 84
            41                                    number: 105
            42                                    number: 1
            43                                    number: 13
            5                                     number: 102
            6                                     number: 59
            7                                     number: 58
            8                                     number: 86
            9                                     number: 100
getElementIndustryStatus(localId)                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}\n"
getElementList()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 80
            10                                    number: 81
            11                                    number: 104
            12                                    number: 14
            13                                    number: 95
            14                                    number: 94
            15                                    number: 96
            16                                    number: 85
            17                                    number: 92
            18                                    number: 98
            19                                    number: 91
            2                                     number: 101
            20                                    number: 90
            21                                    number: 106
            22                                    number: 89
            23                                    number: 88
            24                                    number: 99
            25                                    number: 87
            26                                    number: 74
            27                                    number: 73
            28                                    number: 72
            29                                    number: 71
            3                                     number: 93
            30                                    number: 69
            31                                    number: 70
            32                                    number: 75
            33                                    number: 97
            34                                    number: 76
            35                                    number: 77
            36                                    number: 78
            37                                    number: 79
            38                                    number: 82
            39                                    number: 83
            4                                     number: 103
            40                                    number: 84
            41                                    number: 105
            42                                    number: 1
            43                                    number: 13
            5                                     number: 102
            6                                     number: 59
            7                                     number: 58
            8                                     number: 86
            9                                     number: 100
getElementMass(uid)                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementMassById(localId)                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementMaxHitPoints(uid)                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementMaxHitPointsById(localId)               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementName(uid)                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementNameById(localId)                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementPositionById(localId)                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: 0.0
getElementRotationById(localId)                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: 0.0
            4                                     number: 0.0
getElementTagsById(localId)                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "[]\n"
getElementType(uid)                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementTypeById(localId)                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 70.89
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getMaxKinematicsParametersAlongAxis(taglist,CRefAxis)function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: 0.0
            4                                     number: 0.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getSchematicInfo(schematicId)                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}\n"
getVelocity()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.020366662374703
            2                                     number: 0.019454939576275
            3                                     number: -0.0038139173457262
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "core"
getWorldAcceleration()                            function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.51780639927775
            2                                     number: -0.62957344666226
            3                                     number: 0.55074194727009
getWorldAirFrictionAcceleration()                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -1.8734005347995e-05
            2                                     number: -3.9682142773887e-06
            3                                     number: -9.6714865664988e-06
getWorldAirFrictionAngularAcceleration()          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 4.5693968662276e-05
            2                                     number: -4.3281468526014e-05
            3                                     number: -0.00013358411902539
getWorldAngularAcceleration()                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.0082879357873834
            2                                     number: -0.0017349966114242
            3                                     number: -0.1033806044495
getWorldAngularVelocity()                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.0011181465815753
            2                                     number: 0.0016610536258668
            3                                     number: 0.00087607477325946
getWorldGravity()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 2.4696573928732
            2                                     number: -7.0012167401986
            3                                     number: -6.5044108473911
getWorldVelocity()                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0048744822852314
            2                                     number: 0.0061597777530551
            3                                     number: -0.0016826821956784
getWorldVertical()                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.25020996508477
            2                                     number: -0.70931873019298
            3                                     number: -0.65898551757205
hide()                                            function
load()                                            function
moveSticker(index,x,y,z)                          function
rotateSticker(index,angle_x,angle_y,angle_z)      function
show()                                            function
spawnArrowSticker(x,y,z,orientation)              function
spawnNumberSticker(nb,x,y,z,orientation)          function
unit                                              table
    [reference to self]

 

 

Databank

r0.21.2

Spoiler
clear()                                           function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "DataBankUnit"
getFloatValue(key)                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 202
getIntValue(key)                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getKeys()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "[]"
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 17.09
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getNbKeys()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getStringValue(key)                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hasKey(key)                                       function
hide()                                            function
load()                                            function
setFloatValue(key,val)                            function
setIntValue(key,val)                              function
setStringValue(key,val)                           function
show()                                            function
unit                                              table
    [reference to self]

  

 

Elements with a state

r0.21.2

Detection areas, laser detectors and manual buttons expose the same functions. Their state is accessed using getState().

Spoiler
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "ManualButtonUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 196
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 13.27
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getSignalOut(plug)                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

 

 

Elements with a toggle-able state

 r0.21.2

Force fields, ship doors, landing gears and manual switches expose the same functions. The state is accessed using getState() and can be changed by activate(), deactivate() or toggle().

Spoiler
activate()                                        function
deactivate()                                      function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "ManualSwitchUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 197
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 13.27
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getSignalIn(plug)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getSignalOut(plug)                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
setSignalIn(plug,state)                           function
show()                                            function
toggle()                                          function
unit                                              table
    [reference to self]

 


Emitter

r0.23.0

Spoiler
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "EmitterUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 52.53
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 541
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 69.31
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 52.53
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getRange()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1000.0
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getSignalIn(plug)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
send(channel,message)                             function
setSignalIn(plug,state)                           function
show()                                            function
unit                                              table
    [reference to self]

  

 

Engine

r0.21.0

Space engines, atmospheric engines, ailerons, air-brakes, retro-engines and adjustors expose the same functions. Usually engines are controlled through unit.setEngineCommand and do not require linking to the control unit.

Spoiler
activate()                                        function
deactivate()                                      function
distance()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.36820710083824
export                                            table
    [same functions]
getCurrentFuelRate()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 9e-09
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"currentMaxThrust\":59893.564930293411,\"currentThrust\":0.0,\"helperId\":\"engine_unit\",\"maxThrustBase\":60000.0,\"name\":\"Hover engine s [17]\",\"type\":\"engine_unit\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e5267951"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "Hovercraft"
getFuelConsumption()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getFuelRate()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 9e-12
getFuelRateEfficiency()                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1.0
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 53.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 17
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 56.91
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 53.0
getMaxThrust()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 59893.564930293
getMaxThrustBase()                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 60000.0
getMaxThrustEfficiency()                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1.0
getMinThrust()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getObstructionFactor()                            function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getSignalIn(plug)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getT50()                                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getTags()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getThrust()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "engine_unit"
hasBrokenFuelTank()                               function
hide()                                            function
isObstructed()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isOutOfFuel()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
load()                                            function
setSignalIn(plug,state)                           function
setTags(tags)                                     function
setThrust(thrust)                                 function
show()                                            function
thrustAxis()                                      function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.11607212473206
            2                                     number: 0.82471327348847
            3                                     number: 0.55351176897345
toggle()                                          function
torqueAxis()                                      function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.15486745757987
            2                                     number: 1.147459492394
            3                                     number: -1.677198808322
unit                                              table
    [reference to self]

 

 

 Fuel container

 r0.23.0

Spoiler
acquireStorage()                                  function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"helperId\":\"fuel_container_space_fuel\",\"name\":\"Space fuel tank s [72]\",\"percentage\":37,\"timeLeft\":\"n/a\",\"type\":\"fuel_container\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e125945581"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "SpaceFuelContainer"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 187.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 72
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getItemsList()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "[\n\9{\n\9\9\"class\" : \"Kergon1\",\n\9\9\"name\" : \"Kergon-X1 fuel\",\n\9\9\"quantity\" : 272.51468992233276,\n\9\9\"type\" : \"material\",\n\9\9\"unitMass\" : 6.0,\n\9\9\"unitVolume\" : 1.0\n\9}\n]\n"
getItemsMass()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1635.088139534
getItemsVolume()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 272.51468992233
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1817.758139534
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 187.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5
getMaxVolume()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 720.0
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5
getSelfMass()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 182.67
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "fuel_container"
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

  

 

Gyro

 r0.21.2

Spoiler
activate()                                        function
deactivate()                                      function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"helperId\":\"gyro\",\"name\":\"Gyroscope [203]\",\"pitch\":0.0,\"roll\":0.0,\"type\":\"gyro\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e64181892"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "GyroUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 203
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 104.41
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getPitch()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getRoll()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "gyro"
getYaw()                                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
hide()                                            function
load()                                            function
localForward()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 1.7484555314695e-07
            2                                     number: -1.0
            3                                     number: -1.509958309498e-07
localRight()                                      function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -1.0
            2                                     number: -1.7484555314695e-07
            3                                     number: 8.7422783678903e-08
localUp()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 8.7422812100613e-08
            2                                     number: -1.5099580252809e-07
            3                                     number: 1.0
setYawWorldReference(direction)                   function
show()                                            function
toggle()                                          function
unit                                              table
    [reference to self]
worldForward()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: -0.56095521195883
            2                                     number: 0.0038638120439722
            3                                     number: -0.8278371775665
worldRight()                                      function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.81512383023118
            2                                     number: -0.17206315957548
            3                                     number: -0.55314341576952
worldUp()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.14457745155019
            2                                     number: 0.98507841003868
            3                                     number: -0.093370395055397

 

 

Industry

r0.23.0

Spoiler
batchStart(numBatches)                            function
export                                            table
    [same functions]
getCurrentSchematic()                             function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1833008839
getCycleCountSinceStartup()                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getEfficiency()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "Industry1"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5540.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 114
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 2302.34
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5540.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getStatus()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "PENDING"
getUptime()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 4760.765625
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hardStop(allowComponentLoss)                      function
hide()                                            function
load()                                            function
setCurrentSchematic(id)                           function
show()                                            function
softStop()                                        function
start()                                           function
startAndMaintain(quantity)                        function
unit                                              table
    [reference to self]

 

 

Item container

 r0.23.0

Spoiler
acquireStorage()                                  function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "ItemContainer"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 129
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getItemsList()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "[\n\9{\n\9\9\"class\" : \"HydrogenPure\",\n\9\9\"name\" : \"Pure hydrogen\",\n\9\9\"quantity\" : 132323.49996083975,\n\9\9\"type\" : \"material\",\n\9\9\"unitMass\" : 0.070000000000000007,\n\9\9\"unitVolume\" : 1.0\n\9}\n]\n"
getItemsMass()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 9262.6449972588
getItemsVolume()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 132323.49996084
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 9318.4449972588
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5
getMaxVolume()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5
getSelfMass()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 55.8
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

   

 

Library

r0.21.2

Spoiler
export                                            table
    [same functions]
load()                                            function
systemResolution2(vec_c1,vec_c2,vec_c0)           function
systemResolution3(vec_c1,vec_c2,vec_c3,vec_c0)    function
unit                                              table
    [reference to self]

 

 

Light

r0.23.0

Spoiler
activate()                                        function
deactivate()                                      function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "LightUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 530
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 70.05
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getRGBColor()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 255.0
            2                                     number: 255.0
            3                                     number: 255.0
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getSignalIn(plug)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
setRGBColor(r,g,b)                                function
setSignalIn(plug,state)                           function
show()                                            function
toggle()                                          function
unit                                              table
    [reference to self]

 

 

PVP radar (atmospheric and space)

r0.22.0

Spoiler
export                                            table
    [same functions]
getConstructName(id)                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "unreachable"
getConstructPos(id)                               function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: 0.0
getConstructSize(id)                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: 0.0
getConstructType(id)                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "unreachable"
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"constructsList\":[{\"constructId\":\"1256720\",\"distance\":37.221349818623104,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"SCREW ALIOTH\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"151002\",\"distance\":78.970208423127104,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Marketplace Lacobus 2\",\"size\":\"XL\",\"targetThreatState\":0},{\"constructId\":\"1247280\",\"distance\":109.41473493143295,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"SCREW ALIOTH\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1754660\",\"distance\":135.37125020562712,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"F7 Skirmisher\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1254996\",\"distance\":170.30104644741633,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Hauler\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1268696\",\"distance\":599.7846249252301,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Static construct\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1638799\",\"distance\":658.26074758918492,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Dynamic construct\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1700801\",\"distance\":660.94779302344352,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Cyllandra\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1752495\",\"distance\":828.23031322176314,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"iCore v2\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1755652\",\"distance\":844.48860881322764,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Shuttlebus\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"120313\",\"distance\":860.05564745669471,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"AndersonWilliams AMNS ATLAS\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120314\",\"distance\":891.24202467005466,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Renard FSI SFC Heracles\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"120315\",\"distance\":922.73060310301059,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Renard Hercules Cutaway\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"120302\",\"distance\":927.20227237489632,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"UEF Big Ships Museum 3\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120301\",\"distance\":927.50527478037998,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"UEF Big Ship Museum 2\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120303\",\"distance\":944.45007431861291,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"UEF Big Ships Museum 4\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120300\",\"distance\":945.08768876341844,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"UEF Big Ship Museum 1\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120312\",\"distance\":965.55196940715564,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Renard SFC Argo\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"120310\",\"distance\":968.5185262655931,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"SoCalExile Paradise\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120309\",\"distance\":976.76436732241757,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"InfinityCorp ISS Boundless\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120304\",\"distance\":977.7710960441384,\"inIdentifyRange\":true,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"UEF Big Ships Museum 5\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120311\",\"distance\":988.83503723921115,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"EvilDesGas Newton s Folly\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1310138\",\"distance\":1009.2226595585395,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Zoom Zoom\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"120305\",\"distance\":1025.838530305108,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"UEF Big Ships Museum 6\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"120308\",\"distance\":1048.3086534996405,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"BrianTurney Stanton Fore\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1627826\",\"distance\":1064.6922718854748,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Novark Speeder Mk6\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"120306\",\"distance\":1071.5861991233078,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"BrianTurney Stanton Mid\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"1712462\",\"distance\":1076.0447122819835,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"XS Full Large Space\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1770909\",\"distance\":1098.7264973508127,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"TwoLarge\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1311983\",\"distance\":1099.3553713419651,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Enveus Lacobus Base\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1311613\",\"distance\":1102.9237499640737,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Enveus Factory\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1763164\",\"distance\":1103.7366757827515,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Starter\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1737207\",\"distance\":1104.2616959485381,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"NonAnalogsTank\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"120307\",\"distance\":1109.6055277109579,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"BrianTurney Stanton Aft\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1646177\",\"distance\":1119.1927608809333,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Strider\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1763278\",\"distance\":1119.890871826279,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Skiff2\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1633540\",\"distance\":1122.0805904942233,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Enveus Headquarters\",\"size\":\"L\",\"targetThreatState\":0},{\"constructId\":\"1745152\",\"distance\":1122.536108728088,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Kondor\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1751738\",\"distance\":1124.9955481212139,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Bitch Mobile\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1806616\",\"distance\":1125.3888705341801,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Wasp\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1327062\",\"distance\":1125.417929495424,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mumen Racer Mk2\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1464160\",\"distance\":1128.8948754497335,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mumen Base\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1531956\",\"distance\":1135.4230973035442,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Warp Bus\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1633886\",\"distance\":1136.6401076743134,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mumen Speeder\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1311853\",\"distance\":1138.6738151285883,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Novark Racer MK2\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1309583\",\"distance\":1145.7751611467886,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Rogue 1\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1509996\",\"distance\":1156.441883757813,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mega Miner\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1312061\",\"distance\":1161.7351653506189,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Ship Factory\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1580222\",\"distance\":1174.0605992684107,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Static construct\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1560071\",\"distance\":1174.3003829936799,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Static construct\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1446264\",\"distance\":1175.5462112286255,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Fischer_Moon Piranha\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1830092\",\"distance\":1177.4035771685503,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Dynamic construct\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1561033\",\"distance\":1179.1482339943891,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Araga Factoria\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1752515\",\"distance\":1194.1568465828284,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Static construct\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1472072\",\"distance\":1198.1605053944588,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Space Shuttle\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1496423\",\"distance\":1203.6689635316895,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mostors Hangar\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1571275\",\"distance\":1203.9020183973164,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mostors Hangar\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1575509\",\"distance\":1227.8015857858406,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Landing Pad\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1643274\",\"distance\":1229.1264253603661,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Mostor Class Frigate 001\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1598186\",\"distance\":1319.7804612013581,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"VaderBoat\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1770723\",\"distance\":1327.4553348434283,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Dynamic construct\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1823474\",\"distance\":1355.8212257793577,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lil Valkyrie\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1808373\",\"distance\":1360.7563047818278,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lil Midget\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1363815\",\"distance\":1360.9699837546812,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Cargo Dropship\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1822692\",\"distance\":1365.1325001733526,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lil Fragger\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1783628\",\"distance\":1375.5857061272427,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lil Red\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1701553\",\"distance\":1392.1102344038004,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Snowspeeder\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1808025\",\"distance\":1394.9508719985529,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lil Miner\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1633085\",\"distance\":1413.9012476209768,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lackore Outpost\",\"size\":\"M\",\"targetThreatState\":0},{\"constructId\":\"1464157\",\"distance\":1422.923598652013,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Novark Speeder Mk6\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1597364\",\"distance\":1426.9332300245969,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Novark Mule MK1\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1647597\",\"distance\":1433.3641414195247,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Novark Racer MK2\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1560373\",\"distance\":1440.5320186098229,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Static construct\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1633502\",\"distance\":1461.6463923787842,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Dynamic construct\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1633896\",\"distance\":1468.4719972115017,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Farscape Prime\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1272008\",\"distance\":1661.8400377734986,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Dynamic construct\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1783773\",\"distance\":1677.918396062757,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Miner\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1760805\",\"distance\":2245.4360091855187,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Medrengard\",\"size\":\"S\",\"targetThreatState\":0},{\"constructId\":\"1771883\",\"distance\":2247.5724430678024,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Pacer MK1\",\"size\":\"XS\",\"targetThreatState\":0},{\"constructId\":\"1382045\",\"distance\":3440.1307871647673,\"inIdentifyRange\":false,\"info\":{},\"isIdentified\":false,\"myThreatStateToTarget\":0,\"name\":\"Lacobus Small Factory\",\"size\":\"S\",\"targetThreatState\":0}],\"elementId\":\"129889868\",\"helperId\":\"radar\",\"name\":\"Small atmospheric radar PvP s [102]\",\"properties\":{\"broken\":false,\"errorMessage\":\"\",\"identifiedConstructs\":[],\"identifyConstructs\":{},\"radarStatus\":1,\"selectedConstruct\":\"0\",\"worksInEnvironment\":true},\"staticProperties\":{\"maxIdentifiedTargets\":1,\"ranges\":{\"identify128m\":1000,\"identify16m\":125,\"identify32m\":250,\"identify64m\":500,\"scan\":5000},\"worksInAtmosphere\":true,\"worksInSpace\":false},\"type\":\"radar\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e129889868"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "RadarPvPAtmospheric"
getEntries()                                      function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 120300
            10                                    number: 120309
            11                                    number: 120310
            12                                    number: 120311
            13                                    number: 120312
            14                                    number: 120313
            15                                    number: 120314
            16                                    number: 120315
            17                                    number: 151002
            18                                    number: 1247280
            19                                    number: 1254996
            2                                     number: 120301
            20                                    number: 1256720
            21                                    number: 1268696
            22                                    number: 1272008
            23                                    number: 1309583
            24                                    number: 1310138
            25                                    number: 1311613
            26                                    number: 1311853
            27                                    number: 1311983
            28                                    number: 1312061
            29                                    number: 1327062
            3                                     number: 120302
            30                                    number: 1363815
            31                                    number: 1382045
            32                                    number: 1446264
            33                                    number: 1464157
            34                                    number: 1464160
            35                                    number: 1472072
            36                                    number: 1496423
            37                                    number: 1509996
            38                                    number: 1531956
            39                                    number: 1560071
            4                                     number: 120303
            40                                    number: 1560373
            41                                    number: 1561033
            42                                    number: 1571275
            43                                    number: 1575509
            44                                    number: 1580222
            45                                    number: 1597364
            46                                    number: 1598186
            47                                    number: 1627826
            48                                    number: 1633085
            49                                    number: 1633502
            5                                     number: 120304
            50                                    number: 1633540
            51                                    number: 1633886
            52                                    number: 1633896
            53                                    number: 1638799
            54                                    number: 1643274
            55                                    number: 1646177
            56                                    number: 1647597
            57                                    number: 1700801
            58                                    number: 1701553
            59                                    number: 1712462
            6                                     number: 120305
            60                                    number: 1737207
            61                                    number: 1745152
            62                                    number: 1751738
            63                                    number: 1752495
            64                                    number: 1752515
            65                                    number: 1754660
            66                                    number: 1755652
            67                                    number: 1760805
            68                                    number: 1763164
            69                                    number: 1763278
            7                                     number: 120306
            70                                    number: 1770723
            71                                    number: 1770909
            72                                    number: 1771883
            73                                    number: 1783628
            74                                    number: 1783773
            75                                    number: 1806616
            76                                    number: 1808025
            77                                    number: 1808373
            78                                    number: 1822692
            79                                    number: 1823474
            8                                     number: 120307
            80                                    number: 1830092
            9                                     number: 120308
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 88.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 102
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 486.72
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 88.0
getRange()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 5000.0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "radar"
hasMatchingTransponder(id)                        function
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

 


Radar

not available to craft or buy; for atmosphere and space radars see PVP radar instead

 

Receiver

r0.23.0

Spoiler
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "ReceiverUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 52.53
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 542
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 13.27
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 52.53
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getRange()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1000.0
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getSignalOut(plug)                                function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

 


Screen

r0.21.2

Spoiler
activate()                                        function
addContent(x,y,html)                              function
addText(x,y,fontSize,text)                        function
clear()                                           function
deactivate()                                      function
deleteContent(id)                                 function
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "ScreenUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 198
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 18.67
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getMouseState()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
getMouseX()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getMouseY()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getSignalIn(plug)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getState()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
moveContent(id,x,y)                               function
resetContent(id,html)                             function
setCenteredText(text)                             function
setContent(x,y,html)                              function
setHTML(html)                                     function
setRawHTML(html)                                  function
setSVG(svg)                                       function
setSignalIn(plug,state)                           function
setText(x,y,fontSize,text)                        function
show()                                            function
showContent(id,state)                             function
toggle()                                          function
unit                                              table
    [reference to self]

  

 

System

r0.23.0

Spoiler
__NQ_returnFromRunPlayerLUA(result)               function
addDataToWidget(dataId,widgetId)                  function
addMarker(filter,name)                            function
addMeasure(filter,sectionName,varName,value)      function
createData(dataJson)                              function
createWidget(panelId,type)                        function
createWidgetPanel(label)                          function
destroyData(dataId)                               function
destroyWidget(widgetId)                           function
destroyWidgetPanel(panelId)                       function
export                                            table
    [same functions]
freeze(bool)                                      function
getActionKeyName(actionName)                      function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getActionUpdateDeltaTime()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.017909999936819
getControlDeviceForwardInput()                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getControlDeviceLeftRightInput()                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getControlDeviceYawInput()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getFov()                                          function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 73.0
getMouseDeltaX()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1.0
getMouseDeltaY()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 10.0
getMousePosX()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 975.0
getMousePosY()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 754.0
getMouseWheel()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getPlayerName(id)                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "unreachable"
getPlayerWorldPos(id)                             function
    [pcall]                                       table
        1                                         boolean: true
        2                                         table
            1                                     number: 0.0
            2                                     number: 0.0
            3                                     number: 0.0
getScreenHeight()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1080
getScreenWidth()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 1920
getThrottleInputFromMouseWheel()                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0.0
getTime()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100837321.8601
getWaypointFromPlayerPos()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "::pos{0,0,-31580.3776,89509.4920,-43138.9398}"
isFrozen()                                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
isViewLocked()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 0
load()                                            function
lockView(state)                                   function
logError(msg)                                     function
logInfo(msg)                                      function
logWarning(msg)                                   function
print(msg)                                        function
removeDataFromWidget(dataId,widgetId)             function
setScreen(content)                                function
setWaypoint(waypointStr)                          function
showScreen(bool)                                  function
unit                                              table
    [reference to self]
updateData(dataId,dataJson)                       function

  

 

Telemeter

r0.21.2

Spoiler
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{}"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
getDistance()                                     function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: -1.0
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "TelemeterUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 199
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 40.79
getMaxDistance()                                  function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 50.0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: ""
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

 

 

Warp Drive

r0.23.0

Spoiler
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"buttonMsg\":\"Activate Warp\",\"cellCount\":\"0 / 0\",\"destination\":\"Unknown\",\"distance\":0,\"elementId\":\"475249343\",\"errorMsg\":\"\",\"helperId\":\"warpdrive\",\"name\":\"Warp Drive l [529]\",\"type\":\"warpdrive\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e475249343"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "WarpDriveUnit"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 43117.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 529
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 31360.0
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 43117.0
getMaxRestorations()                              function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getRemainingRestorations()                        function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 3
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "warpdrive"
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

 

 

Weapon

r0.21.0

Spoiler
export                                            table
    [same functions]
getData()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "{\"elementId\":\"5341891\",\"helperId\":\"weapon\",\"name\":\"Extra small cannon xs [40]\",\"properties\":{\"ammoCount\":0,\"ammoMax\":0,\"ammoName\":\"\",\"ammoTypeId\":\"0\",\"cycleAnimationRemainingTime\":0.0,\"fireBlocked\":false,\"fireCounter\":0,\"fireReady\":false,\"hitProbability\":0.0,\"hitResult\":2,\"isBroken\":false,\"outOfZone\":true,\"repeatedFire\":false,\"weaponStatus\":0},\"staticProperties\":{\"baseDamage\":2000.0,\"cycleTime\":2.0,\"magazineVolume\":30.0,\"optimalAimingCone\":10.0,\"optimalDistance\":5000.0,\"optimalTracking\":20.0,\"reloadTime\":5.0,\"size\":\"xs\",\"unloadTime\":2.0},\"targetConstruct\":{\"constructId\":\"0\"},\"type\":\"weapon\"}\n"
getDataId()                                       function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "e5341891"
getElementClass()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "WeaponCannonExtraSmall"
getHitPoints()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 299.0
getId()                                           function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 40
getIntegrity()                                    function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 100.0
getMass()                                         function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 190.1
getMaxHitPoints()                                 function
    [pcall]                                       table
        1                                         boolean: true
        2                                         number: 299.0
getWidgetType()                                   function
    [pcall]                                       table
        1                                         boolean: true
        2                                         string: "weapon"
hide()                                            function
load()                                            function
show()                                            function
unit                                              table
    [reference to self]

 

Link to comment
Share on other sites

Unofficial Lua changelog

r0.23.0

Changes since r0.22.4:

  • All elements
    • New functions: getMaxRestorations(), getRemainingRestorations().
  • Anti-Gravity Generator
    • setBaseAltitude(altitude) no longer works inside the system flush() event.
  • Container (Fuel and Item)
    • New event: storageAcquired().
    • New functions: acquireStorage(), getItemsList(), getItemsVolume(), getMaxVolume().
  • Control unit
    • New function: getMasterPlayerRelativeOrientation().
    • Restored function: setupControlMasterModeProperties(controlMasterModeId,displayName).
  • Core
    • New functions: getElementIndustryStatus(localId), getSchematicInfo(schematicId).
  • Emitter and Receiver
    • Range increased to 1000 m.
  • Industry
    • New functions: getCurrentSchematic(), setCurrentSchematic(id).
  • Light
    • New functions: getRGBColor(), setRGBColor(r,g,b).
  • System
    • New event: inputText(text).
    • New functions: getFov(), getScreenHeight(), getScreenWidth(), getWaypointFromPlayerPos(), setWaypoint(waypointStr).
  • Warp drive
    • Removed function: activateWarp().

r0.22.4

Changes since r0.22.0:

  • Core
    • New functions: getElementPositionById(localId), getElementRotationById(localId), getElementTagsById(localId).
  • Other
    • global.lua is now inside game.ung and cannot be edited by players.
    • Editing existing files in Game/data/lua should no longer trigger the EQU8 anti-cheat.

r0.22.0

Changes since r0.21.3:

  • PVP radar
    • New functions:  getConstructName(id), getConstructPos(id), getConstructSize(id), getConstructType(id), getEntries(), getRange(), hasMatchingTransponder(id). The getConstruct* functions return "unreachable" or { 0, 0, 0 }, even for construct information that's available in getData().
    • New events: enter(id), leave(id).

r0.21.3

Changes since r0.21.2:

  • Other
    • package.loadlib has been disabled.

r0.21.2

Changes since r0.20.0:

  • Anti-Gravity Generator
    • New function: getBaseAltitude().
  • PVP radar
    • getData() no longer returns construct positions.
  • Other
    • pcall and xpcall can no longer be used to avoid the CPU instruction limit.
Edited by hdparm
Updated for v0.23.0
Link to comment
Share on other sites

  • 2 weeks later...

There is a new element I've never seen before (on a ship with a small space engine but its NOT the small engine): 
Element class: SpaceEngineSmallGroup
getFuelRate : function: 000001AEB273EEA0
getSignalIn : function: 000001AEB273EC00
toggle : function: 000001AFD57776A0
isOutOfFuel : function: 000001AEB273EBD0
getObstructionFactor : function: 000001AEB273F2C0
getDataId : function: 000001AFD576FF00
getMass : function: 000001AFD57716D0
activate : function: 000001AFD5771E20
unit : table: 000001AEF8256710
distance : function: 000001AEB273EDE0
setThrust : function: 000001AFD5777580
getMaxThrust : function: 000001AFD57777F0
getMinThrust : function: 000001AFD57794A0
getIntegrity : function: 000001AFD5770260
show : function: 000001AFD576FC30
hide : function: 000001AFD576FE70
torqueAxis : function: 000001AEB273F200
getThrust : function: 000001AEB273F110
getData : function: 000001AFD5770110
load : function: 000001AEB273F230
getMaxHitPoints : function: 000001AFD57702F0
setSignalIn : function: 000001AEB273F1D0
getFuelConsumption : function: 000001AEB273F1A0
setTags : function: 000001AEB273ED50
hasBrokenFuelTank : function: 000001AEB273F3E0
getElementClass : function: 000001AFD57718B0
getT50 : function: 000001AEB273EE40
export : table: 000001AEF82561D0
getTags : function: 000001AEB273F170
getState : function: 000001AFD5777430
isObstructed : function: 000001AEB273F140
getFuelRateEfficiency : function: 000001AEB273F380
thrustAxis : function: 000001AEB273F320
getHitPoints : function: 000001AFD5770290
getId : function: 000001AFD5771640
getWidgetType : function: 000001AFD5770590
getCurrentFuelRate : function: 000001AEB273ED20
getMaxThrustEfficiency : function: 000001AFD5779D40
getMaxThrustBase : function: 000001AFD57777C0
deactivate : function: 000001AFD5777E50
I'm guessing this is an aggregate of all space engines (my setup had only one). Sadly, it disappears if there is no link to the engine.

Link to comment
Share on other sites

Just downloaded DU and unfortunately it looks like they removed the 'C:\ProgramData\Dual Universe\Game\documentation' directory. Can't find the codex in the game files to read any of the Lua API so glad that I was able to find this post detailing that. Would be annoying to have to rely on the game being up and running to look at the Lua documentation.

Link to comment
Share on other sites

  • 2 weeks later...

I'm new to lua and struggling with the syntax a bit. How does one go about reading the response table from a vec3 in DU?

for example, I'd like to know the r value of a lights color...

I used this post to set the value of rgbColor and lua documentation said the  vec3 is returned as vec3(x,y,z) 

I am fairly familiar with C# and VB.net and automate CAD software for a living,  my limited experience outside my hyper focused skillset is really showing, so I'm sorry if this seems like a dumb question.

 

example of code I've tried:

 

local rgbColor = vec3(light.getRGBColor())

local r = rgbColor[x]

system.print(r)

 

Link to comment
Share on other sites

@KuntChopsMcFrontButt Try this:

local rgbColor = vec3(light.getRGBColor())
local r = rgbColor.x -- rgbColor["x"] would also work
system.print(r)

But, you don't really need vec3 here. When the codex says "vec3", it means an array-like table with 3 elements, not a cpml.vec3 instance. This should also work:

local rgbColor = light.getRGBColor()
local r = rgbColor[1]
system.print(r)

 

Link to comment
Share on other sites

16 hours ago, hdparm said:

@KuntChopsMcFrontButt Try this:


local rgbColor = vec3(light.getRGBColor())
local r = rgbColor.x -- rgbColor["x"] would also work
system.print(r)

But, you don't really need vec3 here. When the codex says "vec3", it means an array-like table with 3 elements, not a cpml.vec3 instance. This should also work:


local rgbColor = light.getRGBColor()
local r = rgbColor[1]
system.print(r)

 


 
local rgbColor = vec3(light.getRGBColor())
local r = math.floor(rgbColor.x)
system.print(r)

I wound up stumbling on a bit of code for coordinates in an autopilot script that I adapted last night after digging in some autopilot scripts,
 turns out the math.floor() is needed when getting an RGB value as well. 
I struggled with making rainbow disco lights more than I should have lol, but it was a good exercise in learning the lua syntax.

 

cheers!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...