...
ActivatePassiveDroneAbilities()
Activates all drones with passive abilities.
...
AddCargo(containerID, ware, amount)
Adds the specified amount of the ware to the object.
...
AddInventory(entityID, ware, amount)
Adds the specified amount of the ware to the inventory of the entity.
...
AddKnownItem(library, item)
Adds the item to the specified library, if not yet added.
...
AddLogbookEntry(category, text [, interaction [, interactioncomponent]])
Adds text as a logbook entry in the specified category.
...
AddUnits(defensibleID, unitMacro, amount, unavailable)
Adds or removes the specified amount of units to/from the defensible. Units can be flagged unavailable.
...
string = ConvertTimeString(time [, format [, separators [, accuracy]]])
Formats a time value in seconmds into a string with a format, seperators and accuracy.
Possible formats:
- %s: All seconds
- %S: Seconds (00-59)
- %m: All minutes
- %M: Minutes (00-59)
- %h: All hours
- %H: Hours (00-23)
- %d: All days
- %%: A % sign
- %T: Use time format from TextDB, showing days only if time > 1d
Separators: Use thousand separators, only applies to %s, %m, %h, %d
Accuracy: Number of fractional digits. Only applies to %s and %S. Default is 0. Use -1 for automatic display. A non-zero value is not compatible with separators.
...
extensionSettingsTable = GetAllExtensionSettings()
Returns the settings for all registered extensions.
Code Block | ||||
---|---|---|---|---|
| ||||
extensionSettingsTable = {
[extensionid] = {
enabled = is extension enabled?,
sync = is extension synced?
},
...
} |
...
upgradeArray = GetAllMacroUpgrades(macro, sequence, stage, buildlimit)
Returns information about all upgrades on a specified macro, with options to limit the information to parts of the buildplan.
...
title | upgradeArray |
---|---|
collapse | true |
...
Note |
---|
This list can contain details about planned functions in yet unreleased versions. Please understand that the mentioning of such a version in this list does not imply that the version will become available in the near future (it's not even a confirmation that the version will be released at all). It's merely to be understood as a heads-up information of what a following version might provide and ensures that if that version is released, the documentation is already up to date at the time of the release. Also note that any information provided here for not yet released versions can change at any time before the version is released without any further notice (that includes even the removal of a function which was mentioned here before the release of a particular version).
|
Version | Function | Note | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deprecated in 4.21 Beta 1 (VR: 4.20) | DEPRECATED AbilityMenuClosed() Notifies the system that the ability menu was closed. | ||||||||||||||||||||||
added in 4.00 RC 2 | AbilityMenuOpened() Function which needs to be called, if the ability menu is opened. | ||||||||||||||||||||||
AbortMission(missionID) Aborts the specified mission. | |||||||||||||||||||||||
ActivateDroneAbility(droneSlotNumber) Activates the drone in the given drone slot number (valid range: 1-8). | |||||||||||||||||||||||
ActivatePassiveDroneAbilities() | |||||||||||||||||||||||
changed in 4.00 Beta 4 | addedamount = AddAmmo(defensible, ammomacroname, amount, [checkonly]) Tries to add the specified amount of the ammo to the defensible. Returns actually added amount. | Added "checkonly" parameter in 4.00 Beta 4 | |||||||||||||||||||||
AddCargo(containerID, ware, amount) | |||||||||||||||||||||||
changed in 4.00 Beta 4 | AddInventory(entityID, ware, amount[, crafting]) | Added "crafting" parameter in 4.00 Beta 4 | |||||||||||||||||||||
AddKnownItem(library, item) | |||||||||||||||||||||||
AddLicence(faction, licencetype, licencefaction) Adds the licence of the specified type of the licencefaction to the faction | |||||||||||||||||||||||
AddLogbookEntry(category, text [, interaction [, interactioncomponent]]) | |||||||||||||||||||||||
transferredamount = AddMoney(entityID, amount) Adds or removes the specified amount to the entity account | |||||||||||||||||||||||
AddPlayerDrone(macro, amount) Adds specified macro as drones to the playership. | |||||||||||||||||||||||
tradeID = AddTradeToShipQueue(tradeID, containerID, amount) Adds the specified trade to the queue of the container. Returns ID of the trade on the queue. | |||||||||||||||||||||||
changed in 4.00 RC 2 | AddUITriggeredEvent(screen, control[, screenparam]) Triggers MD/AI event condition <event_ui_triggered />. | optional screenparam parameter added in 4.00 RC 2 | |||||||||||||||||||||
AddUnits(defensibleID, unitMacro, amount, unavailable) | |||||||||||||||||||||||
string = AdjustMultilineString(string) Helper function to fix unsupported line breaks. | |||||||||||||||||||||||
AIRangeUpdated(controllableID, entityID) Triggers the object signal "range_setting_updated" on all subordinates of the controllable. | |||||||||||||||||||||||
AreAttackersInWarningRange | |||||||||||||||||||||||
AreObserversInWarningRange | |||||||||||||||||||||||
AreSliderValuesFixed | |||||||||||||||||||||||
AttackEnemySettingChanged(defencenpcID) Triggers the object signal "update config" on defence npc | |||||||||||||||||||||||
hullfraction = CalculateBuildSlotHullFraction(componentID, sequence, stage) Calculates the fraction of hull for an individual build slot of the component. | |||||||||||||||||||||||
hullfraction = CalculateTotalHullFraction(componentID) Calculates the fraction of hull of the component. | |||||||||||||||||||||||
bool = CanBeSubordinateOf(controllableID, othercontrollableID) Checks whether the controllable can be subordiante of the othercontrollable. | |||||||||||||||||||||||
success = CancelConversation() Cancels the current conversation, e.g. when closing a conversation menu. | |||||||||||||||||||||||
bool, error = CanTradeWith(tradeID, containerID, amount) Checks if trade is possible for the specified container. | It may be necessary to call SetVirtualCargoMode on containerID first, if the container has a shopping queue. | ||||||||||||||||||||||
bool = CanViewLiveData(objectID or zoneID) Checks whether live data is available for the specified object or zone. | |||||||||||||||||||||||
bool = CheckInputProfileRegression() Checks whether inputmap.xml version regressed in the past. | |||||||||||||||||||||||
bool = CheckSuitableTransportType(containerID, ware) Checks whether the specified container can transport the ware. | |||||||||||||||||||||||
added in 4.00 Beta 3 | ClearContainerStockLimitOverride(containerID, ware) Remove any defined stock limit for a particular ware at a ship/station. | ||||||||||||||||||||||
ClearContainerWarePriceOverride(destructibleID [, ware] [, buysellswitch]) Removes custom prices from the container of the destructible. Optional only for the specified ware and only buy/sell prices. | |||||||||||||||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED ClearErrors() Clears the internal error log. | ||||||||||||||||||||||
ClearLogbook([keepnumentries [, category]]) Removes all entries from the logbook. Optional a number of entries can be preserved and only affect a specified category. | |||||||||||||||||||||||
ClearTradeQueue(containerID) Clear the trade queue of the specified container. | Clearing the trade queue will not happen instantaneously, especially if a trade is of the queue is already in progress. | ||||||||||||||||||||||
CloseMenusUponMouseClick | |||||||||||||||||||||||
bool = CompareJumpRoute(numgates, numjumps, othernumgates, othernumjumps) Compare the length of one jump route with another. Both are specified with the amount of gate transitions and jumps they include. | |||||||||||||||||||||||
64-bit int = ConvertIDTo64Bit(luaID) Converts a luaID to a 64-bit integer, e.g.to interface with an FFI function. | |||||||||||||||||||||||
string = ConvertIntegerString(number [, separators [, accuracy [, notrailingspaces [, colorprefix]]]]) Formats number into a string with a given accuracy, thousand seperators, trailing spaces to offset SI prefixes and colored SI prefixes. | |||||||||||||||||||||||
string = ConvertMissionLevelString(difficulty) Converts the difficulty of a mission into a string. | |||||||||||||||||||||||
added in 4.00 Beta 1 | string = ConvertMissionTypeString(missiontype) Converts the type of a mission into a string. | ||||||||||||||||||||||
string = ConvertMoneyString(money [,showcents [, separators [, accuracy [, notrailingspaces [, colorprefix]]]]]) Formats a money value into a string with a given accuracy, thousand seperators, credit cents, trailing spaces to offset SI prefixes and colored SI prefixes. | |||||||||||||||||||||||
64-bit int = ConvertStringTo64Bit(64BitStringID) Converts a string representing a 64-bit value to a 64-bit integer. | |||||||||||||||||||||||
luaID = ConvertStringToLuaID(64BitStringID) Converts a string representing a 64-bit value to a luaID, e.g. to pass it to MD/AI as a component. | |||||||||||||||||||||||
changed in 4.00 Beta 1 | string = ConvertTimeString(time [, format [, separators [, precision]]]) Possible specifiers in the format string:
Default format is "%T" if no format string is provided. Separators: Use thousand separators, only applies to %s, %m, %h, %d Precision: Number of fractional digits. Only applies to %s, %S, and %T. Default is 0. Use -1 for automatic display. A value of -1 is not compatible with separators. (Can be overridden by .# notation in format string) | precision support for %s, %S, and %T were added in 4.00 Beta 1 | |||||||||||||||||||||
CreateButton | |||||||||||||||||||||||
added in 4.00 Beta 2 | descriptor = CreateCheckBox(checkboxDescription) | ||||||||||||||||||||||
CreateCutsceneDescriptor | |||||||||||||||||||||||
CreateEditBox | |||||||||||||||||||||||
CreateFontString | |||||||||||||||||||||||
added in 4.00 Beta 1 | descriptor = CreateGraph(graphDescription) | ||||||||||||||||||||||
CreateIcon | |||||||||||||||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED descriptor = CreateInteractionDescriptor(param1, param2) Creates an interaction descriptor with the specified parameters. | ||||||||||||||||||||||
added in 4.31 Beta 1 | interactionDescriptorID = CreateInteractionDescriptor2(param1, param2) Creates an interaction descriptor with the specified parameters and returns its ID. | ||||||||||||||||||||||
clusterID, objectID = CreateObjectInPresentationCluster(objectmacro [, backgroundmacro]) Creates the specified object in a new cluster with the optional background. | The cluster needs to be destroyed using DestroyPresentationCluster, when it is no longer needed. | ||||||||||||||||||||||
CreateProgressElement | |||||||||||||||||||||||
CreateRenderTarget | |||||||||||||||||||||||
CreateSink | |||||||||||||||||||||||
CreateSlider | |||||||||||||||||||||||
CreateSliderTableView | |||||||||||||||||||||||
CreateSliderView | |||||||||||||||||||||||
CreateSource | |||||||||||||||||||||||
changed in 4.21 Beta 1 (VR: 4.20) | CreateTable | optional argument alerteffectcolor added in 4.21 Beta 1 (VR: 4.20) | |||||||||||||||||||||
CreateTableView | |||||||||||||||||||||||
CreateThreeTableRenderTargetView | |||||||||||||||||||||||
CreateThreeTableView | |||||||||||||||||||||||
CreateTimer | |||||||||||||||||||||||
CreateTwoTableRenderTargetView | |||||||||||||||||||||||
CreateTwoTableSliderRenderTargetView | |||||||||||||||||||||||
CreateTwoTableSliderView | |||||||||||||||||||||||
CreateTwoTableView | |||||||||||||||||||||||
DeactivateView | |||||||||||||||||||||||
DebugError | |||||||||||||||||||||||
DebugProfileStart() Resets the profile timer. Call this function at the start of the section which you want to profile. | |||||||||||||||||||||||
timeInMs = DebugProfileStop() | |||||||||||||||||||||||
DestroyPresentationCluster(clusterID) Destroys a previously created cluster and everything inside it. | |||||||||||||||||||||||
DialogMenuHidden | |||||||||||||||||||||||
DialogMenuShown | |||||||||||||||||||||||
DisableMissionObjectiveBar | |||||||||||||||||||||||
DisplayView | |||||||||||||||||||||||
DumpAllMessages | |||||||||||||||||||||||
DumpAllMessageSinks | |||||||||||||||||||||||
DumpAllMessageSources | |||||||||||||||||||||||
EnableMissionObjectiveBar | |||||||||||||||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED EventmonitorInteractionHidden | ||||||||||||||||||||||
added in 4.31 Beta 1 | EventmonitorInteractionHidden2 | ||||||||||||||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED EventmonitorInteractionShown | ||||||||||||||||||||||
added in 4.31 Beta 1 | EventmonitorInteractionShown2 | ||||||||||||||||||||||
ExecuteDebugCommand | |||||||||||||||||||||||
text or nil = ExistsText(page, line) Returns text if it exists, nil otherwise. | |||||||||||||||||||||||
numgates, numjumps = FindJumpRoute(fromsectorID, tosectorID) Calculates the distance between two sectors in number of gate transitions and jumps needed. | |||||||||||||||||||||||
ForceAnarkUpdate | |||||||||||||||||||||||
... = GetAccountData(entityID, ...) Returns properties of the account of the specified entity. Possible properties are: "money", "minmoney", "maxmoney", "isdummy". | |||||||||||||||||||||||
GetActionDetails | |||||||||||||||||||||||
GetActionInfo | |||||||||||||||||||||||
componentID or nil = GetActiveGuidanceMissionComponent() Returns the component with the active mission guidance if any. | |||||||||||||||||||||||
GetActiveMission | |||||||||||||||||||||||
string = GetAdapterOption() Returns the name of the current adapter. | |||||||||||||||||||||||
int = GetAimAssistOption() Get current setting of the aim assist option. | |||||||||||||||||||||||
GetAlignment | |||||||||||||||||||||||
componentIDArray = GetAllCommanders(controllableID) Returns the chain of commanders for the specified controllable. | |||||||||||||||||||||||
extensionSettingsTable = GetAllExtensionSettings()
| |||||||||||||||||||||||
upgradeArray = GetAllMacroUpgrades(macro, sequence, stage, buildlimit)
| |||||||||||||||||||||||
stringArray = GetAllStatIDs() Returns the ids of all statistic properties. | |||||||||||||||||||||||
upgradeTable = GetAllUpgrades(destructibleID [, buildlimit] [, tag])
| |||||||||||||||||||||||
weaponTable = GetAllWeapons(destructibleID)
| |||||||||||||||||||||||
wareKeyTable = GetAmmoCountAfterShoppingList(containerID)
| Call SetVirtualCargoMode on containerID first, otherwise result will be empty. | ||||||||||||||||||||||
int = GetAntiAliasModeOption() Returns the current anti alias mode setting. | |||||||||||||||||||||||
aaModesArray = GetAntiAliasModes() | |||||||||||||||||||||||
componentID or nil = GetAutoPilotTarget() Returns the target of the auto pilot, if any. | |||||||||||||||||||||||
bool = GetAutorollOption() Returns current autoroll setting. | |||||||||||||||||||||||
bool = GetAutosaveOption() Returns current autosave setting. | |||||||||||||||||||||||
fontsize = GetBestFontSize(fontname, fontsize) Returns the best matching font size available for the specified font and size. | |||||||||||||||||||||||
bonusContentArray = GetBonusContentData()
| |||||||||||||||||||||||
bool = GetBoostToggleOption() Returns the current boost toggle setting. | |||||||||||||||||||||||
... = GetBudgetData(entityID, ...) Returns properties of the budget of the specified entity. Possible properties are: "min", "max", "responsibility". | |||||||||||||||||||||||
componentID or nil = GetBuildAnchor(containerID or buildmoduleID) | |||||||||||||||||||||||
builderMacrosArray = GetBuilderMacros(containerID or buildmoduleID)
| |||||||||||||||||||||||
method = GetBuildProductionMethod(containerID or buildmoduleID, macro) Returns the production method used by the specified container or buildmodule to produce macro. | |||||||||||||||||||||||
duration = GetBuildSlotDuration(macro or componentID, sequence, stage) | |||||||||||||||||||||||
resourceTable = GetBuildSlotResources(containerID or buildmoduleID, macro or componentID, sequence, stage, upgradePlanArray)
| |||||||||||||||||||||||
moduleArray = GetBuildStageModules(macro or componentID, sequence, stage)
| |||||||||||||||||||||||
upgradeTable = GetBuildStageUpgrades(containerID, sequence, stage [, buildlimit] [, tags])
| |||||||||||||||||||||||
buildTreeTable = GetBuildTree(macro or componentID)
| |||||||||||||||||||||||
GetButtonColor | |||||||||||||||||||||||
GetButtonFont | |||||||||||||||||||||||
GetButtonHotkeyDetails | |||||||||||||||||||||||
GetButtonIcon | |||||||||||||||||||||||
GetButtonIcon2 | |||||||||||||||||||||||
GetButtonIcon2Color | |||||||||||||||||||||||
GetButtonIcon2Offset | |||||||||||||||||||||||
GetButtonIcon2Size | |||||||||||||||||||||||
GetButtonIconColor | |||||||||||||||||||||||
GetButtonIconOffset | |||||||||||||||||||||||
GetButtonIconSize | |||||||||||||||||||||||
GetButtonSwapIcon | |||||||||||||||||||||||
GetButtonSwapIcon2 | |||||||||||||||||||||||
GetButtonText | |||||||||||||||||||||||
GetButtonTextAlignment | |||||||||||||||||||||||
GetButtonTextColor | |||||||||||||||||||||||
GetButtonTextOffset | |||||||||||||||||||||||
bool = GetCaptureHQOption() Returns current capture hq setting. | |||||||||||||||||||||||
wareKeyTable = GetCargoAfterShoppingList(containerID)
| Call SetVirtualCargoMode on containerID first, otherwise result will be empty. | ||||||||||||||||||||||
GetCellContent | |||||||||||||||||||||||
GetCellText | |||||||||||||||||||||||
GetChildren | |||||||||||||||||||||||
GetClosestAttackerDistance | |||||||||||||||||||||||
GetClosestHighwaySection | |||||||||||||||||||||||
GetClosestObserverDistance | |||||||||||||||||||||||
componentIDArray = GetClusters([showonmap]) Returns an array of all player-known clusters. | |||||||||||||||||||||||
changed in 4.10 Beta 1 | collectableDataTable = GetCollectableData(collectableID)
| shieldrestore value changed to return a floating point number (rather than an integer number) in 4.10 Beta 1 | |||||||||||||||||||||
bool = GetCollisionAvoidanceAssistOption() Returns current collision avoidance assist option. | |||||||||||||||||||||||
GetColor | |||||||||||||||||||||||
commanderID or nil = GetCommander(controllableID) | |||||||||||||||||||||||
entityID or nil = GetCommanderEntity(controllableID) Returns commanding entity of specified controllable, if any. | |||||||||||||||||||||||
... changed in 3.60 Beta 3, 4.00 Beta 2, 4.00 Beta 3 and 4.00 Beta 5 | ... = GetComponentData(componentID, ...)
| ||||||||||||||||||||||
removed 3.50 Beta 3 | |||||||||||||||||||||||
name = GetComponentName( Container "tradewares" property added in 3.60 Beta 3 | |||||||||||||||||||||||
removed 3.50 Beta 3 | |||||||||||||||||||||||
name = GetComponentName(componentID, fontname, fontsize, availablewidth[, omitfaction[, forcewidth]]) Returns the name of the component. Iff the component is an object the name is formatted accordingly to the given parameters. | |||||||||||||||||||||||
bool = GetConfineMouseOption() Returns the current confine mouse option. | |||||||||||||||||||||||
objectIDArray = GetContainedObjectsByOwner(faction, [space]) Returns an array of objects owned by the specified faction. Optionally results can be confined to a specified space. | |||||||||||||||||||||||
shipIDArray = GetContainedShips([space], [showonmap]) Returns an array of ships in the specified space or the galaxy. | |||||||||||||||||||||||
shipIDArray = GetContainedShipsByOwner(faction, [space]) | |||||||||||||||||||||||
stationIDArray = GetContainedStations([space], [showonmap], [includeconstruction]) Returns an array of stations in the specified space or the galaxy. | |||||||||||||||||||||||
stationIDArray = GetContainedStationsByOwner(faction, [space], [includeconstruction]) Returns an array of stations owned by the specified faction. Optionally results can be confined to a specified space. | |||||||||||||||||||||||
price = GetContainerWarePrice(containerID or buildmoduleID, ware, buysellswitch) Returns the price the specified container buys/sells the ware. | |||||||||||||||||||||||
contextID or nil = GetContextByClass(componentID, classname [, includeself]) Returns the context of the specified class of the component. | |||||||||||||||||||||||
entityID or nil = GetControlEntity(controllableID, commandertype) Returns the control entity of the specified controllable of the given type. | |||||||||||||||||||||||
GetControllerInfo | |||||||||||||||||||||||
bool = GetCrashReportOption() Returns the current crash report setting. | |||||||||||||||||||||||
time = GetCurRealTime() Returns the real time since session start in seconds. | |||||||||||||||||||||||
Code Block | ||||
---|---|---|---|---|
| ||||
upgradePlanArray = {
[1] = {
[1] = upgradetype,
[2] = level
},
[2] = { ... }
} |
resourceTable = GetCurrentBuildSlotResources(containerID or buildmoduleID)
Returns the needed resources to build the current build slot under construction by this container or buildmodule.
mode, angle = GetControllerInfo()
Returns the current input mode ("mouseSteering"|"mouseCursor"|"gamepad"|"touch"|"joystick") and the joystick input angle (only reasonable in "touch", "joystick", or "gamepad" mode).
The angle value will be -1, if the joystick is in its safe area. Otherwise it returns the angle in radian [0..2π] (with 0 corresponding to the joystick pointing upwards - rotation is clockwise).
4.30 RC 2 (VR: 4.30 Hotfix 2): Added "joystick" as new possible input mode.
Returns the current crash report setting.
Returns the real time since session start in seconds.
sequence, stage, progress, upgradePlanArray = GetCurrentBuildSlot(containerID)
Returns information about the current build process of the specified container. Returns nil if not currently building.
Code Block | ||||
---|---|---|---|---|
| ||||
upgradePlanArray = {
[1] = {
[1] = upgradetype,
[2] = level
},
[2] = { ... }
} |
resourceTable = GetCurrentBuildSlotResources(containerID or buildmoduleID)
Returns the needed resources to build the current build slot under construction by this container or buildmodule.
Code Block | ||||
---|---|---|---|---|
| ||||
resourceTable = { [1] = { ware = ware id, name = ware name, cycle = amount, price = price }, [2] = { ... }, ..., totalprice = totalprice } |
DEPRECATED string = GetCurrentModuleName()
Returns the name of the current game module.
Returns the ingame time in seconds.
string|table = GetDate([format [,time]])
Returns a string or a table containing date and time, formatted according to the given string "format".
Refer to the Lua documentation about os.date() for details.
As of XR 4.30 RC 1 GetDate() supports only the following format specifiers:
Expand | ||
---|---|---|
| ||
|
Returns the current deadzone setting.
Returns information about the specified dialog option of the current active conversation.
text is the actual dialog menu button text
isSelectable indicates whether the option can be selected
isImmediate indicates whether the option is flagged as an immediate option
shortcutKey specifies the assigned shortcut key associated with the option
RESERVED is an internal value not to be used
mouseOverText is the text to display when mousing over the specified option
Returns the current difficulty setting.
Returns the current distortion setting.
Returns the drone commander of the specified drone, if any.
Returns an array of all drones of that ship.
number = GetEffectDistanceOption()
Returns the current effect distance setting.
Returns an array with the macro names of all efficiency upgrades connected to the specified destructible.
DEPRECATED bool = GetEMCutsceneOption()
Returns false
Returns properties of the specified component. Possible properties are: "name", "icon"
severity = GetErrorSeverity(logMessageIndex)
Returns the severity of the specified log message.
severity | level |
---|---|
info | 1 |
error | 2 |
panic | 5 |
extensionTable = GetExtensionList()
Returns information about all extensions.
Code Block | ||||
---|---|---|---|---|
| ||||
extensionTable = {
[1] = {
id = extension id,
index = extension index,
name = extension name,
desc = extension description,
author = extension author,
date = extension date,
location = extension location,
version = extension version,
enabled = extension enabled,
sync = extension sync,
personal = extension personal,
isworkshop = is extension in workshop,
error = extension error ID, if any,
errortext = extension error text, if any,
warning = workshop update warning, if any,
warningtext = workshop update warning, if any,
dependencies = {
id = dependency id,
name = dependency name,
version = dependency version
}
}
} |
Returns the update warning text of a workshop extension, if any.
Returns current fov setting.
Returns amount of free cargo space for the specified ware after the trade queue will be resolved.
Returns amount for free unit storage space for the specified container.
Returns the current fullscreen detailmonitor setting.
Returns the current fullscreen and borderless setting.
Returns the current gamepad mode setting.
Returns the current gamma setting.
Returns an array of gates in the specified space.
Returns the current gfx quality setting.
Returns the current global extension sync setting.
Returns the current glow setting.
licenceTable = GetHeldLicences(faction)
Returns a table with information about all held licences of the specified faction.
Code Block | ||||
---|---|---|---|---|
| ||||
licenceTable = { [1] = { id = licence id, type = licence type, name = licence name, icon = licence icon, price = licence price, minrelation = minimum relation required, faction = factionid }, [2] = { ... } } |
Returns the defined x, y coordinates of the specified position in percent with (0, 0) being in the upper left corner. Hint positions can be defined in parameters.xml.
productionColor, buildColor, storageColor, radarColor, dronedockColor, efficiencyColor, defenceColor, playerColor, friendColor, enemyColor, missionColor = GetHoloMapColors()
Returns the colors defined for various holomap items in parameters.xml.
Code Block | ||||
---|---|---|---|---|
| ||||
Color = { r = red (0-255), g = green (0-255), b = blue (0-255), a = alpha (0-100) } |
wareKeyTable = GetIncomingRemoteWares(wareType)
Returns information about incoming remote transport wares.
Code Block | ||||
---|---|---|---|---|
| ||||
wareKeyTable = { [ware] = amount, ... } |
actionTable = GetInputActionMap()
Returns the current input actions mapped.
Code Block | ||||
---|---|---|---|---|
| ||||
actionTable = { [ActionID] = { [1] = { [1] = InputID Source, [2] = InputID Code, [3] = InputID Signum }, [2] = { ... } }, [ActionID] = { ... } } |
inputProfileTable = GetInputProfiles()
Returns information about the current input profiles.
Code Block | ||||
---|---|---|---|---|
| ||||
inputProfileTable = { [1] = { id = profile ID, version = profile version, filename = filename, personal = is file in personal folder?, name = profile name, customname = profile custom name }, [2] = { ... } } |
rangeTable = GetInputRangeMap()
Returns the current input ranges mapped.
Code Block | ||||
---|---|---|---|---|
| ||||
rangeTable = { [RangeID] = { [1] = { [1] = InputID Source, [2] = InputID Code, [3] = InputID Signum }, [2] = { ... } }, [RangeID] = { ... } } |
stateTable = GetInputStateMap()
Returns the current input states mapped.
Code Block | ||||
---|---|---|---|---|
| ||||
stateTable = { [StateID] = { [1] = { [1] = InputID Source, [2] = InputID Code, [3] = InputID Signum }, [2] = { ... } }, [StateID] = { ... } } |
GetInteractiveObject
wareTable = GetInventory(entityID)
Returns information about the wares held in the inventory of specified entity.
Code Block | ||||
---|---|---|---|---|
| ||||
wareTable = { [ware1] = { name = ware name amount = ware amount price = ware price }, [ware2] = { ... } } |
bool = GetInversionSetting(rangeid)
Returns the current inversion setting for the specified input range.
joystickTable = GetJoysticksOption()
Returns information about currently connected joysticks.
Code Block | ||||
---|---|---|---|---|
| ||||
joystickTable = {
[1] = {
name = joystick name,
guid = joystick guid
},
[2] = { ... }
} |
jumpbeaconIDArray = GetJumpBeacons(zoneID, [showonmap])
Returns an array of jumpbeacons in the specified zone.
Returns the current legacy main menu setting.
Returns the current legacy shaders setting.
libraryTable = GetLibrary(library)
Returns information about the items in the specified library.
Code Block | ||||
---|---|---|---|---|
| ||||
libraryTable = { [1] = { id = item id, name = item name, icon = item icon [parent = item parent] [relation = player relation] }, [2] = { ... } } |
entryTable = GetLibraryEntry(library, itemid)
Returns detailed information about the specified library entry.
Code Block | ||||
---|---|---|---|---|
| ||||
entryTable = { name = info name, description = info description, icon = info icon, image = info image, video = info video [race = npc race, faction = npc faction] [hull = object hull, maxspeed = object maxspeed, shield = object shield, jumpdrive = object has jumpdrive?, storagecapacity = storage capacity, storagetags = storage tags, storagenames = storage names, unitcapacity = unit capacity, productions = { [1] = { [1] = { id = product id, name = product name, cycle = product cycle time, amount = product amount }, [2] = { ... } }, [2] = { ... } }, weapons = { [1] = { class = weapon / missile, id = weapon id, name = weapon name }, [2] = { ... } }, upgrades = { [1] = { upgrade = upgrade type, name = upgrade name, total = upgrade total amount }, [2] = { ... } }] [primaryrace = faction primaryrace] [avgprice = ware average price, volume = ware volume, transporttype = ware transport type, methods = { [1] = method, [2] = ... }] [range = weapon range, dps = weapon dps] [speed = missile speed, acceleration = missile acceleration, damage = missile damage] [hull = shieldgen hull, shield = shieldgen shield] [hull = turret hull, range = turret range, dps = turret dps, rotation = turret rotation speed] } |
Returns the size of the specified library.
Returns the name of the key assigned to the specified input action, state or range.
Returns the name of the specified keycode.
Returns the current
Returns the current mouse position (nil, if the mouse is not over the current environment).
Returns the current lod setting.
logbookTable = GetLogbook(start, count [, category])
Returns logbook entries in the specified range, optionally filtered by category.
Code Block | ||||
---|---|---|---|---|
| ||||
logbookTable = { [1] = { text = log text, time = timestamp, category = log category, interaction = log interaction type, interactioncomponent = log interaction component, dependent on type [2] = ... } |
Returns the needed resources to build the specified macro build slot.
Code Block | ||||
---|---|---|---|---|
| ||||
resourceTable = { [1] = { ware = ware id, name = ware name, cycle = amount, price = price }, [2] = { ... }, ..., totalprice = totalprice } |
changed in 4.00 RC 1
changed in 4.22 Beta 2 (VR: 4.22)
Returns properties of the specified macro. Possible properties are:
"name", "icon", "efficiencyfactor", "efficiencybonus", "ware", "primarypurpose", "primarypurposename", "storagecapacity", "storagetags"
Returns the capacity of unit storage on the specified macro build slot.
Returns an array of , "storagenames", "scanlevel"
"scanlevel" property added in 4.00 RC 1
as of 4.00 RC 1 "storagetags" no longer returns "fuel", if the queried object contains another storage type as well
"storagenames" property added in 4.22 Beta 2 (VR: 4.22)
Returns the capacity of unit storage on the specified macro build slot.
Returns an array of joysticks currently mapped for input. Indices refer to the return value of GetJoysticksOption().
Returns the maximum length of the specified text which can fit in the given width in this font.
Returns the parameters the current menu was opened with.
Returns all unit macros the specified macro can use to mine, if any.
updated in 4.31 Beta 1
Returns details of the specified mission.
4.31 Beta 1: removed fontname, fontsize, and textwidth parameters
Returns details of the specified mission's objective.
Returns details about the mission offer at the specified location.
updated in 4.10 Beta 5
updated in 4.31 Beta 1
Returns details about the specified mission offer.
4.31 Beta 1: removed fontname, fontsize, and textwidth parameters
Returns the module type of the specified destructible.
Returns the needed resources of the specified buildmodule.
Code Block | ||||
---|---|---|---|---|
| ||||
resourceTable = { [1] = { ware = ware id, name = ware name, cycle = amount, price = price }, [2] = { ... }, ..., totalprice = totalprice } |
Returns the setting whether non-squad ships should be included in the trade offers menu.
Returns an array of all components included in the specified destructible of the specified class, which are updated in 4.31 Beta 1
Returns details about the specified notification (or nil, if there's an error or if the notification doesn't exist).
4.31 Beta 1:
Returns an array of all components included in the specified destructible of the specified class, which are not upgrades.
Return the blackboard variable "valueName" from the blackboard of the specified entity.
Returns an array of entities in the specified desctructible.
Returns an array of entities on stations in the specified sector within the given distance to the player.
Returns the number of incoming remote transport wares for specified type.
Returns the number of logbook entries, optionally filtered by the given category.
Returns the number of accecpted missions.
subsystemsTable = GetObjectRepairStatus(containerID)
Returns information of all damaged subsystems of the specified container.
Code Block | ||||
---|---|---|---|---|
| ||||
subsystemsTable = { shieldgens = { [1] = component id, [2] = ... }, engines = { [1] = component id, [2] = ... }, weapons = { [1] = component id, [2] = ... }, jumpdrives = { [1] = component id, [2] = ... } } |
licenceTable = GetOwnLicences(faction)
Returns information of the own licences the specified faction offers.
Code Block | ||||
---|---|---|---|---|
| ||||
licenceTable = { [1] = { id = licence id, type = licence type, name = licence name, icon = licence icon, price = licence price, minrelation = minimum relation required, issellable = can the licence be bought }, [2] = { ... } } |
Returns the setting to send personalized crash reports.
Returns an array of dockingbays that are platforms of the specified container.
Returns the current player mode.
Returns the ammo count of the specified macro on the player ship.
Returns the context of the player with the specified class, if any.
Returns the number of drone slots on the player ship.
playerDroneTable = GetPlayerDroneStorageData()
Returns information on the drones of the playership.
Code Block | ||||
---|---|---|---|---|
| ||||
playerDroneTable = { stored = total stored amount, [1] = { name = "Unit Name", amount = amountnumber, macro = Macro Name }, [2] = { ... } } |
Returns the player's enviroment object.
wareTable = GetPlayerInventory()
Returns information about the wares held in the inventory of specified entity.
Code Block | ||||
---|---|---|---|---|
| ||||
wareTable = { [ware1] = { name = ware name amount = ware amount price = ware price }, [ware2] = { ... } } |
Returns the amount of money in the player account.
Returns the macro of the cockpit currently installed in the player ship.
Returns the player primary ship.
Returns the macro of the player primary ship.
Returns the current player room.
Returns the current player target.
adapterTable = GetPossibleAdapters()
Returns information about all possible display adapters.
Code Block | ||||
---|---|---|---|---|
| ||||
adapterTable = { [1] = { name = adapter name, ordinal = adapter ordinal } } |
productionInfoTable = GetPossibleProducts(productionmoduleID)
Returns information about all possible products of the specified productionmodule.
Code Block | ||||
---|---|---|---|---|
| ||||
productionInfoTable = { [1] = { ware = product id, name = product name, cycletime = cycle duration, component = componentname resources = { [1] = { ware = resource id, name = resource name, cycle = cycle amount }, [2] = { ... } } }, [2] = { ... } } |
resolutionsTable = GetPossibleResolutions()
Returns information about all possible resolutions.
Code Block | ||||
---|---|---|---|---|
| ||||
resolutionsTable = { [1] = { height = resolution height in px, width = resolution width in px }, [2] = { ... } } |
Returns an array of entities on the specified dockingbay.
productionDataTable = GetProductionModuleData(productionmoduleID)
Returns information about the specified productionmodule.
Code Block | ||||
---|---|---|---|---|
| ||||
if production queue empty: productionDataTable = { state = "empty" } else: productionDataTable = { state = "ProductionState", cycletime = CycleTime (only if state == "producing", otherwise 0), cycleefficiency = cycle efficiency percentage (100% default), remainingcycletime = Time remaining for this cycle (only if state == "producing", otherwise 0), cycleprogress = percentage of current cycle progress (only if state = "producing", otherwise 0), remainingtime = time until out of resources (does not take limited storage space into account), products = { efficiency = product efficiency percentage (100% default), [1] = { ware = "wareid", name = "Ware Name", amount = storageamount, cycle = cycleamount, component = componentname }, [2] = { ... } }, presources = { ... }, -- primary resources, analogous to products table sresources = { ... }, -- secondary resources, analogous to products table estimated = is data filtered? } |
Returns an array with all productionmodules in the specified destructible.
Returns the name of the macro with biggest radar range included in the specified object.
Returns the current radar setting.
Returns the profit selling the specified ware from the given container at the given price will provide.
moduleArray = GetRegisteredModules()
Returns information about all registered modules.
Code Block | ||||
---|---|---|---|---|
| ||||
moduleArray = { id = module id, name = module name, description = gamestart description, if any, image = gamestart image, if any } |
resourceTable = GetRepairResources(containerID or buildmoduleID, repairdestructibleID, sequence, stage, buildlimit, targethullfraction)
Returns the resources needed to repair the specified repairdestructible by the given buildmodule to targethullfraction.
title | resourceTable |
---|---|
collapse | true |
added in 4.21 Beta 1 (VR: 4.20)
changed in 4.31 Beta 1
x, y, z = GetRelativeMousePosition(element[, sizedMousePoint])
Returns the x/y/z-mouse cursor coordinates relative to the the elements own coordinate space. The return value range is [0, 1] if sizedMousePoint is not specified or false, and [0, maxExtends] if sizedMousePoint is set to true. 0/0/0 corresponding to the upper left front edge of the element and maxExtends corresponding to boxWidth/boxHeight/boxDepth of the specified elemnt.
Note that the return value is undefined if the element is not pickable at all or wasn't hit by the mouse cursor in the current frame.
resourceTable = GetRepairResources(containerID or buildmoduleID, repairdestructibleID, sequence, stage, buildlimit, targethullfraction)
Returns the resources needed to repair the specified repairdestructible by the given buildmodule to targethullfraction.
Code Block | ||||
---|---|---|---|---|
| ||||
resourceTable = {
[1] = {
ware = ware id,
name = ware name,
cycle = amount,
price = price
},
[2] = { ... },
...,
totalprice = totalprice
} |
Returns the current resolution or the resolution set in config.xml.
Returns the current controller rumble intensity setting.
Returns the productionmodule in the same build slot as the specified entity.
savegameTable = GetSaveList()
Returns information about existing savegames.
Code Block | ||||
---|---|---|---|---|
| ||||
savegameTable = {
filename = save filename,
name = savegame name,
version = savegame version,
time = formatted save date,
rawtime = save date,
playtime = played time,
playername = player name,
location = save location,
money = player money,
difficulty = save difficulty,
mindifficulty = minimum difficulty the save was ever set to,
error = there was an error loading the savegame (non-localized error message in name property)
[invalidgameid = the save is from an invalid game],
[invalidversion = save version is higher than current game version],
invalidpatches = {
[1] = {
id = patch id,
name = patch name,
state = patch state,
requiredversion = version of this patch required by the savegame,
installedversion = version of this patch that is installed
},
[2] = { ... }
}
} |
Returns an array of sectors
savegameTable = GetSaveList2()
Returns available information about existing savegames.
Note to trigger population of the list GetSaveList2() returns, call the FFI function ReloadSaveList() first (or make sure it was called before at some point).
While this function returns the same data as GetSaveList(), it does only return the data which is available right now without blocking the game to wait for all savegame details having been processed. This allows for a more performant non-blocking approach than would be possible with GetSaveList().
Returns an array of sectors in the specified cluster.
Returns the current sensitivity setting for the specified input range.
Returns the current shader quality setting.
Returns the current shadow setting.
shoppingListTable = GetShoppingList(containerID)
Returns information about the trade queue of the specified container.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
shoppingListTable = { [1] = { id = trade id, name = ware name, amount = trade amount, minamount = trade minimum amount, price = trade price, isbuyoffer = is the container selling?, isselloffer = is the container buying?, averageprice = trade ware avg. price, [station = trade partner, stationname = trade partner's name, stationzone = trade partner's zone name, stationsectorid = trade partner's sector,] iswareexchange = is it a ware exchange trade?, ispassive = is container passive? }, [2] = { ... } } |
Returns the current soft shadow setting.
Returns the current global sound setting.
Returns the current ssao setting.
Returns an array of unit macros that are considered standard for the specified macro.
Returns properties of the specified statistic. Possible properties are: "exists", "value", "hidden", "displayname", "displayvalue"
Returns the current steering note setting.
Returns the current setting whether the playership should stop while a menu is open.
storageDataTable = GetStorageData(destructibleID)
Returns information about the storage capabilities in the specified destructible.
Code Block | ||||
---|---|---|---|---|
| ||||
storageDataTable = { modules = { [1] = storagemodule, [2] = ... } capacity = totalcapacityamount, stored = totalstoredamount, estimated = is data filtered?, [1] = { name = "cargobayname", capacity = capacityamount, stored = storedamount, consumption = totalconsumption, [1] = { ware = "wareid", name = "Ware Name", amount = amountnumber, volume = ware volume, consumption = consumption and production of this ware, }, [2] = ... }, [2] = ... } |
Returns an array with all subordinates of the specified controllable, optionally filtered by the commandertype.
Returns the current subtitle option.
UNSUPPORTED
GetTargetElementInfo
Returns the height in pixels of the specified text.
Returns the number of lines of the specified text with text with the given font and width .
Returns the width in pixels of the specified text.
UNSUPPORTED
Returns the value of the specified container, optionally for selling and in reference to the price list of the reference container.
tradeDataTable tradeData = GetTradeData(trade)
Returns information about the specified trade.
Code Block | ||||
---|---|---|---|---|
| ||||
tradeData = { id = trade id, ware = trade ware, name = ware name, amount = trade amount, desiredamount = trade desired amount, minamount = trade min amount, price = trade price, marketprice = price without discounts/commissions, quantityfactor = market price / average price, total price = price * amount, totalmarketprice = market price * amount, isbuyoffer = is it a buy offer?, isselloffer = is it a sell offer?, rebundle = rebundle units?, unbundle = unbundle units? [station = trade container, ] } |
QuitGame()
Sends a generic ObjectSignalledEvent on the specified component. These can be listened to by MD/AI script.
stationname = trade container name,
stationzone = trade container zone name,
stationzoneid = trade container zone,
stationsectorid = trade container sector,
isplayer = is trade container player owned,
pricemodifiers = {
[1] = {
name = modifier name,
level = modifier level,
amount = modifier amount,
expire = modifier expire time
},
[2] = { ... }
},
faction = trade container faction,]
expire = trade expire time
} |
tradeDataArray = GetTradeList([tradeship], [sortby], [indexbyid])
Returns an array of player known trades, optionally indexed by id strings.
Code Block | ||||
---|---|---|---|---|
| ||||
tradeDataArray = {
[1 or IDString] = {
id = trade id,
ware = trade ware,
name = ware name,
amount = trade amount,
desiredamount = trade desired amount,
minamount = trade min amount,
price = trade price,
marketprice = price without discounts/commissions,
quantityfactor = market price / average price,
total price = price * amount,
totalmarketprice = market price * amount,
isbuyoffer = is it a buy offer?,
isselloffer = is it a sell offer?,
rebundle = rebundle units?,
unbundle = unbundle units?
[station = trade container,
stationname = trade container name,
stationzone = trade container zone name,
stationzoneid = trade container zone,
stationsectorid = trade container sector,
isplayer = is trade container player owned,
pricemodifiers = {
[1] = {
name = modifier name,
level = modifier level,
amount = modifier amount,
expire = modifier expire time
},
[2] = { ... }
},
faction = trade container faction,]
expire = trade expire time
},
[2 or IDString] = { ... }
} |
restrictionsTable = GetTradeRestrictions(containerID)
Returns information about trade restictions for the specified container.
Code Block | ||||
---|---|---|---|---|
| ||||
restrictionsTable = {
faction = global restriction to trade with other factions,
overrrides = {
[ware] = bool,
...
}
} |
Returns an array of trades at the specified connection.
tradeShipData = GetTradeShipData(shipID)
Returns information about the specified ship related to trading.
Code Block | ||||
---|---|---|---|---|
| ||||
tradeShipData = {
shipid = shipID,
name = ship name,
cargo = {
ware = ware,
name = ware name,
amount = ware amount,
volume = ware volume
},
queue = {
[1] = {
id = trade id,
name = ware name,
amount = trade amount,
minamount = trade min amount,
price = trade price,
isbuyoffer = is the ship selling?,
isselloffer = is the ship buying?,
averageprice = trade ware avg. price,
[stationname = trade partner name,
stationsectorid = trade partner sector]
},
[2]= { ... }
},
cargocurrent = currently used cargo space,
cargomax = cargo capacity,
cargofree = free cargo capacity,
numtrips = number of planned trips
} |
tradeShipDataArray = GetTradeShipList()
Returns an array with information about ships related to trading.
Code Block | ||||
---|---|---|---|---|
| ||||
tradeShipDataArray = {
[1] = {
shipid = shipID,
name = ship name,
cargo = {
ware = ware,
name = ware name,
amount = ware amount,
volume = ware volume
},
queue = {
[1] = {
id = trade id,
name = ware name,
amount = trade amount,
minamount = trade min amount,
price = trade price,
isbuyoffer = is the ship selling?,
isselloffer = is the ship buying?,
averageprice = trade ware avg. price,
[stationname = trade partner name,
stationsectorid = trade partner sector]
},
[2]= { ... }
},
cargocurrent = currently used cargo space,
cargomax = cargo capacity,
cargofree = free cargo capacity,
numtrips = number of planned trips
},
[2] = { ... }
} |
Returns an array of unit macros suitable for transport of cargo for the specified macro.
x2d, y2d, z, onscreen, width, height = GetUIElementRectangleScreenPosition(posID, minRecSize, maxRecSize)
Retrieves the positioning information for the given target element in rectangle mode (only applicable in non-worldspace mode).
For the other return values, refer to GetUIElementScreenPosition().
Retrieves the positioning information for the given target element (only applicable in non-worldspace mode).
x2d and y2d are ranging from -viewWidth/2 (or -viewHeight/2) to +viewWidht/2 (or +viewHeight/2) with 0/0 being the center of the screen and -viewWidth/2|-viewHeight/2 being the lower left corner of the screen.
z is the position between the clipping planes ranging form 0 to 1.
onscreen indicates whether the elemnt is actually on- or off-screen.
Returns the relation of the player to the specified faction.
unitTable = GetUnitStorageData(defensibleID [, unitcategory] [, virtualammo][, excluderestricted])
Returns information about the units stored on the specified defensible. Optionally filtered by unit category.
Code Block | ||||
---|---|---|---|---|
| ||||
unitTable = {
capacity = capacityamount,
stored = storedamount,
[categorystored = storedamount of this category]
[1] = {
macro = "macroname",
name = "Unit Name",
amount = amountnumber,
unavailable = unavailablenumber,
},
[2] = { ... }
} |
If you want to use the virtualammo flag, call SetVirtualCargoMode first.
4.00 Beta 6: added excluderestricted parameter
resourceTable = GetUpgradesResources(containerID or buildmoduleID, upgradeDestructibleID, sequence, stage, buildlimit, upgradePlanArray)
Returns the needed resources to build the specified upgrades with this container or buildmodule.
Code Block | ||||
---|---|---|---|---|
| ||||
resourceTable = {
[1] = {
ware = ware id,
name = ware name,
cycle = amount,
price = price
},
[2] = { ... },
...,
totalprice = totalprice
} |
Code Block | ||||
---|---|---|---|---|
| ||||
upgradePlanArray = {
[1] = {
[1] = upgradetype,
[2] = level
},
[2] = { ... }
} |
Returns the current game version.
Returns the current view distance setting.
Returns the current volume setting of the specified type.
Returns the current vsync setting.
Returns the capacity of the specified container for the given ware. By default existing cargo is ignored.
Returns properties of the specified component. Possible properties are: "name", "shortname", "description", "icon", "avgprice", "minprice", "maxprice", "pricerange", "tags", "illegal", "inventory", "component",
"transport", "image", "video", "hasproductionmethod", "productionmethod", "products", "resources", "buyprice", "volatile", "gift", "allowdrop", "groupID", "groupName", "groupIcon", "isweaponmod", "isammo", "issinglecraft"
"allowdrop" property added in 4.00 Beta 1
"groupID" property added in 4.00 Beta 1
"groupName" property added in 4.00 Beta 1
"groupIcon" property added in 4.00 Beta 1
"isweaponmod" property added in 4.00 Beta 4
"isammo" property added in 4.00 Beta 4
"issinglecraft" property added in 4.00 Beta 5
tradeDataArray = GetWareExchangeTradeList(tradingshipID, tradedcontainerID [, sortby])
Returns information about possible ware exchange trade between the two trade partners.
Code Block | ||||
---|---|---|---|---|
| ||||
tradeDataArray = {
[1] = {
id = trade id,
ware = trade ware,
name = ware name,
amount = trade amount,
desiredamount = trade desired amount,
minamount = trade min amount,
price = trade price,
marketprice = price without discounts/commissions,
quantityfactor = market price / average price,
total price = price * amount,
totalmarketprice = market price * amount,
isbuyoffer = is it a buy offer?,
isselloffer = is it a sell offer?,
rebundle = rebundle units?,
unbundle = unbundle units?
[station = trade container,
stationname = trade container name,
stationzone = trade container zone name,
stationzoneid = trade container zone,
stationsectorid = trade container sector,
isplayer = is trade container player owned,
pricemodifiers = {
[1] = {
name = modifier name,
level = modifier level,
amount = modifier amount,
expire = modifier expire time
},
[2] = { ... }
},
faction = trade container faction,]
expire = trade expire time
},
[2] = { ... }
} |
Returns the production limit for the specified ware on the given container.
Returns an array of zones contained in the specified sector.
yieldTable = GetZoneYield(zoneID [, skipmaxyields])
Returns information about yields in the specified zone.
Code Block | ||||
---|---|---|---|---|
| ||||
yieldTable = {
[1] = {
ware = ware,
name = ware name,
amount = current yield,
max = max yield
},
[2] = { ... },
...,
snapshottime = time when data was taken, 0 if live.
} |
Checks whether the specified entity has all ingredients to craft the specified ware.
Returns whether the ship/station has an override for the stock limit of a particular ware defined.
Checks whether the specified ware has a price override on the given container.
Checks whether the specified faction holds the given licence of the licence faction.
Checks whether the specified space includes a shipyard.
HasSliderTwoScales
Checks whether the specified connection has the given tag.
Returns static variable to re-init the options menu after ui reload, e.g. on device lost.
Checks whether extension settings changed in this session.
Increases the specified statistic by the given value.
Installs the specified steam dlc.
Stops the current player ship computer line.
Checks whether the game has cheats enabled.
Checks whether the specified component is of the given class.
Checks whether the specified component is under construction.
Checks whether the specified component is operational.
Checks whether the given operational range of the specified container is sufficient to operate normally.
Checks whether the specified ship is allowed to dock at the given dockingbay.
Checks whether the specified faction is known to the player.
Check whether the gamepad is active.
Check whether the specified information of the given component is available to the player.
Checks whether the specified item is known in the given library.
Checks whether the specified macro is of the given class.
Checks whether the specified target element (identified via the posID) is obstructed against the player view.
If canBeObstructedByOwnComponent is set to true, then the target element can also be obstructed by elements on its own geometry (for example a target element on a capital ship would be obstructed by parts on the capital ship itself).
If ignoreCockpitObstruction is set to true, then the player cockpit geometry will not cause the target element to be determined as being obstructed. (defaults to true - which equals the behavior pre 4.20 Hotfix 1).
Checks whether the player is in first person mode.
Helper function to compare two luaIDs or 64-bit integer representing components.
Helper function to compare two luaIDs representing trades.
Checks whether saving is currently possible.
Checks whether steamworks are enabled.
Checks whether the specified component has a valid context.
Check whether the specified ware is illegal for the given licencefaction. Optionally checks against a specified police faction.
Ends the interact menu interaction.
Raises a lua event for the next input instead of evaluating that input. Event names are: "keyboardInput", "mousebuttonsInput", "joyaxesInputPosSgn[1-8]", "joyaxesInputNegSgn[1-8]", "joybuttonsInput[1-8]"
Loads the specified savegame.
Load the specified input profile.
Move the specified component to the top of the repair queue of the entity.
Teleport the player to the specified zone.
Start a new game with the specified module and difficulty.
Opens the steam store page in the steam overlay.
Opens an url in the steam overlay.
Open the specified extension in the workshop overlay.
Pause the game. If the explicit flag is set to true, this will pause the game as if the pause key was hit.
Play the credits.
Checks whether the specified key is part of the player ship. Possible keys are: "trademk1", "trademk2", "trademk3"
(Optionally) Prepares the specified texture to be used as a rendertarget.
Return value indicates success/failure.
Proceeds from a conversation menu to the specified conversation section in MD. Optionally passing parameters.
Notifies the system that the quick menu was closed.
QuitGame()
Quit to desktop.
Quit the current module to the start menu.
Returns text if it exists, error message otherwise.
Registers addon key bindings using the <bindinggroup /> nodes in ui.xml. If no groupid is specified all groups will be registered.
Registers the specified elemnent (and all its children) to enable mouse/pointer picking interactions.
Releases the descriptor which was returned by CreateInteractionDescriptor().
Removes the specified amount of the ammo from the object.
Removes the specified amount of the ware from the object.
Removes the specified amount of the ware from the inventory of the entity.
Removes the logbook entry at index.
Removes specified macro from the playership.
requesterRemoved = RemoveSofttargetLockRequest(requesterID)
Removes the lock-request for the specified requesterID.
Note that the return value only indicates whether the requester was removed. It does not necessarily correspond to the target lock having been lifted (i.e. if there are still outstanding lock-requests).
Repairs the specified destructibles.
Replace the player ship cockpit with the specified macro.
success = RequestSofttargetLock(requesterID)
Adds a lock-request (with the specified requesterID) of the current softtarget (preventing the current target from being changed).
Prior to 4.20 the function could be used to prevent objects being targeted (i.e. calling RequestSofttargetLock() with no current target). As of 4.20 such a call will fail and indicate the failure via its return value.
Resets all changes to extension settings from this session.
Restores the game settings from the default config.
Restores the gfx settings from the default config.
Opens the options menu.
Restores the sound settings from the default config.
Returns from a conversation menu. Optionally passing a parameter.
Save the current fullscreen setting to the player config.
Save the game to the specified filename.
Save the input profile.
SaveInputSettings(actionTable, stateTable, rangeTable)
Save the input map.
Code Block | ||||
---|---|---|---|---|
| ||||
actionTable = {
[ActionID] = {
[1] = {
[1] = InputID Source,
[2] = InputID Code,
[3] = InputID Signum
},
[2] = { ... }
},
[ActionID] = { ... }
} |
Code Block | ||||
---|---|---|---|---|
| ||||
stateTable = {
[StateID] = {
[1] = {
[1] = InputID Source,
[2] = InputID Code,
[3] = InputID Signum
},
[2] = { ... }
},
[StateID] = { ... }
} |
Code Block | ||||
---|---|---|---|---|
| ||||
rangeTable = {
[RangeID] = {
[1] = {
[1] = InputID Source,
[2] = InputID Code,
[3] = InputID Signum
},
[2] = { ... }
},
[RangeID] = { ... }
} |
Save the current resolutions setting to the player config.
Schedule a ui reload.
Select the back in a conversation choice.
Sends the specified entity to the given container or the player ship via remote transport drone.
Sends a generic ObjectSignalledEvent on the specified component. These can be listened to by MD/AI script.
SendTransportDrone(sendingentityID, receivingentityID, waretype, wareAmountArray)
Sends the specified wareAmountList from the sendingentity to the receivingentity.
Code Block | ||||
---|---|---|---|---|
| ||||
wareAmountArray = {
[1] = {
[1] = ware,
[2] = amount
},
[2] = { ... }
} |
Sets the specified mission as active.
Sets the display adapter to the specified ordinal.
Sets the aim assist setting.
Sets the anti alias mode.
Toggles the autoroll setting.
Toggles autosave setting.
Toggle the boost toggle setting.
Set the budget responsibility of the specified entity.
SetButtonColor(buttonID, r, g, b, alpha)
Sets the color for the specified button.
Toggle the capture hq setting.
Toggle the collision avoidance assist setting.
SetComponentName(componentID, name)
Set the name of the specified component.
SetConfineMouseOption()
Toggle confine mouse setting.
Define a stock limit for a particular ware for this ship/station.
Sets the price the specified container buys/sells the ware.
Toggles the crash report setting.
Set the deadzone setting to the specified percentage.
Sets the difficulty setting.
Toggles the distortion setting.
Sets the effect distance setting.
Toggle the event monitor cutscene setting.
Sets the setting of the specified extension.
Sets the fov setting.
Toggles the fullscreen detailmonitor setting.
Sets the render mode of the current UI environment to fullscreen 1:1 mapping. Return value indicates success/failure.
Sets the render mode of the current UI environment to worldspace rendering mode.
Sets the fullscreen setting and optionally provide a prompt if the setting worked.
Sets the gamepad mode option to setting.
Sets the gamma setting.
Sets the gfx quality setting.
Sets the glow setting.
Toggles inversion for the specified range input.
Sets the specified guid as the joystick.
Toggles the legacy main menu setting.
Toggles the legacy shaders setting.
Sets the lod setting.
Sets the max budget of the specified entity.
Sets the min budget of the specified entity.
Sets the mouse cursor override of the specified element (and all of its children) to the given cursor ID. If the mouse is hovered over the element, the cursor will display the specified cursor icon.
Sets the mouse to sleep until moved again.
Toggles the setting whether non-squad ships should be included in the trade offers menu.
Sets the blackboard variable "valueName" from the blackboard of the specified entity to "value". If the "value" is nil, the blackboard variable is cleared.
Set the specified skill of the given entity to value.
SetPersonalizedCrashReportsOption()
Toggles the setting to send personalized crash reports.
Sets the pointer ID override of the specified element (and all of its children) to the given pointer ID. If the pointer (i.e. either the cursor or a pointing device) is hovered over the element, the pointer will display the specified pointer ID).
Sets the radar setting.
Swaps the rendering mode to a preset rendertarget. It's intended for UI internal use. No current support to utilize this in a useful way for UI modding.
Sets the size of the specified rendertarget (given as a relative path to the texturename).
Sets the resoltion to the specifed values. Optionally provide a prompt if the setting worked.
Sets the rumble setting.
Sets the sensitivity setting of the specified input range.
Sets the shader quality setting.
Sets the shadow setting.
Toggles the soft shadow setting.
Toggle the global sound setting.
Sets the ssao setting.
Sets the specified statistic to value.
Toggles the steering note setting.
Toggles the setting whether the playership should stop while a menu is open.
Sets the subtitle setting.
Sets the view distance setting.
Sets the specified container to virtual cargo mode. Using its trade queue to predict future cargo and unit availability.
Sets the volume setting of the specified type.
Toggles the vsync setting.
Starts the interact menu interaction.
Start the auto pilot on the specified component.
Notifies the MD that a mission briefing was started.
Starts the specified new conversation in MD. This requires that no conversation is currently active. Conversation parameter is required but can be nil.
Proceeds from a conversation menu to the specified new conversation in MD. Optionally passing parameters.
Stops the auto pilot.
Notifiy the MD that a mission briefing stopped.
Stop restoring the options menu after ui reloads.
Toggle faction trade restriction on the specified container.
Toggle faction trade restriction override on the specified container for the given ware.
Toggle the mission guidance for the specified mission.
Transfers the specified ware and amount from the given entity to the player.
Transfers the specified amount from the given entity to the player.
Transfers the specified ware and amount from the player to the given entity.
Transfers the specified amount from the player to the given entity.
Truncates the given text with the specified limitations.
Uninstalls the specified steam dlc.
Unpause the game. If the explicit flag is set to true, this will unpause the game as if the pause key was hit.
Unregisters addon key bindings using the <bindinggroup /> nodes in ui.xml. If no groupid is specified all groups will be unregistered.
Resets the render target for the radar/map display.
Removes any specified mouse cursor override from the specified element or its children.
Removes any specified pointer override from the specified element or its children.
Unregisters the specified elemnent (and all its children) from mouse/pointer picking interactions.
...
(destructibleID, upgradetype, level) Upgrade the specified destructible with the given upgrade level. |
...
title | wareTable |
---|---|
collapse | true |
...
// @since 4.31 Beta 1: depreacted (use NotifyTargetElementShown)