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).
UNSUPPORTED markers imply that the function is technically available but not part of our provided public Lua API set. We might change these functions to be in the supported set of Lua functions in the future. Until then, the function can change its behavior any time and/or even be entirely removed (without a replacement). Changes to these functions are usually not listed in the UI changelog and are also (usually) not covered in the overview of breaking changes between X Rebirth releases.
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, ...) | 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. | ||||||||||
changed in 4.21 Beta 1 (VR: 4.20) and 4.30 RC2 (VR: 4.30 Hotfix 2) | mode, angle = GetControllerInfo() 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.21 Beta 1 (VR: 4.20): Added "touch" as new possible input mode. 4.30 RC 2 (VR: 4.30 Hotfix 2): Added "joystick" as new possible input mode. | ||||||||
bool = GetCrashReportOption() Returns the current crash report setting. | ||||||||||
time = GetCurRealTime() Returns the real time since session start in seconds. | ||||||||||
sequence, stage, progress, upgradePlanArray = GetCurrentBuildSlot(containerID) | ||||||||||
resourceTable = GetCurrentBuildSlotResources(containerID or buildmoduleID) | ||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED string = GetCurrentModuleName() | |||||||||
deprecated in 4.22 Beta 2 (VR: 4.22) | DEPRECATED time = GetCurTime() Returns the ingame time in seconds. | |||||||||
changed in 4.30 RC 1 (VR: 4.30) | string|table = GetDate([format [,time]]) | As of XR 4.30 RC 1 GetDate() supports only the following format specifiers: | ||||||||
int = GetDeadzoneOption() Returns the current deadzone setting. | ||||||||||
text, isSelectable, isImmediate, shortcutKey, RESERVED, mouseOverText = GetDialogOption(index) 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 | ||||||||||
string = GetDifficultyOption() Returns the current difficulty setting. | ||||||||||
bool = GetDistortionOption() Returns the current distortion setting. | ||||||||||
dronecommanderID or nil = GetDroneCommander(drone) Returns the drone commander of the specified drone, if any. | ||||||||||
droneIDArray = GetDrones(shipID) Returns an array of all drones of that ship. | See also GetUnitStorageData. | |||||||||
GetDroneWeapon | ||||||||||
GetEditBoxCloseMenuOption | ||||||||||
GetEditBoxColor | ||||||||||
GetEditBoxFont | ||||||||||
GetEditBoxHotkeyDetails | ||||||||||
GetEditBoxText | ||||||||||
GetEditBoxTextAlignment | ||||||||||
GetEditBoxTextColor | ||||||||||
number = GetEffectDistanceOption() | ||||||||||
stringArray = GetEfficiencyUpgrades(destructible) Returns an array with the macro names of all efficiency upgrades connected to the specified destructible. | ||||||||||
DEPRECATED bool = GetEMCutsceneOption() | ||||||||||
.. = GetEntityTypeData(entitytype, ...) Returns properties of the specified component. Possible properties are: "name", "icon" | ||||||||||
GetError | ||||||||||
changed in 4.30 RC 1 (VR: 4.30) | severity = GetErrorSeverity(logMessageIndex)
| 4.30 RC 1 changed the severity levels and introduced the new info level. | ||||||||
GetErrorTimestamp | ||||||||||
GetEventMonitorDetailsBridge | ||||||||||
removed in 3.50 RC 1 | ||||||||||
extensionTable = GetExtensionList() | ||||||||||
string or nil = GetExtensionUpdateWarningText(extensionid, personal) Returns the update warning text of a workshop extension, if any. | ||||||||||
removed 3.50 Beta 3 | ||||||||||
GetFont | ||||||||||
GetFontHeight | ||||||||||
number = GetFOVOption() Returns current fov setting. | ||||||||||
GetFrameBackgroundID | ||||||||||
GetFrameOverlayID | ||||||||||
GetFramePosition | ||||||||||
amount = GetFreeCargoAfterShoppingList(containerID, ware) Returns amount of free cargo space for the specified ware after the trade queue will be resolved. | Call SetVirtualCargoMode on containerID first, otherwise result will be empty. | |||||||||
amount = GetFreeUnitStorageAfterShoppingList(containerID) Returns amount for free unit storage space for the specified container. | Call SetVirtualCargoMode on containerID first, otherwise result will be empty. | |||||||||
bool = GetFullscreenDetailmonitorOption() Returns the current fullscreen detailmonitor setting. | ||||||||||
fullscreen, borderless = GetFullscreenOption() Returns the current fullscreen and borderless setting. | ||||||||||
int = GetGamepadModeOption() Returns the current gamepad mode setting. | ||||||||||
number = GetGammaOption() Returns the current gamma setting. | ||||||||||
gateIDArray = GetGates(space [, showonmap]) Returns an array of gates in the specified space. | ||||||||||
int = GetGfxQualityOption() Returns the current gfx quality setting. | ||||||||||
bool = GetGlobalSyncSetting() Returns the current global extension sync setting. | ||||||||||
int = GetGlowOption() Returns the current glow setting. | ||||||||||
GetHeader | ||||||||||
licenceTable = GetHeldLicences(faction) | ||||||||||
x, y = GetHintPosition(position) 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() | ||||||||||
GetIconDetails | ||||||||||
wareKeyTable = GetIncomingRemoteWares(wareType) | ||||||||||
actionTable = GetInputActionMap() | ||||||||||
inputProfileTable = GetInputProfiles() | ||||||||||
rangeTable = GetInputRangeMap() | ||||||||||
stateTable = GetInputStateMap() | ||||||||||
GetInteractiveObject | ||||||||||
wareTable = GetInventory(entityID) | ||||||||||
bool = GetInversionSetting(rangeid) | ||||||||||
joystickTable = GetJoysticksOption() | ||||||||||
jumpbeaconIDArray = GetJumpBeacons(zoneID, [showonmap]) | ||||||||||
bool = GetLegacyMainMenuOption() Returns the current legacy main menu setting. | ||||||||||
bool = GetLegacyShadersOption() Returns the current legacy shaders setting. | ||||||||||
libraryTable = GetLibrary(library) | ||||||||||
changed in 4.22 Beta 2 (VR: 4.22) | entryTable = GetLibraryEntry(library, itemid) | "storagenames" field added in 4.22 Beta 2 (VR: 4.22) | ||||||||
int = GetLibrarySize(library) Returns the size of the specified library. | ||||||||||
GetLiveDataBridge | ||||||||||
GetLoadingInfo | ||||||||||
changed in 4.00 Beta 3 | string = GetLocalizedKeyName(type, id) Returns the name of the key assigned to the specified input action, state or range. | |||||||||
string = GetLocalizedRawKeyName(keycode) Returns the name of the specified keycode. | ||||||||||
added in 4.00 Beta 2 | mouseX, mouseY = GetLocalMouseClickPosition() Returns the current mouse click position (nil, if the mouse was not clicked on the current environment). | |||||||||
mouseX, mouseY = GetLocalMousePosition() Returns the current mouse position (nil, if the mouse is not over the current environment). | ||||||||||
number = GetLODOption() Returns the current lod setting. | ||||||||||
logbookTable = GetLogbook(start, count [, category]) | ||||||||||
resourceTable = GetMacroBuildSlotResources(macro, sequence, stage) Returns the needed resources to build the specified macro build slot. | ||||||||||
changed in 4.00 RC 1 | ... = GetMacroData(macro, ...) Returns properties of the specified macro. Possible properties are: "name", "icon", "efficiencyfactor", "efficiencybonus", "ware", "primarypurpose", "primarypurposename", "storagecapacity", "storagetags", "storagenames", "scanlevel" | "scanlevel" property added in 4.00 RC 1 | ||||||||
int = GetMacroUnitStorageCapacity(macro, sequence, stage [, buildlimit]) Returns the capacity of unit storage on the specified macro build slot. | ||||||||||
joystickIndexArray = GetMappedJoysticks() Returns an array of joysticks currently mapped for input. Indices refer to the return value of GetJoysticksOption(). | ||||||||||
GetMaxRemoteControlRange | ||||||||||
stringLength = GetMaxTextLength(text, fontname, fontsize, width) Returns the maximum length of the specified text which can fit in the given width in this font. | ||||||||||
param, param2 = GetMenuParameters() Returns the parameters the current menu was opened with. | ||||||||||
GetMessageScreenPosition | ||||||||||
GetMiniGameCursorPosition | ||||||||||
macroArray = GetMiningUnitMacros(macro) Returns all unit macros the specified macro can use to mine, if any. | ||||||||||
updated in 4.00 Beta 3 updated in 4.31 Beta 1 | missionID, name, description, difficulty, maintype, subtype, faction, rewardmoney, rewardtext, briefingobjectives, activebriefingstep, opposingfaction, licence, timeleft, duration, abortable, guidancedisabled, associatedcomponent, hasObjective = GetMissionDetails(missionIndex Returns details of the specified mission. | 4.00 Beta 3: added hasObjective return value 4.31 Beta 1: removed fontname, fontsize, and textwidth parameters | ||||||||
updated in 4.31 Beta 1 | objectivetext, objectiveicon, timeout, progressname, curprogress, maxprogress, objectivetargets = GetMissionObjective(missionIndex Returns details of the specified mission's objective. | 4.31 Beta 1: removed fontname, fontsize, and textwidth parameters | ||||||||
GetMissionObjectiveBarInfo | ||||||||||
name, desc, faction, type, level, reward, opposingfaction, licence, associatedcomponent = GetMissionOfferAtConnection(componentID, templateConnectionName) Returns details about the mission offer at the specified location. | ||||||||||
updated in 4.10 Beta 5 | name, description, difficulty, maintype, subtype, faction, rewardmoney, rewardtext, briefingobjectives, activebriefingstep, opposingfaction, licence, timeleft, duration, abortable, guidancedisabled, associatedcomponent, offeractor, offercomponent = GetMissionOfferDetails(offerID Returns details about the specified mission offer. | 4.10 Beta 5: added offercomponent return value 4.31 Beta 1: removed fontname, fontsize, and textwidth parameters | ||||||||
type = GetModuleType(destructibleID) Returns the module type of the specified destructible. | ||||||||||
resourceTable = GetNeededBuildSlotResources(containerID or buildmoduleID) Returns the needed resources of the specified buildmodule. | ||||||||||
bool = GetNonSquadShipsForTradeOffersOption() Returns the setting whether non-squad ships should be included in the trade offers menu. | ||||||||||
updated in 4.31 Beta 1 | notificationDetailsTable = GetNotificationDetails(notificationID) Returns details about the specified notification (or nil, if there's an error or if the notification doesn't exist). | 4.31 Beta 1: added the interactionID to the returned table 4.31 Beta 1: | ||||||||
GetNotificationPriority | ||||||||||
componentIDArray = GetNotUpgradesByClass(destructibleID, class) Returns an array of all components included in the specified destructible of the specified class, which are not upgrades. | ||||||||||
value or nil = GetNPCBlackboard(entityID, valueName) Return the blackboard variable "valueName" from the blackboard of the specified entity. | ||||||||||
entityIDArray = GetNPCs(destructibleID) Returns an array of entities in the specified desctructible. | ||||||||||
entityIDArray = GetNPCsInSectorOnStations(sectorID, distance) Returns an array of entities on stations in the specified sector within the given distance to the player. | ||||||||||
GetNumAttackers | ||||||||||
GetNumErrors | ||||||||||
int = GetNumIncomingRemoteWares(wareType) Returns the number of incoming remote transport wares for specified type. | ||||||||||
int = GetNumLogbook([category]) Returns the number of logbook entries, optionally filtered by the given category. | ||||||||||
int = GetNumMissions() Returns the number of accecpted missions. | ||||||||||
GetNumObservers | ||||||||||
subsystemsTable = GetObjectRepairStatus(containerID) | ||||||||||
GetOffset | ||||||||||
GetOrigin | ||||||||||
licenceTable = GetOwnLicences(faction) | ||||||||||
bool = GetPersonalizedCrashReportsOption() Returns the setting to send personalized crash reports. | ||||||||||
dockingbayIDArray = GetPlatforms(containerID) Returns an array of dockingbays that are platforms of the specified container. | ||||||||||
string = GetPlayerActivity() Returns the current player mode. | ||||||||||
int = GetPlayerAmmoCount(macro) Returns the ammo count of the specified macro on the player ship. | ||||||||||
contextID or nil = GetPlayerContextByClass(class) Returns the context of the player with the specified class, if any. | ||||||||||
GetPlayerControlledHullShield | ||||||||||
GetPlayerDroneDetails | ||||||||||
int = GetPlayerDroneSlots() Returns the number of drone slots on the player ship. | ||||||||||
GetPlayerDroneSpeed | ||||||||||
playerDroneTable = GetPlayerDroneStorageData() | ||||||||||
GetPlayerDroneSystems | ||||||||||
componentID = GetPlayerEnvironmentObject() Returns the player's enviroment object. | ||||||||||
wareTable = GetPlayerInventory() | ||||||||||
money = GetPlayerMoney() Returns the amount of money in the player account. | ||||||||||
macro = GetPlayerPrimaryShipCockpitMacro() Returns the macro of the cockpit currently installed in the player ship. | ||||||||||
shipID = GetPlayerPrimaryShipID() Returns the player primary ship. | ||||||||||
macro = GetPlayerPrimaryShipMacro() Returns the macro of the player primary ship. | ||||||||||
roomID = GetPlayerRoom() Returns the current player room. | ||||||||||
GetPlayerShipHullShield | ||||||||||
GetPlayerShipShieldDetails | ||||||||||
GetPlayerSpeed | ||||||||||
GetPlayerSteeringStrength | ||||||||||
componentID = GetPlayerTarget() Returns the current player target. | ||||||||||
adapterTable = GetPossibleAdapters() | ||||||||||
productionInfoTable = GetPossibleProducts(productionmoduleID) | ||||||||||
resolutionsTable = GetPossibleResolutions() | ||||||||||
GetPrimaryShipWeapon | ||||||||||
entityIDArray = GetPrioritizedPlatformNPCs(dockingbayID) Returns an array of entities on the specified dockingbay. | ||||||||||
productionDataTable = GetProductionModuleData(productionmoduleID) | ||||||||||
productionmoduleIDArray = GetProductionModules(destructible) Returns an array with all productionmodules in the specified destructible. | ||||||||||
GetProgressElementDetails | ||||||||||
string = GetRadarModuleName(objectID) Returns the name of the macro with biggest radar range included in the specified object. | ||||||||||
int = GetRadarOption() Returns the current radar setting. | ||||||||||
money or nil = GetReferenceProfit(container, ware, price, amount [, shoppinglistidx]) Returns the profit selling the specified ware from the given container at the given price will provide. | ||||||||||
moduleArray = GetRegisteredModules() | ||||||||||
removed 3.50 Beta 3 | ||||||||||
removed 3.50 Beta 3 | ||||||||||
added in 4.21 Beta 1 (VR: 4.20) | x, y, z = GetRelativeMousePosition(element[, sizedMousePoint]) 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. | 4.31 Beta 1: added sizedMousePoint parameter | ||||||||
GetRelativePlayerShipPosition | ||||||||||
GetRemoteControlHUDIcons | ||||||||||
resourceTable = GetRepairResources(containerID or buildmoduleID, repairdestructibleID, sequence, stage, buildlimit, targethullfraction) | ||||||||||
resolutionTable = GetResolutionOption([checkconfig]) Returns the current resolution or the resolution set in config.xml. | ||||||||||
number = GetRumbleOption() Returns the current controller rumble intensity setting. | ||||||||||
productionmoduleID = GetSalesRepProduction(entityID) Returns the productionmodule in the same build slot as the specified entity. | ||||||||||
savegameTable = GetSaveList() | Performance critical, do not call unnecessarily. | |||||||||
added in 4.10 Beta 1 | savegameTable = GetSaveList2() 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). | |||||||||
GetScreenAspects | ||||||||||
getScreenInfo | ||||||||||
GetSecondaryShipWeapon | ||||||||||
sectorIDArray = GetSectors(clusterID) Returns an array of sectors in the specified cluster. | ||||||||||
number = GetSensitivitySetting(rangeid) Returns the current sensitivity setting for the specified input range. | ||||||||||
int = GetShaderQualityOption() Returns the current shader quality setting. | ||||||||||
int = GetShadowOption() Returns the current shadow setting. | ||||||||||
shoppingListTable = GetShoppingList(containerID) | ||||||||||
GetSize | ||||||||||
GetSliderGranularity | ||||||||||
GetSliderText | ||||||||||
DEPRECATED GetSliderValues | ||||||||||
added in 4.10 Beta 1 | GetSliderValues2 | |||||||||
GetSliderValueSuffix | ||||||||||
bool = GetSoftShadowsOption() Returns the current soft shadow setting. | ||||||||||
bool = GetSoundOption() Returns the current global sound setting. | ||||||||||
int = GetSSAOOption() Returns the current ssao setting. | ||||||||||
GetStandardButtons | ||||||||||
macroArray = GetStandardUnitMacros(macro) Returns an array of unit macros that are considered standard for the specified macro. | ||||||||||
... = GetStatData(stat, ...) Returns properties of the specified statistic. Possible properties are: "exists", "value", "hidden", "displayname", "displayvalue" | ||||||||||
bool = GetSteeringNoteOption() Returns the current steering note setting. | ||||||||||
bool = GetStopShipInMenuOption() Returns the current setting whether the playership should stop while a menu is open. | ||||||||||
storageDataTable = GetStorageData(destructibleID) | ||||||||||
componentIDArray = GetSubordinates(controllableID [, commandertype]) Returns an array with all subordinates of the specified controllable, optionally filtered by the commandertype. | ||||||||||
string = GetSubtitleOption() Returns the current subtitle option. | ||||||||||
GetTableColumnSpan | ||||||||||
GetTableColumnWidths | ||||||||||
GetTableFullHeight | ||||||||||
GetTableInitialSelectedColumn | ||||||||||
GetTableInitialSelectedRow | ||||||||||
GetTableInitialTopRow | ||||||||||
GetTableNumFixedRows | ||||||||||
GetTableNumRows | ||||||||||
GetTableRowColor | ||||||||||
GetTableRowHeight | ||||||||||
| GetTargetElementInfo | |||||||||
GetText | ||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED int = GetTextHeightExact(text, font, fontsize, width, wordwrap) Returns the height in pixels of the specified text. Note that the width parameter specifies the maximum width (per row) to be displayed. The parameter is ignored, if wordwrap is false. | |||||||||
changed in 4.00 Beta 1 | int, actualwidth = GetTextNumLines(text, font, fontsize, width) Returns the number of lines of the specified text with the given font and width and the actual width of the wordwrapped text. | 4.00 Beta 1: added the second return value (actualwidth) | ||||||||
deprecated in 4.31 Beta 1 | DEPRECATED int = GetTextWidth(text, fontname, fontsize) Returns the width in pixels of the specified text. | |||||||||
GetTimeLeft | ||||||||||
| GetTopTargetPriorityMessages | |||||||||
money = GetTotalValue(containerID [, sellprice] [, referenceContainerID]) Returns the value of the specified container, optionally for selling and in reference to the price list of the reference container. | ||||||||||
tradeData = GetTradeData(trade) | ||||||||||
changed in 4.00 Beta 4 | tradeDataArray = GetTradeList([tradeship], [sortby], [indexbyid]) | Added "indexbyid" parameter in 4.00 Beta 4 | ||||||||
restrictionsTable = GetTradeRestrictions(containerID) | ||||||||||
tradeArray = GetTradesAtConnection(componentID, templateConnectionName) Returns an array of trades at the specified connection. | ||||||||||
tradeShipData = GetTradeShipData(shipID) | ||||||||||
tradeShipDataArray = GetTradeShipList() | ||||||||||
macroArray = GetTransportUnitMacros(macro) 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) For the other return values, refer to GetUIElementScreenPosition(). | ||||||||||
x2d, y2d, z, onscreen = GetUIElementScreenPosition(posID, iconSizeOnScreen, iconSizeOffScreen) 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. | ||||||||||
relation = GetUIRelation(faction) Returns the relation of the player to the specified faction. | ||||||||||
changed in 4.00 Beta 6 | unitTable = GetUnitStorageData(defensibleID [, unitcategory] [, virtualammo][, excluderestricted]) | 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) | ||||||||||
string = GetVersionString() Returns the current game version. | ||||||||||
number = GetViewDistanceOption() Returns the current view distance setting. | ||||||||||
GetViewSize | ||||||||||
number = GetVolumeOption(volumetype) Returns the current volume setting of the specified type. | ||||||||||
bool = GetVSyncOption() Returns the current vsync setting. | ||||||||||
int = GetWareCapacity(containerID, ware [, ignoreexisting = true]) Returns the capacity of the specified container for the given ware. By default existing cargo is ignored. | ||||||||||
changed in 4.00 Beta 1, 4.00 Beta 4, 4.00 Beta 5 | ... = GetWareData(ware, ...) 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 | ||||||||
tradeDataArray = GetWareExchangeTradeList(tradingshipID, tradedcontainerID [, sortby]) | Call SetVirtualCargoMode on tradingshipid and tradedcontainerid first, otherwise result will be empty. | |||||||||
int = GetWareProductionLimit(containerID, ware) Returns the production limit for the specified ware on the given container. | ||||||||||
GetWordWrap | ||||||||||
zoneIDArray = GetZones(sectorID) Returns an array of zones contained in the specified sector. | ||||||||||
yieldTable = GetZoneYield(zoneID [, skipmaxyields]) | Performance critical, set skipmaxyields = true, if possible. | |||||||||
bool = HasAllResourcesToCraft(entityID, ware) Checks whether the specified entity has all ingredients to craft the specified ware. | ||||||||||
added in 4.00 Beta 3 | bool = HasContainerStockLimitOverride(containerID, ware) Returns whether the ship/station has an override for the stock limit of a particular ware defined. | |||||||||
bool = HasContainerWarePriceOverride(containerID or buildmoduleID, ware, buysellswitch) Checks whether the specified ware has a price override on the given container. | ||||||||||
HasDroneControl | ||||||||||
HasFlightControl | ||||||||||
bool = HasLicence(faction, licencetype, licencefaction) Checks whether the specified faction holds the given licence of the licence faction. | ||||||||||
HasShipControl | ||||||||||
bool = HasShipyard(spaceID) Checks whether the specified space includes a shipyard. | ||||||||||
HasSliderTwoScales | ||||||||||
bool = HasTag(componentID, templateConnectionName, tagname) Checks whether the specified connection has the given tag. | ||||||||||
DEPRECATED int = HasToRestoreOptionsMenu() Returns static variable to re-init the options menu after ui reload, e.g. on device lost. | ||||||||||
bool = HaveExtensionSettingsChanged() Checks whether extension settings changed in this session. | ||||||||||
HideMissionObjective | ||||||||||
HidePresentation | ||||||||||
HideView | ||||||||||
IncStatValue(stat[, addvalue]) Increases the specified statistic by the given value. | ||||||||||
InstallSteamDLC(appid) Installs the specified steam dlc. | ||||||||||
InterruptPlayerComputer() Stops the current player ship computer line. | ||||||||||
IsBorderEnabled | ||||||||||
IsButtonActive | ||||||||||
IsCheatVersion() Checks whether the game has cheats enabled. | ||||||||||
bool IsComponentClass(componentID, classname) Checks whether the specified component is of the given class. | ||||||||||
bool IsComponentConstruction(componentiD) Checks whether the specified component is under construction. | ||||||||||
bool = IsComponentOperational(componentID) Checks whether the specified component is operational. | ||||||||||
removed in 3.50 Beta 2 | replaced by IsValidComponent() | |||||||||
bool = IsContainerOperationalRangeSufficient(containerID, spaceID) Checks whether the given operational range of the specified container is sufficient to operate normally. | ||||||||||
IsDialogActive | ||||||||||
bool = IsDockingPossible(shipID, dockingbayID) Checks whether the specified ship is allowed to dock at the given dockingbay. | ||||||||||
bool = IsFactionKnown(faction) Checks whether the specified faction is known to the player. | ||||||||||
IsFadeEnabled | ||||||||||
IsFirstPerson | ||||||||||
bool = IsGamepadActive() Check whether the gamepad is active. | ||||||||||
bool = IsInfoUnlockedForPlayer(componentID, info) Check whether the specified information of the given component is available to the player. | ||||||||||
IsInteractive | ||||||||||
bool = IsKnownItem(library, itemid) Checks whether the specified item is known in the given library. | ||||||||||
bool = IsMacroClass(macro, classname) Checks whether the specified macro is of the given class. | ||||||||||
changed in 4.21 Beta 1 (VR: 4.20 Hotfix 1) | bool = IsObstructed(posID, canBeObstructedByOwnComponent[, ignoreCockpitObstruction]) 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). | "ignoreCockpitObstruction" argument was added in 4.21 Beta 1 (VR:4.20 Hotfix 1) | ||||||||
bool = IsPlayerFirstPerson() Checks whether the player is in first person mode. | ||||||||||
bool = IsSameComponent(component1ID, component2ID) Helper function to compare two luaIDs or 64-bit integer representing components. | ||||||||||
bool = IsSameTrade(trade1ID, trade2ID) Helper function to compare two luaIDs representing trades. | ||||||||||
bool = IsSavingPossible() Checks whether saving is currently possible. | ||||||||||
IsSelectable | ||||||||||
IsSliderCenterValueDisplayed | ||||||||||
IsSliderIndicatorInverted | ||||||||||
IsSliderScaleInverted | ||||||||||
IsSofttargetLocked | ||||||||||
bool = IsSteamworksEnabled() Checks whether steamworks are enabled. | ||||||||||
IsTableColumnWidthPercentage | ||||||||||
IsTableRowSelectable | ||||||||||
IsType | ||||||||||
added in 3.50 Beta 2 | bool = IsValidComponent(componentID) Checks whether the specified component has a valid context. | |||||||||
IsValidWidgetElement | ||||||||||
bool = IsWareIllegalTo(ware, licencefaction [, policefaction]) Check whether the specified ware is illegal for the given licencefaction. Optionally checks against a specified police faction. | ||||||||||
deprecated in 4.21 Beta 1 (VR: 4.20) | DEPRECATED LeaveInteractMenu() Ends the interact menu interaction. | |||||||||
ListenForInput() 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]" | ||||||||||
LoadGame(filename) Loads the specified savegame. | ||||||||||
LoadInputProfile(filename, personal) Load the specified input profile. | ||||||||||
LockPresentation | ||||||||||
MakeRepairPriority(entityID, componentID) Move the specified component to the top of the repair queue of the entity. | ||||||||||
MovePlayerToZone(zoneID) Teleport the player to the specified zone. | Needs cheats enabled. | |||||||||
NewGame(modulename, difficulty) Start a new game with the specified module and difficulty. | ||||||||||
NotifyOnActionPerformed | ||||||||||
NotifyOnChangedEnvironmentObject | ||||||||||
NotifyOnChangedZone | ||||||||||
NotifyOnConversationFinished | ||||||||||
NotifyOnCutsceneStopped | ||||||||||
NotifyOnCycleWeapon | ||||||||||
NotifyOnHackAborted | ||||||||||
NotifyOnHackFinished | ||||||||||
NotifyOnHackStarted | ||||||||||
added in 4.00 Beta 2 | NotifyOnInventoryWaresAdded | |||||||||
added in 4.00 Beta 3 | NotifyOnJumpDriveCharging | |||||||||
NotifyOnMissionObjectiveBarUpdate | ||||||||||
added in 4.31 Beta 1 | NotifyOnObservationStarted | |||||||||
added in 4.31 Beta 1 | NotifyOnObservationStopped | |||||||||
NotifyOnPlayerControlStarted | ||||||||||
NotifyOnPlayerControlStopped | ||||||||||
NotifyOnScanAborted | ||||||||||
NotifyOnScanFinished | ||||||||||
NotifyOnScanStarted | ||||||||||
NotifyOnStartDialog | ||||||||||
NotifyOnStopDialog | ||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED NotifyOnTargetElementDisplayed | |||||||||
deprecated in 4.31 Beta 1 | DEPRECATED NotifyOnTargetElementHidden | |||||||||
added in 4.31 Beta 1 | NotifyTargetElementHidden | |||||||||
added in 4.31 Beta 1 | NotifyTargetElementShown | |||||||||
NotifyVoiceOutput | ||||||||||
OpenSteamOverlayStorePage([appid]) Opens the steam store page in the steam overlay. | ||||||||||
OpenSteamOverlayWebPage(url) Opens an url in the steam overlay. | ||||||||||
OpenWorkshop(id, personal) Open the specified extension in the workshop overlay. | ||||||||||
changed in 4.00 Beta 3 | Pause([explicit]) Pause the game. If the explicit flag is set to true, this will pause the game as if the pause key was hit. | Note: prior to 4.21 Beta 1 (VR: 4.20) a call to Pause() (or Pause(false) didn't display a Game Paused text. As of 4.21 Beta 1 (VR: 4.20) both cases will display this text now. | ||||||||
PerformAction | ||||||||||
PlayAmbientSound | ||||||||||
PlayCredits() Play the credits. | ||||||||||
bool = PlayerPrimaryShipHasContents(key) Checks whether the specified key is part of the player ship. Possible keys are: "trademk1", "trademk2", "trademk3" | ||||||||||
PlaySound | ||||||||||
added in 4.00 Beta 6 | PrepareIcon | |||||||||
success = PrepareRenderTarget(texturename) (Optionally) Prepares the specified texture to be used as a rendertarget. Return value indicates success/failure. | ||||||||||
ProceedFromMenu(convsection[, choiceparam][, baseparam]) Proceeds from a conversation menu to the specified conversation section in MD. Optionally passing parameters. | ||||||||||
added in 4.21 Beta 1 (VR: 4.20) | QuickMenuOpened() Notifies the system that the quick menu was closed. | |||||||||
QuitGame() | ||||||||||
QuitModule() Quit the current module to the start menu. | ||||||||||
RaisePlayerInteractionEvent | ||||||||||
text = ReadText(page, line) Returns text if it exists, error message otherwise. | ||||||||||
RegisterAddonBindings(addonname [, groupid = ""]) Registers addon key bindings using the <bindinggroup /> nodes in ui.xml. If no groupid is specified all groups will be registered. | | |||||||||
RegisterMouseInteractions(element) Registers the specified elemnent (and all its children) to enable mouse/pointer picking interactions. | ||||||||||
RegisterWidget | ||||||||||
ReleaseCutsceneDescriptor | ||||||||||
ReleaseDescriptor | ||||||||||
depreacted in 4.31 Beta 1 | DEPRECATED ReleaseInteractionDescriptor(descriptor) Releases the descriptor which was returned by CreateInteractionDescriptor(). | |||||||||
ReleaseListener | ||||||||||
ReleaseNotification | ||||||||||
ReleaseViewDescriptor | ||||||||||
RemoveAmmo(defensibleID, ammoMacro, amount) Removes the specified amount of the ammo from the object. | ||||||||||
RemoveCargo(containerID, ware, amount) Removes the specified amount of the ware from the object. | ||||||||||
RemoveInventory(entityID, ware, amount) Removes the specified amount of the ware from the inventory of the entity. | ||||||||||
RemoveLogbookEntry(index [, category]) Removes the logbook entry at index. | ||||||||||
RemovePlayerDrone(macroname, amount) Removes specified macro from the playership. | ||||||||||
RemoveSofttarget | ||||||||||
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). | ||||||||||
RepairDestructibles(destructible1ID, destructible2ID, ...) Repairs the specified destructibles. | ||||||||||
ReplacePlayerCockpit(cockpitmacro) Replace the player ship cockpit with the specified macro. | ||||||||||
updated in 4.21 Beta 1 (VR: 4.20) | success = RequestSofttargetLock(requesterID) | 4.21 Beta 1 (VR: 4.20): added success return value | ||||||||
ResetAllExtensionSettings() Resets all changes to extension settings from this session. | ||||||||||
RestoreGameOptions() Restores the game settings from the default config. | ||||||||||
RestoreGraphicOptions() Restores the gfx settings from the default config. | ||||||||||
RestoreOptionsMenu() Opens the options menu. | ||||||||||
RestoreSoundOptions() Restores the sound settings from the default config. | ||||||||||
ReturnFromMenu([returnparam]) Returns from a conversation menu. Optionally passing a parameter. | ||||||||||
SaveFullscreenOption() Save the current fullscreen setting to the player config. | ||||||||||
SaveGame(filename, savename) Save the game to the specified filename. | ||||||||||
SaveInputProfile(filename, id, customname[, copyfromfile]) Save the input profile. | ||||||||||
SaveInputSettings(actionTable, stateTable, rangeTable) | ||||||||||
SaveResolutionOption() Save the current resolutions setting to the player config. | ||||||||||
ScheduleReloadUI() Schedule a ui reload. | ||||||||||
SelectAction | ||||||||||
bool = SelectBackOption() Select the back in a conversation choice. | ||||||||||
SelectDialogOption | ||||||||||
SendEntityTransportDrone(entityID, containerID or nil) Sends the specified entity to the given container or the player ship via remote transport drone. | ||||||||||
added in 3.50 RC 1 | SignalObject(componentID [, param1] [, param2] [, param3] [, delay]) Sends a generic ObjectSignalledEvent on the specified component. These can be listened to by MD/AI script. | |||||||||
SendTransportDrone(sendingentityID, receivingentityID, waretype, wareAmountArray) | ||||||||||
SetActiveMission(missionID) Sets the specified mission as active. | ||||||||||
SetAdapterOption(adapterOrdinal) Sets the display adapter to the specified ordinal. | ||||||||||
SetAimAssistOption(setting) Sets the aim assist setting. | ||||||||||
SetAntiAliasModeOption(antialiasmode) Sets the anti alias mode. | ||||||||||
SetAutorollOption() Toggles the autoroll setting. | ||||||||||
SetAutosaveOption() Toggles autosave setting. | ||||||||||
SetBoostToggleOption() Toggle the boost toggle setting. | ||||||||||
responsibility = SetBudgetResponsibility(entityID, responsibility) Set the budget responsibility of the specified entity. | ||||||||||
added in 3.60 Beta 1 | SetButtonColor(buttonID, r, g, b, alpha) | |||||||||
SetButtonText | ||||||||||
SetCaptureHQOption() Toggle the capture hq setting. | ||||||||||
SetCellContent | ||||||||||
SetCollisionAvoidanceAssistOption() Toggle the collision avoidance assist setting. | ||||||||||
SetComponentName(componentID, name) | ||||||||||
SetConfineMouseOption() | ||||||||||
added in 4.00 Beta 3 | SetContainerStockLimitOverride(containerID, ware, amount) Define a stock limit for a particular ware for this ship/station. | |||||||||
SetContainerWarePriceOverride(containerID or buildmoduleID, ware, buysellswitch, price) Sets the price the specified container buys/sells the ware. | ||||||||||
SetCrashReportOption() Toggles the crash report setting. | ||||||||||
SetDeadzoneOption(percentage) Set the deadzone setting to the specified percentage. | ||||||||||
SetDifficultyOption(setting) Sets the difficulty setting. | ||||||||||
SetDiffuseColor | ||||||||||
SetDistortionOption() Toggles the distortion setting. | ||||||||||
SetEffectDistanceOption(distance) Sets the effect distance setting. | ||||||||||
DEPRECATED SetEMCutsceneOption() Toggle the event monitor cutscene setting. | ||||||||||
SetExtensionSettings(id, personal, setting, value) Sets the setting of the specified extension. | ||||||||||
SetFOVOption(fov) Sets the fov setting. | ||||||||||
SetFullscreenDetailmonitorOption() Toggles the fullscreen detailmonitor setting. | ||||||||||
updated in 4.10 Beta 1 | bool = SetFullScreenOneToOne() Sets the render mode of the current UI environment to fullscreen 1:1 mapping. Return value indicates success/failure. | 4.10 Beta 1: added boolean return value. | ||||||||
added in 4.21 Beta 1 (VR: 4.20) | SetFullScreenWorldSpace() Sets the render mode of the current UI environment to worldspace rendering mode. | |||||||||
SetFullscreenOption(setting, [checksetting]) Sets the fullscreen setting and optionally provide a prompt if the setting worked. | ||||||||||
SetGamepadModeOption(setting) Sets the gamepad mode option to setting. | ||||||||||
SetGammaOption(gamma) Sets the gamma setting. | ||||||||||
SetGfxQualityOption(setting) Sets the gfx quality setting. | ||||||||||
SetGlowOption(setting) Sets the glow setting. | ||||||||||
SetHeight | ||||||||||
SetIcon | ||||||||||
SetInversionSetting(rangeid, configname) Toggles inversion for the specified range input. | ||||||||||
SetJoysticksOption(joystick, guid) Sets the specified guid as the joystick. | ||||||||||
SetLegacyMainMenuOption() Toggles the legacy main menu setting. | ||||||||||
SetLegacyShadersOption() Toggles the legacy shaders setting. | ||||||||||
SetLODOption(lodfactor) Sets the lod setting. | ||||||||||
SetMainMissiontargetMessage(posID, messageID) | ||||||||||
amount = SetMaxBudget(entityID, amount) Sets the max budget of the specified entity. | ||||||||||
amount = SetMinBudget(entityID, amount) Sets the min budget of the specified entity. | ||||||||||
deprecated in 4.21 Beta 1 (VR: 4.20) | DEPRECATED SetMouseOverride(element, cursorIcon) 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. | |||||||||
SetMouseSleeping() Sets the mouse to sleep until moved again. | ||||||||||
SetNonSquadShipsForTradeOffersOption() Toggles the setting whether non-squad ships should be included in the trade offers menu. | ||||||||||
changed in 4.10 Beta 5 | SetNPCBlackboard(entityID, valueName, value) Sets the blackboard variable "valueName" from the blackboard of the specified entity to "value". If the "value" is nil, the blackboard variable is cleared. | 4.10 Beta 5: If the "value" is nil, the blackboard variable is cleared. | ||||||||
SetNPCSkill(entityID, skill, value) Set the specified skill of the given entity to value. | ||||||||||
SetPersonalizedCrashReportsOption() | ||||||||||
added in 4.21 Beta 1 (VR: 4.20) | SetPointerOverride(element, pointerID) 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). | |||||||||
added in 4.31 Beta 1 | SetPriorityMissionTargetMessage(posID, messageID) | |||||||||
SetRadarOption(setting) Sets the radar setting. | ||||||||||
added in 4.00 Beta 1 | SetRenderTargetOneToOne() 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. | |||||||||
SetRenderTargetSize(texturename, width, height) Sets the size of the specified rendertarget (given as a relative path to the texturename). | ||||||||||
SetResolutionOption(width, height [, checksetting]) Sets the resoltion to the specifed values. Optionally provide a prompt if the setting worked. | ||||||||||
SetRumbleOption(setting) Sets the rumble setting. | ||||||||||
SetSensitivitySetting(rangeid, configname, sensitivity) Sets the sensitivity setting of the specified input range. | ||||||||||
SetShaderQualityOption(setting) Sets the shader quality setting. | ||||||||||
SetShadowOption(setting) Sets the shadow setting. | ||||||||||
SetSoftShadowsOption() Toggles the soft shadow setting. | ||||||||||
SetSofttarget | ||||||||||
SetSoundOption() Toggle the global sound setting. | ||||||||||
SetSSAOOption(setting) Sets the ssao setting. | ||||||||||
SetStatValue(stat, value) Sets the specified statistic to value. | ||||||||||
SetSteeringNoteOption() Toggles the steering note setting. | ||||||||||
SetStopShipInMenuOption() Toggles the setting whether the playership should stop while a menu is open. | ||||||||||
SetSubtitleOption(setting) Sets the subtitle setting. | ||||||||||
SetText | ||||||||||
SetTextColor | ||||||||||
SetTextureColorMode | ||||||||||
SetViewDistanceOption(distance) Sets the view distance setting. | ||||||||||
SetVirtualCargoMode(containerID, onoff) Sets the specified container to virtual cargo mode. Using its trade queue to predict future cargo and unit availability. | Virtual cargo mode should be disabled again when leaving the current menu. | |||||||||
SetVolumeOption(volumetype, volume) Sets the volume setting of the specified type. | ||||||||||
SetVSyncOption() Toggles the vsync setting. | ||||||||||
SetWidth | ||||||||||
deprecated in 4.21 Beta 1 (VR: 4.20) | DEPRECATED ShowInteractMenu() Starts the interact menu interaction. | |||||||||
ShowMissionObjective | ||||||||||
ShowPresentation | ||||||||||
StartAutoPilot(componentID) Start the auto pilot on the specified component. | ||||||||||
StartBriefing(missionid, {texturename1, ...}) Notifies the MD that a mission briefing was started. | ||||||||||
added in 4.21 Beta 1 (VR: 4.20) | success = StartConversationFromMenu(conversation, actor, convparam) Starts the specified new conversation in MD. This requires that no conversation is currently active. Conversation parameter is required but can be nil. | |||||||||
StartCutscene | ||||||||||
StartPlayingSound | ||||||||||
success = StartSubConversationFromMenu(conversation, actor[, convparam][, baseparam][, view]) Proceeds from a conversation menu to the specified new conversation in MD. Optionally passing parameters. | ||||||||||
StopAutoPilot() Stops the auto pilot. | ||||||||||
StopBriefing(missionid) Notifiy the MD that a mission briefing stopped. | ||||||||||
StopCutscene | ||||||||||
StopPlayingSound | ||||||||||
StopRestoringOptionsMenu() Stop restoring the options menu after ui reloads. | ||||||||||
SwitchInteractiveObject | ||||||||||
ToggleFactionTradeRestriction(containerID) Toggle faction trade restriction on the specified container. | ||||||||||
ToggleFactionTradeWareOverride(containerID, ware) Toggle faction trade restriction override on the specified container for the given ware. | ||||||||||
ToggleMissionGuidance(missionid) Toggle the mission guidance for the specified mission. | ||||||||||
TraceBack | ||||||||||
transferredAmount = TransferInventoryToPlayer(ware, amount, entityID) Transfers the specified ware and amount from the given entity to the player. | ||||||||||
transferredMoney = TransferMoneyToPlayer(amount, entityID) Transfers the specified amount from the given entity to the player. | ||||||||||
transferredAmount = TransferPlayerInventoryTo(ware, amount, entityID) Transfers the specified ware and amount from the player to the given entity. | ||||||||||
transferredMoney = TransferPlayerMoneyTo(amount, entityID) Transfers the specified amount from the player to the given entity. | ||||||||||
text = TruncateText(text, fontname, fontsize, width [, wordwrap, textheight]) Truncates the given text with the specified limitations. | ||||||||||
UninstallSteamDLC(appid) Uninstalls the specified steam dlc. | ||||||||||
changed in 4.00 Beta 3 | Unpause([explicit]) Unpause the game. If the explicit flag is set to true, this will unpause the game as if the pause key was hit. | |||||||||
UnregisterAddonBindings(addonname, [, groupid = ""]) Unregisters addon key bindings using the <bindinggroup /> nodes in ui.xml. If no groupid is specified all groups will be unregistered. | ||||||||||
deprecated in 4.31 Beta 1 | DEPRECATED UnsetMapRenderTarget() Resets the render target for the radar/map display. | |||||||||
deprecated in 4.21 Beta 1 (VR: 4.20) | DEPRECATED UnsetMouseOverride(element) Removes any specified mouse cursor override from the specified element or its children. | |||||||||
added in 4.21 Beta 1 (VR: 4.20) | UnsetPointerOverride(element) Removes any specified pointer override from the specified element or its children. | |||||||||
added in 4.31 Beta 1 | UnregisterMouseInteractions(element) Unregisters the specified elemnent (and all its children) from mouse/pointer picking interactions. | |||||||||
UnsuspendConversation | ||||||||||
UpdateRegisteredWidget | ||||||||||
UpgradeObject(destructibleID, upgradetype, level) Upgrade the specified destructible with the given upgrade level. |
// @since 4.31 Beta 1: depreacted (use NotifyTargetElementShown)
6 Comments
Anonymous
Just found out this List is not complete. Needed to get the Player Entity for interfacing between Lua and MD in an consistent manner for all Objects (using the Pilots/Captains or the Managers Blackboard) and wanted to use the Player Entity as Blackboard for the special Case of the player.primaryship - it is not Listed here but GetPlayerEntityID() worked like a charm in the end
UniTrader
Stefan Hett
X Rebirth doesn't provide that function itself. So if it's available to you, I take it you have some mod installed which defines this function globally.
Anonymous
i would be surprised if i did. just searched all lua files in my Mod Testing XR Directory and the usage in my Renaming Mod was the only result (where its called, but its not defined there)
Maybe XR developed an AGI and can solve this by itself 
Also no error in the Log, and this Value/function must have been acessed at least twice (first for saving my blackboard var for the unformatted name, then again for reading it for further edits).
PS and i just confirmed by looking in a Savegame that my Blackboard Var is indeed saved on the player.entity
UniTrader
PPS Link with the Mod where i call this nonexistent Function if interested: http://steamcommunity.com/sharedfiles/filedetails/?id=766717010
Stefan Hett
I quickly tested it, downloading the mod and modifying the menu_rename.lua file adding the following line in the OK-button handler:
DebugError(tostring(GetPlayerEntityID()))
Pressing the OK-button in-game then produces the expected error message for me:
The call to GetPlayerEntityID() in menu.onShowMenu() (ln 135 in menu_rename.lua) is not triggering directly that error, since it's part of an expression evaluation. In this case, the error won't pop up but rather menu.controlentity will be false (later-on you'll then get an error with the call to GetNPCBlackboard(menu.controlentity, "$namereplacement")).
Steps to reproduce:
Here you'll get the following error with the vanilla game:
So as said: If you get a different behavior, I strongly suspect that you have some other mod (or local modifications) active which declares that function globally.
Anonymous
well, i somehow think we might have diffrent Versions of XR.
Today i deleted the whole Steam XR folder (including all Extensions) and redownloaded it. the DLCs were also re-added, and i also Subscribed my own Mod. then confirmed in the Extensions Folder that no other Extensions were present and also checked the InGame Extensions Menu ( https://www.dropbox.com/s/56goh9d0fdrxpbc/Screenshot%202017-03-22%2020.15.03.png?dl=0 ) - and found nothing which might interfere.
then i tested my Mod
Result Screens:
When entering the Name:
https://www.dropbox.com/s/e9ecanqeco80ori/Screenshot%202017-03-22%2020.17.00.png?dl=0
After Entering the Name:
https://www.dropbox.com/s/e9ecanqeco80ori/Screenshot%202017-03-22%2020.17.00.png?dl=0
And when returning to the Renaming Menu:
https://www.dropbox.com/s/pqexhnrrdrpg7bg/Screenshot%202017-03-22%2020.17.04.png?dl=0
confirmed this for both the current regular Version and the Public Beta.
Also looked in the Log File after doing a Rename (also activated my own Debug Output for that test so the Entity where the Blackboard Var is taken from is written to the Log)
Result Log:[code]Logfile started, time Wed Mar 22 20:21:51 2017
[General] 41.07 ======================================
[=ERROR=] 41.07 Error in MD cue md.UT_CAC_Object_Name_Managment.NameUpdate<inst:20cbc>: Property lookup failed: $nameB
* Expression: '%1\nDYNAMIC: %2 %4 %3'.[$debug, $nameA, @$nameB, if $nameA == $nameB then '==' else '!=']
[General] 41.07 ======================================
[General] 41.07 *** Context:md.UT_CAC_Object_Name_Managment.NameUpdate<inst:20cbc>: 41.0737 Albion Skunk Advanced Renaming Name Stages: // naming Entity: Ren Otani
UNFORM: /hexBADA55#/type DEBUG
CUSTOM: (Not seperate from next yet)
LOCAL: /hexBADA55#/type DEBUG
STATIC: #FFBADA55#/type DEBUG
SCRIPT EXPR: table[]
SCRIPT: #FFBADA55#Albion Skunk DEBUG
DYNAMIC: #FFBADA55#Albion Skunk DEBUG != null
POSTDYN: #FFBADA55#Albion Skunk DEBUG null[/code]
Since the Unformatted Name is never passed directly but only read from the Blackboard of the "controlentity" (Pilot, Manager or Playerentity) this Var must have been set from lua, and as expected by me on the right Entity.
(note: fixed some small mistake afterwards where i forgot an @)
Well, will not press this further, i am glad that it works for me
UniTrader
Stefan Hett
The difference between your and my test case is that you tested it while being in the cockpit. That doesn't trigger the code path, since there the retrieved ship's control entity is the player and will use that (i.e. it won't reach the call to GetPlayerEntityID()).
If you go to the ship's backroom first (ENTER -> 7 -> 1) (see my repro case step 2) and then use the rename menu, you'd get the error I reported above.