Difference between revisions of "API Index"

From Vendetta Lua
Jump to: navigation, search
(GetStationDesiredItem)
(too much hassle to keep them in sync by hand. gonna periodically rebuild it from index2 at some point)
 
(155 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 
'''WARNING: This index is is mostly based on guesswork and experimentation. A lot of entries may be incomplete or inaccurate.'''
 
'''WARNING: This index is is mostly based on guesswork and experimentation. A lot of entries may be incomplete or inaccurate.'''
  
 
+
'''Somewhat out of date. See [[API_Index2]] for current descriptions.'''
 
+
  
 
== Functions ==
 
== Functions ==
 +
 +
=== AbbrLocationStr ===
 +
'''Definition:'''<br>
 +
AbbrLocationStr(int sectorid) -> string name
 +
<br>
 +
'''Description:''' <br>
 +
Get abbreviated sector name for sectorid
 +
<br>
 +
'''Arguments:'''<br>
 +
''sectorid'' [[sectorid]]
 +
<br>
 +
'''Returns:'''<br>
 +
''name'' shortened sector name
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">AbbrLocationStr(5000) -> "Sed H9"</source><br>
 +
<br>
  
 
=== AbortMission ===
 
=== AbortMission ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
AbortMission() -> nil
+
AbortMission(int itemid) -> nil
<br><br>
+
<br>
 
'''Description:''' <br>
 
'''Description:''' <br>
Abort the currently running mission.
+
Abort a mission
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''itemid'' [[itemid]] of mission (optional)
'''Returns:'''
+
<br>
<br><br>
+
 
'''Example:'''
+
=== AccomplishmentTemplate ===
<br><br>
+
'''Definition:'''<br>
 +
AccomplishmentTemplate(function cb(string desc)) -> userdate box
 +
<br>
 +
'''Description:''' <br>
 +
Create box with accomplishment icons (targetinfo dialog). see: [[AccomplishmentTemplate]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''cb'' function to call when clicking<br>
 +
''desc'' description of clicked accomplishment
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[AccomplishmentTemplate]]
 +
<br>
 +
 
 +
=== AccomplishmentTemplate2 ===
 +
'''Definition:'''<br>
 +
AccomplishmentTemplate2(function cb(string desc, int type, level)) -> userdate box
 +
<br>
 +
'''Description:''' <br>
 +
Create list with accomplishment icons (pda playerinfo dialog). see: [[AccomplishmentTemplate]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''cb'' function to call when clicking icons<br>
 +
''desc'' description of clicked accomplishment<br>
 +
''type'' type of clicked accomplishment<br>
 +
''level'' level of clicked accomplishment
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[AccomplishmentTemplate]]
 +
<br>
  
 
=== Article ===
 
=== Article ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
Article(string '''word''') -> string '''out'''
+
Article(string ''word'') -> string ''out''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
prepends the appropriate article to the string '''word'''
+
prepends the appropriate article to the string ''word''
<br><br>
+
<br>
'''Arguments:''' <br>
+
'''Arguments:'''<br>
'''word''' string to prepend an article to.
+
''word'' string to prepend an article to.
<br><br>
+
<br>
'''Returns:''' <br>
+
'''Returns:'''<br>
'''out''' the string with an article prepended.
+
''out'' the string with an article prepended.
<br><br>
+
<br>
 
'''Example''':<br>
 
'''Example''':<br>
 
<source lang="lua">Article("apple") -> "an apple"</source><br>
 
<source lang="lua">Article("apple") -> "an apple"</source><br>
 
<br>
 
<br>
 
  
 
=== CanUseAddon ===
 
=== CanUseAddon ===
 
'''Definition:''' <br>
 
'''Definition:''' <br>
CanUseAddon(string '''itemid''') -> bool '''ret1''' {string l1 ..}
+
CanUseAddon(int ''itemid'') -> bool ''ret1'', {string l1 ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
check if the player can equip the addon '''itemid'''
+
check if the player can equip the addon ''itemid''
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of addon to check
+
''itemid'' [[itemid]] of addon to check
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret1''' true or false depending on equipability<br>
+
''ret1'' can use<br>
'''l1''' license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with the station)<br>
+
''l1'' license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with a station)<br>
  
 
'''Example:'''<br>
 
'''Example:'''<br>
Line 57: Line 101:
  
 
=== CanUseMerchandise ===
 
=== CanUseMerchandise ===
'''Definition:'''  
+
'''Definition:''' <br>
<br><br>
+
CanUseMerchandise(table ''iteminfo'') -> bool ''ret1'', {string l1 ..}
'''Description:'''
+
<br>
<br><br>
+
'''Description:'''<br>
'''Arguments:'''
+
check if the player can use the item ''iteminfo''
<br><br>
+
<br>
'''Returns:'''
+
'''Arguments:'''<br>
<br><br>
+
''iteminfo'' iteminfo of item to check
'''Example:'''
+
<br>
<br><br>
+
'''Returns:'''<br>
 
+
''ret1'' can use<br>
 +
''l1'' license requirements of the item<br>
 +
<br>
  
 
=== CancelPurchaseShipLoadout ===
 
=== CancelPurchaseShipLoadout ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
CancelPurchaseShipLoadout() -> nil
'''Description:'''
+
<br>
<br><br>
+
'''Description:'''<br>
'''Arguments:'''
+
Interrupt purchase of ship loadout
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== ChatLogTemplate  ===
 +
'''Definition:'''<br>
 +
ChatLogTemplate(string bg, string scrolledbg, function updatecb, string editbg, bool clickable) -> table container
 +
<br>
 +
'''Description:'''<br>
 +
Create rudimentary chet container. See [[ChatLogTemplate]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''bg'' [[iupcolor]] of background<br>
 +
''scrolledbg'' [[iupcolor]] of background when scrolled up<br>
 +
''updatecb'' function called whenever contents of the container changes<br>
 +
''editbg'' image for background of entry<br>
 +
''clickable'' if true the container will respond to mouse clicks
 +
<br>
 +
'''Returns:'''<br>
 +
''container'' [[ChatLogTemplate]]
 +
<br>
  
 
=== CheckCharProximity ===
 
=== CheckCharProximity ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
CheckCharProximity(int dist, charid) -> bool inrange
'''Description:'''
+
<br>
<br><br>
+
'''Description:'''<br>
'''Arguments:'''
+
Tell if a character at a given distance is within proximity range. The function only returns true once for every character in radar proximity range. Any further checks will return false until the character leaves the range.
<br><br>
+
<br>
'''Returns:'''
+
'''Arguments:'''<br>
<br><br>
+
''dist'' distance of character<br>
'''Example:'''
+
''charid'' [[charid]]
<br><br>
+
<br>
 
+
'''Returns:'''<br>
 +
''inrange'' true if a character is within proximity range and hasn't left it since the last check
 +
<br>
  
 
=== CheckProximityWarning ===
 
=== CheckProximityWarning ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
CheckProximityWarning() -> nil
'''Description:'''
+
<br>
<br><br>
+
'''Description:'''<br>
'''Arguments:'''
+
Trigger the PROXIMITY_ALERT event if a character, that hasn't been before, is within proximity range
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== CheckStorageAndUnloadCargo ===
 +
'''Definition:'''
 +
CheckStorageAndUnloadCargo({{int itemid, int quantity} ..}, function cb) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Unload cargo items and quantities according to the provided table also checks station storage and pops up a dialog if not enough available
 +
<br>
 +
'''Arguments:'''<br>
 +
''itemid'' [[itemid]] of cargo item<br>
 +
''quantity'' amount of this cargo to unload<br>
 +
''cb'' optional function to call on success
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">CheckStorageAndUnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 +
unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235
 +
<br>
  
 
=== ClearGeneralChatLog ===
 
=== ClearGeneralChatLog ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
ClearGeneralChatLog() -> nil
 +
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
doesn't seem to do anything ...
+
clears general chat log..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ClearLastShipLoadout ===
 
=== ClearLastShipLoadout ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
ClearLastShipLoadout() -> nil
 
ClearLastShipLoadout() -> nil
<br><br>
+
<br>
 
'''Description:''' <br>
 
'''Description:''' <br>
 
clear last shiploadout. prevents client from asking to rebuy ship after destruction
 
clear last shiploadout. prevents client from asking to rebuy ship after destruction
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ClearMissionChatLog ===
 
=== ClearMissionChatLog ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
ClearMissionChatLog() -> nil
 +
<br>
 
'''Description:''' <br>
 
'''Description:''' <br>
does nothing..
+
clears mission log..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ClearProximityCache ===
 
=== ClearProximityCache ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
ClearProximityCache() -> nil
 +
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
I guess it clears the proximity cache?
+
Clear list of characters in proximity range. Stops [[API_Index#CheckCharProximity|CheckCharProximity]] and [[API_Index#CheckProximityWarning|CheckProximityWarning]] from ignoring them.
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ClearStationChatLog ===
 
=== ClearStationChatLog ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
ClearStationChatLog() -> nil
 +
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
does nothing...
+
clears station log (bar)..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ConfigureMultipleWeaponGroups ===
 
=== ConfigureMultipleWeaponGroups ===
'''Definition:''' ConfigureMultipleWeaponGroups{table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}
+
'''Definition:'''<br>
<br><br>
+
ConfigureMultipleWeaponGroups({table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}, function cb) -> nil
 +
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
configures weapon groups according to given tables
+
configures weapon groups according to given tables.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''group*key*''' each table seems to represent one group key to which a group of ports can be assigned. Members of the tables contain boolean values where each index represents a port. the first index seems to switch the whole group on or off depending on its value. that kind of works for the first table at least ..
+
''group*key*'' Each table represents one group key. Key 1-6 map to the primary trigger, 7-12 secondary and 13-18 tertiary. Each index in the tables represents a port. Weapon ports start at index 2. Valid values for each port are nil or true.<br>
<br><br>
+
''cb'' function to call on completition (optional)
'''Returns:'''
+
<br>
<br><br>
+
'''Example:'''<br>
'''Example:'''
+
<source lang=lua>
ConfigureMultipleWeaponGroups
+
-- enable port 1 for the primary trigger and port 2 for the secondary
<br><br>
+
-- index 1 is the power cell port
 
+
ConfigureMultipleWeaponGroups{[1]={nil, true, nil}, [2]={nil, nil, true}}
 +
</source>
  
 
=== ConfigureWeaponGroup ===
 
=== ConfigureWeaponGroup ===
'''Definition:'''  
+
'''Definition:'''<br>
<br><br>
+
ConfigureWeaponGroup(int id, table port_ids, function cb) -> nil
'''Description:'''
+
<br>
<br><br>
+
'''Description:'''<br>
'''Arguments:'''
+
Configures one weapon group
<br><br>
+
<br>
'''Returns:'''
+
'''Arguments:'''<br>
<br><br>
+
''id'' is number of group. 0-5 primary, 6-11 secondary and 12-17 tertiary trigger<br>
'''Example:'''
+
''ports_ids'' is list of ports active for that group (2-numweaponports)<br>
<br><br>
+
''cb'' function to call on completition (optional)
 
+
<br>
 +
'''Example:'''<br>
 +
<source lang=lua>
 +
-- enable port 1 and 2 for the primary trigger
 +
ConfigureWeaponGroup(0, {2,3})
 +
</source>
  
 
=== ConnectAddon ===
 
=== ConnectAddon ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
ConnectAddon(int portid, int itemid) -> bool canconnect
+
ConnectAddon(int portid, int itemid, function cb) -> bool canconnect
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Attaches the addon '''itemid''' to the active ship in port '''portid'''
+
Attaches the addon ''itemid'' to the active ship in port ''portid''
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''portid''' [[portid]] of the the port<br>
+
''portid'' [[portid]] of the the port<br>
'''itemid''' itemid of the addon
+
''itemid'' itemid of the addon<br>
<br><br>
+
''cb'' function to call on completition (optional)
 +
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''canconnect''' returns true if the player is docked and has an active ship otherwise nil
+
''canconnect'' returns true if the player is docked and has an active ship otherwise nil
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
<source lang="lua">ConnectAddon(2, 123) -> true</source><br>
+
<source lang="lua">
put the addon 123 into port 2 while the player is docked to a station
+
-- put the addon 123 into port 2 while the player is docked to a station
<br><br>
+
ConnectAddon(2, 123) -> true
 +
</source>
  
 +
=== CreateBig3DViewMenu ===
 +
'''Definition:'''<br>
 +
CreateBig3DViewMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create [[API_Index#Big3DViewDialog|Big3DViewDialog]] a [[Big3DViewDialog]]
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[Big3DViewDialog]]
 +
<br>
 +
 +
=== CreateCancelLoadoutMenu ===
 +
'''Definition:'''<br>
 +
CreateCancelLoadoutMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message. See [[MessageDialog]]<br>
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[MessageDialog]]
 +
<br>
 +
 +
=== CreateCapShipChatTab ===
 +
'''Definition:'''<br>
 +
CreateCapShipChatTab() -> userdata box
 +
<br>
 +
'''Description:'''<br>
 +
Create box with "Ship Com" tab. See [[ChatLogTemplate]]
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' box with "Ship Com" tab
 +
<br>
 +
 +
=== CreateCapShipFactionInfo ===
 +
'''Definition:'''<br>
 +
CreateCapShipFactionInfo() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CapShipFactionInfo]]
 +
<br>
 +
 +
=== CreateCapShipPDATab ===
 +
'''Definition:'''<br>
 +
CreateCapShipPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CapShipTabPDA]]
 +
<br>
 +
 +
=== CreateCapShipRepairTab ===
 +
'''Definition:'''<br>
 +
CreateCapShipRepairTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CapShipRepairTab]]
 +
<br>
 +
 +
=== CreateCapShipTacticalTab ===
 +
'''Definition:'''<br>
 +
CreateCapShipTacticalTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CapShipTacticalTab]]
 +
<br>
 +
 +
=== CreateCapShipTurretTab ===
 +
'''Definition:'''<br>
 +
CreateCapShipTurretTab() -> userdata box, button
 +
<br>
 +
'''Description:'''<br>
 +
Create [[CapShipTurretTab]] and the select button
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CapShipTurretTab]]<br>
 +
''button'' select button
 +
<br>
 +
 +
=== CreateCharCreateFailedMenu ===
 +
'''Definition:'''<br>
 +
CreateCharCreateFailedMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message. See [[MessageDialog]]<br>
 +
The created variant pops up [[API_Index#CharCreateDialog|CharCreateDialog]] after clicking the button
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[MessageDialog]]
 +
<br>
 +
 +
=== CreateCharCreateMenu ===
 +
'''Definition:'''<br>
 +
CreateCharCreateMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[CharCreateDialog]]
 +
<br>
 +
 +
=== CreateCharSelectFailedMenu ===
 +
'''Definition:'''<br>
 +
CreateCharSelectFailedMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message. See [[MessageDialog]]<br>
 +
The created variant pops up [[API_Index#CharSelectDialog|CharSelectDialog]] after clicking the button
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[MessageDialog]]
 +
<br>
 +
 +
=== CreateCharSelectMenu ===
 +
'''Definition:'''<br>
 +
CreateCharSelectMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[CharSelectDialog]]
 +
<br>
  
 
=== CreateCharacter ===
 
=== CreateCharacter ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
CreateCharacter(int name, int nation) -> nil
 
CreateCharacter(int name, int nation) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Creates the character of the given nation
 
Creates the character of the given nation
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''name''' name of character<br>
+
''name'' name of character<br>
'''nation''' nation of character
+
''nation'' nation of character
<br><br>
+
<br>
'''Returns:'''
+
 
<br><br>
+
=== CreateCharacterPDATab ===
'''Example:'''
+
'''Definition:'''<br>
<br><br>
+
CreateCharacterPDATab() -> userdata box, tab1, tab2, tab3
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDACharacterTab]]<br>
 +
''tab1'' [[PDACharacterStatsTab]]<br>
 +
''tab2'' [[PDACharacterFactionTab]]<br>
 +
''tab3'' [[PDACharacterAccomTab]]
 +
<br>
 +
 
 +
=== CreateCommPDATab ===
 +
'''Definition:'''<br>
 +
CreateCommPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDACommTab]]
 +
<br>
 +
 
 +
=== CreateConnectingMenu ===
 +
'''Definition:'''<br>
 +
CreateConnectingMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message. See [[MessageDialog]]<br>
 +
The created variant logs out after clicking the button
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[MessageDialog]]
 +
<br>
 +
 
 +
=== CreateCreditsDialog ===
 +
'''Definition:'''<br>
 +
CreateCreditsDialog(userdata parent) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create credits dialog
 +
<br>
 +
'''Arguments:'''<br>
 +
''parent'' dialog to show on clicking "Close"
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' credits dialog
 +
<br>
 +
 
 +
=== CreateEULAMenu ===
 +
'''Definition:'''<br>
 +
CreateEULAMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[EULADialog]]
 +
<br>
 +
 
 +
=== CreateInvalidAmountMenu ===
 +
'''Definition:'''<br>
 +
CreateInvalidAmountMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message. See [[msgdlgtemplate1]]
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgdlgtemplate1]]
 +
<br>
 +
 
 +
=== CreateInventoryPDATab ===
 +
'''Definition:'''<br>
 +
CreateInventoryPDATab() -> userdata dialog, tab1, tab2
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[PDAInventoryTab]]<br>
 +
''tab1'' [[PDAInventoryInventoryTab]]<br>
 +
''tab2'' [[PDAInventoryJettisonTab]]
 +
<br>
 +
 
 +
=== CreateKilledByPDATab ===
 +
'''Definition:'''<br>
 +
CreateKilledByPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[KilledByPDATab]]
 +
<br>
 +
 
 +
=== CreateKilledPDATab ===
 +
'''Definition:'''<br>
 +
CreateKilledPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[KilledPDATab]]
 +
<br>
 +
 
 +
=== CreateLoadingMenu ===
 +
'''Definition:'''<br>
 +
CreateLoadingMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[LoadingDialog]]
 +
<br>
 +
 
 +
=== CreateLoginDialog ===
 +
'''Definition:'''<br>
 +
CreateLoginDialog() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[LoginDialog]]
 +
<br>
 +
 
 +
=== CreateLoginHelpDialog ===
 +
'''Definition:'''<br>
 +
CreateLoginHelpDialog(userdata parent) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with help text for the login screen and a close button
 +
<br>
 +
'''Arguments:'''<br>
 +
''parent'' dialog to show on clicking close
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' login help dialog
 +
<br>
 +
 
 +
=== CreateLowGridPowerDialog ===
 +
'''Definition:'''<br>
 +
CreateLowGridPowerDialog() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with low grid power error
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' low grid power dialog
 +
<br>
 +
 
 +
=== CreateMissionAbortMenu ===
 +
'''Definition:'''<br>
 +
CreateMissionAbortMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[MissionAbortDialog]]
 +
<br>
 +
 
 +
=== CreateMissionPromptMenu ===
 +
'''Definition:'''<br>
 +
CreateMissionPromptMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[MissionPromptDialog]]
 +
<br>
 +
 
 +
=== CreateMissionsPDATab ===
 +
'''Definition:'''<br>
 +
CreateMissionsPDATab() -> userdata box, tab1, tab2, tab3, tab4, infobutton
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDAMissionsTab]]<br>
 +
''tab1'' [[PDAMissionNotesTab]]<br>
 +
''tab2'' [[PDAMissionAdvancementTab]]<br>
 +
''tab3'' [[PDAMissionLogTab]]<br>
 +
''tab4'' [[PDAMissionBoardTab]]<br>
 +
''infobutton'' [[PDAMissionBoardTabInfoButton]]
 +
<br>
 +
 
 +
=== CreateNavigationPDATab ===
 +
'''Definition:'''<br>
 +
CreateNavigationPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDAShipNavigationTab]]
 +
<br>
 +
 
 +
=== CreateNearbyShipsPDATab ===
 +
'''Definition:'''<br>
 +
CreateNearbyShipsPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDASensorNearbyTab]]
 +
<br>
 +
 
 +
=== CreateNewsMenu ===
 +
'''Definition:'''<br>
 +
CreateNewsMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[NewsDialog]]
 +
<br>
 +
 
 +
=== CreateNotEnoughStorageMenu ===
 +
'''Definition:'''<br>
 +
CreateNotEnoughStorageMenu() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message. See [[msgdlgtemplate1]]
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgdlgtemplate1]]
 +
<br>
 +
 
 +
=== CreateNotificationMenu ===
 +
'''Definition:'''<br>
 +
CreateNotificationMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[NotificationDialog]]
 +
<br>
 +
 
 +
=== CreateOptionsMenu ===
 +
'''Definition:'''<br>
 +
CreateOptionsMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[OptionsDialog]]
 +
<br>
 +
 
 +
=== CreatePDA ===
 +
'''Definition:'''<br>
 +
CreatePDA() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[PDADialog]]
 +
<br>
 +
 
 +
=== CreatePDATab1 ===
 +
'''Definition:'''<br>
 +
CreatePDATab1() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDATab1]]
 +
<br>
 +
 
 +
=== CreatePVPTab ===
 +
'''Definition:'''<br>
 +
CreatePVPTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PVPTab]]
 +
<br>
 +
 
 +
=== CreateQuantityPurchaseMenu ===
 +
'''Definition:'''<br>
 +
CreateQuantityPurchaseMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[API_Index#SellItemDialog]]
 +
<br>
 +
 
 +
=== CreateSensorPDATab ===
 +
'''Definition:'''<br>
 +
CreateSensorPDATab() -> userdata box, tab1, tab2, tab3, tab4, tab5
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDASensorTab]]<br>
 +
''tab1'' [[PDASensorNearbyTab]]<br>
 +
''tab2'' [[PDAKilledTab]]<br>
 +
''tab3'' [[PDAKilledByTab]]<br>
 +
''tab4'' [[PDAStationVisitsTab]]<br>
 +
''tab5'' [[PVPTab]]
 +
<br>
 +
 
 +
=== CreateShipCargoPDATab ===
 +
'''Definition:'''<br>
 +
CreateShipCargoPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDAInventoryJettisonTab]]
 +
<br>
 +
 
 +
=== CreateShipPDATab ===
 +
'''Definition:'''<br>
 +
CreateShipPDATab() -> userdata box, tab1
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDAShipTab]]<br>
 +
''tab1'' [[PDAShipNavigationTab]]
 +
<br>
 +
 
 +
=== CreateStation ===
 +
'''Definition:'''<br>
 +
CreateStation() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[StationDialog]]
 +
<br>
 +
 
 +
=== CreateStationBlankTab ===
 +
'''Definition:'''<br>
 +
CreateStationBlankTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationBlankTab]]
 +
<br>
 +
 
 +
=== CreateStationChatTab ===
 +
'''Definition:'''<br>
 +
CreateStationChatTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationChatTab]]
 +
<br>
 +
 
 +
=== CreateStationCommerceTab ===
 +
'''Definition:'''<br>
 +
CreateStationCommerceTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationCommerceTab]]
 +
<br>
 +
 
 +
=== CreateStationCommoditiesBuyTab ===
 +
'''Definition:'''<br>
 +
CreateStationCommoditiesBuyTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationCommoditiesBuyTab]]
 +
<br>
 +
 
 +
=== CreateStationCommoditiesLoadTab ===
 +
'''Definition:'''<br>
 +
CreateStationCommoditiesLoadTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationCommoditiesLoadTab]]
 +
<br>
 +
 
 +
=== CreateStationCommoditiesSellTab ===
 +
'''Definition:'''<br>
 +
CreateStationCommoditiesSellTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationCommoditiesSellTab]]
 +
<br>
 +
 
 +
=== CreateStationCommoditiesTab ===
 +
'''Definition:'''<br>
 +
CreateStationCommoditiesTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationCommerceCommoditiesTab]]
 +
<br>
 +
 
 +
=== CreateStationEquipmentBuyTab ===
 +
'''Definition:'''<br>
 +
CreateStationEquipmentBuyTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentBuyTab]]
 +
<br>
 +
 
 +
=== CreateStationEquipmentManageTab ===
 +
'''Definition:'''<br>
 +
CreateStationEquipmentManageTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentManageTab]]
 +
<br>
 +
 
 +
=== CreateStationEquipmentSellTab ===
 +
'''Definition:'''<br>
 +
CreateStationEquipmentSellTab() -> userdata box
 +
<br>
 +
'''Description:'''<br>
 +
Unused. Creates old equipment sell tab.
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[OldStationEquipmentSellTab]]
 +
<br>
 +
 
 +
=== CreateStationEquipmentTab ===
 +
'''Definition:'''<br>
 +
CreateStationEquipmentTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentTab]]
 +
<br>
 +
 
 +
=== CreateStationFactionInfo ===
 +
'''Definition:'''<br>
 +
CreateStationFactionInfo() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create [[StationFactionInfo]]
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[StationFactionInfo]]
 +
<br>
 +
 
 +
=== CreateStationHelpMenu ===
 +
'''Definition:'''<br>
 +
CreateStationHelpMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[StationHelpDialog]]
 +
<br>
 +
 
 +
=== CreateStationMissionBuyTab ===
 +
'''Definition:'''<br>
 +
CreateStationMissionBuyTab() -> userdata box, button
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDAMissionBoardTab]]<br>
 +
''button'' info button in box
 +
<br>
 +
 
 +
=== CreateStationPDATab ===
 +
'''Definition:'''<br>
 +
CreateStationPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationTabPDA]]
 +
<br>
 +
 
 +
=== CreateStationPortConfigTab ===
 +
'''Definition:'''<br>
 +
CreateStationPortConfigTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentManagePortConfigTab]]
 +
<br>
 +
 
 +
=== CreateStationShipPurchaseTab ===
 +
'''Definition:'''<br>
 +
CreateStationShipPurchaseTab() -> userdata box, button
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentBuyShipTab]]<br>
 +
''button'' buy button in box
 +
<br>
 +
 
 +
=== CreateStationShipSelectionTab ===
 +
'''Definition:'''<br>
 +
CreateStationShipSelectionTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentManageShipSelectionTab]]
 +
<br>
 +
 
 +
=== CreateStationShipStatusTab ===
 +
'''Definition:'''<br>
 +
CreateStationShipStatusTab() -> userdata box
 +
<br>
 +
'''Description:'''<br>
 +
Unused. Creates old ship status tab.
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationEquipmentManageShipStatusTab]]
 +
<br>
 +
 
 +
=== CreateStationVisitsPDATab ===
 +
'''Definition:'''<br>
 +
CreateStationVisitsPDATab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationVisitsTab]]
 +
<br>
 +
 
 +
=== CreateStationWelcomeTab ===
 +
'''Definition:'''<br>
 +
CreateStationWelcomeTab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[StationCommerceWelcomeTab]]
 +
<br>
 +
 
 +
=== CreateStorageRentalDialog ===
 +
'''Definition:'''<br>
 +
CreateStorageRentalDialog() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create storage rental dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[StorageRentalDialog]]
 +
<br>
 +
 
 +
=== CreateSurveyMenu ===
 +
'''Definition:'''<br>
 +
CreateSurveyMenu() -> userdata dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[SurveyDialog]]
 +
<br>
 +
 
 +
=== CreateTargetInfo ===
 +
'''Definition:'''<br>
 +
CreateTargetInfo() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDATargetInfo]]
 +
<br>
 +
 
 +
=== CreateVoiceChatOptions ===
 +
'''Definition:'''<br>
 +
CreateVoiceChatOptions() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create Voicechat options dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[VoiceChatOptions]]
 +
<br>
  
 
=== DeleteCharacter ===
 
=== DeleteCharacter ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
DeleteCharacter(int slot) -> nil
 
DeleteCharacter(int slot) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Deletes the character in the character slot '''slot'''
+
Deletes the character in the character slot ''slot''
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''slot''' which character to delete
+
''slot'' which character to delete
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== DisableProximityWarning ===
 
=== DisableProximityWarning ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
DisableProximityWarning() -> nil
 
DisableProximityWarning() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
disable the proximity warning ...
 
disable the proximity warning ...
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== DisconnectAddon ===
 
=== DisconnectAddon ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
DisconnectAddon(int '''itemid''') -> bool ret1
+
DisconnectAddon(int ''itemid'') -> bool ret1
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
detaches the addon '''itemid''' and stores it in the station<br>
+
detaches the addon ''itemid'' and stores it in the station<br>
 
Note: detached items will likely have a different itemid in the station
 
Note: detached items will likely have a different itemid in the station
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' id of the item to detach  
+
''itemid'' id of the item to detach  
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret1''' returns true if the player is docked and has an active ship otherwise nil
+
''ret1'' returns true if the player is docked and has an active ship otherwise nil
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">DisconnectAddon(123) -> true</source>
 
<source lang="lua">DisconnectAddon(123) -> true</source>
 
remove the item 123 from the active ship while the player is docked to a station
 
remove the item 123 from the active ship while the player is docked to a station
<br><br>
+
<br>
 
+
  
 
=== DisconnectAllAddons ===
 
=== DisconnectAllAddons ===
 
'''Definition:'''
 
'''Definition:'''
 
DisconnectAllAddons() -> nil
 
DisconnectAllAddons() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Detach all addons from the active ship and store them in the current station
 
Detach all addons from the active ship and store them in the current station
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== EnableProximityWarning ===
 
=== EnableProximityWarning ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
DisableProximityWarning() -> nil
 
DisableProximityWarning() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
enable the proximity warning ...
 
enable the proximity warning ...
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== EnableVoiceChat ===
 +
'''Definition:'''<br>
 +
EnableVoiceChat(bool enable) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Toggle Voice chat
 +
<br>
 +
'''Arguments:'''<br>
 +
''enable'' enable voice chat if true
 +
<br>
  
=== FindAndReplaceTags ===
+
=== FactionStandingTemplate ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
FindAndReplaceTags(string text, table matches) -> string ret1
+
FactionStandingTemplate(function cb, frame, filler, string expand) -> userdata container
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Replaces all occurances of with &lt; and &gt; enclosed substrings in '''text''' with matching values from the provided table
+
Creates a container with a list of faction standings of a character. Details: [[FactionStandingTemplate]]
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''test''' string to replace tags in<br>
+
''cb'' called on clicking an item in the list. [[factionid]] of selected item is passed to it<br>
'''matches''' table with tags/replacement pairs
+
''frame'' iup.*frame function<br>
<br><br>
+
''filler'' iup.*filler function<br>
 +
''expand'' iup expand parameter that is applied to the container
 +
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret1''': converted text
+
''container'' [[FactionStandingTemplate]]
<br><br>
+
<br>
 +
 
 +
=== FactionStandingWithInfoTemplate ===
 +
'''Definition:'''<br>
 +
FactionStandingWithInfoTemplate() -> userdata container
 +
<br>
 +
'''Description:'''<br>
 +
Wrapper around [[API_Index#FactionStandingTemplate|FactionStandingTemplate]] that adds faction descriptions to the list.
 +
<br>
 +
'''Returns:'''<br>
 +
''container'' [[FactionStandingWithInfoTemplate]]
 +
<br>
 +
 
 +
=== FadeControl ===
 +
'''Definition:'''<br>
 +
FadeControl(userdata control, int timetofade, float startalpha, endalpha, function cb, ...) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Fade an iup control by modifying its alpha field. Usually a label.
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' iup control to fade<br>
 +
''timetofade'' time to fade in seconds<br>
 +
''startalpha'' alpha value before fading (0-1)<br>
 +
''endalpha'' alpha value after fading(0-1)<br>
 +
''cb'' function to call when done<br>
 +
''...'' arguments to pass to ''cb''
 +
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
<source lang="lua">FindAndReplaceTags("hi this is a &lt;br&gt; linebreak", {br="\n"})<br>
+
<source lang="lua">
-> "hi this is a<br>
+
-- shows a dialog with a label that will fade away on clicking "Fade"
linebreak"</source>
+
-- clicking on "Stop" interrupts the process
<br><br>
+
  
 +
local d, label, fadebutton, stopbutton
 +
label = iup.label{title="Fade me!"}
  
=== FindAndReplaceTagsCB ===
+
local function fadebutton_cb()
'''Definition:'''
+
local function fade_cb()
<br><br>
+
label.alpha = "255" -- reset the alpha when done
'''Description:'''
+
end
<br><br>
+
FadeControl(label, 5, 1, 0, fade_cb) -- fade for 5 seconds from full to zero alpha
'''Arguments:'''
+
end
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
local function stopbutton_cb()
 +
      local fadeinfo = FadeLookup(label) -- get the fade info table for the label
 +
if fadeinfo then -- check if the control is still being faded
 +
    print("Fading was stopped after "..tostring(fadeinfo.counter).." seconds") -- print elapsed time
 +
end
  
=== FindMissionByID ===
+
FadeStop(label) -- interrupt fading
'''Definition:'''
+
label.alpha = "255" -- reset alpha
<br><br>
+
end
'''Description:'''
+
<br><br>
+
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
fadebutton = iup.button{title="Fade", action=fadebutton_cb}
 +
stopbutton = iup.button{title="Stop", action=stopbutton_cb}
 +
d = iup.dialog{iup.vbox{label, fadebutton, stopbutton}}
 +
d:show()
 +
</source>
 +
<br>
 +
 +
=== FadeLookup ===
 +
'''Definition:'''<br>
 +
FadeLookup(userdata control) -> table fi
 +
<br>
 +
'''Description:'''<br>
 +
Get a fade info table of a control that is currently being faded.
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' faded iup control
 +
<br>
 +
'''Returns'''<br>
 +
''fi'' fade info table or nil if the given control isn't currently being faded<br>
 +
''fi.timetofade'' time to fade in seconds<br>
 +
''fi.startalpha'' alpha value before fading (0-1)<br>
 +
''fi.endalpha'' alpha value after fading(0-1)<br>
 +
''fi.endfunc'' function to call when done<br>
 +
''fi.endfuncargs'' table with arguments for ''fi.endfunc''<br>
 +
''fi.counter'' elapsed fade time<br>
 +
''fi.control'' control that is being faded
 +
<br>
 +
'''Example:'''<br>
 +
see [[API_Index#FadeControl|Fadecontrol]]
 +
<br>
 +
 +
=== FadeStop ===
 +
'''Definition:'''<br>
 +
FadeStop(userdata control) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Stop fading a control
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' control that is being faded
 +
<br>
 +
'''Example:'''<br>
 +
see [[API_Index#FadeControl|Fadecontrol]]
 +
<br>
 +
 +
=== FillInObjectInfo ===
 +
'''Definition:'''<br>
 +
FillInObjectInfo(string name, desc) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Put given name and description into the character info dialog
 +
<br>
 +
'''Arguments:'''<br>
 +
''name'' object name<br>
 +
''desc'' object description
 +
<br>
 +
 +
=== FillInPlayerInfo ===
 +
'''Definition:'''<br>
 +
FillInPlayerInfo(int charid) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Fill character info dialog with info of given character
 +
<br>
 +
'''Arguments:'''<br>
 +
''charid'' [[charid]]
 +
<br>
 +
 +
=== FindAndReplaceTags ===
 +
'''Definition:'''<br>
 +
FindAndReplaceTags(string text, table matches) -> string ret1
 +
<br>
 +
'''Description:'''<br>
 +
Replaces all occurances of with &lt; and &gt; enclosed substrings in ''text'' with matching values from the provided table
 +
<br>
 +
'''Arguments:'''<br>
 +
''test'' string to replace tags in<br>
 +
''matches'' table with tags/replacement pairs
 +
<br>
 +
'''Returns:'''<br>
 +
''ret1'': converted text
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">FindAndReplaceTags("hi this is a<br>linebreak", {br="\n"})<br>
 +
-> "hi this is a
 +
linebreak"</source>
 +
<br>
 +
 +
=== FindAndReplaceTagsCB ===
 +
'''Definition:'''<br>
 +
FindAndReplaceTagsCB(string text, function cb) -> string ret1
 +
<br>
 +
'''Description:'''<br>
 +
Pass each occurances of with &lt; and &gt; enclosed substrings in ''text'' to ''cb'' and replace them with the return value
 +
<br>
 +
'''Arguments:'''<br>
 +
''test'' string to replace tags in<br>
 +
''cb'' called with the content of each tag as argument
 +
<br>
 +
'''Returns:'''<br>
 +
''ret1'': converted text
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
local function find_cb(t)
 +
      if t == "br" then
 +
      return "\n"
 +
      end
 +
end
 +
FindAndReplaceTags("hi this is a<br>linebreak", find_cb)<br>
 +
-> "hi this is a
 +
linebreak"</source>
 +
<br>
  
 
=== ForEachBuddy ===
 
=== ForEachBuddy ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
ForEachBuddy(function func(string name, bool isonline, int sectorid)) -> nil
 
ForEachBuddy(function func(string name, bool isonline, int sectorid)) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
calls '''func''' with the name, if the player is online for each of your buddies as well as his position if the player is currently online
+
calls ''func'' with the name, if the player is online for each of your buddies as well as his position if the player is currently online
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''func''' gets called for each buddy<br>
+
''func'' gets called for each buddy<br>
'''name''' name of the buddy<br>
+
''name'' name of the buddy<br>
'''isonline''' true if the player is online else false<br>
+
''isonline'' true if the player is online else false<br>
'''sectorid''' location of player as [[sectorid]]  
+
''sectorid'' location of player as [[sectorid]]  
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">ForEachBuddy(function (name, isonline, pos) print(name .." "..tostring(isonline).." "..tostring(pos)) end)</source><br>
 
<source lang="lua">ForEachBuddy(function (name, isonline, pos) print(name .." "..tostring(isonline).." "..tostring(pos)) end)</source><br>
 
prints a list with your buddies and their status
 
prints a list with your buddies and their status
<br><br>
+
<br>
  
 
=== ForEachPlayer ===
 
=== ForEachPlayer ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
ForEachPlayer(function func(int charid)) -> nil
 
ForEachPlayer(function func(int charid)) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
calls '''func''' with the character id of each player in the sector. that includes bots and the sector thingy itself
+
calls ''func'' with the character id of each player in the sector. that includes bots and the sector thingy itself
<br><br>
+
<br>
 
This function is called by the toplist when you open it.
 
This function is called by the toplist when you open it.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''func''' gets called for each buddy<br>
+
''func'' gets called for each buddy<br>
'''ncharid''' character id <br>
+
''ncharid'' character id <br>
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source><br>
 
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source><br>
 
prints a list with all players in the sector
 
prints a list with all players in the sector
<br><br>
+
<br>
 +
 
 +
=== ForgiveKiller ===
 +
'''Definition:'''<br>
 +
ForgiveKiller(bool forgive) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Forgive the last killer.
 +
<br>
 +
'''Arguments:'''<br>
 +
''forgive'' if true forgive the last killer if not don't
 +
<br>
  
 
=== GeneratePlayerDiedMessage ===
 
=== GeneratePlayerDiedMessage ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GeneratePlayerDiedMessage(string name1, name2, int weapon) -> string msg
 
GeneratePlayerDiedMessage(string name1, name2, int weapon) -> string msg
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
generate appropiate kill message for the arguments.
 
generate appropiate kill message for the arguments.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''name1''' character that died<br>
+
''name1'' character that died<br>
'''name2''' character that killed name1<br>
+
''name2'' character that killed name1<br>
'''weapon''' [[weaponid]] of weapon with which the kill was made(?)
+
''weapon'' [[weaponid]] of weapon with which the kill was made(?)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''msg''' kill message
+
''msg'' kill message
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">
 
<source lang="lua">
Line 426: Line 1,219:
 
GeneratePlayerDiedMessage("foo", "foo", 0) -> "foo is having issues"
 
GeneratePlayerDiedMessage("foo", "foo", 0) -> "foo is having issues"
 
</source>
 
</source>
<br><br>
+
<br>
  
 +
=== GetAccomplishmentBigSize ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentBigSize(int type, level) -> string bigsize
 +
<br>
 +
'''Description:'''<br>
 +
Get size of accomplishment medal
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''bigsize'' iup size string of medal
 +
<br>
  
 +
=== GetAccomplishmentBigTexture ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentBigTexture(int type, level) -> string tex
 +
<br>
 +
'''Description:'''<br>
 +
Get texture of accomplishment medal
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''tex'' filename of medal texture
 +
<br>
  
 +
=== GetAccomplishmentBigUV ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentBigUV(int type, level) -> string uv
 +
<br>
 +
'''Description:'''<br>
 +
Get uv mapping of accomplishment medal
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''uv'' iup uv mapping of medal texture
 +
<br>
 +
 +
=== GetAccomplishmentCategory ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentCategory(int type, level) -> string category
 +
<br>
 +
'''Description:'''<br>
 +
Get category of accomplishment
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''category'' accomplishment category
 +
<br>
 +
 +
=== GetAccomplishmentDescription ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentDescription(int type, level) -> string desc
 +
<br>
 +
'''Description:'''<br>
 +
Get description of accomplishment
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''desc'' accomplishment description
 +
<br>
  
 
=== GetAccomplishmentLevels ===
 
=== GetAccomplishmentLevels ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetAccomplishmentLevels(int accomid) -> int curlevel int reqlevel
 
GetAccomplishmentLevels(int accomid) -> int curlevel int reqlevel
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the current and the required level for the selected accomplishment
 
returns the current and the required level for the selected accomplishment
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''accomid''' id of the accomplishment
+
''accomid'' id of the accomplishment
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''curlevel''' current level of the accomplishment<br>
+
''curlevel'' current level of the accomplishment<br>
'''reqlevel''' what is required to get the accomplishment<br>
+
''reqlevel'' what is required to get the accomplishment<br>
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetAccomplishmentLevels(9) -> 34 50</source><br>
 
<source lang="lua">GetAccomplishmentLevels(9) -> 34 50</source><br>
 
assuming 9 is buskills this player has 34 kills of the 50 required
 
assuming 9 is buskills this player has 34 kills of the 50 required
<br><br>
+
<br>
 +
 
 +
=== GetAccomplishmentName ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentName(int type, level) -> string name
 +
<br>
 +
'''Description:'''<br>
 +
Get name of accomplishment
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''name'' name of accomplishment
 +
<br>
 +
 
 +
=== GetAccomplishmentSize ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentSize(int type, level) -> string size
 +
<br>
 +
'''Description:'''<br>
 +
Get size of accomplishment badge
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''size'' iup size of badge
 +
<br>
 +
 
 +
=== GetAccomplishmentTexture ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentTexture(int type, level) -> string tex
 +
<br>
 +
'''Description:'''<br>
 +
Get texture of accomplishment badge
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''tex'' filename of badge texture
 +
<br>
 +
 
 +
=== GetAccomplishmentTitle ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentTitle(int type, level) -> string title
 +
<br>
 +
'''Description:'''<br>
 +
Get title of accomplishment
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''title'' accomplishment title
 +
<br>
  
 
=== GetAccomplishmentType ===
 
=== GetAccomplishmentType ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetAccomplishmentType(int accomindex) -> int accomplishmenttype int accomplishmentlevel
+
GetAccomplishmentType(int accomindex, char) -> int accomplishmenttype int accomplishmentlevel
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns some numbers..
 
returns some numbers..
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''accomindex''' index of the accomplishment
+
''accomindex'' index of the accomplishment<br>
<br><br>
+
''char'' [[charid]] of character whose accomplishment to look up
 +
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''accomplishmenttype''' type of accomplishment<br>
+
''accomplishmenttype'' type of accomplishment<br>
'''accomplishmentlevel''' what level the accomplishment is, starting at 1.<br>
+
''accomplishmentlevel'' what level the accomplishment is, starting at 1.<br>
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">local accomtype, accomlevel = GetAccomplishmentType(accomindex)<br>
 
<source lang="lua">local accomtype, accomlevel = GetAccomplishmentType(accomindex)<br>
 
local description = GetAccomplishmentDescription(accomtype, accomlevel)</source>
 
local description = GetAccomplishmentDescription(accomtype, accomlevel)</source>
<br><br>
+
<br>
 +
 
 +
=== GetAccomplishmentUV ===
 +
'''Definition:'''<br>
 +
GetAccomplishmentUV(int type, level) -> string uv
 +
<br>
 +
'''Description:'''<br>
 +
Get uv mapping of accomplishment badge
 +
<br>
 +
'''Arguments:'''<br>
 +
''type'' accomplishment type<br>
 +
''level'' accomplishment level
 +
<br>
 +
'''Returns:'''<br>
 +
''uv'' iup uv mapping of badge
 +
<br>
  
 
=== GetActiveChatChannel ===
 
=== GetActiveChatChannel ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveChatChannel() -> int channel
 
GetActiveChatChannel() -> int channel
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the active channel
 
returns the active channel
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''channel''' active chat channel
+
''channel'' active chat channel
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveChatChannel() -> 1</source><br>
 
<source lang="lua">GetActiveChatChannel() -> 1</source><br>
 
you are currently in channel 1
 
you are currently in channel 1
<br><br>
+
<br>
  
 
=== GetActiveMissionInfo ===
 
=== GetActiveMissionInfo ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveMissionInfo(int num) -> string mname table mmsg int itemid
 
GetActiveMissionInfo(int num) -> string mname table mmsg int itemid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Get information about the selcted active mission
 
Get information about the selcted active mission
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''num''' index of active mission (always 1)
+
''num'' index of active mission (always 1)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''mname''' string containing name of active mission<br>
+
''mname'' string containing name of active mission<br>
'''mmsg''' array where each index contains a mission log entry + optional interface elements and their properties<br>
+
''mmsg'' array where each index contains a mission log entry + optional interface elements and their properties<br>
'''itemid''' itemid of the mission
+
''itemid'' itemid of the mission
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234</source><br>
 
<source lang="lua">GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234</source><br>
 
The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234
 
The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234
<br><br>
+
<br>
 
+
  
 
=== GetActiveShipCargoCount ===
 
=== GetActiveShipCargoCount ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetActiveChatChannel() -> int cargocount
+
GetActiveShipCargoCount() -> int cargocount
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns amount of cargo in the ship
 
returns amount of cargo in the ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cargocount''' amount of cargo in the ship
+
''cargocount'' amount of cargo in the ship
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetActiveShipEnergy ===
 
=== GetActiveShipEnergy ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipEnergy() -> float eng fraction
 
GetActiveShipEnergy() -> float eng fraction
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the energy level of the active ship
 
returns the energy level of the active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''eng''' energy level in game units 0 .. maxcapacacity <br>
+
''eng'' energy level in game units 0 .. maxcapacacity <br>
'''fraction''' energy level as float from 0.0-1.0
+
''fraction'' energy level as float from 0.0-1.0
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipEnergy() -> 150.0 0.5</source><br>
 
<source lang="lua">GetActiveShipEnergy() -> 150.0 0.5</source><br>
 
the battery of this ship is half empty and has a capacity of 300
 
the battery of this ship is half empty and has a capacity of 300
<br><br>
+
<br>
  
 
=== GetActiveShipHealth ===
 
=== GetActiveShipHealth ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max  
 
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns information about the active ships health
 
returns information about the active ships health
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''d?''' damage to subsection 0 = no damage<br>
+
''d?'' damage to subsection 0 = no damage<br>
'''dmg''' accumulated damage of subsections<br>
+
''dmg'' accumulated damage of subsections<br>
'''max''' max health of ship
+
''max'' max health of ship
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipHealth() -> 500 10 10 0 0 0 520 10000</source><br>
 
<source lang="lua">GetActiveShipHealth() -> 500 10 10 0 0 0 520 10000</source><br>
 
ship has 500 damagei n frontal region 520 dmg overall and a max health of 10000
 
ship has 500 damagei n frontal region 520 dmg overall and a max health of 10000
<br><br>
+
<br>
  
 
=== GetActiveShipGridPowerAndUsage ===
 
=== GetActiveShipGridPowerAndUsage ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipGridPowerAndUsage() -> int power usage
 
GetActiveShipGridPowerAndUsage() -> int power usage
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the energy grid power and usage of the current ship..
 
returns the energy grid power and usage of the current ship..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''power''' energy grid power<br>
+
''power'' energy grid power<br>
'''fraction''' power usage
+
''fraction'' power usage
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipGridPowerAndUsage() -> 20 12</source><br>
 
<source lang="lua">GetActiveShipGridPowerAndUsage() -> 20 12</source><br>
 
the ships power grid has a capacity of 20 and 12 are currently used
 
the ships power grid has a capacity of 20 and 12 are currently used
<br><br>
+
<br>
 
+
 
+
 
+
 
+
  
 
=== GetActiveShipID ===
 
=== GetActiveShipID ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipID() -> int itemid
 
GetActiveShipID() -> int itemid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns itemid of active ship
 
returns itemid of active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' item id of active ship
+
''itemid'' item id of active ship
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetActiveShipItemIDAtPort ===
 
=== GetActiveShipItemIDAtPort ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipItemIDAtPort(int portid) -> int itemid
 
GetActiveShipItemIDAtPort(int portid) -> int itemid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns itemid of addon in selected port
 
returns itemid of addon in selected port
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''portid''' [[portid]]
+
''portid'' [[portid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' itemid of addon in port
+
''itemid'' itemid of addon in port
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipItemIDAtPort(1) -> 1234</source><br>
 
<source lang="lua">GetActiveShipItemIDAtPort(1) -> 1234</source><br>
 
addon in port 1 has itemid 1234
 
addon in port 1 has itemid 1234
<br><br>
+
<br>
  
 
=== GetActiveShipMass ===
 
=== GetActiveShipMass ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipMass() -> int mass
 
GetActiveShipMass() -> int mass
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns mass of active ship
 
returns mass of active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''mass''' mass of active ship
+
''mass'' mass of active ship
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipMAss() -> 15.0000</source><br>
 
<source lang="lua">GetActiveShipMAss() -> 15.0000</source><br>
 
ship weights 15000kg
 
ship weights 15000kg
<br><br>
+
<br>
 
+
  
 
=== GetActiveShipMaxCargo ===
 
=== GetActiveShipMaxCargo ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipMaxCargo() -> int cargo
 
GetActiveShipMaxCargo() -> int cargo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns amount of cargo space of the active ship in cu
 
returns amount of cargo space of the active ship in cu
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cargo''' cargospace
+
''cargo'' cargospace
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetActiveShipMaxSpeed ===
 
=== GetActiveShipMaxSpeed ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipMaxSpeed() -> int speed
 
GetActiveShipMaxSpeed() -> int speed
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns max nonturbo speed of active ship
 
returns max nonturbo speed of active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''speed''' ...
+
''speed'' ...
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetActiveShipName ===
 
=== GetActiveShipName ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipName() -> string name
 
GetActiveShipName() -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns a string with the active ships name
 
returns a string with the active ships name
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name''' ...  
+
''name'' ...  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetActiveShipNumAddonPorts ===
 
=== GetActiveShipNumAddonPorts ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipNumAddonPorts() -> int ports
 
GetActiveShipNumAddonPorts() -> int ports
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns number of ports in active ship
 
returns number of ports in active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ports''' number of ports, including engine and battery  
+
''ports'' number of ports, including engine and battery  
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipNumAddonPorts() -> 4</source>
 
<source lang="lua">GetActiveShipNumAddonPorts() -> 4</source>
 
this ship has 3 ports
 
this ship has 3 ports
<br><br>
+
<br>
 
+
  
 
=== GetActiveShipPortIDOfItem ===
 
=== GetActiveShipPortIDOfItem ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipPortIDOfItem(int itemid) -> int portid
 
GetActiveShipPortIDOfItem(int itemid) -> int portid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns [[portid]] of the given addon in active ship
 
returns [[portid]] of the given addon in active ship
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of an addon
+
''itemid'' [[itemid]] of an addon
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''portid''' [[portid]] of port the addon is in or nil if addon is not on the ship or invalid
+
''portid'' [[portid]] of port the addon is in or nil if addon is not on the ship or invalid
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">GetActiveShipPortIDOfItem(1234) -> 3</source>
 
<source lang="lua">GetActiveShipPortIDOfItem(1234) -> 3</source>
<br><br>
+
<br>
  
 
=== GetActiveShipPortInfo ===
 
=== GetActiveShipPortInfo ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipPortInfo(int portid) -> table portinfo
 
GetActiveShipPortInfo(int portid) -> table portinfo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns information about the given port
 
returns information about the given port
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''portid''' [[portid]]
+
''portid'' [[portid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''portinfo''' table with port info <br>
+
''portinfo'' table with port info <br>
 
fields include:<br>
 
fields include:<br>
 
type: int holding the type of port<br>
 
type: int holding the type of port<br>
Line 733: Line 1,631:
 
position: vector with port position on ship<br>
 
position: vector with port position on ship<br>
 
orientation: quaternion holding orientation of port<br>
 
orientation: quaternion holding orientation of port<br>
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipPortInfo(1) -> {type=4 name="PowerCell" position=(0, 0, 0) orientation=(0.000 0.000 0.000 1.000)}</source>
 
<source lang="lua">GetActiveShipPortInfo(1) -> {type=4 name="PowerCell" position=(0, 0, 0) orientation=(0.000 0.000 0.000 1.000)}</source>
 
portinfo of a ragnaroks battery port
 
portinfo of a ragnaroks battery port
<br><br>
+
<br>
 
+
  
 
=== GetActiveShipSelectedWeaponGroupIDs ===
 
=== GetActiveShipSelectedWeaponGroupIDs ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipSelectedWeaponGroupIDs() -> int id1 id2 id3
 
GetActiveShipSelectedWeaponGroupIDs() -> int id1 id2 id3
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns ids of the selected weapon groups ...
 
returns ids of the selected weapon groups ...
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''id?''' id's of weapon groups. Probably mapping to those key buttons.
+
''id?'' id's of weapon groups. Probably mapping to those key buttons.
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetActiveShipSelectedWeaponGroupIDs() -> 0 6 12</source>
 
<source lang="lua">GetActiveShipSelectedWeaponGroupIDs() -> 0 6 12</source>
 
default mapping
 
default mapping
<br><br>
+
<br>
  
 
=== GetActiveShipSpeed ===
 
=== GetActiveShipSpeed ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipSpeed() -> int speed
 
GetActiveShipSpeed() -> int speed
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns current speed of active ship
 
returns current speed of active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''speed''' ...
+
''speed'' ...
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetActiveShipWeaponGroup ===
 
=== GetActiveShipWeaponGroup ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetActiveShipWeaponGroup(int id) -> table group
 
GetActiveShipWeaponGroup(int id) -> table group
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return which ports are enabled in the provided group
 
return which ports are enabled in the provided group
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''id''' id of weapon group correspondents to group key[0-5] + (trigger group[0-2] * 6)
+
''id'' id of weapon group correspondents to group key[0-5] + (trigger group[0-2] * 6)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''port''' table where the indexes are the port ids and values bools that are true when the port is active
+
''port'' table where the indexes are the port ids and values bools that are true when the port is active
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">GetActiveShipWeaponGroup(6) -> {2=true 3=true}</source>
 
<source lang="lua">GetActiveShipWeaponGroup(6) -> {2=true 3=true}</source>
 
6 -> 6 % 6 = 1 R 0 thus 6 represents first group key and and second trigger group. port 2 and 3 are active for example this could be the 2 s ports on a vult
 
6 -> 6 % 6 = 1 R 0 thus 6 represents first group key and and second trigger group. port 2 and 3 are active for example this could be the 2 s ports on a vult
<br><br>
+
<br>
 
+
  
 
=== GetAddonItemInfo ===
 
=== GetAddonItemInfo ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetAddonItemInfo(int itemid) -> int current maximum
 
GetAddonItemInfo(int itemid) -> int current maximum
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
 
Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of an addon or ship.
+
''itemid'' itemid of an addon or ship.
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''current''' Current ammo/armor, or -1.<br>
+
''current'' Current ammo/armor, or -1.<br>
'''maximum''' Maximum ammo/armor, or -1.
+
''maximum'' Maximum ammo/armor, or -1.
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetAvailableMissionInfo ===
 
=== GetAvailableMissionInfo ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetAvailableMissionInfo(int midx) -> {int itemtype, string name, bool active, string icon, string desc}
+
GetAvailableMissionInfo(int midx) -> {int itemtype, string name, bool active, int category, string icon, string desc}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Returns information about the mission with the provided index
+
Returns information about the mission with the given index.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''midx''' index of mission in missionlist
+
''midx'' index of mission in missionlist (1 based)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemtype''' no idea<br>
+
''itemtype'' no idea<br>
'''name''' name of mission<br>
+
''name'' name of mission<br>
'''active''' is this mission active<br>
+
''active'' is this mission active<br>
'''icon''' path to icon<br>
+
''category'' mission category<br>
'''desc''' mission description
+
''icon'' path to icon<br>
<br><br>
+
''desc'' mission description
'''Example:'''
+
<br>
<br><br>
+
 
+
 
+
  
 
=== GetBarPatrons ===
 
=== GetBarPatrons ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetBarPatrons() -> {[charid1], [charid2]...}
 
GetBarPatrons() -> {[charid1], [charid2]...}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get people in the current station bar
 
get people in the current station bar
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid?''' index of returned table are charids of characters in the bar
+
''charid?'' index of returned table are charids of characters in the bar
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetBestPriceInfoOfItem ===
 +
'''Definition:'''<br>
 +
GetBestPriceInfoOfItem(int item) -> int price, station
 +
<br>
 +
'''Description:'''<br>
 +
Get highest sell price of a cargo item in the active ship in the currentsystem
 +
<br>
 +
'''Arguments:'''<br>
 +
''item''  [[itemid]] of cargo item
 +
<br>
 +
'''Returns:'''<br>
 +
''price'' highest price in system<br>
 +
''station'' [[locationid]] of station with highest price
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
-- print best prices in system for all cargo items in the ship
 +
for _,item in ipairs(GetShipInventory(GetActiveShipID()).cargo) do
 +
local price, station = GetBestPriceInfoOfItem(item)
 +
print(GetInventoryItemName(item).." "..tostring(price).."c at "..LocationStr(math.floor(station / 100)))
 +
end
 +
</source>
 +
<br>
  
=== GetBSStats ===
+
=== GetBotSightedInfoForSector ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetBSStats() -> int crew_i crew_s
+
GetBotSightedInfoForSector(int sectorid) -> string botinfo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
returns number of Border Skirmish crew left on each side
+
returns bot ihnfo text for the given sector
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''sectorid''  [[sectorid]]
 +
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''crew_i''' itani crew<br>
+
''botinfo'' string with bots in given sector or an empty string
'''crew_s''' serco crew<br>
+
<br>
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetBuddyInfo ===
 
=== GetBuddyInfo ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetBuddyInfo() -> ???
+
GetBuddyInfo(int char) -> string name, bool isonline, int sectorid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
not figured out yet
+
Get name, online status and location of a buddy
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''char'' [[charid]] of a buddy
'''Returns:'''
+
<br>
<br><br>
+
'''Returns:'''<br>
'''Example:'''
+
''name'' name of buddy<br>
<br><br>
+
''isonline'' online status<br>
 +
''sectorid'' [[sectorid]] of location of buddy
 +
<br>
  
 +
=== GetCargoValue ===
 +
'''Definition:'''<br>
 +
GetCargoValue() -> int value, price
 +
<br>
 +
'''Description:'''<br>
 +
Get value and buy price of the cargo and equipped addons on the active ship at the current station
 +
<br>
 +
'''Returns:'''<br>
 +
''value'' value of cargo and addons<br>
 +
''price'' buy price of cargo and addons at the current station
 +
<br>
  
 
=== GetCharacterDescription ===
 
=== GetCharacterDescription ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
GetCharacterDescription() -> string desc
+
GetCharacterDescription(int charid) -> string desc
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Get the character description for your and possibly other chars. It just returns an empty string when an argument is passed to it, which suggests that it accepts one or more unknown arguments.
+
Get the character description of a character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
???
+
''charid'' [[charid]] of a character
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''desc''' your character description text whne no argument is provided
+
''desc'' character description
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetCharacterID ===
 
=== GetCharacterID ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetCharacterID(int nodeid) -> int charid
 
GetCharacterID(int nodeid) -> int charid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns character id of the provided node id
 
returns character id of the provided node id
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''nodeid''' node id of one of the characters in the sector
+
''nodeid'' node id of one of the characters in the sector
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' character id of the given node if a valid nodeid is valid otherwise the players charid
+
''charid'' character id of the given node if a valid nodeid is valid otherwise the players charid
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetCharacterIDByName ===
 
=== GetCharacterIDByName ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetCharacterIDByName(string name) -> int charid
 
GetCharacterIDByName(string name) -> int charid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get character id by name
 
get character id by name
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''name''' name of a character
+
''name'' name of a character
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' a character id or nil
+
''charid'' a character id or nil
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
  
Line 932: Line 1,838:
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetCharacterInfo(int cslot) -> string name faction int money kills deaths loc home cl ll hl tl ml
 
GetCharacterInfo(int cslot) -> string name faction int money kills deaths loc home cl ll hl tl ml
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Get information about your characters
 
Get information about your characters
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''cslot''' a character slot (1-6)
+
''cslot'' a character slot (1-6)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name'''<br>
+
''name''<br>
'''faction'''<br>
+
''faction''<br>
'''money'''<br>
+
''money''<br>
'''kills''' all kills<br>
+
''kills'' all kills<br>
'''deaths'''<br>
+
''deaths''<br>
'''loc''' [[sectorid]] of current location<br>
+
''loc'' [[sectorid]] of current location<br>
'''home''' [[sectorid]] of characters homestation<br>
+
''home'' [[sectorid]] of characters homestation<br>
'''cl''' combat level<br>
+
''cl'' combat level<br>
'''ll''' light weapon level<br>
+
''ll'' light weapon level<br>
'''hl''' heavy weapon level<br>
+
''hl'' heavy weapon level<br>
'''tl''' trade level<br>
+
''tl'' trade level<br>
'''ml''' mining level
+
''ml'' mining level
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">GetCharacterInfo(1) -> "Dude" "Corvus" 10000 10 100 4444 4444 1 1 1 0 0<br></source>
 
<source lang="lua">GetCharacterInfo(1) -> "Dude" "Corvus" 10000 10 100 4444 4444 1 1 1 0 0<br></source>
 
This players first character is called "Dude" is of the "Corvus" faction has 10000c killed 10 things died 100 times is in sector 4444, homed in 4444 and has level 1/1/1/0/0
 
This players first character is called "Dude" is of the "Corvus" faction has 10000c killed 10 things died 100 times is in sector 4444, homed in 4444 and has level 1/1/1/0/0
<br><br>
+
<br>
  
 
=== GetCharacterKillDeaths ===
 
=== GetCharacterKillDeaths ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetCharacterKillDeaths(int charid) -> int kills deaths pks
 
GetCharacterKillDeaths(int charid) -> int kills deaths pks
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get info about kills and deaths. returns your own info if no charid given or a lua error if an invalid one ...
 
get info about kills and deaths. returns your own info if no charid given or a lua error if an invalid one ...
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id or nil
+
''charid'' character id or nil
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''kills''' total kills
+
''kills'' total kills
'''deaths''' total deaths
+
''deaths'' total deaths
'''pks''' player kills
+
''pks'' player kills
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetChatLogReadState ===
 +
'''Definition:'''
 +
GetChatLogReadState() -> bool read
 +
<br>
 +
'''Description:'''<br>
 +
Tell if the general chat log was displayed. [[API_Index#SetChatLogRead|SetChatLogRead]] was called since the last line was added to the log.
 +
<br>
 +
'''Returns:'''<br>
 +
''read'' true if the log was displayed
 +
<br>
  
 
=== GetCurrentChatTab ===
 
=== GetCurrentChatTab ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
GetCurrentChatTab() -> int tab
 +
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
no idea maybe unused. always returns 2 here
+
Unused. Get The current chat tab (general chat or mission chat)
<br><br>
+
<br>
'''Arguments:'''
+
'''Returns:'''<br>
<br><br>
+
''tab'' 1 = general, 2 = mission
'''Returns:'''
+
<br>
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== GetCurrentSectorid ===
 
=== GetCurrentSectorid ===
 
'''Definition:'''
 
'''Definition:'''
 
GetCurrentSectorid() -> int sectorid
 
GetCurrentSectorid() -> int sectorid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get current sector id
 
get current sector id
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''sectorid''' [[sectorid]] of current sector
+
''sectorid'' [[sectorid]] of current sector
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetCurrentStationType ===
 
=== GetCurrentStationType ===
 
'''Definition:'''
 
'''Definition:'''
 
GetCurrentStationType() -> int type
 
GetCurrentStationType() -> int type
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return the current station type..
 
return the current station type..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''type''' current station type. seems be usually 0 except when docked to a capship then 1
+
''type'' current station type. seems be usually 0 except when docked to a capship then 1
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetCurrentSystemid ===
 
=== GetCurrentSystemid ===
 
'''Definition:'''
 
'''Definition:'''
 
GetCurrentSystemid() -> int systemid
 
GetCurrentSystemid() -> int systemid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get current system id..
 
get current system id..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''systemid''' id of current system
+
''systemid'' id of current system
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetEULA ===
 
=== GetEULA ===
 
'''Definition:'''
 
'''Definition:'''
 
GetEULA() -> string eula
 
GetEULA() -> string eula
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return eula
 
return eula
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''eula''' string containing the eula
+
''eula'' string containing the eula
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetFactionInfo ===
 
=== GetFactionInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetFactionInfo(int faction) -> string info
 
GetFactionInfo(int faction) -> string info
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get faction info text for the provided faction  
 
get faction info text for the provided faction  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''faction''' id of a faction
+
''faction'' id of a faction
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''info''' string containing faction info
+
''info'' string containing faction info
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetFinishedMissionInfo ===
 
=== GetFinishedMissionInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetFinishedMissionInfo() -> string name table msg int itemid
 
GetFinishedMissionInfo() -> string name table msg int itemid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
see GetActiveMissionInfo
 
see GetActiveMissionInfo
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 +
=== GetFriendlyStatus ===
 +
'''Definition:'''
 +
GetFriendlyStatus(int char) -> int fstatus
 +
<br>
 +
'''Description:'''<br>
 +
get friendlyness of a character
 +
<br>
 +
'''Arguments:'''<br>
 +
''char'' [[nodeid]]
 +
<br>
 +
'''Returns:'''<br>
 +
''fstatus'' Returns 0 to 3. Target is friendly if 3, unfriendly otherwise
 +
<br>
  
 
=== GetFullPath ===
 
=== GetFullPath ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
GetFullPath(int sector, table navroute) -> table fullpath
 +
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
sounds obvious but it isn't
+
Get the full path, including wormhole sectors, from ''sector'' along ''navroute''
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''sector'' [[sectorid]] of starting sectors<br>
'''Returns:'''
+
''navroute'' list of sectorids
<br><br>
+
<br>
'''Example:'''
+
'''Returns:'''<br>
<br><br>
+
''fullpath'' ''navroute'' plus sectorids of wormhole sectors
 
+
<br>
 
+
'''Example:'''<br>
 +
<source lang="lua">
 +
-- get full path from Sol a1 to betheshee a1 via sol b1
 +
-- the function adds some duplicate entries
 +
GetFullPath(1, {2, 257}) -> {1, 2, 2, 226, 351, 257}
 +
</source>
 +
<br>
  
 
=== GetGeneralChatLog ===
 
=== GetGeneralChatLog ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGeneralChatLog() -> table log
 
GetGeneralChatLog() -> table log
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the chatlog
 
returns the chatlog
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''log''' table containing chatlog
+
''log'' table containing chatlog
<br><br>
+
<br>
'''Example:'''
+
 
<br><br>
+
  
 
=== GetGroupMemberID ===
 
=== GetGroupMemberID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGroupMemberID(int index) -> int charid
 
GetGroupMemberID(int index) -> int charid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get charid of group member with given index
 
get charid of group member with given index
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''index''' group member index (1-8)
+
''index'' group member index (1-8)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetGroupMemberLocation ===
 
=== GetGroupMemberLocation ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGroupMemberLocation(int charid) -> int loc
 
GetGroupMemberLocation(int charid) -> int loc
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get location of a groupmember
 
get location of a groupmember
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character ids of a groupmember
+
''charid'' character ids of a groupmember
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''loc''' [[sectorid]] of groupmember or 0 for yourself
+
''loc'' [[sectorid]] of groupmember or 0 for yourself
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetGroupOwnerID ===
 
=== GetGroupOwnerID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGroupOwnerID() -> int charid
 
GetGroupOwnerID() -> int charid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get charid of group owner
 
get charid of group owner
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== GetGuildAcronym ===
 
=== GetGuildAcronym ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetGuildAcronym() -> string acronym
 
GetGuildAcronym() -> string acronym
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get your guilds acronym
 
get your guilds acronym
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''acronym''' string containing guild acronym
+
''acronym'' string containing guild acronym
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetGuildBalance ===
 
=== GetGuildBalance ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetGuildBalance() -> int balance
 
GetGuildBalance() -> int balance
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get amount of money in guild bank
 
get amount of money in guild bank
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''balance''' money in bank
+
''balance'' money in bank
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetGuildBankPrivileges ===
 
=== GetGuildBankPrivileges ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetGuildBankPrivileges() -> table deposit withdraw logview
 
GetGuildBankPrivileges() -> table deposit withdraw logview
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get your guilds bank privileges as three tables. they contain the ranks carrying each privilege.<br>
 
get your guilds bank privileges as three tables. they contain the ranks carrying each privilege.<br>
 
see [API_Index#Guild]
 
see [API_Index#Guild]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''deposit''' table with ranks that can deposit money<br>
+
''deposit'' table with ranks that can deposit money<br>
'''withdraw''' table with ranks that can withdraw money<br>
+
''withdraw'' table with ranks that can withdraw money<br>
'''logview''' table with ranks that can view the transfer log<br>
+
''logview'' table with ranks that can view the transfer log<br>
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetGuildBankWithdrawalLimits ===
 
=== GetGuildBankWithdrawalLimits ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetGuildBankWithdrawalLimits() -> int ret1 ret2 ret3
 
GetGuildBankWithdrawalLimits() -> int ret1 ret2 ret3
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get withdrawal limits? returns three numbers
 
get withdrawal limits? returns three numbers
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret1'''<br>
+
''ret1''<br>
'''ret4'''<br>
+
''ret4''<br>
'''ret3'''
+
''ret3''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== GetGuildMOTD ===
 
=== GetGuildMOTD ===
 
'''Definition:'''<br>
 
'''Definition:'''<br>
 
GetGuildMOTD() -> string motd
 
GetGuildMOTD() -> string motd
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get your guilds message of the day
 
get your guilds message of the day
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''motd''' string containing the motd
+
''motd'' string containing the motd
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetGuildMemberInfo ===
 
=== GetGuildMemberInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGuildMemberInfo(int index) -> int charid rank string name  
 
GetGuildMemberInfo(int index) -> int charid rank string name  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get information about the guildmember of the given index
 
get information about the guildmember of the given index
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''index''' index of online guildmembers 1-n
+
''index'' index of online guildmembers 1-n
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' character id<br>
+
''charid'' character id<br>
'''rank''' rank: 0=member, 1=lieutenant, 2=council member, 3=council member and lieutenant, 4=commander<br>
+
''rank'' rank: 0=member, 1=lieutenant, 2=council member, 3=council member and lieutenant, 4=commander<br>
'''name''' name of member<br>
+
''name'' name of member<br>
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">
 
<source lang="lua">
 
for i=1,GetNumGuildMembers()do
 
for i=1,GetNumGuildMembers()do
Line 1,269: Line 2,136:
 
   print("guild member: "..name)
 
   print("guild member: "..name)
 
end</source>
 
end</source>
<br><br>
+
<br>
  
 
=== GetGuildMemberInfoByCharID ===
 
=== GetGuildMemberInfoByCharID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGuildMemberInfoByCharID(int charid) -> int charid rank string name  
 
GetGuildMemberInfoByCharID(int charid) -> int charid rank string name  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get information about the guildmember
 
get information about the guildmember
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' charid of online guildmember
+
''charid'' charid of online guildmember
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' character id<br>
+
''charid'' character id<br>
'''rank''' rank: 0=member, 1=lieutenant, 2=council member, 3=council member and lieutenant, 4=commander<br>
+
''rank'' rank: 0=member, 1=lieutenant, 2=council member, 3=council member and lieutenant, 4=commander<br>
'''name''' name of member
+
''name'' name of member
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">local charid,rank,charname = GetGuildMemberInfoByCharID(GetCharacterID())</source>
 
<source lang="lua">local charid,rank,charname = GetGuildMemberInfoByCharID(GetCharacterID())</source>
<br><br>
+
<br>
  
 
=== GetGuildName ===
 
=== GetGuildName ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGuildName() -> string name
 
GetGuildName() -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get guild name
 
get guild name
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name''' string containing guild name
+
''name'' string containing guild name
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetGuildTag ===
 
=== GetGuildTag ===
 
'''Definition:'''
 
'''Definition:'''
 
GetGuildTag(int charid) -> string tag
 
GetGuildTag(int charid) -> string tag
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get guild tag of self or another character.
 
get guild tag of self or another character.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id or nil to get self's guild tag.
+
''charid'' character id or nil to get self's guild tag.
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''tag''' string containing guild tag or empty string if character not known or not in a guild.
+
''tag'' string containing guild tag or empty string if character not known or not in a guild.
<br><br>
+
<br>
'''Example:'''<br><source lang="lua">
+
'''Example:'''<br>
 
local guildtag = GetGuildTag()
 
local guildtag = GetGuildTag()
 
if guildtag ~= "" then
 
if guildtag ~= "" then
Line 1,327: Line 2,188:
 
   print('Not a member of a guild.\n')
 
   print('Not a member of a guild.\n')
 
end</source><br>
 
end</source><br>
<br><br>
+
<br>
  
 
=== GetHomeStation ===
 
=== GetHomeStation ===
 
'''Definition:'''
 
'''Definition:'''
 
GetHomeStation() -> int sectorid
 
GetHomeStation() -> int sectorid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get sectorid of home station
 
get sectorid of home station
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''sectorid''' [[sectorid]] of home station   
+
''sectorid'' [[sectorid]] of home station   
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetInventoryItemClassSubType ===
 
=== GetInventoryItemClassSubType ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemClassSubType(int itemid) -> int subtype
 
GetInventoryItemClassSubType(int itemid) -> int subtype
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get subclass of an item
 
get subclass of an item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''subtype''' sub type of item<br>
+
''subtype'' sub type of item<br>
 
known types:<br>
 
known types:<br>
 
0 = light weapon or ship<br>
 
0 = light weapon or ship<br>
Line 1,362: Line 2,219:
 
4 = battery<br>
 
4 = battery<br>
 
10 = trade goods
 
10 = trade goods
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemClassType ===
 
=== GetInventoryItemClassType ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemClassType(int itemid) -> int type
 
GetInventoryItemClassType(int itemid) -> int type
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get class of an item
 
get class of an item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''type''' class of item. you can use those CLASSTYPE_* constants to identify types
+
''type'' class of item. you can use those CLASSTYPE_* constants to identify types
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetInventoryItemContainerID ===
 
=== GetInventoryItemContainerID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemContainerID(int itemid) -> int container
 
GetInventoryItemContainerID(int itemid) -> int container
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get container of item
 
get container of item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''container''' itemid of container of or null if it's not in one (a ship)
+
''container'' itemid of container of or null if it's not in one (a ship)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemExtendedDesc ===
 
=== GetInventoryItemExtendedDesc ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemExtendedDesc(int itemid) -> string desc
 
GetInventoryItemExtendedDesc(int itemid) -> string desc
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get description of item
 
get description of item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''desc''' item description text.
+
''desc'' item description text.
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemIcon ===
 
=== GetInventoryItemIcon ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemIcon(int itemid) -> string path
 
GetInventoryItemIcon(int itemid) -> string path
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get path to icon of inventory item
 
get path to icon of inventory item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''path''' path to icon
+
''path'' path to icon
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemInfo ===
 
=== GetInventoryItemInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemInfo(int itemid) -> string ipath name int quant float mass string sdesc desc1 desc2 int container class subtype
 
GetInventoryItemInfo(int itemid) -> string ipath name int quant float mass string sdesc desc1 desc2 int container class subtype
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get most info about inventory item
 
get most info about inventory item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ipath''' icon path<br>  
+
''ipath'' icon path<br>  
'''name''' name or item<br>
+
''name'' name or item<br>
'''quant''' amount of items<br>  
+
''quant'' amount of items<br>  
'''mass''' per item mass as float in tons<br>  
+
''mass'' per item mass as float in tons<br>  
'''sdesc''' short description<br>  
+
''sdesc'' short description<br>  
'''desc1''' long description<br>  
+
''desc1'' long description<br>  
'''desc2''' long description again, sometimes omitted don't know what's the difference<br>  
+
''desc2'' long description again, sometimes omitted don't know what's the difference<br>  
'''container''' itemid of container this item is in<br>  
+
''container'' itemid of container this item is in<br>  
'''class''' type of item (see GetInventoryItemClassType)<br>  
+
''class'' type of item (see GetInventoryItemClassType)<br>  
'''subtype''' subtype of item (see GetInventoryItemClassSubType)
+
''subtype'' subtype of item (see GetInventoryItemClassSubType)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemLocation ===
 
=== GetInventoryItemLocation ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemLocation(int itemid) -> int stationid
 
GetInventoryItemLocation(int itemid) -> int stationid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get location of an inventory item
 
get location of an inventory item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of an inventory item
+
''itemid'' [[itemid]] of an inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''stationid''' [[stationid]] or nil if itemid is invalid
+
''stationid'' [[stationid]] or nil if itemid is invalid
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">ShortLocationStr(SplitStationID(GetInventoryItemLocation(1234))) -> "Dau L-10"</source><br>
 
<source lang="lua">ShortLocationStr(SplitStationID(GetInventoryItemLocation(1234))) -> "Dau L-10"</source><br>
Line 1,478: Line 2,318:
 
get the sectorid part of that stationid<br>
 
get the sectorid part of that stationid<br>
 
print out the sectors name
 
print out the sectors name
<br><br>
+
<br>
 
+
 
+
  
 
=== GetInventoryItemLongDesc ===
 
=== GetInventoryItemLongDesc ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemLongDesc(int itemid) -> string desc
 
GetInventoryItemLongDesc(int itemid) -> string desc
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get long description of an inventory item
 
get long description of an inventory item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of an inventory item
+
''itemid'' [[itemid]] of an inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''desc''' long description of an inventory item
+
''desc'' long description of an inventory item
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">GetInventoryItemLongDesc(1234) ->  
 
<source lang="lua">GetInventoryItemLongDesc(1234) ->  
 
"Damage: 1100|Velocity: 190m/s|Energy: 30/blast|Delay: 0.4s|Mass: 1000 kg| \
 
"Damage: 1100|Velocity: 190m/s|Energy: 30/blast|Delay: 0.4s|Mass: 1000 kg| \
 
Volume (as cargo): 1 cu|Good auto-targeting||KC-Cannon housing with PR-11 plasma cells"</source>
 
Volume (as cargo): 1 cu|Good auto-targeting||KC-Cannon housing with PR-11 plasma cells"</source>
<br><br>
+
<br>
  
 
=== GetInventoryItemMass ===
 
=== GetInventoryItemMass ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemMass(int itemid) -> float mass
 
GetInventoryItemMass(int itemid) -> float mass
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get mass of inventory item
 
get mass of inventory item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''path''' mass of item as float in tons
+
''path'' mass of item as float in tons
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">GetInventoryItemMass(1234) -> 4.000</source><br>
 
<source lang="lua">GetInventoryItemMass(1234) -> 4.000</source><br>
 
the mass of item 1234 is 4000kg
 
the mass of item 1234 is 4000kg
<br><br>
+
<br>
 
+
  
 
=== GetInventoryItemName ===
 
=== GetInventoryItemName ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemName(int itemid) -> string name
 
GetInventoryItemName(int itemid) -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get name of inventory item
 
get name of inventory item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name''' name
+
''name'' name
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemQuantity ===
 
=== GetInventoryItemQuantity ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemQuantity(int itemid) -> int quant
 
GetInventoryItemQuantity(int itemid) -> int quant
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get quantity of inventory item..
 
get quantity of inventory item..
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''quant''' quantity
+
''quant'' quantity
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemType ===
 
=== GetInventoryItemType ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemType(int itemid) -> int type
 
GetInventoryItemType(int itemid) -> int type
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get item type
 
get item type
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' inventory item
+
''itemid'' inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''type''' type
+
''type'' type
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemUnitCost ===
 
=== GetInventoryItemUnitCost ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemUnitCost(int itemid) -> int cost
 
GetInventoryItemUnitCost(int itemid) -> int cost
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get price paid for the given item(?)
 
get price paid for the given item(?)
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of an inventory item
+
''itemid'' [[itemid]] of an inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cost''' price of item
+
''cost'' price of item
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetInventoryItemVolume ===
 
=== GetInventoryItemVolume ===
 
'''Definition:'''
 
'''Definition:'''
 
GetInventoryItemVolume(int itemid) -> int volume
 
GetInventoryItemVolume(int itemid) -> int volume
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get per unit volume of item in cu
 
get per unit volume of item in cu
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of an inventory item
+
''itemid'' [[itemid]] of an inventory item
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''volume''' volume in cu
+
''volume'' volume in cu
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetItemFullDesc ===
 +
'''Definition:'''
 +
GetItemFullDesc(table item) -> string desc
 +
<br>
 +
'''Description:'''<br>
 +
get full description of an inventory item
 +
<br>
 +
'''Arguments:'''<br>
 +
''item'' [[iteminfo]] table
 +
<br>
 +
'''Returns:'''<br>
 +
''desc'' full description of item
 +
<br>
 +
 +
=== GetItemPartialDesc ===
 +
'''Definition:'''
 +
GetItemPartialDesc(table item) -> string desc
 +
<br>
 +
'''Description:'''<br>
 +
get partial description of an inventory item
 +
<br>
 +
'''Arguments:'''<br>
 +
''item'' [[iteminfo]] table
 +
<br>
 +
'''Returns:'''<br>
 +
''desc'' partial description of item
 +
<br>
  
 
=== GetLastAggressor ===
 
=== GetLastAggressor ===
 
'''Definition:'''
 
'''Definition:'''
 
GetLastAggressor(int itemid) -> int nodeid ret1
 
GetLastAggressor(int itemid) -> int nodeid ret1
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get node id of last aggressor and some number
 
get node id of last aggressor and some number
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''nodeid''' node id of last aggressor
+
''nodeid'' node id of last aggressor
'''ret1''' no clue
+
''ret1'' no clue
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetJoinedChannels ===
 +
'''Definition:'''
 +
GetJoinedChannels() -> table channels
 +
<br>
 +
'''Description:'''<br>
 +
get array with currently joined channels
 +
<br>
 +
'''Returns:'''<br>
 +
''channels'' array with joined channels
 +
<br>
  
 
=== GetLastPrivateSpeaker ===
 
=== GetLastPrivateSpeaker ===
 
'''Definition:'''
 
'''Definition:'''
 
GetLastPrivateSpeaker(int itemid) -> string name
 
GetLastPrivateSpeaker(int itemid) -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get name of last character that pmed you
 
get name of last character that pmed you
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name''' last messager
+
''name'' last messager
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetLastShipLoadout ===
 
=== GetLastShipLoadout ===
 
'''Definition:'''
 
'''Definition:'''
 
GetLastShipLoadout() -> {groups = {1 = group1 .. 18 = group18}, int ship, ports= {1 = port1 ..}, int shipcolor}
 
GetLastShipLoadout() -> {groups = {1 = group1 .. 18 = group18}, int ship, ports= {1 = port1 ..}, int shipcolor}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get last ship loadout, color and weapon groups. this function only works in space
 
get last ship loadout, color and weapon groups. this function only works in space
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''groups''' table containing the weapon group setup
+
''groups'' table containing the weapon group setup
'''group?''' group information. array indices correspondent to ports, is the value of an index set to true the port is enabled
+
''group?'' group information. array indices correspondent to ports, is the value of an index set to true the port is enabled
'''ship''' type of ship
+
''ship'' type of ship
'''ports''' array indices correspondent to ports, value of index is the type of addon
+
''ports'' array indices correspondent to ports, value of index is the type of addon
'''shipcolor''' ship color 1-255(?)
+
''shipcolor'' ship color 1-255(?)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetLastShipLoadoutPurchaseCost ===
 
=== GetLastShipLoadoutPurchaseCost ===
 
'''Definition:'''
 
'''Definition:'''
 
GetLastShipLoadoutPurchaseCost() -> int cost
 
GetLastShipLoadoutPurchaseCost() -> int cost
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
what you payed for your last ship(?)
 
what you payed for your last ship(?)
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cost'''
+
''cost''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetLicenseLevel ===
 
=== GetLicenseLevel ===
 
'''Definition:'''
 
'''Definition:'''
 
GetLicenseLevel(int type) -> int level
 
GetLicenseLevel(int type) -> int level
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get the level of the provided license
 
get the level of the provided license
<br><br>
+
<br>
'''Arguments:'''<be>
+
'''Arguments:'''<br>
'''type''' type of license (1-5)
+
''type'' type of license (1-5)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''level''' license level or 0 if invalid type given
+
''level'' license level or 0 if invalid type given
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetLicenseRequirement ===
 
=== GetLicenseRequirement ===
 
'''Definition:'''
 
'''Definition:'''
 
GetLicenseRequirement(int level) -> int xp
 
GetLicenseRequirement(int level) -> int xp
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get xp required for given level
 
get xp required for given level
<br><br>
+
<br>
'''Arguments:'''<be>
+
'''Arguments:'''<br>
'''level''' license level
+
''level'' license level
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''xp'''
+
''xp''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetListOfSeenNames ===
 +
'''Definition:'''
 +
GetListOfSeenNames() -> table names
 +
<br>
 +
'''Description:'''<br>
 +
get table with names of characters that have been in the same sector as the player or have sent messages
 +
<br>
 +
'''Returns:'''<br>
 +
''names'' table with names of characters
 +
<br>
  
 
=== GetMaxRadarDistance ===
 
=== GetMaxRadarDistance ===
 
'''Definition:'''
 
'''Definition:'''
 
GetMaxRadarDistance() -> int dist
 
GetMaxRadarDistance() -> int dist
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get current(?) max radar range
 
get current(?) max radar range
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''dist''' max radar range
+
''dist'' max radar range
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetMinJumpDistance ===
 
=== GetMinJumpDistance ===
 
'''Definition:'''
 
'''Definition:'''
 
GetMinJumpDistance() -> int dist
 
GetMinJumpDistance() -> int dist
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get minimum distance from large objects to jump
 
get minimum distance from large objects to jump
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''dist''' min jump distance
+
''dist'' min jump distance
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetMissionChatLog ===
 
=== GetMissionChatLog ===
 
'''Definition:'''
 
'''Definition:'''
 
GetMissionChatLog() -> {bool updated, string 1.. }
 
GetMissionChatLog() -> {bool updated, string 1.. }
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get advancement log
 
get advancement log
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''1-n''' advancement log
+
''1-n'' advancement log
'''updated''' no clue
+
''updated'' no clue
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetMissionLogReadState ===
 +
'''Definition:'''
 +
GetMissiontLogReadState() -> bool read
 +
<br>
 +
'''Description:'''<br>
 +
Tell if the mission chat/advanmcement log was displayed. [[API_Index#SetMissionLogRead|SetMissionLogRead]] was called since the last line was added to the log.
 +
<br>
 +
'''Returns:'''<br>
 +
''read'' true if the log was displayed
 +
<br>
  
 
=== GetMissionTimers ===
 
=== GetMissionTimers ===
 
'''Definition:'''
 
'''Definition:'''
 
GetMissionTimers() -> int time
 
GetMissionTimers() -> int time
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get time left on the current mission. may have some functionality for multiple missions
 
get time left on the current mission. may have some functionality for multiple missions
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''time''' time left on this timer in 1000th seconds
+
''time'' time left on this timer in 1000th seconds
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetMoney ===
 
=== GetMoney ===
 
'''Definition:'''
 
'''Definition:'''
 
GetMoney() -> int money
 
GetMoney() -> int money
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get how many credits you own
 
get how many credits you own
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''money'''
+
''money''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetNationKills ===
 
=== GetNationKills ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNationKills(int nation) -> int kills
 
GetNationKills(int nation) -> int kills
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of player kills for the given nation
 
get number of player kills for the given nation
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''nation''' id of nation (1-3)
+
''nation'' id of nation (1-3)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''kills''' number of player kills or 0 if invalid nation
+
''kills'' number of player kills or 0 if invalid nation
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetNewsHeadline ===
 
=== GetNewsHeadline ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNewsHeadline(int index) -> string title int time ret1  
 
GetNewsHeadline(int index) -> string title int time ret1  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get headline, post time and some number
 
get headline, post time and some number
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''index''' index of headline newest is 1  
+
''index'' index of headline newest is 1  
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''title''' the headline
+
''title'' the headline
'''time''' post date in unix time
+
''time'' post date in unix time
'''ret1''' no clue, always 1
+
''ret1'' no clue, always 1
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetNumAccomplishments ===
 
=== GetNumAccomplishments ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumAccomplishments(int charid) -> int accomplishments
 
GetNumAccomplishments(int charid) -> int accomplishments
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
get number of accomplishmeants for given character(?). not well tested, may require caching of the char info
+
get number of accomplishments for the given character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id (?)
+
''charid'' [[charid]] of a character
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''accomplishments''' number of accomplishments  
+
''accomplishments'' number of accomplishments  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetNumActiveMissions ===
 
=== GetNumActiveMissions ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumActiveMissions() -> int missions
 
GetNumActiveMissions() -> int missions
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of active missions.
 
get number of active missions.
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''missions''' number of active missions
+
''missions'' number of active missions
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetNumAvailableMissions ===
 
=== GetNumAvailableMissions ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumAvailableMissions() -> int missions
 
GetNumAvailableMissions() -> int missions
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of available missions
 
get number of available missions
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''missions'''  
+
''missions''  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetNumCharacters ===
 
=== GetNumCharacters ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumCharacters() -> int chars
 
GetNumCharacters() -> int chars
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of characters you have defined
 
get number of characters you have defined
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''chars'''
+
''chars''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetNumCompletedMissions ===
 
=== GetNumCompletedMissions ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumCompletedMissions() -> int missions
 
GetNumCompletedMissions() -> int missions
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of completed missions
 
get number of completed missions
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''missions'''
+
''missions''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetNumFinishedMissions ===
 
=== GetNumFinishedMissions ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumFinishedMissions() -> int missions
 
GetNumFinishedMissions() -> int missions
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of finished missions. as displayed in the mission log panel
 
get number of finished missions. as displayed in the mission log panel
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''missions'''
+
''missions''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetNumGroupMembers ===
 
=== GetNumGroupMembers ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumCharacters() -> int chars
 
GetNumCharacters() -> int chars
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of characters in your group
 
get number of characters in your group
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''chars''' number of characters in your group or 0 if player is not in group
+
''chars'' number of characters in your group or 0 if player is not in group
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetNumGuildMembers ===
 
=== GetNumGuildMembers ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumGuildMembers() -> int numchars
 
GetNumGuildMembers() -> int numchars
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of online guildmembers  
 
get number of online guildmembers  
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''chars''' number of guildmembers currently online or 0 if player is not in a guild
+
''chars'' number of guildmembers currently online or 0 if player is not in a guild
<br><br>
+
<br>
'''Example:'''<source lang="lua">
+
'''Example:'''<br>
 +
<source lang="lua">
 
for i=1,GetNumGuildMembers() do
 
for i=1,GetNumGuildMembers() do
 
   local id, rank, name = GetGuildMemberInfo(i)
 
   local id, rank, name = GetGuildMemberInfo(i)
 
   print("member: "..name)
 
   print("member: "..name)
 
end</source>
 
end</source>
<br><br>
+
<br>
  
 
=== GetNumNewsHeadlines ===
 
=== GetNumNewsHeadlines ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumNewsHeadlines() -> int num
 
GetNumNewsHeadlines() -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of news headlines..  
 
get number of news headlines..  
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num'''
+
''num''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetNumStationDesiredItems ===
 
=== GetNumStationDesiredItems ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumStationDesiredItems() -> int num
 
GetNumStationDesiredItems() -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Get number of items this station desires. The names of the items can then be fetched with [[API Index#GetStationDesiredItem|GetStationDesiredItem]], e.g.
+
Get number of items this station desires. The names of the items can then be fetched with [[API Index#GetStationDesiredItem|GetStationDesiredItem]].
 
+
<br>
    for i = 1, GetNumStationDesiredItems(), 1 do
+
        print("This station wants: "..GetStationDesiredItem(i))
+
    done
+
<br><br>
+
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num'''
+
''num'' The number of items the station wants.
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
<br><br>
+
<source lang="lua">
 +
for i = 1, GetNumStationDesiredItems(), 1 do
 +
    print("This station wants: "..GetStationDesiredItem(i))
 +
done
 +
</source>
 +
<br>
  
 
=== GetNumStationMerch ===
 
=== GetNumStationMerch ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumStationMerch() -> int num
 
GetNumStationMerch() -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of addons, ships an cargo this station sells
 
get number of addons, ships an cargo this station sells
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num'''  
+
''num''  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetNumStationTurrets ===
 
=== GetNumStationTurrets ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumStationTurrets() -> int num
 
GetNumStationTurrets() -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get number of turrets on this station or ship
 
get number of turrets on this station or ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num''' number of turrets attached to this station or ship. 0 if not docked
+
''num'' number of turrets attached to this station or ship. 0 if not docked
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetNumTips ===
 
=== GetNumTips ===
 
'''Definition:'''
 
'''Definition:'''
 
GetNumTips() -> int num
 
GetNumTips() -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get size of load screen tips pool
 
get size of load screen tips pool
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num'''  
+
''num''  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetParentHealth ===
 
=== GetParentHealth ===
 
'''Definition:'''
 
'''Definition:'''
 
GetParentHealth() -> float ret1 ret2
 
GetParentHealth() -> float ret1 ret2
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get health of object this one is attached to (turret to capship). untested!
 
get health of object this one is attached to (turret to capship). untested!
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret1''' health in percent(?)
+
''ret1'' health in percent(?)
'''ret2''' health as float (1-0)(?)
+
''ret2'' health as float (1-0)(?)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetPlayerDistance ===
 
=== GetPlayerDistance ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPlayerDistance(int charid) -> float distance
 
GetPlayerDistance(int charid) -> float distance
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get distance to another character
 
get distance to another character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id of another character in this sector
+
''charid'' character id of another character in this sector
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''distance''' distance to character in m
+
''distance'' distance to character in m
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetPlayerFaction ===
 
=== GetPlayerFaction ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPlayerFaction(int charid) -> int factionid
 
GetPlayerFaction(int charid) -> int factionid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get nation of a player
 
get nation of a player
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id or nil
+
''charid'' character id or nil
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''factionid''' number representing the faction (1-13, 99)
+
''factionid'' number representing the faction (1-13, 99)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetPlayerFactionStanding ===
 
=== GetPlayerFactionStanding ===
 
'''Definition:'''
 
'''Definition:'''
GetPlayerFactionStanding(int factionid) -> int standing
+
GetPlayerFactionStanding(int factionid, charid) -> int standing
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
get your standing with provided faction
+
get a players standing with a faction
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''factionid''' number representing a faction
+
''factionid'' a number representing a faction. Only 1 to 3 work for other players. [[factionid]]<br>
<br><br>
+
''charid'' [[charid]] of a player (in the current sector?). nil is equivalent of own id.
 +
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''standing''' number representing faction standing 0-65535, (0 in-game being -1000, 32768 in-game being 0 and 65535 being 1000 in-game)
+
''standing'' number representing faction standing 0-65535, (0 in-game being -1000, 32768 in-game being 0 and 65535 being 1000 in-game)
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
If the player's Itani Faction Standing was 0:
 
If the player's Itani Faction Standing was 0:
 
<source lang="lua">print( GetPlayerFactionStanding(1) )  -> "32768"</source>
 
<source lang="lua">print( GetPlayerFactionStanding(1) )  -> "32768"</source>
 
Or used in conjunction with GetPlayerFaction:
 
Or used in conjunction with GetPlayerFaction:
<source lang="lua">print( GetPlayerFactionStanding( GetPlayerFaction(charid) ) -> "Will return the players faction standing of the faction that charid belongs to." )</source>
+
<source lang="lua">print( GetPlayerFactionStanding( GetPlayerFaction(charid) )
<br><br>
+
-> "Will return the players faction standing of the faction that charid belongs to." )</source>
 +
<br>
  
 
=== GetPlayerHealth ===
 
=== GetPlayerHealth ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPlayerHealth(int charid) -> float health
 
GetPlayerHealth(int charid) -> float health
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get health of provided character
 
get health of provided character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''health''' health of character in percent or -1 if character is not in the current sector
+
''health'' health of character in percent or -1 if character is not in the current sector
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetPlayerName ===
 
=== GetPlayerName ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPlayerName(int charid) -> string name
 
GetPlayerName(int charid) -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get name of character
 
get name of character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name'''
+
''name''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetPlayerNodeID ===
 
=== GetPlayerNodeID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPlayerNodeID(int charid) -> int nodeid
 
GetPlayerNodeID(int charid) -> int nodeid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get [[nodeid]] of a character in the sector
 
get [[nodeid]] of a character in the sector
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''nodeid''' [[nodeid]] or nil if charid is invalid
+
''nodeid'' [[nodeid]] or nil if charid is invalid
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== GetPrimaryShipIDOfPlayer ===
 
=== GetPrimaryShipIDOfPlayer ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPrimaryShipIDOfPlayer(int charid) -> int shipid
 
GetPrimaryShipIDOfPlayer(int charid) -> int shipid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get shipid of a character (= objectid?)
 
get shipid of a character (= objectid?)
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''shipid'''
+
''shipid''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetPrimaryShipNameOfPlayer ===
 
=== GetPrimaryShipNameOfPlayer ===
 
'''Definition:'''
 
'''Definition:'''
 
GetPrimaryShipNameOfPlayer(int charid) -> string name
 
GetPrimaryShipNameOfPlayer(int charid) -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get ship name (type) of provided character
 
get ship name (type) of provided character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name'''
+
''name''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetProfitColor ===
 +
'''Definition:'''
 +
GetProfitColor(int price, cost) -> string color
 +
<br>
 +
'''Description:'''<br>
 +
get color depending on the given prices
 +
<br>
 +
'''Arguments:'''<br>
 +
''price'' sell price<br>
 +
''cost'' buy price
 +
<br>
 +
'''Returns:'''<br>
 +
''color'' iup color string
 +
<br>
 +
 +
=== GetProfitHexColor ===
 +
'''Definition:'''
 +
GetProfitHexColor(int price, cost) -> string color
 +
<br>
 +
'''Description:'''<br>
 +
get color in hex format depending on the given prices
 +
<br>
 +
'''Arguments:'''<br>
 +
''price'' sell price<br>
 +
''cost'' buy price
 +
<br>
 +
'''Returns:'''<br>
 +
''color'' hex color string. format: "rrggbb"
 +
<br>
  
 
=== GetProximityWarningDistance ===
 
=== GetProximityWarningDistance ===
 
'''Definition:'''
 
'''Definition:'''
 
GetProximityWarningDistance() -> int dist
 
GetProximityWarningDistance() -> int dist
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get proxy warnign distance<br>
 
get proxy warnign distance<br>
 
Note: even returns the distance when proxy warning is disabled
 
Note: even returns the distance when proxy warning is disabled
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''dist''' proxy distance.
+
''dist'' proxy distance.
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetSectorAlignment ===
 
=== GetSectorAlignment ===
 
'''Definition:'''
 
'''Definition:'''
 
GetSectorAlignment() -> int alignment
 
GetSectorAlignment() -> int alignment
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the alignment of the current sector<br>
 
returns the alignment of the current sector<br>
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''alignment''' int representing alignment of the current sector. see: [[FactionName]]
+
''alignment'' int representing alignment of the current sector. see: [[FactionName]]
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
 
+
  
 
=== GetSectorMonitoredStatus ===
 
=== GetSectorMonitoredStatus ===
 
'''Definition:'''
 
'''Definition:'''
 
GetSectorMonitoredStatus() -> int monitor
 
GetSectorMonitoredStatus() -> int monitor
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the monitor status of the current sector (Unmonitored, Guarded ...) see: [[FactionMonitor]] and [[FactionMonitorStr]] <br>
 
returns the monitor status of the current sector (Unmonitored, Guarded ...) see: [[FactionMonitor]] and [[FactionMonitorStr]] <br>
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''monitor''' monitor status  
+
''monitor'' monitor status  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetShipAmmoPrices ===
 +
'''Definition:'''
 +
GetShipAmmoPrices(int ship) -> table prices
 +
<br>
 +
'''Description:'''<br>
 +
get cost of ship ammo
 +
<br>
 +
'''Arguments:'''<br>
 +
''ship'' [[itemid]] of a ship
 +
<br>
 +
'''Returns:'''<br>
 +
''prices'' weapon itemid ammo price pairs<br>
 +
''prices.allammoprice'' cost of reloading all weapons<br>
 +
''prices.allammoquantity'' amoutn of ammo to reload
 +
<br>
  
 
=== GetShipCargoCount ===
 
=== GetShipCargoCount ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipCargoCount(int itemid) -> int num
 
GetShipCargoCount(int itemid) -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get amount of cargo in the ship
 
get amount of cargo in the ship
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' item id of a ship
+
''itemid'' item id of a ship
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num''' amount of argo in ship in cu
+
''num'' amount of argo in ship in cu
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetShipInventory ===
 
=== GetShipInventory ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipInventory(int itemid) -> {cargo = {int cargoitemid ..}, addons = {int addonitemid ..}}
 
GetShipInventory(int itemid) -> {cargo = {int cargoitemid ..}, addons = {int addonitemid ..}}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get itemids of items attached to a ship
 
get itemids of items attached to a ship
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' item id of a ship
+
''itemid'' item id of a ship
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cargo''' array with cargo items<br>
+
''cargo'' array with cargo items<br>
'''addons''' array with addons<br>
+
''addons'' array with addons<br>
'''cargoitemid''' itemids of cargo items<br>
+
''cargoitemid'' itemids of cargo items<br>
'''addonitemid''' itemids of addons
+
''addonitemid'' itemids of addons
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetShipList ===
 
=== GetShipList ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipList() -> {int itemid ..}
 
GetShipList() -> {int itemid ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get list of your ships in the current station. produces error when called outside station..
 
get list of your ships in the current station. produces error when called outside station..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' itemid of a ship
+
''itemid'' itemid of a ship
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetShipMaxCargo ===
 
=== GetShipMaxCargo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipMaxCargo(int itemid) -> int cargo
 
GetShipMaxCargo(int itemid) -> int cargo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get amount of cargo the given ship can hold
 
get amount of cargo the given ship can hold
<br><br>
+
<br>
'''Arguments:''' <br>
+
'''Arguments:'''<br>
'''itemid''' [[itemid]] of a ship
+
''itemid'' [[itemid]] of a ship
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cargo''' cargo in cu
+
''cargo'' cargo in cu
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetShipMeshInfo ===
 
=== GetShipMeshInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipMeshInfo(int itemid) -> string id model int color
 
GetShipMeshInfo(int itemid) -> string id model int color
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get mesh information about equipment in your inventory. if an invalid itemid is given the info about the current ship is returned
 
get mesh information about equipment in your inventory. if an invalid itemid is given the info about the current ship is returned
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of one of your ships or nil
+
''itemid'' [[itemid]] of one of your ships or nil
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''id''' of the ship<br>
+
''id'' of the ship<br>
'''model''' filename of the model(?)<br>
+
''model'' filename of the model(?)<br>
'''color''' [[colorid]] of the item see [[Function_Index#ShipPalette]]
+
''color'' [[colorid]] of the item see [[API Index#ShipPalette|ShipPalette]]
<br><br>
+
<br>
'''Example:'''
+
'''Example:'''<br>
 
<source lang="lua">GetShipMeshInfo(1234) -> "ship_generic_behemoth" "gaf/ship_generic_behemoth.dfs" 166</source>
 
<source lang="lua">GetShipMeshInfo(1234) -> "ship_generic_behemoth" "gaf/ship_generic_behemoth.dfs" 166</source>
<br><br>
+
<br>
  
 
=== GetShipPortIDOfItem ===
 
=== GetShipPortIDOfItem ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipPortIDOfItem(int itemid1, int itemid2) -> int portid
 
GetShipPortIDOfItem(int itemid1, int itemid2) -> int portid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get port of weapon in one of your ships
 
get port of weapon in one of your ships
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid1''' itemid of one of your ships<br>
+
''itemid1'' itemid of one of your ships<br>
'''itemid2''' itemid of a weapon or nil
+
''itemid2'' itemid of a weapon or nil
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''portid''' port of a wweapon or first free port if itemid2 is nil
+
''portid'' port of a wweapon or first free port if itemid2 is nil
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetShipPurchaseColor ===
 
=== GetShipPurchaseColor ===
 
'''Definition:'''
 
'''Definition:'''
 
GetShipPurchaseColor() -> int color
 
GetShipPurchaseColor() -> int color
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get selected color from the color picker
 
get selected color from the color picker
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''colorid''' number representing color (0-255)
+
''colorid'' number representing color (0-255)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetSkillLevel ===
 
=== GetSkillLevel ===
 
'''Definition:'''
 
'''Definition:'''
 
GetSkillLevel(int licenseid) -> int current next
 
GetSkillLevel(int licenseid) -> int current next
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get current and required xp for next level or provided skill
 
get current and required xp for next level or provided skill
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''licenseid''' type of license (1-5)
+
''licenseid'' type of license (1-5)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''current''' current xp
+
''current'' current xp
'''next''' xp required for next level
+
''next'' xp required for next level
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 +
=== GetSkirmishInfo ===
 +
'''Definition:'''<br>
 +
GetSkirmishInfo() -> int crew1 crew2 init1 init2 string name1 name2 bool active
 +
<br>
 +
'''Description:'''<br>
 +
returns crew info for skirmish missions
 +
<br>
 +
'''Returns:'''<br>
 +
''crew1'' crew members left for side 1 (top bar)<br>
 +
''crew2'' crew members left for side 2 (bottom bar)<br>
 +
''init1'' initial crew strength for side 1<br>
 +
''init2'' initial crew strength for side 2<br>
 +
''name1'' name of side 1<br>
 +
''name2'' name of side 2<br>
 +
''active'' true if mission active(?)
 +
<br>
  
 
=== GetStationAddonList ===
 
=== GetStationAddonList ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationAddonList() -> {int itemid ..}
 
GetStationAddonList() -> {int itemid ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get array with your addons in the station hold
 
get array with your addons in the station hold
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' [[itemid]] of one of your addons  
+
''itemid'' [[itemid]] of one of your addons  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetStationAmmoInfoByID ===
 
=== GetStationAmmoInfoByID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationAmmoByID(int itemid) -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc,  bool locallyproduced, int itemid, string icon}
 
GetStationAmmoByID(int itemid) -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc,  bool locallyproduced, int itemid, string icon}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get info about ammo based weapons in the station by item id
 
get info about ammo based weapons in the station by item id
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid
+
''itemid'' itemid
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetStationCargoList ===
 
=== GetStationCargoList ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationCargoList() -> {int itemid ..}
 
GetStationCargoList() -> {int itemid ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get list of cargo items in the current station. produces error when called outside station..
 
get list of cargo items in the current station. produces error when called outside station..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' itemid of a trade item
+
''itemid'' itemid of a trade item
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetStationChatLog ===
 
=== GetStationChatLog ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationChatLog() -> {string msg ..}
 
GetStationChatLog() -> {string msg ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get table with messages in the station chat
 
get table with messages in the station chat
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''msg''' chat message
+
''msg'' chat message
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetStationCurrentCargo ===
 
=== GetStationCurrentCargo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationCurrentCargo() -> int cargo
 
GetStationCurrentCargo() -> int cargo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get amount of cargo currently in this station. including cargo, equipment, ships ..
 
get amount of cargo currently in this station. including cargo, equipment, ships ..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cargo''' amount of cargo in cu
+
''cargo'' amount of cargo in cu
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== GetStationDesiredItem ===
 
=== GetStationDesiredItem ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationDesiredItem(int index) -> string ditem
 
GetStationDesiredItem(int index) -> string ditem
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Get the string name of an item that this station desires. The index ranges from 1 to [[API Index#GetNumStationDesiredItems|GetNumStationDesiredItems()]].
 
Get the string name of an item that this station desires. The index ranges from 1 to [[API Index#GetNumStationDesiredItems|GetNumStationDesiredItems()]].
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''index''' index in list of strings
+
''index'' index in list of strings
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ditems''' desired item
+
''ditems'' desired item
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetStationFaction ===
 
=== GetStationFaction ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationFaction(int stationid) -> int factionid
 
GetStationFaction(int stationid) -> int factionid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get faction of the given station
 
get faction of the given station
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''stationid''' [[stationid]]
+
''stationid'' [[stationid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''factionid''' [[factionid]] or 0 if stationid invalid
+
''factionid'' [[factionid]] or 0 if stationid invalid
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetStationFactionAppraisalModifier ===
 +
'''Definition:'''
 +
GetStationFactionAppraisalModifier() -> float modifier
 +
<br>
 +
'''Description:'''<br>
 +
Returns a number that seems to affect the price of storage space. depends on faction standing or something
 +
<br>
 +
'''Returns:'''<br>
 +
''modifier''
 +
<br>
  
 
=== GetStationLocation ===
 
=== GetStationLocation ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationLocation() -> int stationid
 
GetStationLocation() -> int stationid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get the [[stationid]] of the current station  
 
get the [[stationid]] of the current station  
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''stationid''' [[stationid]] or nil if not docked to a station  
+
''stationid'' [[stationid]] or nil if not docked to a station  
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 +
=== GetStationLogReadState ===
 +
'''Definition:'''
 +
GetStationLogReadState() -> bool read
 +
<br>
 +
'''Description:'''<br>
 +
Tell if the stationlog/bar was displayed. [[API_Index#SetStationLogRead|SetStationLogRead]] was called since the last line was added to the log.
 +
<br>
 +
'''Returns:'''<br>
 +
''read'' true if the log was displayed
 +
<br>
  
 
=== GetStationMaxCargo ===
 
=== GetStationMaxCargo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationMaxCargo() -> int cargo
 
GetStationMaxCargo() -> int cargo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return amount of cargo this station can hold.
 
return amount of cargo this station can hold.
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''cargo''' amount of cargo in cu
+
''cargo'' amount of cargo in cu
<br><br>
+
''purchaseable max''
'''Example:'''
+
''purchaseincrement''
<br><br>
+
''purchase price''
 
+
''mincargo''
 
+
''rent''
 +
<br>
  
 
=== GetStationMerchInfo ===
 
=== GetStationMerchInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationMerchInfo(int merchid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
 
GetStationMerchInfo(int merchid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get info about items this station sells
 
get info about items this station sells
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''merchid''' id of sold items (1-n)
+
''merchid'' id of sold items (1-n), where n = GetNumStationMerch()
<br><br>
+
<br>
'''Returns:'''<br>  
+
'''Example:'''<br>
<br><br>
+
<source lang="lua">
'''Example:'''
+
for item = 1, GetNumStationMerch() do
<br><br>
+
    local haveitem = GetStationMerchInfo(item);
 
+
    console_print("Station has item: ".. haveitem.name);
 +
end
 +
</source>
 +
<br>
  
 
=== GetStationMerchInfoByID ===
 
=== GetStationMerchInfoByID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationMerchInfoByID(int itemid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
 
GetStationMerchInfoByID(int itemid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get info about items this station sells by itemid
 
get info about items this station sells by itemid
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of sold items  
+
''itemid'' itemid of sold items  
<br><br>
+
<br>
'''Returns:'''<br>
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
  
Line 2,580: Line 3,324:
 
'''Definition:'''
 
'''Definition:'''
 
GetStationMerchInfoByID(int itemid) -> int price
 
GetStationMerchInfoByID(int itemid) -> int price
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get price of an item this station sells
 
get price of an item this station sells
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of sold items
+
''itemid'' itemid of sold items
<br><br>
+
<br>
'''Returns:'''<br>  
+
'''Returns:'''<br>
'''price''' price of an item or 0 if this item isn't sold
+
''price'' price of an item or 0 if this item isn't sold
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
  
Line 2,599: Line 3,341:
 
'''Definition:'''
 
'''Definition:'''
 
GetStationName(int stationid) -> string name
 
GetStationName(int stationid) -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
get the name of a station. if the provided stationid is invalid the function produces a lua error
+
Get the name of a station. If the provided stationid is invalid the function produces a lua error.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''stationid''' [[stationid]] or nil for the current station
+
* ''stationid'' [[stationid]] or nil for the current station
<br><br>
+
<br>
'''Returns:'''<br>  
+
'''Returns:'''<br>
'''name''' long name of the current station if no argument otherwise the shortname of a station
+
* ''name'' Long name of the current station if no argument is given, otherwise the sector name and coordinates of a station.
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
<source lang="lua">GetStationName(200*256+1) -> "SkyCommand"</source>
+
<source lang="lua">
200 is the sectorid of sol2 h13
+
GetStationName(200*256+1) --returns "Sol II H-13" (200 is the sectorid for Sol II, H-13)
<br><br>
+
GetStationName() -- returns "SkyCommand" when in the station at Sol II, H-13
 
+
</source>
 +
<br>
  
 
=== GetStationSellableInventoryInfoByID ===
 
=== GetStationSellableInventoryInfoByID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationSellableInventoryInfoByID() -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, string name, bool locallyproduced, neededlevels =  {string l1 .. l5}, int itemid, string icon }
 
GetStationSellableInventoryInfoByID() -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, string name, bool locallyproduced, neededlevels =  {string l1 .. l5}, int itemid, string icon }
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get sellable inventory info by id ...
 
get sellable inventory info by id ...
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== GetStationSellableInventoryPriceByID ===
 +
'''Definition:'''
 +
GetStationSellableInventoryPriceByID(int itemid, int quantity) -> int value, unitprice
 +
<br>
 +
'''Description:'''<br>
 +
Get value of inventory items and price per unit in the current station
 +
<br>
 +
'''Arguments:'''<br>
 +
''itemid'' [[itemid]] of an inventory item in the current station<br>
 +
''quantity'' number of units of this item (optional)
 +
<br>
 +
'''Returns:'''<br>
 +
''value'' value of item(s)<br>
 +
''unitprice'' price per unit
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
GetStationSellableInventoryPriceByID(1234, 2) -> 2000, 1400
 +
-- Two units of item 1234 are worth 2000c. The station sells a unit for 1400c.
 +
</source>
 +
<br>
  
 
=== GetStationShipList ===
 
=== GetStationShipList ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationShipList(int itemid) -> {int itemid1 ..}
 
GetStationShipList(int itemid) -> {int itemid1 ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get array of your ships in the current station
 
get array of your ships in the current station
<br><br>
+
<br>
'''Arguments:'''
+
'''Returns:'''<br>
<br><br>
+
''itemid?'' itemid of ship in the current station  
'''Returns:'''<br>  
+
<br>
'''itemid?''' itemid of ship in the current station  
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetStationTurretInfo ===
 
=== GetStationTurretInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationTurretInfo(int turretid) -> {int objectid, int nodeid, float armorpercent, int itemid}
 
GetStationTurretInfo(int turretid) -> {int objectid, int nodeid, float armorpercent, int itemid}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get information about a stations or ships turrets
 
get information about a stations or ships turrets
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
 
''turretid''' id of a turret
 
''turretid''' id of a turret
<br><br>
+
<br>
'''Returns:'''<br>  
+
'''Returns:'''<br>
'''objectid'''<br>
+
''objectid''<br>
'''nodeid'''<br>
+
''nodeid''<br>
'''armorpercent''' armor level<br>
+
''armorpercent'' armor level<br>
'''itemid'''
+
''itemid''
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetStationType ===
 
=== GetStationType ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStationType() -> string stype
 
GetStationType() -> string stype
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get station type
 
get station type
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''stype''' station type. returns "frigate" when docked to a cruiser otherwise nil
+
''stype'' station type. returns "frigate" when docked to a cruiser otherwise nil
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetStorageItemInfo ===
 
=== GetStorageItemInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStorageItemInfo() -> ??
 
GetStorageItemInfo() -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
no clue. can't make it return anything
 
no clue. can't make it return anything
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetStorageLocationSector ===
 
=== GetStorageLocationSector ===
 
'''Definition:'''
 
'''Definition:'''
 
GetStorageLocationSector(int arg1) -> int ret1
 
GetStorageLocationSector(int arg1) -> int ret1
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns some number when fed with an itemid
 
returns some number when fed with an itemid
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== GetSurveyChoices ===
 
=== GetSurveyChoices ===
 
'''Definition:'''
 
'''Definition:'''
 
GetSurveyChoices() -> {}
 
GetSurveyChoices() -> {}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns an empty table!
 
returns an empty table!
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== GetSurveyQuestion ===
 
=== GetSurveyQuestion ===
 
'''Definition:'''
 
'''Definition:'''
 
GetSurveyQuestion() -> string ret1
 
GetSurveyQuestion() -> string ret1
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns an empty string!
 
returns an empty string!
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret1''' an empty string!
+
''ret1'' an empty string!
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== GetSystemID ===
 
=== GetSystemID ===
 
'''Definition:'''
 
'''Definition:'''
 
GetSystemID(int sectorid) -> int systemid
 
GetSystemID(int sectorid) -> int systemid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get systemid of the given sector. lua error on nil
 
get systemid of the given sector. lua error on nil
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''sectorid''' [[sectorid]]
+
''sectorid'' [[sectorid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''systemid''' [[systemid]]
+
''systemid'' [[systemid]]
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== GetTargetDistance ===
 
=== GetTargetDistance ===
 
'''Definition:'''
 
'''Definition:'''
 
GetTargetDistance() -> float dist
 
GetTargetDistance() -> float dist
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get distance to target
 
get distance to target
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''dist''' distance to target in m
+
''dist'' distance to target in m
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== GetTargetFriendlyStatus ===
 
=== GetTargetFriendlyStatus ===
 
'''Definition:'''
 
'''Definition:'''
 
GetTargetFriendlyStatus() -> int fstatus
 
GetTargetFriendlyStatus() -> int fstatus
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get friendlyness of target
 
get friendlyness of target
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''fstatus''' Returns 0 to 3. Target is friendly if 3, unfriendly otherwise
+
''fstatus'' Returns 0 to 3. Target is friendly if 3, unfriendly otherwise
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetTargetInfo ===
 
=== GetTargetInfo ===
 
'''Definition:'''
 
'''Definition:'''
 
GetTargetInfo() -> string name float health dist int factionid string guild ship
 
GetTargetInfo() -> string name float health dist int factionid string guild ship
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get info about target
 
get info about target
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''name'''<br>
+
''name''<br>
'''health''' health in percent<br>
+
''health'' health in percent<br>
'''dist''' distance in m<br>
+
''dist'' distance in m<br>
'''factionid''' faction of target<br>
+
''factionid'' faction of target<br>
'''guild''' guild tag of target<br>
+
''guild'' guild tag of target<br>
'''ship''' name of targets ship
+
''ship'' name of targets ship
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetTip ===
 
=== GetTip ===
 
'''Definition:'''
 
'''Definition:'''
 
GetTip(int tipid) -> string tip
 
GetTip(int tipid) -> string tip
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get loading screen with given index
 
get loading screen with given index
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''tipid''' tip id (1-n)
+
''tipid'' tip id (1-n)
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''tip''' loading screen tip
+
''tip'' loading screen tip
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== GetTurretNamesByStationType ===
 
=== GetTurretNamesByStationType ===
 
'''Definition:'''
 
'''Definition:'''
 
GetTurretNamesByStationType(string stype) -> {string tur1 ..}
 
GetTurretNamesByStationType(string stype) -> {string tur1 ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get turret name of provided station type
 
get turret name of provided station type
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''stype''' station type
+
''stype'' station type
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''tur1''' turret name (2-n)(?)
+
''tur1'' turret name (2-n)(?)
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">GetTurretNameByStationType("frigate") -> {2 = "LeftAft", 3 = "Left Front", 4 = "Left Lower Fin" ..}</source>
 
<source lang="lua">GetTurretNameByStationType("frigate") -> {2 = "LeftAft", 3 = "Left Front", 4 = "Left Lower Fin" ..}</source>
<br><br>
+
<br>
 
+
  
 
=== GetTutorialLevel ===
 
=== GetTutorialLevel ===
 
'''Definition:'''
 
'''Definition:'''
 
GetTutorialLevel() -> int num
 
GetTutorialLevel() -> int num
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return if the player has done the tutorial(?)
 
return if the player has done the tutorial(?)
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''num''' 0 if tutorial wasn'T done -1 if it was, I think ...
+
''num'' 0 if tutorial wasn'T done -1 if it was, I think ...
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== GetUserName ===
 +
'''Definition:'''
 +
GetUserName() -> string Name
 +
<br>
 +
'''Description:'''<br>
 +
Returns the username.
 +
<br>
 +
'''Returns:'''<br>
 +
'''Name''' <test:username> or <dev:username> if you are on the test or dev server, otherwise <username>.
 +
<br>
  
 
=== GiveMoney ===
 
=== GiveMoney ===
 
'''Definition:'''
 
'''Definition:'''
 
GiveMoney(string char, int amount) -> nil
 
GiveMoney(string char, int amount) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
transfer money to a character
 
transfer money to a character
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''char''' name of a character within the sector<br>
+
''char'' name of a character within the sector<br>
'''amount''' amount of money to transfer
+
''amount'' amount of money to transfer
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== HasActiveShip ===
 
=== HasActiveShip ===
 
'''Definition:'''
 
'''Definition:'''
 
HasActiveShip() -> bool aship
 
HasActiveShip() -> bool aship
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return true if the player has an active ship
 
return true if the player has an active ship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''aship''' true if the player has an activer ship otherwise false
+
''aship'' true if the player has an activer ship otherwise false
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== HasLastShipLoadout ===
 
=== HasLastShipLoadout ===
 
'''Definition:'''
 
'''Definition:'''
 
HasLastShipLoadout() -> bool loadout
 
HasLastShipLoadout() -> bool loadout
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return true if the player has a last ship loadout saved. (see ClearLastShipLoadout)
 
return true if the player has a last ship loadout saved. (see ClearLastShipLoadout)
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''loadout''' true if the player has a last shiploadout saved otherwise false
+
''loadout'' true if the player has a last shiploadout saved otherwise false
<br><br>
+
<br>
'''Example:'''
+
 
<br><br>
+
=== HelpCharAccom ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpCharFaction ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpCharGuild ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpCharInventory ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpCharStats ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpCommoditiesAction ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpGridPower ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpIgnore ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpLargeAddonsAction ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpOtherAddonsAction ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAAdvancementLog ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAJettison ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAKilledByList ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAKilledList ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAMissionLog ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAMissionNotes ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDANearbyShips ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAPVPList ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpPDAStationVisitsList ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpSellAction ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpSellAddons ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpSellCommodities ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipAmmo ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipCargo ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipEquip ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipGroup ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipPurchase ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipSelect ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpShipStatus ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpSmallAddonsAction ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationAddonEquip ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationAddonGroups ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationBuddies ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationMission ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationNav ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationNews ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpStationWelcome ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpSystemNotes ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HelpVoiceChat ===
 +
'''Description:'''<br>
 +
[[helpfunc]]
 +
<br>
 +
 
 +
=== HideAllDialogs ===
 +
'''Definition:'''
 +
HideAllDialogs() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Hide all dialogs that were shown with [[API_Index#ShowDialog|ShowDialog]] or [[API_Index#PopupDialog|PopupDialog]]
 +
<br>
 +
 
 +
=== HideDialog ===
 +
'''Definition:'''
 +
HideDialog(userdata dialog) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Hide a dialog that was shown with [[API_Index#ShowDialog|ShowDialog]] or [[API_Index#PopupDialog|PopupDialog]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''dialog'' a currently shown dialog
 +
<br>
 +
 
 +
=== HideTooltip ===
 +
'''Definition:'''
 +
HideTooltip() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Hide [[API_Index#ToolTip|ToolTip]], the tooltip dialog
 +
<br>
  
 
=== IsConnected ===
 
=== IsConnected ===
 
'''Definition:'''
 
'''Definition:'''
 
IsConnected() -> bool connected
 
IsConnected() -> bool connected
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
return true if the player is connected to the game
 
return true if the player is connected to the game
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''connected''' true if the player is connected otherwise false
+
''connected'' true if the player is connected otherwise false
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== IsEnemy ===
 
=== IsEnemy ===
 
'''Definition:'''
 
'''Definition:'''
 
IsEnemy(charid) -> bool enemy
 
IsEnemy(charid) -> bool enemy
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Part of the base radar functionality. Used in conjunction with GetFriendlyStatus.  
 
Part of the base radar functionality. Used in conjunction with GetFriendlyStatus.  
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''enemy''' returns true if someone is an enemy, otherwise false. Totally unreliable.
+
''enemy'' returns true if someone is an enemy, otherwise false. Totally unreliable.
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== IsGroupMember ===
 
=== IsGroupMember ===
 
'''Definition:'''
 
'''Definition:'''
 
IsGroupMember(int charid) -> bool grmember
 
IsGroupMember(int charid) -> bool grmember
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if the provided character is a group member
 
tell if the provided character is a group member
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''grmember''' true if character is a groupmember false if not or you aren't member of a group
+
''grmember'' true if character is a groupmember false if not or you aren't member of a group
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== IsGuildMember ===
 
=== IsGuildMember ===
 
'''Definition:'''
 
'''Definition:'''
 
IsGuildMember(int charid) -> bool guildmember
 
IsGuildMember(int charid) -> bool guildmember
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if the provided character is a guild member
 
tell if the provided character is a guild member
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charid''' character id
+
''charid'' character id
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''gumember''' true if character is a guildmember false if not or you aren't member of a guild
+
''gumember'' true if character is a guildmember false if not or you aren't member of a guild
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== IsInDuel ===
 
=== IsInDuel ===
 
'''Definition:'''
 
'''Definition:'''
IsInDuel(charid) -> bool
+
IsInDuel() -> bool duel
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Returns true if charid is in a duel, otherwise false.
+
Returns true if the player is in a duel
<br><br>
+
<br>
'''Arguments:'''
+
'''Returns:'''<br>
<br><br>
+
''duel'' true if dueling
'''Returns:'''
+
<br>
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== IsPlayerRequestingBuddy ===
 
=== IsPlayerRequestingBuddy ===
 
'''Definition:'''
 
'''Definition:'''
IsPlayerRequestingBuddy(?) -> ?
+
IsPlayerRequestingBuddy(string name) -> bool req
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
not tried. sounds obvious though
+
Tell if the given player is requesting to become a buddy
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''name'' player name
'''Returns:'''
+
<br>
<br><br>
+
'''Returns:'''<br>
'''Example:'''
+
''req'' true if player is requesting to become a buddy
<br><br>
+
<br>
  
 
=== IsPlayerRequestingDuel ===
 
=== IsPlayerRequestingDuel ===
 
'''Definition:'''
 
'''Definition:'''
IsPlayerRequestingDuel(?) -> ?
+
IsPlayerRequestingDuel(string name) -> bool req
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
not tried. sounds obvious though
+
Tell if the given player is requesting a duel
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''name'' player name
'''Returns:'''
+
<br>
<br><br>
+
'''Returns:'''<br>
'''Example:'''
+
''req'' true if player is requesting a duel
<br><br>
+
<br>
 
+
 
+
  
 
=== IsPlayerRequestingGroupInvite ===
 
=== IsPlayerRequestingGroupInvite ===
 
'''Definition:'''
 
'''Definition:'''
IsPlayerRequestingGroupInvite(?) -> ?
+
IsPlayerRequestingGroupInvite(string name) -> bool req
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
not tried. sounds obvious though
+
Tell if the given player has sent a group invite
<br><br>
+
<br>
'''Arguments:'''
+
'''Arguments:'''<br>
<br><br>
+
''name'' player name
'''Returns:'''
+
<br>
<br><br>
+
'''Returns:'''<br>
'''Example:'''
+
''req'' true if invited by player
<br><br>
+
<br>
 
+
 
+
  
 
=== IsProximityWarningEnabled ===
 
=== IsProximityWarningEnabled ===
 
'''Definition:'''
 
'''Definition:'''
 
IsProximityWarningEnabled() -> bool isproxy
 
IsProximityWarningEnabled() -> bool isproxy
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if proximity warning is enabled
 
tell if proximity warning is enabled
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''isproxy''' true if proximity warning is enabled otherwise false
+
''isproxy'' true if proximity warning is enabled otherwise false
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== IsStormPresent ===
 
=== IsStormPresent ===
 
'''Definition:'''
 
'''Definition:'''
 
IsStormPresent() -> bool isstorm
 
IsStormPresent() -> bool isstorm
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if there's a storm in the current sector
 
tell if there's a storm in the current sector
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''isstorm''' true if storm is present otherwise false
+
''isstorm'' true if storm is present otherwise false
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== IsTransactionInProgress ===
 
=== IsTransactionInProgress ===
 
'''Definition:'''
 
'''Definition:'''
 
IsTransactionInProgress() -> bool trans
 
IsTransactionInProgress() -> bool trans
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if a transaction is in progress (like selling a ship, items ..)
 
tell if a transaction is in progress (like selling a ship, items ..)
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''trans''' true if transaction in progress
+
''trans'' true if transaction in progress
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== IsVoiceChatEnabled ===
 +
'''Definition:'''
 +
IsVoiceChatEnabled() -> bool vc
 +
<br>
 +
'''Description:'''<br>
 +
tell if voice chat is enabled
 +
<br>
 +
'''Returns:'''<br>
 +
''vc'' true if voice chat is enabled
 +
<br>
  
 
=== JettisonAll ===
 
=== JettisonAll ===
 
'''Definition:'''
 
'''Definition:'''
 
JettisonAll() -> nil
 
JettisonAll() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Jettison all of your ships cargo
 
Jettison all of your ships cargo
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== JettisonMultiple ===
 
=== JettisonMultiple ===
 
'''Definition:'''
 
'''Definition:'''
 
JettisonMultiple{item1 = {int id, int quantity} ..} -> nil
 
JettisonMultiple{item1 = {int id, int quantity} ..} -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Jettison cargo items and quantitiss according to the provided table  
 
Jettison cargo items and quantitiss according to the provided table  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''item1''' table containing quantity and itemid of cargo to jettison
+
''item1'' table containing quantity and itemid of cargo to jettison
'''id''' itemid of cargo item
+
''id'' itemid of cargo item
'''quantity''' amount of this cargo to jettison
+
''quantity'' amount of this cargo to jettison
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">JettisonMultiple{{id=1234, quantity=2}, {id=1235, quantity=3}}</source><br>
 
<source lang="lua">JettisonMultiple{{id=1234, quantity=2}, {id=1235, quantity=3}}</source><br>
 
jettison 2 untis of the cargo with the itemid 1234 and 3 with the id 1235
 
jettison 2 untis of the cargo with the itemid 1234 and 3 with the id 1235
<br><br>
+
<br>
 
+
 
+
 
+
 
+
  
 
=== JettisonSingle ===
 
=== JettisonSingle ===
 
'''Definition:'''
 
'''Definition:'''
 
JettisonSingle(int itemid, int quantity) -> nil
 
JettisonSingle(int itemid, int quantity) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Jettison provided type and amount of cargo  
 
Jettison provided type and amount of cargo  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of cargo item
+
''itemid'' itemid of cargo item
'''quantity''' amount of cargo to jettison
+
''quantity'' amount of cargo to jettison
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">JettisonMultiple(1234, 2)</source><br>
 
<source lang="lua">JettisonMultiple(1234, 2)</source><br>
 
jettison 2 units of the cargo with the itemid 1234  
 
jettison 2 units of the cargo with the itemid 1234  
<br><br>
+
<br>
 
+
  
 
=== JoinChannel ===
 
=== JoinChannel ===
 
'''Definition:'''
 
'''Definition:'''
 
JoinChannel{channelid1 ..} -> nil
 
JoinChannel{channelid1 ..} -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
join the provided channels without leaving existing channels
 
join the provided channels without leaving existing channels
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''channelid1''' channel number (1 - 2^32) the last index is the active channel
+
''channelid1'' channel number (1 - 2^32) the last index is the active channel
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== LeaveChannel ===
 
=== LeaveChannel ===
 
'''Definition:'''
 
'''Definition:'''
 
LeaveChannel{channelid1 ..} -> nil
 
LeaveChannel{channelid1 ..} -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
leave the provided channels
 
leave the provided channels
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''channelid1''' channel number (1 - 2^32)
+
''channelid1'' channel number (1 - 2^32)
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== ListChannels ===
 
=== ListChannels ===
 
'''Definition:'''
 
'''Definition:'''
 
ListChannels() -> nil
 
ListChannels() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
print list of currently joined channels and usage info to the chatarea
 
print list of currently joined channels and usage info to the chatarea
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== LoadCargo ===
 
=== LoadCargo ===
 
'''Definition:'''
 
'''Definition:'''
LoadCargo{item1 = {int itemid, int quantity} ..} -> nil
+
LoadCargo({{int itemid, int quantity} ..}, function cb) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Load cargo items and quantitiss according to the provided table  
 
Load cargo items and quantitiss according to the provided table  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''item1''' table containing quantity and itemid of cargo
+
''itemid'' itemid of cargo item<br>
'''itemid''' itemid of cargo item
+
''quantity'' amount of this cargo to load<br>
'''quantity''' amount of this cargo to load
+
''cb'' optional function to call on success
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">LoadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 
<source lang="lua">LoadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 
load 2 units of the cargo with the itemid 1234 and 3 with the id 1235
 
load 2 units of the cargo with the itemid 1234 and 3 with the id 1235
<br><br>
+
<br>
 
+
  
 
=== LoadChannels ===
 
=== LoadChannels ===
 
'''Definition:'''
 
'''Definition:'''
 
LoadChannels() -> nil
 
LoadChannels() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
restore chat channels from config file(?)
 
restore chat channels from config file(?)
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== LoadMissionNotes ===
 
=== LoadMissionNotes ===
 
'''Definition:'''
 
'''Definition:'''
 
LoadMissionNotes() -> string notes
 
LoadMissionNotes() -> string notes
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
read and return players notes from playernotes.txt. See also: [[Function_Index#SaveMissionNotes]]  
 
read and return players notes from playernotes.txt. See also: [[Function_Index#SaveMissionNotes]]  
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''notes''' mission notes text
+
''notes'' mission notes text
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== LoadNavpath ===
 
=== LoadNavpath ===
 
'''Definition:'''
 
'''Definition:'''
 
LoadNavpath(string navpath) -> {int sectorid1 ..}
 
LoadNavpath(string navpath) -> {int sectorid1 ..}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
load navroute by name and return array with hops
 
load navroute by name and return array with hops
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''sectorid1''' [[sectorid]] of a hop on this navroute first index is first hop (1-n)
+
''sectorid1'' [[sectorid]] of a hop on this navroute first index is first hop (1-n)
<br><br>
+
<br>
'''Example:'''
+
 
<br><br>
+
=== LoadShipPresets ===
 +
'''Definition:'''
 +
LoadShipPresets() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
read ship presets from config file and setup buyback dialog
 +
<br>
 +
 
 +
=== LoadSystemNotes ===
 +
'''Definition:'''
 +
LoadSystemNotes(int systemid) -> string notes
 +
<br>
 +
'''Description:'''<br>
 +
load system notes from settings/<charactername>/system<systemid>notes.txt
 +
<br>
 +
'''Arguments:'''<br>
 +
''sectorid'' [[systemid]]
 +
<br>
 +
'''Returns:'''<br>
 +
''notes'' string with system notes
 +
<br>
  
 
=== LocationStr ===
 
=== LocationStr ===
 
'''Definition:'''
 
'''Definition:'''
 
LocationStr(int sectorid) -> string sname
 
LocationStr(int sectorid) -> string sname
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
translate a sectorid into a sector name. error if no argument provided
 
translate a sectorid into a sector name. error if no argument provided
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''sectorid''' [[sectorid]]
+
''sectorid'' [[sectorid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''sname''' sector name
+
''sname'' sector name
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">LocationStr(5000) -> "Sedina System, Sector H-9"</source>
 
<source lang="lua">LocationStr(5000) -> "Sedina System, Sector H-9"</source>
<br><br>
+
<br>
  
 
=== Login ===
 
=== Login ===
 
'''Definition:'''
 
'''Definition:'''
 
Login(string username, string password) -> nil
 
Login(string username, string password) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Login to the game. crashes game when arguments are missing...
 
Login to the game. crashes game when arguments are missing...
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''username''' vendetta account name<br>
+
''username'' vendetta account name<br>
'''password''' password  
+
''password'' password  
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== Logout ===
 
=== Logout ===
 
'''Definition:'''
 
'''Definition:'''
 
Logout() -> nil
 
Logout() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Inititate logout sequence.
 
Inititate logout sequence.
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== MakeBotName ===
 
=== MakeBotName ===
 
'''Definition:'''
 
'''Definition:'''
MakeBotName(string arg1, int arg2) -> string bname
+
MakeBotName(string nameset, int seed) -> string name
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
no clue. returns the string that's passed to it and requires an int as second argument
+
Generate a name fromthe given nameset and optional random seed
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''arg1:''' ?<br>
+
''nameset'' [[nameset]] from which to generate a name<br>
'''arg2:''' random seed<br>
+
''seed'' optional random seed<br>
<br><br>
+
<br>
'''Returns:'''
+
'''Returns:'''<br>
<br><br>
+
''name'' a random name based on the nameset
'''Example:'''
+
<br>
<br><br>
+
 
 +
=== MakeBuyBackQuestionDlg ===
 +
'''Definition:'''
 +
MakeBuyBackQuestionDlg() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create the buyback dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' buyback dialog
 +
<br>
  
 
=== NPlural ===
 
=== NPlural ===
 
'''Definition:'''
 
'''Definition:'''
 
NPlural(string arg1, string arg2) -> string pstring
 
NPlural(string arg1, string arg2) -> string pstring
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
concaterates the two provided strings together and pluralizes the result
 
concaterates the two provided strings together and pluralizes the result
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''arg1''' first substring<br>
+
''arg1'' first substring<br>
'''arg2''' second substring<br>
+
''arg2'' second substring<br>
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''pstring''' concaterated and pluralized string
+
''pstring'' concaterated and pluralized string
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">NPlural("Serco", "Cookie") -> "Serco Cookies"</source>
 
<source lang="lua">NPlural("Serco", "Cookie") -> "Serco Cookies"</source>
<br><br>
+
<br>
  
 +
=== MakeBuyBackQuestionDlg ===
 +
'''Definition:'''
 +
MakeBuyBackQuestionDlg() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create the buyback dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' buyback dialog
 +
<br>
  
 +
=== OnIdle ===
 +
'''Definition:'''
 +
OnIdle(float delta) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Idle handler
 +
<br>
 +
'''Arguments:'''<br>
 +
''delta'' seconds since last call(?)
 +
<br>
 +
 +
=== OpenAlarm ===
 +
'''Definition:'''
 +
OpenAlarm(string title, text, buttontext) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Show [[API_index#ConfirmationDialog|ConfirmationDialog]] with the given message
 +
<br>
 +
'''Arguments:'''<br>
 +
''title'' title text<br>
 +
''text'' body text<br>
 +
''buttontext'' text on button
 +
<br>
 +
 +
=== OverlapPrevention ===
 +
'''Definition:'''
 +
OverlapPrevention(table ip) -> bool overlap
 +
<br>
 +
'''Description:'''<br>
 +
Adjust icon positions in a viewport so that they don't overlap
 +
<br>
 +
'''Arguments:'''<br>
 +
''ip'' table with viewport dimensions and icon positions<br>
 +
''ip.icon_positions'' table with [[icon_postions]]<br>
 +
''ip.width'' width of viewport<br>
 +
''ip.height'' height of viewport
 +
<br>
 +
'''Returns:'''<br>
 +
''overlap'' true if icons overlapped
 +
<br>
  
 
=== ParseXML ===
 
=== ParseXML ===
 
'''Definition:'''
 
'''Definition:'''
 
ParseXML(string xmlstring) -> {dom}
 
ParseXML(string xmlstring) -> {dom}
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
returns the provided string as a collection of substrings and nodes as subtables ..see example
 
returns the provided string as a collection of substrings and nodes as subtables ..see example
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''xmlstring''' string containing xml tags
+
''xmlstring'' string containing xml tags
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''dom''' table with xml nodes and substrings
+
''dom'' table with xml nodes and substrings
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">ParseXML("a <xml>test</xml>woohoo<tag>subtext<bla>subsubtext</bla></tag>") ->  
 
<source lang="lua">ParseXML("a <xml>test</xml>woohoo<tag>subtext<bla>subsubtext</bla></tag>") ->  
 
{"a ", {"test", "xml"}, "woohoo", {"subtext", {"subsubtext", "bla" }, "tag"}}</source>
 
{"a ", {"test", "xml"}, "woohoo", {"subtext", {"subsubtext", "bla" }, "tag"}}</source>
<br><br>
+
<br>
  
 
=== PlayerInStation ===
 
=== PlayerInStation ===
 
'''Definition:'''
 
'''Definition:'''
 
PlayerInStation() -> bool instation
 
PlayerInStation() -> bool instation
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if the player is in a station or capship
 
tell if the player is in a station or capship
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''instation''' true if the player is in a station otherwise false
+
''instation'' true if the player is in a station otherwise false
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== PlayerInventoryPairs ===
 
=== PlayerInventoryPairs ===
 
'''Definition:'''
 
'''Definition:'''
 
PlayerInventoryPairs() -> int itemid table iteminfo
 
PlayerInventoryPairs() -> int itemid table iteminfo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Iterator function that returns information about an item in the players inventory each time it is called. works like pairs()
 
Iterator function that returns information about an item in the players inventory each time it is called. works like pairs()
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' [[itemid]]<br>
+
''itemid'' [[itemid]]<br>
'''iteminfo''' inventory [[iteminfo]]
+
''iteminfo'' inventory [[iteminfo]]
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">for i,v in PlayInventoryPairs() do console_print(i) printtable(v) end</source>
 
<source lang="lua">for i,v in PlayInventoryPairs() do console_print(i) printtable(v) end</source>
 
prints the info of every item in the players inventory to the console
 
prints the info of every item in the players inventory to the console
<br><br>
+
<br>
 +
 
 +
=== PopupDialog ===
 +
'''Definition:'''
 +
PopupDialog(userdata dialog, int x, y) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Wrapper around [[iup#Popup|iup.Popup]] that allows the dialog to be closed with [[API_Index#HideDialog|HideDialog]] or [[API_Index#HideAllDialogs|HideAllDialogs]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''dialog'' dialog to show<br>
 +
''x'' horizontal position<br>
 +
''y'' vertical position
 +
<br>
  
 
=== PrintJoinUsage ===
 
=== PrintJoinUsage ===
 
'''Definition:'''
 
'''Definition:'''
 
PrintJoinUsage() -> nil
 
PrintJoinUsage() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
prints how to use /join to the chatarea
 
prints how to use /join to the chatarea
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== PrintLeaveUsage ===
 
=== PrintLeaveUsage ===
 
'''Definition:'''
 
'''Definition:'''
 
PrintLeaveUsage() -> nil
 
PrintLeaveUsage() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
prints how to use /leave to the chatarea
 
prints how to use /leave to the chatarea
<br><br>
+
<br>
'''Arguments:'''
+
 
<br><br>
+
=== PrintPurchaseTransaction ===
'''Returns:'''
+
'''Definition:'''
<br><br>
+
PrintPurchaseTransaction(string name, int quantity, totalvalue, totalcost) -> nil
'''Example:'''
+
<br>
<br><br>
+
'''Description:'''<br>
 +
Print a sale summery message to the chat log
 +
<br>
 +
'''Arguments:'''<br>
 +
''name'' sold item<br>
 +
''quantity'' number items sold<br>
 +
''totalvalue'' value of items<br>
 +
''totalcost'' price of items<br>
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
-- prints "100x of Stuff sold for a total amount of 1000c (profit of 1c)" to the chat log
 +
PrintPurchaseTransaction("Stuff", 100, 1000, 999)
 +
</source>
 +
<br>
 +
 
 +
=== PrintTransactionTable ===
 +
'''Definition:'''
 +
PrintTransactionTable() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
print pending transactions.
 +
<br>
 +
'''Returns:'''<br>
 +
{[x]={trackback="...(tail call): ?", wantcount=0, count=0}}
 +
for current transactions, otherwise returns nil.
 +
<br>
  
 
=== ProcessEvent ===
 
=== ProcessEvent ===
 
'''Definition:'''
 
'''Definition:'''
 
ProcessEvent(string eventtype, data) -> nil
 
ProcessEvent(string eventtype, data) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Processes various events. Trigger a with [[Function_Index#RegisterEvent]] defined event
 
Processes various events. Trigger a with [[Function_Index#RegisterEvent]] defined event
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''eventtype''' [[eventtype]]<br>
+
''eventtype'' [[eventtype]]<br>
'''data''' varies depending on eventtype. Sometimes it's a table, sometimes it's a string.
+
''data'' varies depending on eventtype. Sometimes it's a table, sometimes it's a string.
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
 
+
<br><br>
+
  
 
=== PurchaseMerchandiseItem ===
 
=== PurchaseMerchandiseItem ===
 
'''Definition:'''
 
'''Definition:'''
PurchaseMerchandiseItem(int itemid, int amount) -> nil
+
PurchaseMerchandiseItem(int itemid, int amount, func callback) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
buy the provided item
 
buy the provided item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of cargo merch item
+
''itemid'' itemid of cargo merch item<br>
<br><br>
+
''amount'' number of items to purchase<br>
'''Returns:'''
+
''callback'' function that gets called when transaction is finished, callback is called with no arguments in case of success or with numeric errorcode in case of failure
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== PurchaseShipLoadout ===
 
=== PurchaseShipLoadout ===
 
'''Definition:'''
 
'''Definition:'''
 
PurchaseShipLoadout(func arg1) -> ??
 
PurchaseShipLoadout(func arg1) -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
no clue takes function as first argument
 
no clue takes function as first argument
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 
=== RegisterEvent ===
 
=== RegisterEvent ===
 
'''Definition:'''
 
'''Definition:'''
RegisterEvent({func OnEvent}, string eventtype) -> nil
+
RegisterEvent(object eventhandler, string eventtype) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
hook up object to event. the obect is a table with a method called OnEvent that is called when the event is triggered
+
Hook up object to event. The object is a function or a table with a method called OnEvent or the name of the event. See [[Eventtype#Introduction|Event Intro]]
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''OnEvent''' function to call when event is triggered<br>
+
''eventhandler'' object to register with event<br>
'''eventtype''' [[eventtype]]
+
''eventtype'' [[eventtype]]
<br><br>
+
<br>
'''Returns:'''
+
'''Example:'''<br>
<br><br>
+
see [[Eventtype#Introduction|Event Intro]]
'''Example:'''<br><source lang="lua">
+
<br>
obj = {}
+
-- create method in above created table that prints out the name of the event and the data passed to it
+
function obj:OnEvent(event, ...) print(event) print(...) end
+
-- Register the event
+
RegisterEvent(obj, "TEST_EVENT")
+
-- trigger the event and pass the string "test" to it
+
ProcessEvent("TEST_EVENT", "test")
+
-- which should output:
+
-- TEST_EVENT
+
-- test
+
</source>
+
<br><br>
+
  
 
=== RegisterUserCommand ===
 
=== RegisterUserCommand ===
 
'''Definition:'''
 
'''Definition:'''
 
RegisterUserCommand(string commandname, func callback(dataarg, {arguments1, ..}), data) -> nil
 
RegisterUserCommand(string commandname, func callback(dataarg, {arguments1, ..}), data) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
hook up object to command
 
hook up object to command
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''commandname''' string containing the command<br>
+
''commandname'' string containing the command<br>
'''callback''' function accepting two arguments to run when command is executed<br>
+
''callback'' function accepting two arguments to run when command is executed<br>
'''dataarg''' see '''data'''<br>
+
''dataarg'' see ''data''<br>
'''arguments1''' arguments of the command (Note: if there are no arguments the table is nil not an empty table.)<br>
+
''arguments1'' arguments of the command (Note: if there are no arguments the table is nil not an empty table.)<br>
'''data''' data to pass callback
+
''data'' data to pass callback
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
<source lang="lua">RegisterUserCommand("printsomething", function(data, args) print(data..tostring(args or {})[1]) end, "test")</source><br>
+
<source lang="lua">
 +
-- function to call when the command is entered
 +
local function printfunc(data, args)
 +
  -- data contains the third parameter of RegisterUserCommand
 +
  local str = tostring(data)
 +
  -- if the command was entered without parameters args is nil otherwise a table containing the parameters
 +
  if args then
 +
    str = str..tostring(args[1])
 +
  end
 +
  print(str)
 +
end
 +
RegisterUserCommand("printsomething", printfunc, "test")</source><br>
 
Registers the command "printsomething" that calls a function that prints the text "test" and the first argument appended<br>
 
Registers the command "printsomething" that calls a function that prints the text "test" and the first argument appended<br>
<br><br>
+
<br>
 +
 
 +
=== ReinitIconPositions ===
 +
'''Definition:'''
 +
ReinitIconPositions(timer icontimer, int ship, userdata viewport, table iconlist, userdata iconcontainer, table ipcache) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Setup icons in a viewport
 +
<br>
 +
'''Arguments:'''<br>
 +
''icontimer'' timer for overlap prevention animation<br>
 +
''ship'' [[itemid]] of ship to use<br>
 +
''viewport'' target viewport<br>
 +
''iconlist'' table to [[portdata]] to [[portid]]s<br>
 +
''iconcontainer'' target box<br>
 +
''ipcache'' table that maps [[icon_positions]] to ship types that acts as a cache<br>
 +
<br>
  
 
=== ReloadInterface ===
 
=== ReloadInterface ===
 
'''Definition:'''
 
'''Definition:'''
 
ReloadInterface() -> nil
 
ReloadInterface() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Reloads everything related to the interface that isn't a texture. This means VO lua scripts as well as scripts in the /addons directory.
+
Reloads everything related to the interface that isn't a texture. This means VO lua scripts as well as scripts in the /plugins directory.
<br><br>
+
<br>
'''Arguments:'''
+
 
<br><br>
+
=== RentStorage ===
'''Returns:'''
+
'''Definition:'''
<br><br>
+
RentStorage(int storage) -> nil
'''Example:'''
+
<br>
<br><br>
+
'''Description:'''<br>
 +
Rent storage space at the current station.
 +
<br>
 +
'''Arguments:'''<br>
 +
''storage'' amount of space to rent. value is rounded up to a multiple of 10K
 +
<br>
  
 
=== RepairShip ===
 
=== RepairShip ===
 
'''Definition:'''
 
'''Definition:'''
 
RepairShip() -> ??
 
RepairShip() -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
not tested
 
not tested
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ReplenishAll ===
 
=== ReplenishAll ===
 
'''Definition:'''
 
'''Definition:'''
 
ReplenishAll(int itemid, func cb) -> nil
 
ReplenishAll(int itemid, func cb) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
replenish all weapons on provided ship
 
replenish all weapons on provided ship
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' [[itemid]] of ship<br>
+
''itemid'' [[itemid]] of ship<br>
'''cb''' function to be called once the transaction is complete
+
''cb'' function to be called once the transaction is complete
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== ReplenishWeapon ===
 
=== ReplenishWeapon ===
 
'''Definition:'''
 
'''Definition:'''
 
ReplenishWeapon() -> ??
 
ReplenishWeapon() -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
not tested
 
not tested
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== RequestCharacterStats ===
 
=== RequestCharacterStats ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestCharacterStats() -> nil
 
RequestCharacterStats() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
no clue
 
no clue
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== RequestLaunch ===
 
=== RequestLaunch ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestLaunch() -> bool ret
 
RequestLaunch() -> bool ret
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Launches from the station. Any issues preventing launch are reported via pop-up window. Otherwise, the player's ship undocks.  
 
Launches from the station. Any issues preventing launch are reported via pop-up window. Otherwise, the player's ship undocks.  
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''ret''' always true (?)
+
''ret'' always true (?)
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== RequestMissionDetails ===
 
=== RequestMissionDetails ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestMissionDetails(int missionid) -> nil
 
RequestMissionDetails(int missionid) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Request information about the given mission (aka the info button) and pop up the info dialog if id is valid
+
Request information about the given mission (aka the info button) and pop up [[API_Index#MissionPromptDialog]] if id is valid
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''missionid''' mission id (1-n)
+
''missionid'' mission id (1-n)
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== RequestMissionList ===
 
=== RequestMissionList ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestMissionList() -> nil
 
RequestMissionList() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
no clue. maybe used by /updatestation
 
no clue. maybe used by /updatestation
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== RequestNewsArticle ===
 
=== RequestNewsArticle ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestNewsArticle(int newsindex) -> nil
 
RequestNewsArticle(int newsindex) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
ask server for news item(?)<br>
 
ask server for news item(?)<br>
 
fills [[API_Index#NewsDialog]] with given news item
 
fills [[API_Index#NewsDialog]] with given news item
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''newsindex''' index of news item, newest first
+
''newsindex'' index of news item, newest first
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== RequestNewsHeadlines ===
 
=== RequestNewsHeadlines ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestNewsHeadlines() -> nil
 
RequestNewsHeadlines() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
ask server for news item list?
 
ask server for news item list?
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== RequestTargetStats ===
 
=== RequestTargetStats ===
 
'''Definition:'''
 
'''Definition:'''
 
RequestTargetStats() -> int charid
 
RequestTargetStats() -> int charid
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get character id of target (considreing the name maybe more?)
 
get character id of target (considreing the name maybe more?)
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''charid''' character id of torgat or yours if no target selected
+
''charid'' character id of torgat or yours if no target selected
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 
=== ResetTutorial ===
 
=== ResetTutorial ===
 
'''Definition:'''
 
'''Definition:'''
 
ResetTutorial() -> nil
 
ResetTutorial() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Reset the tutorial flag. the player will have to go through it again after docking.
 
Reset the tutorial flag. the player will have to go through it again after docking.
<br><br>
+
<br>
'''Arguments:'''
+
 
<br><br>
+
=== RunTutorial ===
'''Returns:'''
+
'''Definition:'''
<br><br>
+
RunTutorial() -> nil
'''Example:'''
+
<br>
<br><br>
+
'''Description:'''<br>
 +
launch tutorial
 +
<br>
  
 
=== SaveChannels ===
 
=== SaveChannels ===
 
'''Definition:'''
 
'''Definition:'''
 
SaveChannels() -> nil
 
SaveChannels() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Save joined channels(?). Kinda useless since trhat's done as soon as you join one
 
Save joined channels(?). Kinda useless since trhat's done as soon as you join one
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== SaveMissionNotes ===
 
=== SaveMissionNotes ===
 
'''Definition:'''
 
'''Definition:'''
 
SaveMissionNotes(string notes) -> nil
 
SaveMissionNotes(string notes) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Save the provided string to the characters mission notes file. See also: [[Function_Index#LoadMissionNotes]]
+
Save the provided string to the characters mission notes file. See also: [[API Index#LoadMissionNotes]]
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''notes''' text to be saved in the notes file
+
''notes'' text to be saved in the notes file
<br><br>
+
<br>
'''Returns:'''
+
 
<br><br>
+
=== SaveShipPresets ===
'''Example:'''
+
'''Definition:'''
<br><br>
+
SaveShipPresets(int index) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Save ship preset(s) and recreate buyback dialog
 +
<br>
 +
'''Arguments:'''<br>
 +
''index'' ship preset to save if omitted all presets are save
 +
<br>
 +
 
 +
=== SaveSystemNotes ===
 +
'''Definition:'''
 +
SaveSystemNotes(string notes, int systemid) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
save system notes to settings/<charactername>/system<systemid>notes.txt
 +
<br>
 +
'''Arguments:'''<br>
 +
''notes'' Notes to save. Normally a spickled version of an [[API Index#SystemNotes]] entry, but it accepts anything<br>
 +
''sectorid'' [[systemid]]
 +
<br>
  
 
=== SaveNavpath ===
 
=== SaveNavpath ===
 
'''Definition:'''
 
'''Definition:'''
 
SaveNavpath({int sectorid1 ..}, string name) -> nil
 
SaveNavpath({int sectorid1 ..}, string name) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Save the provided navroute
 
Save the provided navroute
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''sectorid1''' [[sectorid]] of each hop<br>
+
''sectorid1'' [[sectorid]] of each hop<br>
'''name''' name of this route
+
''name'' name of this route
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">SaveNavpath({5000, 5001, 5002}, "sedina") -> nil</source><br>
 
<source lang="lua">SaveNavpath({5000, 5001, 5002}, "sedina") -> nil</source><br>
 
a route that hops around in sedina called "sedina"
 
a route that hops around in sedina called "sedina"
<br><br>
+
<br>
  
 
=== SaveShipLoadout ===
 
=== SaveShipLoadout ===
 
'''Definition:'''
 
'''Definition:'''
 
SaveShipLoadout() -> ??
 
SaveShipLoadout() -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
save shiploadout? after a ClearLastShipLoadout() this function causes the buy back dialog to pop up again but the ship won't be rebought.. maybe it needs a loadout as arg
 
save shiploadout? after a ClearLastShipLoadout() this function causes the buy back dialog to pop up again but the ship won't be rebought.. maybe it needs a loadout as arg
<br><br>
+
<br>
'''Arguments:'''
+
 
<br><br>
+
=== SectorIDFromLocationStr ===
'''Returns:'''
+
'''Definition:'''
<br><br>
+
SectorIDFromLocationStr(string location) -> int sectorid
'''Example:'''<br><br>
+
<br>
 +
'''Description:'''<br>
 +
Convert a location string into a [[sectorid]].
 +
<br>
 +
'''Arguments:'''<br>
 +
''location'' location string. output of [[API_Index#ShortLocationStr]]
 +
<br>
 +
'''Returns:'''<br>
 +
''sectorid'' [[sectorid]]
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">SectorIDFromLocationStr("Sedina H-9") -> 5000</source><br>
  
 
=== SelectActiveShip ===
 
=== SelectActiveShip ===
 
'''Definition:'''
 
'''Definition:'''
 
SelectActiveShip(int itemid) -> nil
 
SelectActiveShip(int itemid) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Set the given ship active
 
Set the given ship active
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of  ship in the current station
+
''itemid'' itemid of  ship in the current station
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''<br><br>
+
 
+
  
 
=== SelectCharacter ===
 
=== SelectCharacter ===
 
'''Definition:'''
 
'''Definition:'''
 
SelectCharacter(int charslot) -> nil
 
SelectCharacter(int charslot) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Select characteri in given slot and enter the game with it (only "works" when you haven'T one selected yet)
 
Select characteri in given slot and enter the game with it (only "works" when you haven'T one selected yet)
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''charslot''' a character slot (1-5)
+
''charslot'' a character slot (1-5)
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== SellInventoryItem ===
 
=== SellInventoryItem ===
 
'''Definition:'''
 
'''Definition:'''
 
SellInventoryItem(int itemid, int amount) -> nil
 
SellInventoryItem(int itemid, int amount) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Sell the provided amount of an inventory item from the current station or ship when docked to a station
 
Sell the provided amount of an inventory item from the current station or ship when docked to a station
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''itemid''' itemid of an item at the current station<br>
+
''itemid'' itemid of an item at the current station<br>
'''amount''' how many to sell
+
''amount'' how many to sell
<br><br>
+
<br>
'''Returns:'''
+
'''Example:'''<br>
<br><br>
+
'''Example:'''<br><br>
+
 
+
  
 
=== SendChat ===
 
=== SendChat ===
 
'''Definition:'''
 
'''Definition:'''
SendChat(string msg, string dst, string char) -> nil
+
SendChat(string msg, string dst, string dstparam) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Send a message to the provided destination.
 
Send a message to the provided destination.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''msg''' the message<br>
+
''msg'' the message<br>
'''dst''' destination<br>
+
''dst'' destination<br>
 
known destinations:<br>
 
known destinations:<br>
 
"SAY" sector chat<br>
 
"SAY" sector chat<br>
Line 3,824: Line 4,712:
 
"GUILD" guild chat<br>
 
"GUILD" guild chat<br>
 
"MISSION" mission chat. to activate reply buttons in the mission log send numbers. where 1 correspondends to the top most button<br>
 
"MISSION" mission chat. to activate reply buttons in the mission log send numbers. where 1 correspondends to the top most button<br>
'''char''' in case of dst = PRIVATE, the player to send the message
+
''dstparam'' if dst = PRIVATE, the player to send the message, if dst = CHANNEL the channel to send the message (nil for current channel)
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">SendChat("Hi", "PRIVATE", "dude") -> nil</source><br>
 
<source lang="lua">SendChat("Hi", "PRIVATE", "dude") -> nil</source><br>
 
send the message "Hi" to player dude
 
send the message "Hi" to player dude
<br><br>
+
<br>
  
 
=== SendMissionQuestionResponse ===
 
=== SendMissionQuestionResponse ===
 
'''Definition:'''
 
'''Definition:'''
 
SendMissionQuestionResponse(int num) -> nil
 
SendMissionQuestionResponse(int num) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
called by the initial info dialog 1 = accept, 0 = decline
 
called by the initial info dialog 1 = accept, 0 = decline
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''num''' 1 or 0  
+
''num'' 1 or 0  
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== SetChatLogRead ===
 +
'''Definition:'''
 +
SetChatLogRead() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Mark the general chat log as read/displayed
 +
<br>
  
 +
=== SetChatLogReceiver ===
 +
'''Definition:'''
 +
SetChatLogReceiver(table chatcontainer) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Point the general chat log to a chat container
 +
<br>
 +
'''Example:'''<br>
 +
see [[ChatLogTemplate#Example|ChatLogTemplate Example]]
 +
<br>
  
 
=== SetCurrentChatTab ===
 
=== SetCurrentChatTab ===
 
'''Definition:'''
 
'''Definition:'''
 
SetCurrentChatTab() -> ??
 
SetCurrentChatTab() -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
does nothing. maybe a leftover from the general/mission chat system
 
does nothing. maybe a leftover from the general/mission chat system
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== SetHomeStation ===
 
=== SetHomeStation ===
 
'''Definition:'''
 
'''Definition:'''
 
SetHomeStation() -> nil
 
SetHomeStation() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
set current station as your home station
 
set current station as your home station
<br><br>
+
<br>
'''Arguments:'''
+
 
<br><br>
+
=== SetMissionLogRead ===
'''Returns:'''
+
'''Definition:'''
<br><br>
+
SetMissionLogRead() -> nil
'''Example:'''
+
<br>
<br><br>
+
'''Description:'''<br>
 +
Mark the advancement log as read/displayed
 +
<br>
 +
 
 +
=== SetMissionLogReceiver ===
 +
'''Definition:'''
 +
SetMissionLogReceiver(table chatcontainer) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Point the advancement log to a chat container
 +
<br>
 +
'''Example:'''<br>
 +
see [[ChatLogTemplate#Example|ChatLogTemplate Example]]
 +
<br>
  
 
=== SetProximityWarningDistance ===
 
=== SetProximityWarningDistance ===
 
'''Definition:'''
 
'''Definition:'''
 
SetProximityWarningDistance(int dist) -> nil
 
SetProximityWarningDistance(int dist) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
set proximity warning distance ..
 
set proximity warning distance ..
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''dist''' proximity distance
+
''dist'' proximity distance
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== SetShipPurchaseColor ===
 
=== SetShipPurchaseColor ===
 
'''Definition:'''
 
'''Definition:'''
 
SetShipPurchaseColor(int color) -> nil
 
SetShipPurchaseColor(int color) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
color of the next ship the player will buy
 
color of the next ship the player will buy
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''color''' color value (0-255)
+
''color'' color value (0-255)
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== SetStationLogRead ===
 +
'''Definition:'''
 +
SetStationLogRead() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Mark the station log as read/displayed
 +
<br>
 +
 +
=== SetStationLogReceiver ===
 +
'''Definition:'''
 +
SetStationLogReceiver(table chatcontainer) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Point the station log to a chat container
 +
<br>
 +
'''Example:'''<br>
 +
see [[ChatLogTemplate#Example|ChatLogTemplate Example]]
 +
<br>
 +
 +
=== SetViewObject ===
 +
'''Definition:'''
 +
SetViewObject(userdata modelview, string meshname, string meshfile, int color) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Change the ship in a modelview
 +
<br>
 +
'''Arguments:'''<br>
 +
''modelview'' [[iup#modelview|modelview]] to change<br>
 +
''meshname'' mesh name of ship<br>
 +
''meshfile'' filename of mesh<br>
 +
''color'' [[colorid]]
 +
<br>
  
 
=== SHA1 ===
 
=== SHA1 ===
 
'''Definition:'''
 
'''Definition:'''
 
SHA1(string text) -> string hash
 
SHA1(string text) -> string hash
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
generate SHA1 hash of the given string
 
generate SHA1 hash of the given string
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''text''' text to hash
+
''text'' text to hash
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''hash''' hash of text
+
''hash'' hash of text
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">SHA1("hi there!") -> "a903cda4b5b93d3204af0fd6b7b92d24af1923a5"</source>
 
<source lang="lua">SHA1("hi there!") -> "a903cda4b5b93d3204af0fd6b7b92d24af1923a5"</source>
<br><br>
+
<br>
 
+
  
 
=== ShortLocationStr ===
 
=== ShortLocationStr ===
 
'''Definition:'''
 
'''Definition:'''
 
ShortLocationStr(int sectorid) -> string loc
 
ShortLocationStr(int sectorid) -> string loc
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
string representing the provided sector
 
string representing the provided sector
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''sectorid''' [[sectorid]]
+
''sectorid'' [[sectorid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''loc''' short sector description
+
''loc'' short sector description
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">ShortLocationStr(5000) -> "Sedina H-9"</source>
 
<source lang="lua">ShortLocationStr(5000) -> "Sedina H-9"</source>
<br><br>
+
<br>
 
+
  
 
=== ShouldTutorialRun ===
 
=== ShouldTutorialRun ===
 
'''Definition:'''
 
'''Definition:'''
 
ShouldTutorialRun() -> bool tut
 
ShouldTutorialRun() -> bool tut
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
tell if the player has done the tutorial
 
tell if the player has done the tutorial
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''tut''' true if the player still has to do the tutorial otherwise false
+
''tut'' true if the player still has to do the tutorial otherwise false
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
 
+
  
 +
=== ShowDialog ===
 +
'''Definition:'''
 +
ShowDialog(userdata dialog, int x, y) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Wrapper around [[iup#Show|iup.Show]] that allows the dialog to be closed with [[API_Index#HideDialog|HideDialog]] or [[API_Index#HideAllDialogs|HideAllDialogs]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''dialog'' dialog to show<br>
 +
''x'' horizontal position (optional)<br>
 +
''y'' vertical position (optional)
 +
<br>
  
 +
=== ShowTooltip ===
 +
'''Definition:'''
 +
ShowTooltip(int x, y, string text) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Show the [[API_Index#ToolTip|ToolTip]] the tooltip dialog with the given text
 +
<br>
 +
'''Arguments:'''<br>
 +
''x'' horizontal position<br>
 +
''y'' vertical position<br>
 +
''text'' text in tooltip
 +
<br>
  
 
=== SplitSectorID ===
 
=== SplitSectorID ===
 
'''Definition:'''
 
'''Definition:'''
 
SplitSectorID(int sectorid) -> int systemid sectorh sectorv  
 
SplitSectorID(int sectorid) -> int systemid sectorh sectorv  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
split up a sectorid into systemid and axis on the system grid  
 
split up a sectorid into systemid and axis on the system grid  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''sectorid''' [[sectorid]]
+
''sectorid'' [[sectorid]]
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''systemid'''<br>
+
''systemid''<br>
'''sectorh''' horizonatal axis<br>
+
''sectorh'' horizonatal axis<br>
'''sectorv''' vertical axis
+
''sectorv'' vertical axis
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">SplitSectorID(5000) -> 20 8 9</source><br>
 
<source lang="lua">SplitSectorID(5000) -> 20 8 9</source><br>
 
Sedina h9  
 
Sedina h9  
<br><br>
+
<br>
 
+
  
 
=== SplitStationID ===
 
=== SplitStationID ===
 
'''Definition:'''
 
'''Definition:'''
 
SplitStationID(int stationid) -> int systemidl sectorhv
 
SplitStationID(int stationid) -> int systemidl sectorhv
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
split up a stationid into systemid -1 and sector in system. this may be totally wrong
 
split up a stationid into systemid -1 and sector in system. this may be totally wrong
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''stationid''' a stationid
+
''stationid'' a stationid
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''systemidl''' systemid - 1<br>
+
''systemidl'' systemid - 1<br>
'''secttorhv''' sector in system
+
''secttorhv'' sector in system
<br><br>
+
<br>
'''Example:'''
+
 
<br><br>
+
=== StartSellInventoryItem ===
 +
'''Definition:'''
 +
StartSellInventoryItem(int itemid, function cb) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Receive instant price updates for the given item.
 +
<br>
 +
'''Arguments:'''<br>
 +
''itemid'' [[itemid]] of inventory item for which to receive instant price updates. Pass 0 to disable updates.
 +
''cb'' function to call on success
 +
<br>
  
 
=== StationPlayerAmmoPairs ===
 
=== StationPlayerAmmoPairs ===
 
'''Definition:'''
 
'''Definition:'''
 
StationPlayerAmmoPairs() -> int itemid table ammoinfo
 
StationPlayerAmmoPairs() -> int itemid table ammoinfo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Iterator function that prints information about ammo based weapons in the players inventory at the current station each time it is called. works like pairs()
 
Iterator function that prints information about ammo based weapons in the players inventory at the current station each time it is called. works like pairs()
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' [[itemid]]<br>
+
''itemid'' [[itemid]]<br>
'''iteminfo''' [[ammoinfo]]
+
''iteminfo'' [[ammoinfo]]
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">for i,v in StationPlayerAmmoPairs() do console_print(i) printtable(v) end</source>
 
<source lang="lua">for i,v in StationPlayerAmmoPairs() do console_print(i) printtable(v) end</source>
 
prints the ammo info of every ammo based weapon at the current station
 
prints the ammo info of every ammo based weapon at the current station
<br><br>
+
<br>
 
+
  
 
=== StationSellableInventoryPairs ===
 
=== StationSellableInventoryPairs ===
 
'''Definition:'''
 
'''Definition:'''
 
StationSellableInventoryPairs() -> int itemid table iteminfo
 
StationSellableInventoryPairs() -> int itemid table iteminfo
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Iterator function that prints information about an item in the players inventory at the current station each time it is called. works like pairs()
 
Iterator function that prints information about an item in the players inventory at the current station each time it is called. works like pairs()
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''itemid''' [[itemid]]<br>
+
''itemid'' [[itemid]]<br>
'''iteminfo''' [[iteminfo]]
+
''iteminfo'' [[iteminfo]]
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">for i,v in StationSellableInventoryPairs() do console_print(i) printtable(v) end</source>
 
<source lang="lua">for i,v in StationSellableInventoryPairs() do console_print(i) printtable(v) end</source>
 
prints the item info of every inventory item at the current station to the console
 
prints the item info of every inventory item at the current station to the console
<br><br>
+
<br>
  
 +
=== StationSellItem ===
 +
'''Definition:'''
 +
StationSellItem(userdata button, table item, int quantity, function cb) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Sell items with aconfirmation dialog
 +
<br>
 +
'''Arguments:'''<br>
 +
''button'' button that clalled this function. it will be activated if sale failed<br>
 +
''item'' [[iteminfo]]<br>
 +
''quantity'' how many units to sell
 +
''cb'' optional function to call when done. an error code is passed to it
 +
<br>
  
 
=== StopTutorial ===
 
=== StopTutorial ===
 
'''Definition:'''
 
'''Definition:'''
 
StopTutorial() -> nil
 
StopTutorial() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
does nothing..
 
does nothing..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== StrTable ===
 
=== StrTable ===
 
'''Definition:'''
 
'''Definition:'''
 
StopTutorial() -> nil
 
StopTutorial() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
seems to be another serialisation function. similar (the same?) to splickle
 
seems to be another serialisation function. similar (the same?) to splickle
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== SubmitSurvey ===
 
=== SubmitSurvey ===
 
'''Definition:'''
 
'''Definition:'''
 
SubmitSurvey() -> nil
 
SubmitSurvey() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
does nothing..
 
does nothing..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== SwapAddons ===
 
=== SwapAddons ===
 
'''Definition:'''
 
'''Definition:'''
 
SwapAddons(int portid1 itemid1 porid1 itemid2 function cb) -> nil
 
SwapAddons(int portid1 itemid1 porid1 itemid2 function cb) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Swap two addons equipped to the current ship (crashes client after undocking)
 
Swap two addons equipped to the current ship (crashes client after undocking)
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''portid1''' port of first item<br>
+
''portid1'' port of first item<br>
'''itemid1''' itemid of addon that is supposed to go into port with id portid1<br>
+
''itemid1'' itemid of addon that is supposed to go into port with id portid1<br>
'''portid2''' port of second item<br>
+
''portid2'' port of second item<br>
'''itemid2''' itemid of addon that is supposed to go into port with id portid2<br>
+
''itemid2'' itemid of addon that is supposed to go into port with id portid2<br>
'''cb''' function to call on success
+
''cb'' function to call on success
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
assuming 1234 is currently in port 3 and 1235 in port 2 this could be used to swap them<br>
 
assuming 1234 is currently in port 3 and 1235 in port 2 this could be used to swap them<br>
 
<source lang="lua">SwapAddons(2, 1234, 3, 1235)</source>
 
<source lang="lua">SwapAddons(2, 1234, 3, 1235)</source>
<br><br>
+
<br>
 
+
  
 
=== TabCompleteName ===
 
=== TabCompleteName ===
 
'''Definition:'''
 
'''Definition:'''
 
TabCompleteName(string name) -> string completename
 
TabCompleteName(string name) -> string completename
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Attempts to fill out name with the best match the client has seen since startup. If TabCompleteName cannot find a match for name it returns nil, otherwise, completename will be a string containing the best match completed name.
+
Attempts to fill out name with the best match the client has seen since startup. If TabCompleteName cannot find a match for name it returns nil, otherwise, completename will be a string containing the best match.
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''name''' name to be completed
+
''name'' name to be completed
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''completename''' completed name
+
''completename'' completed name
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
  
 +
=== TutorialEnd ===
 +
'''Definition:'''
 +
TutorialEnd() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
finish up the tutorial
 +
<br>
 +
 +
=== TutorialPart1 ===
 +
'''Definition:'''
 +
TutorialPart1() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart2 ===
 +
'''Definition:'''
 +
TutorialPart2() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart3 ===
 +
'''Definition:'''
 +
TutorialPart3() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart4 ===
 +
'''Definition:'''
 +
TutorialPart4() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart5 ===
 +
'''Definition:'''
 +
TutorialPart5() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart6 ===
 +
'''Definition:'''
 +
TutorialPart6() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart7 ===
 +
'''Definition:'''
 +
TutorialPart7() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart8 ===
 +
'''Definition:'''
 +
TutorialPart8() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart9 ===
 +
'''Definition:'''
 +
TutorialPart9() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart10 ===
 +
'''Definition:'''
 +
TutorialPart10() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart11 ===
 +
'''Definition:'''
 +
TutorialPart11() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart12 ===
 +
'''Definition:'''
 +
TutorialPart12() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
 +
 +
=== TutorialPart13 ===
 +
'''Definition:'''
 +
TutorialPart13() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Launch a tutorial segment
 +
<br>
  
 
=== UnloadCargo ===
 
=== UnloadCargo ===
 
'''Definition:'''
 
'''Definition:'''
UnloadCargo{item1 = {int itemid, int quantity} ..} -> nil
+
UnloadCargo({{int itemid, int quantity} ..}, function cb) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Unload cargo items and quantities according to the provided table  
 
Unload cargo items and quantities according to the provided table  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''item1''' table containing quantity and itemid of cargo<br>
+
''itemid'' [[itemid]] of cargo item<br>
'''itemid''' [[itemid]] of cargo item<br>
+
''quantity'' amount of this cargo to unload<br>
'''quantity''' amount of this cargo to unload
+
''cb'' optional function to call on success
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">UnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 
<source lang="lua">UnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 
unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235
 
unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235
<br><br>
+
<br>
  
 
=== UnloadSellCargo ===
 
=== UnloadSellCargo ===
 
'''Definition:'''
 
'''Definition:'''
UnloadSellCargo{item1 = {int itemid, int quantity} ..} -> nil
+
UnloadSellCargo({{int itemid, int quantity} ..}, function cb) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Unload and sell cargo items and quantities according to the provided table  
 
Unload and sell cargo items and quantities according to the provided table  
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''item1''' table containing quantity and itemid of cargo
+
''itemid'' itemid of cargo item<br>
'''itemid''' itemid of cargo item
+
''quantity'' amount of this cargo to unload and sell<br>
'''quantity''' amount of this cargo to unload and sell
+
''cb'' optional function to call on success
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">UnloadSellCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 
<source lang="lua">UnloadSellCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source><br>
 
unload and sell 2 units of the cargo with the itemid 1234 and 3 with the id 1235
 
unload and sell 2 units of the cargo with the itemid 1234 and 3 with the id 1235
<br><br>
+
<br>
 
+
 
+
 
+
  
 
=== UnregisterEvent ===
 
=== UnregisterEvent ===
 
'''Definition:'''
 
'''Definition:'''
UnregisterEvent({func OnEvent}, string eventtype) -> nil
+
UnregisterEvent(object, string eventtype) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Unregister an event registered with [[Function_Index#RegisterEvent]]
+
Unregister an object registered with [[API_Index#RegisterEvent|RegisterEvent]]
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''OnEvent''' function to run when event is triggered<br>
+
''eventhandler'' object to unregister<br>
'''eventtype''' [[eventtype]]
+
''eventtype'' [[eventtype]]
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''<br>
+
<br><br>
+
  
 
=== UnregisterUserCommand ===
 
=== UnregisterUserCommand ===
 
'''Definition:'''
 
'''Definition:'''
 
UnregisterUserCommand(string command) -> nil
 
UnregisterUserCommand(string command) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
Unregister a command registered with [[Function_Index#RegisterUserCommand]]
+
Unregister a command registered with [[API Index#RegisterUserCommand|RegisterUserCommand]]
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''command''' command to unregister
+
''command'' command to unregister
<br><br>
+
<br>
'''Returns:'''
+
 
<br><br>
+
=== UnrentStorage ===
'''Example:'''<br>
+
'''Definition:'''
<br><br>
+
UnrentStorage(int storage) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Unrent storage space at the current station.
 +
<br>
 +
'''Arguments:'''<br>
 +
''storage'' amount of space to unrent. value is rounded down to multiple of 10K
 +
<br>
 +
 
 +
=== UpdateFade ===
 +
'''Definition:'''
 +
UpdateFade(float delta) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Do a fade step on controls registered with [[API_index#FadeControl|FadeControl]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''delta'' time since last update
 +
<br>
  
 
=== XMLTagToString ===
 
=== XMLTagToString ===
 
'''Definition:'''
 
'''Definition:'''
 
XMLTagToString() -> nil
 
XMLTagToString() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
might the reverse of ParseXML
 
might the reverse of ParseXML
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== _ERRORMESSAGE ===
 
=== _ERRORMESSAGE ===
 
'''Definition:'''
 
'''Definition:'''
 
_ERRORMESSAGE(string msg) -> nil
 
_ERRORMESSAGE(string msg) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
creates an error message with the provided string. probably more
 
creates an error message with the provided string. probably more
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''msg''' a message
+
''msg'' a message
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== assert ===
 
=== assert ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== bbhash ===
 +
'''Definition:'''
 +
bbhash(string input, int arg2) -> string hash
 +
<br>
 +
'''Description:'''<br>
 +
Seems to be some kind of hash function
 +
<br>
 +
'''Arguments:'''<br>
 +
''input'' string from which to generate hash<br>
 +
''arg2'' initializer(?)
 +
<br>
 +
'''Returns:'''<br>
 +
''hash'' generated hash
 +
<br>
 +
 +
=== calc_health_color ===
 +
'''Definition:'''
 +
calc_health_color(float health, int alpha, mode) -> string color
 +
<br>
 +
'''Description:'''<br>
 +
Create an iup color string corresponding to the given health
 +
<br>
 +
'''Arguments:'''<br>
 +
''health'' health (0-100)<br>
 +
''alpha'' optional alpha value (0-255)<br>
 +
''mode'' optional premultiply mode "*" or "&"
 +
<br>
 +
'''Returns:'''<br>
 +
''color'' iup color string. format: "RRR GGG BBB AAA M"
 +
<br>
 +
 +
=== chatareatemplate ===
 +
'''Definition:'''
 +
chatareatemplate(string statontabname, bool expanded) -> table container
 +
<br>
 +
'''Description:'''<br>
 +
create old style chatarea that combines general, mission and station log. the container seems to be incompatible with the [[API_Index#chatareatemplate2|chatareatemplate2]] based maximized chat containers which breaks the maximize button
 +
<br>
 +
'''Arguments:'''<br>
 +
''stationtabnaem'' "Station", "ShipCom" or nil. determines which maximized chat container to show on clicking the maximize button and whether to show the station log<br>
 +
''expanded'' create a maximized chat container
 +
<br>
 +
'''Returns:'''<br>
 +
''container'' chat container<br>
 +
''container.area'' the chat area box<br>
 +
''container.chatlog'' [[ChatLogTemplate]] for the general chat<br>
 +
''container.missionlog'' [[ChatLogTemplate]] for the mission log<br>
 +
''container.stationlog'' optional [[ChatLogTemplate]] for the station log<br>
 +
''container.setup'' setup the chatarea
 +
<br>
 +
 +
=== chatareatemplate2 ===
 +
'''Definition:'''
 +
chatareatemplate2(bool maximized) -> userdata box
 +
<br>
 +
'''Description:'''<br>
 +
create a chatarea control. wrapper around [[API_Index#ChatLogTemplate|ChatLogTemplate]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''maximized'' create maximized control
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[chataretemplate2]]
 +
<br>
 +
 +
=== clear_accomlistbox ===
 +
'''Definition:'''
 +
clear_accomlistbox(userdata control, table itemlist) -> int selection
 +
<br>
 +
'''Description:'''<br>
 +
Clear an accomplishment list control. See: [[API_index#AccomplishmentTemplate|AccomplishmentTemplate]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' accomplishment list to clear<br>
 +
''itemlist'' list of accomplishment list items. return value of [[API_Index#fill_accomlistbox|fill_accomlistbox]]
 +
<br>
 +
'''Returns:'''<br>
 +
''selection'' index of selected item
 +
<br>
 +
 +
=== clear_listbox ===
 +
'''Definition:'''
 +
clear_listbox(userdata control, table itemlist) -> int selection
 +
<br>
 +
'''Description:'''<br>
 +
Clear a list control
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' list to clear<br>
 +
''itemlist'' list of list items. return value of [[API_Index#fill_listbox|fill_listbox]]
 +
<br>
 +
'''Returns:'''<br>
 +
''selection'' index of selected item
 +
<br>
  
 
=== clearscene ===
 
=== clearscene ===
 
'''Definition:'''
 
'''Definition:'''
 
clearscene() -> nil
 
clearscene() -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
removes al objects from the game world
 
removes al objects from the game world
<br><br>
+
<br>
'''Arguments:'''
+
 
<br><br>
+
=== create_char_guild_tab ===
'''Returns:'''
+
'''Definition:'''<br>
<br><br>
+
create_char_guild_tab(bool sub) -> userdata box
'''Example:'''
+
<br>
<br><br>
+
'''Description:'''<br>
 +
Create guild tab
 +
<br>
 +
'''Arguments:'''<br>
 +
''sub'' create as a sub tab
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CharGuildTab]]
 +
<br>
 +
 
 +
=== create_char_inventory_tab ===
 +
'''Definition:'''<br>
 +
create_char_guild_tab(bool expand_local_branches, show_prices, showsellbutton) -> userdata box, tree
 +
<br>
 +
'''Description:'''<br>
 +
Create inventory tab
 +
<br>
 +
'''Arguments:'''<br>
 +
''expand_local_branches'' expand the "Local Inventory" branch by default<br>
 +
''show_prices'' show item prices while docked to station<br>
 +
''showsellbutton'' show a sell button. the sell button is inactive unless ''show_pricess'' is set
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[CharInventoryTab]]<br>
 +
''tree'' the tree control in the tab
 +
<br>
 +
 
 +
=== create_jettison_tab ===
 +
'''Definition:'''<br>
 +
create_jettison_tab() -> userdata box
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[PDAInventoryJettisonTab]]
 +
<br>
 +
 
 +
=== create_ship_group_template ===
 +
'''Definition:'''<br>
 +
create_ship_group_template(table iconlist, bool sub) -> userdata box
 +
<br>
 +
'''Description:'''<br>
 +
Create weapon groups tab
 +
<br>
 +
'''Arguments:'''<br>
 +
''iconlist'' list of [[portdata]]<br>
 +
''sub'' create as a sub tab
 +
<br>
 +
'''Returns:'''<br>
 +
''box'' [[GroupsTab]]
 +
<br>
  
 
=== collectgarbage ===
 
=== collectgarbage ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== comma_value ===
 +
'''Definition:'''
 +
comma_value(float number) -> string formatted_number
 +
<br>
 +
'''Description:'''<br>
 +
returns a formatted version of the provided number according to [[API_Index#SI_unit]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''number'': unformatted number
 +
<br>
 +
'''Returns:'''<br>
 +
''formatted_number'' formatted number
 +
<br>
 +
'''Example:'''<br>
 +
assuming SI_unit is 3:
 +
<source lang="lua">comma_value(1000.00) -> "1,000.00"</source><br>
 +
<br>
 +
 +
=== console_clear ===
 +
'''Definition:'''
 +
console_clear() -> nil
 +
<br>
 +
'''Description:'''<br>
 +
clear console on the next [[API_Index#ReloadInterface]]
 +
<br>
  
 
=== console_print ===
 
=== console_print ===
 
'''Definition:'''
 
'''Definition:'''
 
console_print(string text) -> nil
 
console_print(string text) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
print the given string to the ingame console
 
print the given string to the ingame console
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''text''' string to print
+
''text'' string to print
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== debugprint ===
 
=== debugprint ===
 
'''Definition:'''
 
'''Definition:'''
 
debugprint() -> ??
 
debugprint() -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
does nothing..
 
does nothing..
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== declare ===
 
=== declare ===
 
'''Definition:'''
 
'''Definition:'''
 
declare(string name, value) -> nil
 
declare(string name, value) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
declare a variable and assign a value
 
declare a variable and assign a value
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''name''' name of the variable<br>
+
''name'' name of the variable<br>
'''value''' it's value. can be any type
+
''value'' it's value. can be any type
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== deviceByMode ===
 +
'''Definition:'''
 +
deviceByMode(table arg1, mode) -> table ret
 +
<br>
 +
'''Description:'''<br>
 +
not sure. possibly to find audio devices by capability
 +
<br>
  
 
+
=== dofile ===
=== dostuff ===
+
 
'''Definition:'''
 
'''Definition:'''
dostuff() -> ??
+
<br>
<br><br>
+
 
'''Description:'''<br>
 
'''Description:'''<br>
no clue. tries to open a nonexistant file
+
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== error ===
 
=== error ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== factioncontroltemplate3 ===
 +
'''Definition:'''
 +
factioncontroltemplate3(userdata frame, function cb, float font) -> userdata container
 +
<br>
 +
'''Description:'''<br>
 +
Create a fancy progressbar/faction standing indicator
 +
<br>
 +
'''Arguments:'''<br>
 +
''frame'' iup frame to use for progressbar<br>
 +
''cb'' optional function to call on click<br>
 +
''font'' optional font size. see [[Font]]
 +
<br>
 +
'''Returns:'''<br>
 +
''container'' [[factioncontroltemplate3]]
 +
<br>
 +
 +
=== factionfriendlyness ===
 +
'''Definition:'''
 +
factionfriendlyness(int standing) -> string name
 +
<br>
 +
'''Description:'''<br>
 +
get string that represents the given faction standing
 +
<br>
 +
'''Arguments:'''<br>
 +
''standing'' standing (0-65535)
 +
<br>
 +
'''Returns:'''<br>
 +
''name'' standing as string
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
factionfriendlyness(1000) -> "Hate"
 +
</source>
 +
<br>
 +
 +
=== factionfriendlynesscolor ===
 +
'''Definition:'''
 +
factionfriendlynesscolor(int standing) -> string color
 +
<br>
 +
'''Description:'''<br>
 +
get iup color that represents that given faction standing
 +
<br>
 +
'''Arguments:'''<br>
 +
''standing'' standing (0-65535)
 +
<br>
 +
'''Returns:'''<br>
 +
''color'' iup color string
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
factionfriendlynesscolor(1000) -> "195 3 0"
 +
</source>
 +
<br>
 +
 +
=== factionfriendlynessrange ===
 +
'''Definition:'''
 +
factionfriendlynessrange(int standing) -> float range
 +
<br>
 +
'''Description:'''<br>
 +
get progress within the current faction standing level
 +
<br>
 +
'''Arguments:'''<br>
 +
''standing'' standing (0-65535)
 +
<br>
 +
'''Returns:'''<br>
 +
''float'' progress within faction standing level
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
-- a standing of 7000 is about halfway into "Hate"
 +
factionfriendlynessrange(7000) -> 0.534...
 +
</source>
 +
<br>
 +
 +
=== fill_accomlistbox ===
 +
'''Definition:'''
 +
fill_accomlistbox(userdata control, table itemlist, function setup_cb, click_cb) -> table dialoglist
 +
<br>
 +
'''Description:'''<br>
 +
fill an accomplishement listbox with [[accomlistsubdialog]]s according to given values. normally called from [[API_Index#AccomplishmentTemplate2|AccomplishmentTemplate2]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' iup list to fill<br>
 +
''itemlist'' [[fill_accomlistbox#itemlist|itemlist]]<br>
 +
''setup_cb'' function called for each item in ''itemlist''. see: [[fill_accomlistbox#setup_cb|setup_cb]]<br>
 +
''click_cb'' function to after clicking on an item
 +
<br>
 +
'''Returns:'''<br>
 +
''dialoglist'' list of [[accomlistsubdialog]]
 +
<br>
 +
'''Example:'''<br>
 +
see: [[fill_accomlistbox#Example|Example]]
 +
<br>
 +
 +
=== fill_listbox ===
 +
'''Definition:'''
 +
fill_listbox(userdata control, table itemlist, int curselindex, function setup_cb, bool show_quantity, show_price) -> table dialoglist
 +
<br>
 +
'''Description:'''<br>
 +
fill a listbox with [[listsubdialog]]s according to given values
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' iup list to fill<br>
 +
''itemlist'' list of [[iteminfo]]<br>
 +
''curselindex'' index of current selection
 +
''setup_cb'' function called for each item in ''itemlist''. see: [[fill_listbox#setup_cb|setup_cb]]<br>
 +
''click_cb'' function to after clicking on an item<br>
 +
''show_quantity'' show item quantity in list<br>
 +
''show_price'' show item price in list
 +
<br>
 +
'''Returns:'''<br>
 +
''dialoglist'' list of [[listsubdialog]]
 +
<br>
 +
'''Example:'''<br>
 +
see: [[fill_listbox#Example|Example]]
 +
<br>
 +
 +
=== fillModesDropdown ===
 +
'''Definition:'''
 +
fillModesDropdown() -> ?
 +
<br>
 +
'''Description:'''<br>
 +
no clue. fill some kind of drop down menu(?)
 +
<br>
  
 
=== filter_colorcodes ===
 
=== filter_colorcodes ===
 
'''Definition:'''
 
'''Definition:'''
 
filter_colorcodes(string in) -> string out
 
filter_colorcodes(string in) -> string out
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
strips colorcodes from the provided string
 
strips colorcodes from the provided string
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''in''' inputstring
+
''in'' inputstring
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''out''' outputstring
+
''out'' outputstring
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== format_time ===
 
=== format_time ===
 
'''Definition:'''
 
'''Definition:'''
 
format_time(int msecs) -> string tstring
 
format_time(int msecs) -> string tstring
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
get string representation of the provided time
 
get string representation of the provided time
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''msecs''' time in microseconds
+
''msecs'' time in microseconds
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''tstring''' time string
+
''tstring'' time string
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
<source lang="lua">format_time(60001) -> "01:00.001" </source>
 
<source lang="lua">format_time(60001) -> "01:00.001" </source>
<br><br>
+
<br>
  
 +
=== generalprint ===
 +
'''Definition:'''<br>
 +
generalprint(string str) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
print given string to the chat area via CHAT_MSG_PRINT event. Results is printed in the active channel text color.
 +
<br>
 +
'''Arguments:'''<br>
 +
''str'' string to print
 +
<br>
 +
 +
=== get_itemdlg ===
 +
'''Definition:'''<br>
 +
get_itemdlg(bool showquantity, showprice) -> table dialog
 +
<br>
 +
'''Description:'''<br>
 +
Get a new [[listsubdialog]] or recycle one from the cache
 +
<br>
 +
'''Arguments:'''<br>
 +
''showquantity'' show quantity in dialog<br>
 +
''showprice'' show price
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[listsubdialog]]
 +
<br>
 +
 +
=== get_jettisonitemdlg ===
 +
'''Definition:'''<br>
 +
get_jettisonitemdlg(int itemid) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Get a new [[jettisonlistsubdialog]] or recycle one from the cache
 +
<br>
 +
'''Arguments:'''<br>
 +
''itemid'' [[itemid]] of item to show in dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[jettisonlistsubdialog]]
 +
<br>
 +
 +
=== getheight ===
 +
'''Definition:'''<br>
 +
getheight(userdata control) -> int height
 +
<br>
 +
'''Description:'''<br>
 +
Get height of an iup control
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' iup control
 +
<br>
 +
'''Returns:'''<br>
 +
''height'' height of control
 +
<br>
 +
 +
=== getwidth ===
 +
'''Definition:'''<br>
 +
getwidth(userdata control) -> int width
 +
<br>
 +
'''Description:'''<br>
 +
Get width of an iup control
 +
<br>
 +
'''Arguments:'''<br>
 +
''control'' iup control
 +
<br>
 +
'''Returns:'''<br>
 +
''width'' width of control
 +
<br>
 +
 +
=== guildaccessdialogtemplate ===
 +
'''Definition:'''<br>
 +
guildaccessdialogtemplate() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
create guild access dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''''dialog'' guild access dialog
 +
<br>
 +
 +
=== guildactivitylogdialogtemplate ===
 +
'''Definition:'''<br>
 +
guildactivitylogdialogtemplate() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
create guild activity dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[guildactivitydialog]]
 +
<br>
 +
 +
=== guildbanklogdialogtemplate ===
 +
'''Definition:'''<br>
 +
guildbanklogdialogtemplate() -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
create guild bank dialog
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[guildactivitydialog]]
 +
<br>
 +
 +
=== hextorgb ===
 +
'''Definition:'''
 +
hextorgb(string hexcolors) -> string deccolors
 +
<br>
 +
'''Description:'''<br>
 +
Convert hexadecimal formated color string into a decimal one used by [[iup]]
 +
<br>
 +
'''Arguments:'''<br>
 +
''hexcolors'' hexadecimal color string
 +
<br>
 +
'''Returns:'''<br>
 +
''deccolors'' decimal color string
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">hextorgb("ff00ff") -> "255 0 255"</source>
 +
<br>
  
 
=== ipairs ===
 
=== ipairs ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== listpromptdlgtemplate ===
 +
'''Definition:'''<br>
 +
listpromptdlgtemplate(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons, a title and a listbox
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[listpromptdlgtemplate]]
 +
<br>
  
 
=== load ===
 
=== load ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== loadfile ===
 +
'''Definition:'''
 +
<br>
 +
'''Description:'''<br>
 +
[http://www.lua.org/manual/5.0/manual.html#5.1]
 +
<br>
  
 
=== loadscene ===
 
=== loadscene ===
 
'''Definition:'''
 
'''Definition:'''
 
loadscene(string scene) -> ??
 
loadscene(string scene) -> ??
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
load a scene(?). don't know how it works though
 
load a scene(?). don't know how it works though
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''scene''' filename of a scene
+
''scene'' filename of a scene
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== loadstring ===
 
=== loadstring ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== log_chat ===
 +
'''Definition:'''<br>
 +
log_chat(string str) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
Writes current time and given string to the errors.log
 +
<br>
 +
'''Arguments:'''<br>
 +
''str'' string to write to log
 +
<br>
  
 
=== log_print ===
 
=== log_print ===
 
'''Definition:'''
 
'''Definition:'''
loadscene(string str) -> nil
+
log_print(string str) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Writes string to the errors.log
 
Writes string to the errors.log
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''str''' string to write to log
+
''str'' string to write to log
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== msgdlgtemplate1 ===
 +
'''Definition:'''<br>
 +
msgdlgtemplate1(string msg, buttontext, function button_cb, string size, posx, posy, bgcolor) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create fullscreen dialog with button and message
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' dialog message<br>
 +
''buttontext'' text on button<br>
 +
''button_cb'' function called on button click<br>
 +
''size'' iup size string<br>
 +
''posx'' iup size string<br>
 +
''posy'' iup size string<br>
 +
''bgcolor'' iup color string
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgdlgtemplate1]]
 +
<br>
 +
 +
=== msgdlgtemplate1a ===
 +
'''Definition:'''<br>
 +
msgdlgtemplate1a(string msg, size, posx, posy, userdata control, string bgcolor) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a dialog and optionally disable input to the background except to the given control.
 +
Note: if a control is given display the dialog with :show_all() if not use [[API_Index#ShowDialog|ShowDialog]] or :show()
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' dialog message<br>
 +
''size'' iup size of dialog<br>
 +
''posx'' iup horizontal position<br>
 +
''posy'' iup vertical position<br>
 +
''control'' control to unmask<br>
 +
''bgcolor'' iup background color
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' message dialog
 +
<br>
 +
'''Example:'''<br>
 +
Note: The dialogs in both examples can't be closed without some extra work
 +
<source lang="lua">
 +
-- with unmasked control
 +
-- run from station menu
 +
local d = msgdlgtemplate1aNext("bla", "200x200", 10, 10, StationLaunchButton)
 +
d:show_all()
 +
</source>
 +
<source lang="lua">
 +
-- without unmasked control
 +
local d = msgdlgtemplate1aNext("bla", "200x200", 10, 10)
 +
ShowDialog(d)
 +
</source>
 +
<br>
 +
 +
=== msgdlgtemplate1aDone ===
 +
'''Definition:'''<br>
 +
msgdlgtemplate1aDone(function button_cb, string msg, size, posx, posy, userdata control, string bgcolor) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Same as [[API_Index#msgdlgtemplate1a|msgdlgtemplate1a]] but with a "Close" button
 +
<br>
 +
'''Arguments:'''<br>
 +
''nutton_cb'' function called on clicking "Close"<br>
 +
''msg'' dialog message<br>
 +
''size'' iup size of dialog<br>
 +
''posx'' iup horizontal position<br>
 +
''posy'' iup vertical position<br>
 +
''control'' control to unmask<br>
 +
''bgcolor'' iup background color
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' message dialog
 +
<br>
 +
'''Example:'''<br>
 +
<source lang="lua">
 +
local d
 +
local function button_cb()
 +
HideDialog(d)
 +
end
 +
-- with unmasked control
 +
d = msgdlgtemplate1aDone(button_cb, "bla", "200x200", 10, 10, StationLaunchButton)
 +
d:show_all()
 +
-- without unmasked control
 +
-- local d = msgdlgtemplate1aNext("bla", "200x200", 10, 10)
 +
-- ShowDialog(d)
 +
</source>
 +
<br>
 +
 +
=== msgdlgtemplate1aNext ===
 +
'''Definition:'''<br>
 +
msgdlgtemplate1aNext(function button_cb, string msg, size, posx, posy, userdata control, string bgcolor) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Same as [[API_Index#msgdlgtemplate1a|msgdlgtemplate1a]] but with a "Next" button
 +
<br>
 +
'''Arguments:'''<br>
 +
''nutton_cb'' function called on clicking "Next"<br>
 +
''msg'' dialog message<br>
 +
''size'' iup size of dialog<br>
 +
''posx'' iup horizontal position<br>
 +
''posy'' iup vertical position<br>
 +
''control'' control to unmask<br>
 +
''bgcolor'' iup background color
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' message dialog
 +
<br>
 +
'''Example:'''<br>
 +
see [[API_Index#msgdlgtemplate1aDone|msgdlgtemplate1aDone]]
 +
<br>
 +
 +
=== msgdlgtemplate2 ===
 +
'''Definition:'''<br>
 +
msgdlgtemplate2(string msg, ltitle, function lcb, string rtitle, function rcb, string bgcolor, alignment) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons and a message
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback<br>
 +
''bgcolor'' iup color of background<br>
 +
''alignment'' iup alignment of ''msg''
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgdlgtemplate2]]
 +
<br>
 +
 +
=== msgdlgtemplate2withcheck ===
 +
'''Definition:'''<br>
 +
msgdlgtemplate2withcheck(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons, a checkbox and a message
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgdlgtemplate2withcheck]]
 +
<br>
 +
 +
=== msgpromptdlgtemplate2 ===
 +
'''Definition:'''<br>
 +
msgpromptdlgtemplate2(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons, an entry field and a message
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgpromptdlgtemplate2]]
 +
<br>
 +
 +
=== msgpromptdlgtemplate2 ===
 +
'''Definition:'''<br>
 +
msgpromptdlgtemplate2(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons, an entry field and a message
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgpromptdlgtemplate2]]
 +
<br>
 +
 +
=== msgpromptdlgtemplate2lines ===
 +
'''Definition:'''<br>
 +
msgpromptdlgtemplate2lines(string msg, msg2, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons, two entry fields and two messages
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''msg2'' second message<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[msgpromptdlgtemplate2lines]]
 +
<br>
 +
 +
=== multidlgtemplate1 ===
 +
'''Definition:'''<br>
 +
multidlgtemplate1(string msg, msg2, buttontitle, function cb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with a button and two messages (one in a [[iup#multiline|multiline]] control)
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''msg2'' second message. shown in a multiline control<br>
 +
''buttontitle'' right button title<br>
 +
''cb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[multidlgtemplate1]]
 +
<br>
 +
 +
=== multidlgtemplate2 ===
 +
'''Definition:'''<br>
 +
multidlgtemplate2(string msg, msg2, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons and two messages (one in a [[iup#multiline|multiline]] control)
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' message to display in the dialog<br>
 +
''msg2'' second message. shown in a multiline control<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[multidlgtemplate2]]
 +
<br>
 +
 +
=== multilistdlgtemplate ===
 +
'''Definition:'''<br>
 +
multilistdlgtemplate(string msg, msg2, table tbl, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
 +
<br>
 +
'''Description:'''<br>
 +
Create a fullscreen dialog with two buttons, a dialog title, a dropdown menu, a title for the dropdown menu and a listbox
 +
<br>
 +
'''Arguments:'''<br>
 +
''msg'' dialog title<br>
 +
''msg2'' listbox title<br>
 +
''tbl'' unused<br>
 +
''ltitle'' left button title<br>
 +
''lcb'' left button callback<br>
 +
''rtitle'' right button title<br>
 +
''rcb'' right button callback
 +
<br>
 +
'''Returns:'''<br>
 +
''dialog'' [[multilistdlgtemplate]]
 +
<br>
 +
 +
=== navmenu_template ===
 +
'''Definition:'''
 +
navmenu_template(bool showjumpbutton, function close_cb, bool issubsub) -> userdata container, distancetext, jumpbutton, zoombutton, undolastbutton
 +
<br>
 +
'''Description:'''<br>
 +
Create a control with a navmenu description box and some control buttons
 +
'''Arguments:'''<br>
 +
''showjumpbutton'' show the jump button if true<br>
 +
''close_cb'' function to call after clicking the jump button while the player is able to jump<br>
 +
''issubsub'' create a sub sub tab
 +
<br>
 +
'''Returns:'''<br>
 +
''container'' [[navmenu_template]]<br>
 +
''distancetext'' distance label<br>'
 +
''jumpbutton'' jump button or nil<br>
 +
''zoombutton'' zoom button<br>
 +
''undolastbutton'' undo button
 +
<br>
  
 
=== next ===
 
=== next ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== oper ===
 
=== oper ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
not gonna bother
 
not gonna bother
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== pairs ===
 
=== pairs ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 
=== pcall ===
 
=== pcall ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 +
=== print ===
 +
'''Definition:'''<br>
 +
print(string str) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
print given string to the chat area
 +
<br>
 +
'''Arguments:'''<br>
 +
''str'' string to print
 +
<br>
  
 
=== printtable ===
 
=== printtable ===
 
'''Definition:'''
 
'''Definition:'''
 
printtable{in} -> nil
 
printtable{in} -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
print contents of a table to the console
 
print contents of a table to the console
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''in''' table to print
+
''in'' table to print
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== purchaseprint ===
 +
'''Definition:'''<br>
 +
purchaseprint(string str) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
print given string to the chat area via CHAT_MSG_CONFIRMATION event. Results in white text by default. Same as when buying or selling  things.
 +
<br>
 +
'''Arguments:'''<br>
 +
''str'' string to print
 +
<br>
  
 
=== rawequal ===
 
=== rawequal ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== rawget ===
 
=== rawget ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== rawset ===
 
=== rawset ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== require ===
 +
'''Definition:'''
 +
<br>
 +
'''Description:'''<br>
 +
[http://www.lua.org/manual/5.0/manual.html#5.1]
 +
<br>
  
 +
=== rgbtohex ===
 +
'''Definition:'''<br>
 +
rgbtohex(string deccolor) -> string hexcolor
 +
<br>
 +
'''Description:'''<br>
 +
Returns string containing escaped hexadecimal version of the in decimal given color
 +
<br>
 +
'''Arguments:'''<br>
 +
''deccolor'' string with color in decimal format (format: "r g b")
 +
<br>
 +
'''Returns:'''<br>
 +
''hexcolor'' string starting with ascii code 127 followed by the color in hexadecimal format. (format: '\127RRGGBB') on failure it returns your input value
 +
<br>
 +
'''Example:'''<br>
 +
The following prints "hi!" in red to the chat area. The by rgbtohex() returned string is the equivalent of "\127ff0000"<br>
 +
<source lang="lua">print(rgbtohex("255 0 0").."hi!")</source>
 +
<br>
  
 
=== roper ===
 
=== roper ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
not gonna bother
 
not gonna bother
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 +
=== sectorprint ===
 +
'''Definition:'''<br>
 +
sectorprint(string str) -> nil
 +
<br>
 +
'''Description:'''<br>
 +
print given string to the chat area via CHAT_MSG_SERVER_SECTOR event. Results in white text by default.
 +
<br>
 +
'''Arguments:'''<br>
 +
''str'' string to print
 +
<br>
  
 
=== select ===
 
=== select ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 +
<br>
 +
 +
=== setup_accomrow ===
 +
'''Definition:'''<br>
 +
setup_accomrow(int index, table itemlist, userdata subdlg, function click_cb) -> int newindex
 +
<br>
 +
'''Description:''' <br>
 +
Initializes a list item in an accomplishment list. (used as setup_cb argument of [[API_Index#fill_accomlistbox|fill_accomlistbox]])
 +
<br>
 +
'''Arguments:'''<br>
 +
''index'' position within itemlist<br>
 +
''itemlist'' see [[Fill_accomlistbox#itemlist|itemlist]]<br>
 +
''subdialog'' an itemlist dialog<br>
 +
''click_cb'' function called after clicking on '''subdialog'''
 +
<br>
 +
'''Returns:'''<br>
 +
''newindex'' position within itemlist + items consumed
 +
<br>
 +
 +
=== singletab_template ===
 +
'''Definition:'''<br>
 +
singletab_template(string title, userdata contents) -> userdata tab
 +
<br>
 +
'''Description:''' <br>
 +
Wrap a control into a tab like frame
 +
<br>
 +
'''Arguments:'''<br>
 +
''title'' tab title<br>
 +
''contents'' iup control
 
<br><br>
 
<br><br>
'''Arguments:'''
+
'''Returns:'''<br>
<br><br>
+
''tab'' tabbified control
'''Returns:'''
+
<br>
<br><br>
+
'''Example:'''
+
<br><br>
+
  
 +
=== sort_commodities ===
 +
'''Definition:'''<br>
 +
sort_commodities(table a, b) -> bool order
 +
<br>
 +
'''Description:''' <br>
 +
Sort function for [[iteminfo]] tables. See table.sort in the lua reference
 +
<br>
 +
'''Arguments:'''<br>
 +
''a'' [[iteminfo]]<br>
 +
''b'' [[iteminfo]]
 +
<br>
 +
'''Returns:'''<br>
 +
''order'' sort order
 +
<br>
 +
 +
=== sort_sellable_commodities ===
 +
'''Definition:'''<br>
 +
sort_sellable_commodities(table a, b) -> bool order
 +
<br>
 +
'''Description:''' <br>
 +
Sort function for [[iteminfo]] tables that prioritizes items in the active ship. See table.sort in the lua reference
 +
<br><br>
 +
'''Arguments:'''<br>
 +
''a'' [[iteminfo]]<br>
 +
''b'' [[iteminfo]]
 +
<br>
 +
'''Returns:'''<br>
 +
''order'' sort order
 +
<br>
  
 
=== spickle ===
 
=== spickle ===
 
'''Definition:'''
 
'''Definition:'''
 
spickle(table intab) -> string
 
spickle(table intab) -> string
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Converts a table into a string roughly of the format "value","value",{"tablevalue","tablevalue";tablekey="value"};key="value",key="value"
 
Converts a table into a string roughly of the format "value","value",{"tablevalue","tablevalue";tablekey="value"};key="value",key="value"
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''intab''' input table
+
''intab'' input table
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
 
The spickled string
 
The spickled string
<br><br>
+
<br>
 
'''Example:'''<br>
 
'''Example:'''<br>
 
Given table blah with index 1 and 3 containing strings, index 2 containing an empty table, key "apple" containing the string "orange", and key fulltable containing a table with two ints and a string<br>
 
Given table blah with index 1 and 3 containing strings, index 2 containing an empty table, key "apple" containing the string "orange", and key fulltable containing a table with two ints and a string<br>
 
<source lang="lua">spickle(blah) returns "string1",{},"string2";apple="orange",fulltable={3,4,"string3"}</source>
 
<source lang="lua">spickle(blah) returns "string1",{},"string2";apple="orange",fulltable={3,4,"string3"}</source>
<br><br>
+
<br>
  
 +
=== storagelocationcompare ===
 +
'''Definition:'''<br>
 +
storagelocationcompare(int a, b) -> bool order
 +
<br>
 +
'''Description:''' <br>
 +
Sort function for [[locationid]] values. See table.sort in the lua reference
 +
<br>
 +
'''Arguments:'''<br>
 +
''a'' [[locationid]]<br>
 +
''b'' [[locationid]]
 +
<br>
 +
'''Returns:'''<br>
 +
''order'' sort order
 +
<br>
  
 +
=== store_itemdlg ===
 +
'''Definition:'''<br>
 +
store_itemdlg(userdata dlg) -> nil
 +
<br>
 +
'''Description:''' <br>
 +
Store a reference to an itemlist subdialog in the item dialog cache
 +
<br>
 +
'''Arguments:'''<br>
 +
''dlg'' itemlist sub dialog
 +
<br>
 +
 +
=== store_jettisonitemdlg ===
 +
'''Definition:'''<br>
 +
store_jettisonitemdlg(userdata dlg) -> nil
 +
<br>
 +
'''Description:''' <br>
 +
Store a reference to an jettisonlist subdialog in the jettison dialog cache
 +
<br>
 +
'''Arguments:'''<br>
 +
''dlg'' jettisonlist sub dialog
 +
<br>
  
 
=== strip_whitespace ===
 
=== strip_whitespace ===
 
'''Definition:'''
 
'''Definition:'''
 
strip_whitespace(string in) -> string out  
 
strip_whitespace(string in) -> string out  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
strip whitespace from beginning and end of string
 
strip whitespace from beginning and end of string
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''int''' input string
+
''int'' input string
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''out''' output string
+
''out'' output string
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
  
 
=== substitute_vars ===
 
=== substitute_vars ===
 
'''Definition:'''
 
'''Definition:'''
 
substitute_vars(string in) -> string out  
 
substitute_vars(string in) -> string out  
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
replace variables like %target% in input with their corresponding value
 
replace variables like %target% in input with their corresponding value
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''int''' input string
+
''int'' input string
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''out''' output string
+
''out'' output string
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== tabcomplete ===
 
=== tabcomplete ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
produces lua error..
 
produces lua error..
<br><br>
+
<br>
'''Arguments:'''
+
'''Example:'''<br>
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
  
 +
=== testsurvey ===
 +
'''Definition:'''<br>
 +
testsurvey() -> nil
 +
<br>
 +
'''Description:''' <br>
 +
Test function for the survey feature
 +
<br>
  
 
=== tonumber ===
 
=== tonumber ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
'''Example:'''<br>
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
 
+
  
 
=== tostring ===
 
=== tostring ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
'''Example:'''<br>
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
 
+
  
 
=== type ===
 
=== type ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== unpack ===
 
=== unpack ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
'''Example:'''<br>
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
 
+
  
 
=== undeclare ===
 
=== undeclare ===
 
'''Definition:'''
 
'''Definition:'''
 
undeclare(string name) -> nil
 
undeclare(string name) -> nil
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
undeclare a variable created with [[Function_Index#declare]]
 
undeclare a variable created with [[Function_Index#declare]]
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''name''' name of a variable
+
''name'' name of a variable
<br><br>
+
<br>
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
=== unspickle ===
 
=== unspickle ===
 
'''Definition:'''
 
'''Definition:'''
 
unspickle(string in) ->  table outtab
 
unspickle(string in) ->  table outtab
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
Converts a spickled string into a table
 
Converts a spickled string into a table
<br><br>
+
<br>
 
'''Arguments:'''<br>
 
'''Arguments:'''<br>
'''in''' input string
+
''in'' input string
<br><br>
+
<br>
 
'''Returns:'''<br>
 
'''Returns:'''<br>
'''outtab''' The unspickled table
+
''outtab'' The unspickled table
<br><br>
+
<br>
'''Example:'''
+
<br><br>
+
 
+
 
+
  
 
=== xpcall ===
 
=== xpcall ===
 
'''Definition:'''
 
'''Definition:'''
<br><br>
+
<br>
 
'''Description:'''<br>
 
'''Description:'''<br>
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
 
[http://www.lua.org/manual/5.0/manual.html#5.1]
<br><br>
+
<br>
'''Arguments:'''
+
<br><br>
+
'''Returns:'''
+
<br><br>
+
'''Example:'''
+
<br><br>
+
 
+
  
 
== Tables ==
 
== Tables ==
 +
 +
=== Bitlib ===
 +
'''Description:'''<br>
 +
functions to manipulate the bitwise operations
 +
 +
 +
'''Details:'''<br>
 +
[[Bitlib]]
  
 
=== Buddy ===
 
=== Buddy ===
Line 4,783: Line 6,525:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Buddy]]
 
[[Buddy]]
 +
 +
 +
=== CapShipLog ===
 +
'''Description:'''<br>
 +
table with parts of a cap ship chat area.
 +
 +
'''Details:'''<br>
 +
[[CapShipLog]]
  
  
Line 4,797: Line 6,547:
 
'''Description:'''<br>
 
'''Description:'''<br>
 
table with faction colors. indices represent [[factionid]]
 
table with faction colors. indices represent [[factionid]]
 
  
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[FactionColor]]
 
[[FactionColor]]
 +
 +
 +
=== FactionColor_RGB ===
 +
'''Description:'''<br>
 +
table that maps [[factionid]]'s to colors in RGB format
 +
 +
'''Details:'''<br>
 +
[[FactionColor_RGB]]
 +
  
  
Line 4,806: Line 6,564:
 
'''Description:'''<br>
 
'''Description:'''<br>
 
table with monitoring types. indices represent numeric monitoring types and values, string representations of that type
 
table with monitoring types. indices represent numeric monitoring types and values, string representations of that type
 
  
 
'''Details:'''<br>
 
'''Details:'''<br>
Line 4,816: Line 6,573:
 
'''Description:'''<br>
 
'''Description:'''<br>
 
table with monitoring types. values represent numeric monitoring types and indices, string representations of that type
 
table with monitoring types. values represent numeric monitoring types and indices, string representations of that type
 
  
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[FactionMontorStr]]
 
[[FactionMontorStr]]
 
 
  
  
Line 4,840: Line 6,594:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[FactionNameFull]]
 
[[FactionNameFull]]
 
  
  
Line 4,851: Line 6,604:
 
[[FactionStanding]]
 
[[FactionStanding]]
  
 +
 +
=== Font ===
 +
'''Description:'''<br>
 +
table that maps font names to sizes
 +
 +
 +
'''Details:'''<br>
 +
[[Font]]
 +
 +
 +
=== Font1 ===
 +
'''Description:'''<br>
 +
table that maps font names to sizes
 +
 +
 +
'''Details:'''<br>
 +
[[Font1]]
 +
 +
 +
=== Font2 ===
 +
'''Description:'''<br>
 +
table that maps font names to sizes
 +
 +
 +
'''Details:'''<br>
 +
[[Font2]]
  
  
Line 4,860: Line 6,639:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Game]]
 
[[Game]]
 +
 +
 +
=== GeneralChatPanel ===
 +
'''Description:'''<br>
 +
table with parts of a chat area.
 +
seems to point to PDA or HUD chat panel depending on what is visible(?)
 +
 +
'''Details:'''<br>
 +
[[GeneralChatPanel]]
  
  
Line 4,878: Line 6,666:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Guild]]
 
[[Guild]]
 +
 +
 +
=== HUD ===
 +
'''Description:'''<br>
 +
table with HUD all hud releted functions and parts
 +
 +
 +
'''Details:'''<br>
 +
[[HUD]]
  
  
Line 4,887: Line 6,684:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Ignore]]
 
[[Ignore]]
 +
 +
 +
=== InterfaceManager ===
 +
'''Description:'''<br>
 +
table with event handler for some interface related events and function initialize the interface
 +
 +
 +
'''Details:'''<br>
 +
[[InterfaceManager]]
  
  
Line 4,896: Line 6,702:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[InvManager]]
 
[[InvManager]]
 +
 +
 +
=== ListColors ===
 +
'''Description:'''<br>
 +
colors for list widgets
 +
 +
 +
'''Details:'''<br>
 +
[[ListColors]]
  
  
Line 4,905: Line 6,720:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Mentor]]
 
[[Mentor]]
 +
 +
 +
=== MissionLogPanel ===
 +
'''Description:'''<br>
 +
table with parts of the mission log
 +
 +
'''Details:'''<br>
 +
[[MissionLogPanel]]
  
  
Line 4,927: Line 6,750:
 
=== ShipPalette ===
 
=== ShipPalette ===
 
'''Description:'''<br>
 
'''Description:'''<br>
table to map palette color values to rgb values
+
array that maps palette color values to rgb values
  
  
 
'''Details:'''<br>
 
'''Details:'''<br>
 +
 
[[ShipPalette]]
 
[[ShipPalette]]
  
  
 +
=== ShipPalette_strings ===
 +
'''Description:'''<br>
 +
array that maps palette color values to string representations of rgb values
 +
 +
 +
'''Details:'''<br>
 +
[[ShipPalette_string]]
 +
 +
 +
=== ShipPresets ===
 +
'''Description:'''<br>
 +
array with properties of ship presets
 +
 +
 +
'''Details:'''<br>
 +
[[ShipPresets]]
  
  
Line 4,944: Line 6,784:
 
[[Skills]]
 
[[Skills]]
  
 +
 +
=== StationLog ===
 +
'''Description:'''<br>
 +
table with parts of a stations chat area.
 +
 +
'''Details:'''<br>
 +
[[StationLog]]
 +
 +
 +
=== StationLogPanel ===
 +
'''Description:'''<br>
 +
table with parts of a chat area.
 +
 +
 +
'''Details:'''<br>
 +
[[StationLogPanel]]
  
  
 
=== SystemNames ===
 
=== SystemNames ===
 
'''Description:'''<br>
 
'''Description:'''<br>
table to translate systemid's into system names and back
+
Table to translate systemid's into system names and back
  
  
Line 4,954: Line 6,810:
 
[[SystemNames]]
 
[[SystemNames]]
  
 +
=== SystemNotes ===
 +
'''Description:'''<br>
 +
System Notes public table. Used for adding notes to the navmap.
 +
 +
 +
'''Details:'''<br>
 +
[[SystemNotes]]
 +
 +
=== TagFuncs ===
 +
'''Description:'''<br>
 +
Text markup callbacks(?)
 +
 +
 +
'''Details:'''<br>
 +
[[TagFuncs]]
  
 
=== TCPSocket ===
 
=== TCPSocket ===
Line 4,980: Line 6,851:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Timer]]
 
[[Timer]]
 +
 +
 +
=== VoiceChat ===
 +
'''Description:'''<br>
 +
voice chat related functions
 +
 +
 +
'''Details:'''<br>
 +
[[VoiceChat]]
  
  
 
=== Vote ===
 
=== Vote ===
 
'''Description:'''<br>
 
'''Description:'''<br>
functions to use the voteing feature
+
functions to use the voting feature
  
  
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[Vote]]
 
[[Vote]]
 +
 +
 +
=== _generalchatlog ===
 +
'''Description:'''<br>
 +
array with log with chatlog
 +
 +
'''Details:'''<br>
 +
[[_generalchatlog]]
 +
 +
 +
=== _missionlog ===
 +
'''Description:'''<br>
 +
array with mission log
 +
 +
'''Details:'''<br>
 +
[[_missionlog]]
 +
 +
 +
=== _stationlog ===
 +
'''Description:'''<br>
 +
array with log of visisted stations
 +
 +
'''Details:'''<br>
 +
[[_stationlog]]
 +
 +
 +
=== accomthing ===
 +
'''Description:'''<br>
 +
no clue
 +
 +
'''Details:'''<br>
 +
[[accomthing]]
 +
 +
 +
=== chatinfo ===
 +
'''Description:'''<br>
 +
table with display options for each chat event
 +
 +
 +
'''Details:'''<br>
 +
[[chatinfo]]
 +
 +
 +
=== chatreceiver ===
 +
'''Description:'''<br>
 +
event handler for chat events
 +
 +
 +
'''Details:'''<br>
 +
[[chatreceiver]]
 +
 +
 +
=== command_pretty_names ===
 +
'''Description:'''<br>
 +
table that maps commands to their descriptions
 +
 +
 +
'''Details:'''<br>
 +
[[command_pretty_names]]
  
  
Line 5,062: Line 7,001:
 
'''Details:'''<br>
 
'''Details:'''<br>
 
[[gvector]]
 
[[gvector]]
 +
 +
 +
=== ignore_time ===
 +
'''Description:'''<br>
 +
array with with ignored name and period entries
 +
 +
 +
'''Details:'''<br>
 +
[[ignore_time]]
  
  
Line 5,119: Line 7,067:
 
[[quaternion]]
 
[[quaternion]]
  
 +
 +
=== preset_buttons ===
 +
'''Description:'''<br>
 +
table with preset button controls
 +
 +
 +
'''Details:'''<br>
 +
[[preset_buttons]]
  
 
=== radar ===
 
=== radar ===
Line 5,146: Line 7,102:
 
[[table]]
 
[[table]]
  
== Other ==
+
== Variables ==
  
  
Line 5,190: Line 7,146:
 
'''Description'''<br>
 
'''Description'''<br>
 
constant with inventory item class of storage containers (station hold)<br>
 
constant with inventory item class of storage containers (station hold)<br>
'''value'''<br>
+
''value''<br>
 
4
 
4
  
 +
=== ColorChatInput ===
 +
'''Description'''<br>
 +
Boolean that controls coloring<br>
 +
 +
 +
=== DEFAULT_LICENSE_WATCH ===
 +
'''Description'''<br>
 +
license to display in the HUD if not set by player<br>
 +
'''Value'''<br>
 +
2
 +
 +
=== FlashIntensity ===
 +
'''Description'''<br>
 +
Alpha value of the Bloodflash<br>
 +
'''Value'''<br>
 +
1
 +
 +
=== FontScale ===
 +
'''Description'''<br>
 +
font scaling<br>
 +
'''Value'''<br>
 +
1
 +
 +
 +
=== HUD_SCALE ===
 +
'''Description'''<br>
 +
HUD scaling. set via rHUDxscale cvar. 1 means 640. the higher the resolution the lower the value<br>
 +
'''Value'''<br>
 +
1
 +
 +
 +
=== IMAGE_DIR ===
 +
'''Description'''<br>
 +
subdirectory in the game directory where to look for images (skin option in config.ini)<br>
 +
 +
 +
=== MAX_ACCOMICON_COLUMNS ===
 +
'''Description'''<br>
 +
number of ribbons per column to show in the char info screen(?)<br>
 +
'''Value'''<br>
 +
5
 +
 +
 +
=== MAX_ACCOMICON2_COLUMNS ===
 +
'''Description'''<br>
 +
number of ribbons per column to show in pda accomplishments tab(?)<br>
 +
'''Value'''<br>
 +
4
 +
 +
 +
=== MAX_ACCOMICONS ===
 +
'''Description'''<br>
 +
number of ribbons to show in char info(?)<br>
 +
'''Value'''<br>
 +
20
  
  
Line 5,200: Line 7,211:
 
'''Value'''<br>
 
'''Value'''<br>
 
"Unix", "MacOS" or "Windows"
 
"Unix", "MacOS" or "Windows"
 +
 +
 +
=== SI_unit ===
 +
'''Description'''<br>
 +
Number format<br>
 +
'''Value'''<br>
 +
1: unformatted<br>
 +
2: space as thousands separator, comma as decimal separator<br>
 +
3: comma as thousands separator, point as decimal separator<br>
 +
 +
=== SensorSort ===
 +
'''Description'''<br>
 +
Current sort order of nearby ship list<br>
 +
'''Value'''<br>
 +
1: Name<br>
 +
2: Faction<br>
 +
3: Ship<br>
 +
4: Distance<br>
 +
 +
=== ShowLogoffDialog ===
 +
'''Description'''<br>
 +
Show logoff confirmation dialog if true<br>
 +
 +
 +
=== ShowSetHomeDialog ===
 +
'''Description'''<br>
 +
Show homing confirmation dialog if true<br>
 +
 +
 +
=== SortItems ===
 +
'''Description'''<br>
 +
Sort order for lists<br>
 +
'''Value'''<br>
 +
1: Name<br>
 +
2: Price<br>
 +
3: Group>Name>Price<br>
 +
4: Group>Price>Name<br>
 +
  
  
Line 5,215: Line 7,264:
 
'''Value'''<br>
 
'''Value'''<br>
 
"Lua 5.1"
 
"Lua 5.1"
 +
 +
 +
=== defaulttutorialbgcolor ===
 +
'''Description'''<br>
 +
color of the not highlighted parts while the tutorial is active(?)<br>
 +
'''Value'''
 +
"0 0 0 64 *"
 +
  
 
=== lcd ===
 
=== lcd ===
 
'''Description'''<br>
 
'''Description'''<br>
no clue<br>
+
functions for the Logitech G-series keyboard screens<br>
 +
 
 +
=== tabseltextcolor ===
 +
'''Description'''<br>
 +
color of unselected tab<br>
 
'''Value'''
 
'''Value'''
 +
"1 241 255"
  
  
 +
=== tabunseltextcolor ===
 +
'''Description'''<br>
 +
text color of unselected tab<br>
 +
'''Value'''
 +
"0 185 199"
  
 +
 +
== Userdata ==
 +
 +
Mostly UI componoents
 +
 +
=== AskForgivenessDialog ===
 +
'''Description'''<br>
 +
the forgive dialog. see [[QuestionDialog]]
 +
 +
 +
=== Big3DViewDialog ===
 +
'''Description'''<br>
 +
dialog that is shown after clicking on the maximize button in the "Ship"->"Buy->"Buy Ship" tab. created with [[API_Index#CreateBig3DViewMenu|CreateBig3DViewMenu]]
 +
 +
'''Details:'''<br>
 +
[[Big3DViewDialog]]
 +
 +
 +
=== BuybackQuestionPrompt ===
 +
'''Description'''<br>
 +
dialog that is shown when arriving at the home station after dieing
 +
 +
 +
=== CancelLoadoutPurchaseDialog ===
 +
'''Description'''<br>
 +
"Purchasing ..." dialog that is shown while buying a preset. created with [[API_Index#CreateCancelLoadoutMenu|CreateCancelLoadoutMenu]]
 +
 +
'''Details:'''<br>
 +
[[MessageDialog]]
 +
 +
=== CapShipChatArea ===
 +
'''Description'''<br>
 +
vbox with contents the cap ship interface chat area (entry, log, radios ...)
 +
 +
 +
=== CapShipChatTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Commerce"->"Ship Com" tab
 +
 +
 +
=== StationCurrentLocationInfo ===
 +
'''Description'''<br>
 +
label in the top right corner of the cap ship interface with the current system and sector name
 +
 +
 +
=== StationDialog ===
 +
'''Description'''<br>
 +
the base dialog of the cap ship interface
 +
 +
 +
=== CapShipFactionInfo ===
 +
'''Description'''<br>
 +
vbox in the cap ship interface with faction information. contains [[API_Index#CapShipNameLabel]] and [[API_Index#CapShipNameInfo]]. created with [[API_Index#CreateCapShipFactionInfo|CreateCapShipFactionInfo]]
 +
 +
'''Details:'''<br>
 +
[[CapShipFactionInfo]]
 +
 +
 +
=== CapShipFactionLabel ===
 +
'''Description'''<br>
 +
label in the cap ship interface with the name of the faction that owns the current cap ship ("a ... ship")
 +
 +
 +
=== CapShipLaunchButton ===
 +
'''Description'''<br>
 +
button in the cap ship interface that launches the ship
 +
 +
 +
=== CapShipNameLabel ===
 +
'''Description'''<br>
 +
label in the cap ship interface with the name of the current cap ship (top right)
 +
 +
 +
=== CapShipOptionsButton ===
 +
'''Description'''<br>
 +
button in the cap ship interface that opens the options dialog
 +
 +
 +
=== CapShipPDACharacterTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Character"->"Statistics" tab
 +
 +
 +
=== CapShipPDACharacterTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Character" tab
 +
 +
 +
=== CapShipPDACommTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Comm" tab
 +
 +
 +
=== CapShipPDAInventoryInventoryTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Inventory"->"Inventory" tab
 +
 +
 +
=== CapShipPDAInventoryJettisonTab ===
 +
'''Description'''<br>
 +
vbox with contents of the PDAs "Your PDA"->"Inventory"->"Cargo" tab
 +
 +
 +
=== CapShipPDAInventoryTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Inventory" tab
 +
 +
 +
=== CapShipPDAMissionAdvancementTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Missions"->"Advancement Logs" tab
 +
 +
 +
=== CapShipPDAMissionBoardTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Missions"->"Mission Board" tab
 +
 +
 +
=== CapShipPDAMissionBoardTabInfoButton ===
 +
'''Description'''<br>
 +
button in the cap ship interface "Your PDA"->"Missions"->"Mission Board" tab to request mission info
 +
 +
 +
=== CapShipPDAMissionLogTab ===
 +
'''Description'''<br>
 +
hbox with contents of the cap ship interface "Your PDA"->"Missions"->"Mission Logs" tab
 +
 +
 +
=== CapShipPDAMissionNotesTab ===
 +
'''Description'''<br>
 +
vbox with contents of the cap ship interface "Your PDA"->"Missions"->"Mission Notes" tab
 +
 +
 +
=== CapShipPDAMissionsTab ===
 +
'''Description'''<br>
 +
frame with contents of the cap ship interface "Your PDA"->"Missions" tab
 +
 +
 +
=== CapShipPDASensorNearbyTab ===
 +
'''Description'''<br>
 +
vbox with contents of the cap ship interface "Your PDA"->"Sensor Log"->"Nearby Ships" tab
 +
 +
 +
=== CapShipPDASensorTab ===
 +
'''Description'''<br>
 +
frame with contents of the cap ship interface "Your PDA"->"Sensor Log" tab
 +
 +
 +
=== CapShipPDAShipNavigationTab ===
 +
'''Description'''<br>
 +
hbox with contents of the cap ship interface "Your PDA"->"Navigation"->"Navigation" tab
 +
 +
 +
=== CapShipPDAShipTab ===
 +
'''Description'''<br>
 +
frame with contents of the cap ship interface "Your PDA"->"Navigation" tab
 +
 +
 +
=== CapShipRepairTab ===
 +
'''Description'''<br>
 +
frame with contents of the cap ship interface "Tactical"->"Repair/Refill" tab. created with [[API_Index#CreateCapShipRepairTab|CreateCapShipRepairTab]]
 +
 +
'''Details:'''<br>
 +
[[CapShipRepairTab]]
 +
 +
 +
=== CapShipSecondaryInfo ===
 +
'''Description'''<br>
 +
label with character info (Money, Ship, Licenses ...) displayed in the bottom right of the cap ship interface<br>
 +
 +
 +
=== CapShipTabPDA ===
 +
'''Description'''<br>
 +
box with contents of the cap ship interface "Your PDA" tab. created with [[API_Index#CreateCapShipPDATab|CreateCapShipPDATab]]
 +
 +
'''Details:'''<br>
 +
[[CapShipTabPDA]]
 +
 +
 +
=== CapShipTabs ===
 +
'''Description'''<br>
 +
vbox with contents of the cap ship interface tabs
 +
 +
 +
=== CapShipTacticalTab ===
 +
'''Description'''<br>
 +
frame with contents of the cap ship interface "Tactical" tab. created with [[API_Index#CreateCapShipTacticalTab|CreateCapShipTacticalTab]]
 +
 +
'''Details:'''<br>
 +
[[CapShipTacticalTab]]
 +
 +
 +
=== CapShipTurretTab ===
 +
'''Description'''<br>
 +
frame with contents of the cap ship interface "Tactical"->"Turrets" tab. created with [[API_Index#CreateCapShipTurretTab|CreateCapShipTurretTab]]
 +
 +
'''Details:'''<br>
 +
[[CapShipTurretTab]]
 +
 +
 +
=== CharCreateDialog ===
 +
'''Description'''<br>
 +
the character creation dialog
 +
 +
 +
=== CharCreateFailedDialog ===
 +
'''Description'''<br>
 +
error dialog that is shown the character creation failed. created with [[API_Index#CreateCharCreateFailedMenu|CreateCharCreateFailedMenu]]
 +
 +
'''Details:'''<br>
 +
[[MessageDialog]]
 +
 +
 +
=== CharDeleteVerifierConfirmButton ===
 +
'''Description'''<br>
 +
continue button in [[API_Index#CharDeleteVerifierDialog]]
 +
 +
 +
=== CharDeleteVerifierDialog ===
 +
'''Description'''<br>
 +
the verification dialog that shown by the "Delete Character" button
 +
 +
 +
=== CharDeleteVerifierEditbox ===
 +
'''Description'''<br>
 +
entry in [[API_Index#CharDeleteVerifierDialog]]
 +
 +
 +
=== CharInfoDialog ===
 +
'''Description'''<br>
 +
the character info dialog. opened with k in space.
 +
 +
 +
=== CharSelectDialog ===
 +
'''Description'''<br>
 +
the character selection dialog.
 +
 +
 +
=== CharSelectFailedDialog ===
 +
'''Description'''<br>
 +
error dialog with title "Character selection failed". created with [[API_Index#CreateCharSelectFailedMenu|CreateCharSelectFailedMenu]]
 +
 +
'''Details:'''<br>
 +
[[MessageDialog]]
 +
 +
 +
=== ChatColorOptionsDialog ===
 +
'''Description'''<br>
 +
dialog opened via "Options"->"Interface"->"Chat Color Settings"
 +
 +
 +
=== ConfirmationDialog ===
 +
'''Description'''<br>
 +
dialog with an ok button. no clue where it's used
 +
 +
 +
=== ConnectingDialog ===
 +
'''Description'''<br>
 +
"Connecting..." dialog shown during login. created with [[API_Index#CreateConnectingMenu|CreateConnectingMenu]]
 +
 +
'''Details:'''<br>
 +
[[MessageDialog]]
 +
 +
 +
=== CreditsDialog ===
 +
'''Description'''<br>
 +
dialog with credits. opened with the credits button at the log in prompt
 +
 +
 +
=== EULADialog ===
 +
'''Description'''<br>
 +
dialog that with the Eula shown at login
 +
 +
 +
=== HUDHelpMenu ===
 +
'''Description'''<br>
 +
dialog with common keybindings. opened with the F1 key while in space
 +
 +
 +
=== HUDInterfaceOptionsDialog ===
 +
'''Description'''<br>
 +
dialog with the HUD options, opened with the "HUD Settings" buttons in the Interface options dialog
 +
 +
 +
=== InterfaceOptionsDialog ===
 +
'''Description'''<br>
 +
dialog with the interface options
 +
 +
 +
=== InvalidAmountDialog ===
 +
'''Description'''<br>
 +
error dialog with the text "Invalud Amount". no idea where it's used
 +
 +
 +
=== LoadingDialog ===
 +
'''Description'''<br>
 +
dialog with the loading screen that is shown during sector load
 +
 +
 +
=== LoginHelpDialog ===
 +
'''Description'''<br>
 +
dialog with help text that is shown by the "Help" button in the login screen
 +
 +
 +
=== LowGridPowerDialog ===
 +
'''Description'''<br>
 +
error dialog that is shown when trying to connect an that requires more grid power than the ship can provide
 +
 +
 +
=== MaximizedCapShipChat ===
 +
'''Description'''<br>
 +
dialog with the maximized cap ship chat
 +
 +
 +
=== MaximizedSpaceChat ===
 +
'''Description'''<br>
 +
dialog with the maximized space chat
 +
 +
 +
=== MaximizedStationChat ===
 +
'''Description'''<br>
 +
dialog with the maximized station chat
 +
 +
 +
=== MissionAbortDialog ===
 +
'''Description'''<br>
 +
dialog to confirm abortion of missions
 +
 +
 +
=== MissionPromptDialog ===
 +
'''Description'''<br>
 +
dialog with mission description and buttons to accept or decline
 +
 +
 +
=== NewsDialog ===
 +
'''Description'''<br>
 +
dialog showing a news article
 +
 +
 +
=== NotEnoughStorageDialog ===
 +
'''Description'''<br>
 +
error dialog that pops when trying to put more than the storage limit into a station
 +
 +
 +
=== NotificationDialog ===
 +
'''Description'''<br>
 +
A borderless iup dialog with a message. It's displayed during non interruptible processes, like launching.
 +
 +
'''Details:'''<br>
 +
[[NotificationDialog]]
 +
 +
=== OptionsDialog ===
 +
'''Description'''<br>
 +
the Options dialog
 +
 +
 +
=== PDACharacterAccomTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Character"->"Accomplishments" tab
 +
 +
 +
=== PDACharacterFactionTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Character"->"Faction Standings" tab
 +
 +
 +
=== PDACharacterStatsTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Character"->"Statistics" tab
 +
 +
 +
=== PDACharacterTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Character" tab
 +
 +
 +
=== PDAChatArea ===
 +
'''Description'''<br>
 +
vbox with contents a the PDA chat area (entry, log, radios ...)
 +
 +
 +
=== PDACloseButton ===
 +
'''Description'''<br>
 +
button to close the PDA
 +
 +
 +
=== PDACommTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Comm" tab
 +
 +
 +
=== PDACurrentLocationInfo ===
 +
'''Description'''<br>
 +
label in the top right corner of the PDA with the current system and sector name
 +
 +
 +
=== PDADialog ===
 +
'''Description'''<br>
 +
the base dialog of the PDA
 +
 +
 +
=== PDAInventoryInventoryTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Inventory"->"Inventory" tab
 +
 +
 +
=== PDAInventoryJettisonTab ===
 +
'''Description'''<br>
 +
vbox with contents of the PDAs "Your PDA"->"Inventory"->"Cargo" tab
 +
 +
 +
=== PDAInventoryTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Inventory" tab
 +
 +
 +
=== PDAMissionAdvancementTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Missions"->"Advancement Logs" tab
 +
 +
 +
=== PDAMissionBoardTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Missions"->"Mission Board" tab
 +
 +
 +
=== PDAMissionBoardTabInfoButton ===
 +
'''Description'''<br>
 +
button in the PDAs "Your PDA"->"Missions"->"Mission Board" tab to request mission info
 +
 +
 +
=== PDAMissionLogTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Missions"->"Mission Logs" tab
 +
 +
 +
=== PDAMissionNotesTab ===
 +
'''Description'''<br>
 +
vbox with contents of the PDAs "Your PDA"->"Missions"->"Mission Notes" tab
 +
 +
 +
=== PDAMissionsTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Missions" tab
 +
 +
 +
=== PDASecondaryInfo ===
 +
'''Description'''<br>
 +
label with character info (Money, Ship, Licenses ...) displayed in the bottom right of the PDA<br>
 +
 +
 +
=== PDASensorNearbyTab ===
 +
'''Description'''<br>
 +
vbox with contents of the PDAs "Your PDA"->"Sensor Log"->"Nearby Ships" tab
 +
 +
 +
=== PDASensorTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Sensor Log" tab
 +
 +
 +
=== PDAShipNavigationTab ===
 +
'''Description'''<br>
 +
hbox with contents of the PDAs "Your PDA"->"Navigation"->"Navigation" tab
 +
 +
 +
=== PDAShipTab ===
 +
'''Description'''<br>
 +
frame with contents of the PDAs "Your PDA"->"Navigation" tab
 +
 +
 +
=== PDATab1 ===
 +
'''Description'''<br>
 +
not sure
 +
 +
 +
=== PDATabs ===
 +
'''Description'''<br>
 +
vbox with contents of the PDAs "Your PDA" tab
 +
 +
 +
=== PDATargetInfo ===
 +
'''Description'''<br>
 +
vbox with contents of the target info in the top right of the PDA (name, health, faction ...)
 +
 +
 +
=== QuestionDialog ===
 +
'''Description'''<br>
 +
A dialog with two buttons and a message
 +
 +
 +
'''Details:'''<br>
 +
[[QuestionDialog]]
 +
 +
 +
=== QuestionWithCheckDialog ===
 +
'''Description'''<br>
 +
A dialog with two buttons, check box and a message
 +
 +
=== SellItemDialog ===
 +
'''Description'''<br>
 +
dialog that pops up after clicking on the "Sell Selected" button
 +
 +
=== StationChatArea ===
 +
'''Description'''<br>
 +
vbox with contents a stations chat area (entry, log, radios ...)
 +
 +
 +
=== StationChatTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Commerce"->"The Bar" tab
 +
 +
 +
=== StationCommerceCommoditiesTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Commerce"->"Commodities" tab
 +
 +
 +
=== StationCommerceTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Commerce" tab
 +
 +
 +
=== StationCommerceWelcomeTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Commerce"->"Welcome" tab
 +
 +
 +
=== StationCommoditiesBuyTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Commerce"->"Commodities"->"Buy" tab
 +
 +
 +
=== StationCommoditiesLoadTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Commerce"->"Load/Unload" tab
 +
 +
 +
=== StationCommoditiesSellTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Commerce"->"Commodities"->"Sell" tab
 +
 +
 +
=== StationCurrentLocationInfo ===
 +
'''Description'''<br>
 +
label in the top right corner of the station dialog with the current system and sector name
 +
 +
 +
=== StationDialog ===
 +
'''Description'''<br>
 +
the base dialog of the station interface
 +
 +
 +
=== StationEquipmentBuyLargeTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Buy"->"Large" tab
 +
 +
 +
=== StationEquipmentBuyOtherPurchaseButton ===
 +
'''Description'''<br>
 +
"Purchase Selected" button in the "Ship"->"Buy"->"Other" tab
 +
 +
 +
=== StationEquipmentBuyOtherTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Buy"->"Other" tab
 +
 +
 +
=== StationEquipmentBuyShipPurchaseButton ===
 +
'''Description'''<br>
 +
"Purchase Selected" button in the "Ship"->"Buy"->"Buy Ship" tab
 +
 +
 +
=== StationEquipmentBuyShipTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Buy"->"Buy Ship" tab
 +
 +
 +
=== StationEquipmentBuySmallPurchaseButton ===
 +
'''Description'''<br>
 +
"Purchase Selected" button in the "Ship"->"Buy"->"Small Addons" tab
 +
 +
 +
=== StationEquipmentBuySmallTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Buy"->"Small Addons" tab
 +
 +
 +
=== StationEquipmentBuyTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Buy" tab
 +
 +
 +
=== StationEquipmentManagePortConfigTab ===
 +
'''Description'''<br>
 +
hbox with contents of the "Ship"->"Manage"->"Configure Ship" tab
 +
 +
 +
=== StationEquipmentManageShipSelectionTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Manage"->"Select Ship" tab
 +
 +
 +
=== StationEquipmentManageTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Manage" tab
 +
 +
 +
=== StationEquipmentSellTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship"->"Sell" tab
 +
 +
 +
=== StationEquipmentTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Ship" tab
 +
 +
 +
=== StationFactionInfo ===
 +
'''Description'''<br>
 +
vbox in the station window with faction information. contains [[API_Index#StationNameLabel]] and [[API_Index#StationNameInfo]]. created with [[API_Index#CreateStationFactionInfo|CreateStationFactionInfo]]
 +
 +
'''Details:'''<br>
 +
[[StationFactionInfo]]
 +
 +
 +
=== StationFactionLabel ===
 +
'''Description'''<br>
 +
label in the station window with the name of the faction that owns the current station ("a ... station")
 +
 +
 +
=== StationHelpDialog ===
 +
'''Description'''<br>
 +
dialog shown via help buttons that contains a help text
 +
 +
 +
=== StationHomeButton ===
 +
'''Description'''<br>
 +
button in the station window that sets the current station as home station
 +
 +
 +
=== StationLaunchButton ===
 +
'''Description'''<br>
 +
button in the station window that launches the ship
 +
 +
 +
=== StationNameLabel ===
 +
'''Description'''<br>
 +
label in the station window with the name of the current station (top right)
 +
 +
 +
=== StationOptionsButton ===
 +
'''Description'''<br>
 +
button in the station window that opens the options dialog
 +
 +
 +
=== StationPDACharacterStatsTab ===
 +
'''Description'''<br>
 +
hbox with contents of the "Your PDA"->"Character"->"Statistics" tab
 +
 +
 +
=== StationPDACharacterTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Character" tab
 +
 +
 +
=== StationPDACommTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Comm" tab
 +
 +
 +
=== StationPDAInventoryInventoryTab ===
 +
'''Description'''<br>
 +
hbox with contents of the "Your PDA"->"Inventory"->"Inventory" tab
 +
 +
 +
=== StationPDAInventoryJettisonTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Your PDA"->"Inventory"->"Cargo" tab
 +
 +
 +
=== StationPDAInventoryTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Inventory" tab
 +
 +
 +
=== StationPDAMissionAdvancementTab ===
 +
'''Description'''<br>
 +
hbox with contents of the "Your PDA"->"Missions"->"Advancement Logs" tab
 +
 +
 +
=== StationPDAMissionBoardTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Missions"->"Mission Board" tab
 +
 +
 +
=== StationPDAMissionBoardTabInfoButton ===
 +
'''Description'''<br>
 +
info button displayed in the "Your PDA"->"Missions"->"Mission Board" tab
 +
 +
 +
=== StationPDAMissionLogTab ===
 +
'''Description'''<br>
 +
hbox with contents of the "Your PDA"->"Missions"->"Mission Logs" tab
 +
 +
 +
=== StationPDAMissionNotesTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Your PDA"->"Missions"->"Mission Notes" tab
 +
 +
 +
=== StationPDAMissionsTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Missions" tab
 +
 +
 +
=== StationPDASensorNearbyTab ===
 +
'''Description'''<br>
 +
vbox with contents of the "Your PDA"->"Sensor Log"->"Nearby Ships" tab
 +
 +
 +
=== StationPDASensorTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Sensor Log" tab
 +
 +
 +
=== StationPDAShipNavigationTab ===
 +
'''Description'''<br>
 +
hbox with contents of the "Your PDA"->"Navigation"->"Navigation" tab
 +
 +
 +
=== StationPDAShipTab ===
 +
'''Description'''<br>
 +
frame with contents of the "Your PDA"->"Navigation" tab<br>
 +
 +
 +
=== StationSecondaryInfo ===
 +
'''Description'''<br>
 +
label with character info (Money, Ship, Licenses ...) displayed in the
 +
bottom right of the station interface<br>
 +
 +
 +
=== StationTabPDA ===
 +
'''Description'''<br>
 +
frame with contents of the "You PDA" tab<br>
 +
 +
 +
=== StationTabs ===
 +
'''Description'''<br>
 +
vbox housing the main station tabs ("Commerce", "Ship" and "You PDA")<br>
 +
 +
 +
=== StorageRentalDialog ===
 +
'''Description'''<br>
 +
dialog for renting station storage<br>
 +
 +
 +
=== SurveyDialog ===
 +
'''Description'''<br>
 +
A survey dialog. probably unused<br>
 +
 +
 +
=== ToolTip ===
 +
'''Description'''<br>
 +
dialog with the current/last tooltip<br>
 +
 +
 +
=== VoiceChatOptions ===
 +
'''Description'''<br>
 +
dialog with voice chat options<br>
 +
 +
 +
=== shipcargolabel ===
 +
'''Description'''<br>
 +
label in the "Load/Unload" tab with number of cu and mass of cargo on the ship<br>
  
  
Line 5,234: Line 8,076:
 
ShowTooltips: true<br>
 
ShowTooltips: true<br>
 
UseFontScaling: false<br>
 
UseFontScaling: false<br>
AccomplishmentTemplate: function<br>
 
AccomplishmentTemplate2: function<br>
 
ChatLogTemplate: function<br>
 
CreateBig3DViewMenu: function<br>
 
CreateCancelLoadoutMenu: function<br>
 
CreateCapShipChatTab: function<br>
 
CreateCapShipFactionInfo: function<br>
 
CreateCapShipPDATab: function<br>
 
CreateCapShipRepairTab: function<br>
 
CreateCapShipTacticalTab: function<br>
 
CreateCapShipTurretTab: function<br>
 
CreateCharCreateFailedMenu: function<br>
 
CreateCharCreateMenu: function<br>
 
CreateCharSelectFailedMenu: function<br>
 
CreateCharSelectMenu: function<br>
 
CreateCharacterPDATab: function<br>
 
CreateCommPDATab: function<br>
 
CreateConnectingMenu: function<br>
 
CreateCreditsDialog: function<br>
 
CreateEULAMenu: function<br>
 
CreateInvalidAmountMenu: function<br>
 
CreateInventoryPDATab: function<br>
 
CreateKilledByPDATab: function<br>
 
CreateKilledPDATab: function<br>
 
CreateLoadingMenu: function<br>
 
CreateLoginDialog: function<br>
 
CreateLoginHelpDialog: function<br>
 
CreateLowGridPowerDialog: function<br>
 
CreateMissionAbortMenu: function<br>
 
CreateMissionPromptMenu: function<br>
 
CreateMissionsPDATab: function<br>
 
CreateNavigationPDATab: function<br>
 
CreateNearbyShipsPDATab: function<br>
 
CreateNewsMenu: function<br>
 
CreateNotEnoughStorageMenu: function<br>
 
CreateNotificationMenu: function<br>
 
CreateOptionsMenu: function<br>
 
CreatePDA: function<br>
 
CreatePDATab1: function<br>
 
CreateSensorPDATab: function<br>
 
CreateShipCargoPDATab: function<br>
 
CreateShipPDATab: function<br>
 
CreateStation: function<br>
 
CreateStationBlankTab: function<br>
 
CreateStationChatTab: function<br>
 
CreateStationCommerceTab: function<br>
 
CreateStationCommoditiesBuyTab: function<br>
 
CreateStationCommoditiesLoadTab: function<br>
 
CreateStationCommoditiesSellTab: function<br>
 
CreateStationCommoditiesTab: function<br>
 
CreateStationEquipmentBuyTab: function<br>
 
CreateStationEquipmentManageTab: function<br>
 
CreateStationEquipmentSellTab: function<br>
 
CreateStationEquipmentTab: function<br>
 
CreateStationFactionInfo: function<br>
 
CreateStationHelpMenu: function<br>
 
CreateStationMissionBuyTab: function<br>
 
CreateStationPDATab: function<br>
 
CreateStationPortConfigTab: function<br>
 
CreateStationShipPurchaseTab: function<br>
 
CreateStationShipSelectionTab: function<br>
 
CreateStationShipStatusTab: function<br>
 
CreateStationVisitsPDATab: function<br>
 
CreateStationWelcomeTab: function<br>
 
CreateSurveyMenu: function<br>
 
CreateTargetInfo: function<br>
 
FactionStandingTemplate: function<br>
 
FactionStandingWithInfoTemplate: function<br>
 
FadeControl: function<br>
 
FadeLookup: function<br>
 
FadeStop: function<br>
 
FillInObjectInfo: function<br>
 
FillInPlayerInfo: function<br>
 
GetAccomplishmentBigSize: function<br>
 
GetAccomplishmentBigTexture: function<br>
 
GetAccomplishmentBigUV: function<br>
 
GetAccomplishmentCategory: function<br>
 
GetAccomplishmentDescription: function<br>
 
GetAccomplishmentName: function<br>
 
GetAccomplishmentSize: function<br>
 
GetAccomplishmentTexture: function<br>
 
GetAccomplishmentTitle: function<br>
 
GetAccomplishmentUV: function<br>
 
GetCargoValue: function<br>
 
GetChatLogReadState: function<br>
 
GetFriendlyStatus: function<br>
 
GetItemFullDesc: function<br>
 
GetItemPartialDesc: function<br>
 
GetMissionLogReadState: function<br>
 
GetProfitColor: function<br>
 
GetProfitHexColor: function<br>
 
GetShipAmmoPrices: function<br>
 
GetStationLogReadState: function<br>
 
HelpCharAccom: function<br>
 
HelpCharFaction: function<br>
 
HelpCharGuild: function<br>
 
HelpCharInventory: function<br>
 
HelpCharStats: function<br>
 
HelpCommoditiesAction: function<br>
 
HelpGridPower: function<br>
 
HelpLargeAddonsAction: function<br>
 
HelpOtherAddonsAction: function<br>
 
HelpPDAAdvancementLog: function<br>
 
HelpPDAJettison: function<br>
 
HelpPDAKilledByList: function<br>
 
HelpPDAKilledList: function<br>
 
HelpPDAMissionLog: function<br>
 
HelpPDAMissionNotes: function<br>
 
HelpPDANearbyShips: function<br>
 
HelpPDAStationVisitsList: function<br>
 
HelpSellAction: function<br>
 
HelpSellAddons: function<br>
 
HelpSellCommodities: function<br>
 
HelpShipAmmo: function<br>
 
HelpShipCargo: function<br>
 
HelpShipEquip: function<br>
 
HelpShipGroup: function<br>
 
HelpShipPurchase: function<br>
 
HelpShipSelect: function<br>
 
HelpShipStatus: function<br>
 
HelpSmallAddonsAction: function<br>
 
HelpStationAddonEquip: function<br>
 
HelpStationAddonGroups: function<br>
 
HelpStationBuddies: function<br>
 
HelpStationMission: function<br>
 
HelpStationNav: function<br>
 
HelpStationNews: function<br>
 
HelpStationWelcome: function<br>
 
HideAllDialogs: function<br>
 
HideDialog: function<br>
 
HideTooltip: function<br>
 
LoadShipPresets: function<br>
 
MakeBuyBackQuestionDlg: function<br>
 
OnIdle: function<br>
 
OpenAlarm: function<br>
 
OverlapPrevention: function<br>
 
PopupDialog: function<br>
 
PrintPurchaseTransaction: function<br>
 
ReinitIconPositions: function<br>
 
RunTutorial: function<br>
 
SaveShipPresets: function<br>
 
SetChatLogRead: function<br>
 
SetChatLogReceiver: function<br>
 
SetMissionLogRead: function<br>
 
SetMissionLogReceiver: function<br>
 
SetStationLogRead: function<br>
 
SetStationLogReceiver: function<br>
 
SetViewObject: function<br>
 
ShowDialog: function<br>
 
ShowTooltip: function<br>
 
StationSellItem: function<br>
 
TutorialEnd: function<br>
 
TutorialPart1: function<br>
 
TutorialPart10: function<br>
 
TutorialPart11: function<br>
 
TutorialPart12: function<br>
 
TutorialPart13: function<br>
 
TutorialPart2: function<br>
 
TutorialPart3: function<br>
 
TutorialPart4: function<br>
 
TutorialPart5: function<br>
 
TutorialPart6: function<br>
 
TutorialPart7: function<br>
 
TutorialPart8: function<br>
 
TutorialPart9: function<br>
 
UpdateFade: function<br>
 
calc_health_color: function<br>
 
chatareatemplate: function<br>
 
chatareatemplate2: function<br>
 
clear_accomlistbox: function<br>
 
clear_listbox: function<br>
 
create_char_guild_tab: function<br>
 
create_char_inventory_tab: function<br>
 
create_jettison_control: function<br>
 
create_ship_group_template: function<br>
 
dofile: function<br>
 
factioncontroltemplate3: function<br>
 
factionfriendlyness: function<br>
 
factionfriendlynesscolor: function<br>
 
factionfriendlynessrange: function<br>
 
fill_accomlistbox: function<br>
 
fill_listbox: function<br>
 
generalprint: function<br>
 
get_itemdlg: function<br>
 
get_jettisonitemdlg: function<br>
 
getheight: function<br>
 
getwidth: function<br>
 
guildaccessdialogtemplate: function<br>
 
guildactivitylogdialogtemplate: function<br>
 
guildbanklogdialogtemplate: function<br>
 
loadfile: function<br>
 
log_chat: function<br>
 
msgdlgtemplate1: function<br>
 
msgdlgtemplate1a: function<br>
 
msgdlgtemplate1aDone: function<br>
 
msgdlgtemplate1aNext: function<br>
 
msgdlgtemplate2: function<br>
 
msgpromptdlgtemplate2: function<br>
 
msgpromptdlgtemplate2lines: function<br>
 
navmenu_template: function<br>
 
print: function<br>
 
purchaseprint: function<br>
 
require: function<br>
 
sectorprint: function<br>
 
setup_accomrow: function<br>
 
singletab_template: function<br>
 
sort_commodities: function<br>
 
sort_sellable_commodities: function<br>
 
storagelocationcompare: function<br>
 
store_itemdlg: function<br>
 
store_jettisonitemdlg: function<br>
 
test_list: function<br>
 
testsurvey: function<br>
 
DAMP: 0.5<br>
 
DEFAULT_LICENSE_WATCH: 2<br>
 
FontScale: 0.89<br>
 
G: 100000<br>
 
HUD_SCALE: 1<br>
 
K: 15<br>
 
K2: 100<br>
 
M: 1<br>
 
MAX_ACCOMICON2_COLUMNS: 4<br>
 
MAX_ACCOMICONS: 20<br>
 
MAX_ACCOMICON_COLUMNS: 5<br>
 
IMAGE_DIR: <br>
 
UserName: <br>
 
defaulttutorialbgcolor: 0 0 0 64 *<br>
 
tabseltextcolor: 1 241 255<br>
 
tabunseltextcolor: 0 185 199<br>
 
CapShipLog: table<br>
 
FactionColor_RGB: table<br>
 
FadeControls: table<br>
 
Font: table<br>
 
Font1: table<br>
 
Font2: table<br>
 
GeneralChatPanel: table<br>
 
HUD: table<br>
 
InterfaceManager: table<br>
 
MissionLogPanel: table<br>
 
ShipPalette_string: table<br>
 
ShipPresets: table<br>
 
StationLog: table<br>
 
StationLogPanel: table<br>
 
_generalchatlog: table<br>
 
_missionlog: table<br>
 
_stationlog: table<br>
 
accomthing: table<br>
 
chatreceiver: table<br>
 
command_pretty_names: table<br>
 
Big3DViewDialog: userdata<br>
 
BuybackQuestionPrompt: userdata<br>
 
CancelLoadoutPurchaseDialog: userdata<br>
 
CapShipChatArea: userdata<br>
 
CapShipChatTab: userdata<br>
 
CapShipCurrentLocationInfo: userdata<br>
 
CapShipDialog: userdata<br>
 
CapShipFactionInfo: userdata<br>
 
CapShipFactionLabel: userdata<br>
 
CapShipLaunchButton: userdata<br>
 
CapShipNameLabel: userdata<br>
 
CapShipOptionsButton: userdata<br>
 
CapShipPDACharacterStatsTab: userdata<br>
 
CapShipPDACharacterTab: userdata<br>
 
CapShipPDACommTab: userdata<br>
 
CapShipPDAInventoryInventoryTab: userdata<br>
 
CapShipPDAInventoryJettisonTab: userdata<br>
 
CapShipPDAInventoryTab: userdata<br>
 
CapShipPDAMissionAdvancementTab: userdata<br>
 
CapShipPDAMissionBoardTab: userdata<br>
 
CapShipPDAMissionBoardTabInfoButton: userdata<br>
 
CapShipPDAMissionLogTab: userdata<br>
 
CapShipPDAMissionNotesTab: userdata<br>
 
CapShipPDAMissionsTab: userdata<br>
 
CapShipPDASensorNearbyTab: userdata<br>
 
CapShipPDASensorTab: userdata<br>
 
CapShipPDAShipNavigationTab: userdata<br>
 
CapShipPDAShipTab: userdata<br>
 
CapShipRepairTab: userdata<br>
 
CapShipSecondaryInfo: userdata<br>
 
CapShipTabPDA: userdata<br>
 
CapShipTabs: userdata<br>
 
CapShipTacticalTab: userdata<br>
 
CapShipTurretTab: userdata<br>
 
CharCreateDialog: userdata<br>
 
CharCreateFailedDialog: userdata<br>
 
CharDeleteVerifierConfirmButton: userdata<br>
 
CharDeleteVerifierDialog: userdata<br>
 
CharDeleteVerifierEditbox: userdata<br>
 
CharInfoMenu: userdata<br>
 
CharSelectDialog: userdata<br>
 
CharSelectFailedDialog: userdata<br>
 
ConfirmationDialog: userdata<br>
 
ConnectingDialog: userdata<br>
 
CreditsDialog: userdata<br>
 
EULADialog: userdata<br>
 
HUDHelpMenu: userdata<br>
 
HUDInterfaceOptionsDialog: userdata<br>
 
InterfaceOptionsDialog: userdata<br>
 
InvalidAmountDialog: userdata<br>
 
LoadingDialog: userdata<br>
 
LoginHelpDialog: userdata<br>
 
LowGridPowerDialog: userdata<br>
 
MaximizedCapShipChat: userdata<br>
 
MaximizedSpaceChat: userdata<br>
 
MaximizedStationChat: userdata<br>
 
MissionAbortDialog: userdata<br>
 
MissionPromptDialog: userdata<br>
 
NewsDialog: userdata<br>
 
NotEnoughStorageDialog: userdata<br>
 
NotificationDialog: userdata<br>
 
OptionsDialog: userdata<br>
 
PDACharacterAccomTab: userdata<br>
 
PDACharacterFactionTab: userdata<br>
 
PDACharacterStatsTab: userdata<br>
 
PDACharacterTab: userdata<br>
 
PDAChatArea: userdata<br>
 
PDACloseButton: userdata<br>
 
PDACommTab: userdata<br>
 
PDACurrentLocationInfo: userdata<br>
 
PDADialog: userdata<br>
 
PDAInventoryInventoryTab: userdata<br>
 
PDAInventoryJettisonTab: userdata<br>
 
PDAInventoryTab: userdata<br>
 
PDAMissionAdvancementTab: userdata<br>
 
PDAMissionBoardTab: userdata<br>
 
PDAMissionBoardTabInfoButton: userdata<br>
 
PDAMissionLogTab: userdata<br>
 
PDAMissionNotesTab: userdata<br>
 
PDAMissionsTab: userdata<br>
 
PDASecondaryInfo: userdata<br>
 
PDASensorNearbyTab: userdata<br>
 
PDASensorTab: userdata<br>
 
PDAShipNavigationTab: userdata<br>
 
PDAShipTab: userdata<br>
 
PDATab1: userdata<br>
 
PDATabs: userdata<br>
 
PDATargetInfo: userdata<br>
 
QuestionDialog: userdata<br>
 
StationChatArea: userdata<br>
 
StationChatTab: userdata<br>
 
StationCommerceCommoditiesTab: userdata<br>
 
StationCommerceTab: userdata<br>
 
StationCommerceWelcomeTab: userdata<br>
 
StationCommoditiesBuyTab: userdata<br>
 
StationCommoditiesLoadTab: userdata<br>
 
StationCommoditiesSellTab: userdata<br>
 
StationCurrentLocationInfo: userdata<br>
 
StationDialog: userdata<br>
 
StationEquipmentBuyLargeTab: userdata<br>
 
StationEquipmentBuyOtherPurchaseButton: userdata<br>
 
StationEquipmentBuyOtherTab: userdata<br>
 
StationEquipmentBuyShipPurchaseButton: userdata<br>
 
StationEquipmentBuyShipTab: userdata<br>
 
StationEquipmentBuySmallPurchaseButton: userdata<br>
 
StationEquipmentBuySmallTab: userdata<br>
 
StationEquipmentBuyTab: userdata<br>
 
StationEquipmentManagePortConfigTab: userdata<br>
 
StationEquipmentManageShipSelectionTab: userdata<br>
 
StationEquipmentManageTab: userdata<br>
 
StationEquipmentSellTab: userdata<br>
 
StationEquipmentTab: userdata<br>
 
StationFactionInfo: userdata<br>
 
StationFactionLabel: userdata<br>
 
StationHelpDialog: userdata<br>
 
StationHomeButton: userdata<br>
 
StationLaunchButton: userdata<br>
 
StationNameLabel: userdata<br>
 
StationOptionsButton: userdata<br>
 
StationPDACharacterStatsTab: userdata<br>
 
StationPDACharacterTab: userdata<br>
 
StationPDACommTab: userdata<br>
 
StationPDAInventoryInventoryTab: userdata<br>
 
StationPDAInventoryJettisonTab: userdata<br>
 
StationPDAInventoryTab: userdata<br>
 
StationPDAMissionAdvancementTab: userdata<br>
 
StationPDAMissionBoardTab: userdata<br>
 
StationPDAMissionBoardTabInfoButton: userdata<br>
 
StationPDAMissionLogTab: userdata<br>
 
StationPDAMissionNotesTab: userdata<br>
 
StationPDAMissionsTab: userdata<br>
 
StationPDASensorNearbyTab: userdata<br>
 
StationPDASensorTab: userdata<br>
 
StationPDAShipNavigationTab: userdata<br>
 
StationPDAShipTab: userdata<br>
 
StationSecondaryInfo: userdata<br>
 
StationTabPDA: userdata<br>
 
StationTabs: userdata<br>
 
SurveyDialog: userdata<br>
 
ToolTip: userdata<br>
 
accombox: userdata<br>
 
container: userdata<br>
 
gridusagelabel: userdata<br>
 
loadquantityedit: userdata<br>
 
option17: userdata<br>
 
option18: userdata<br>
 
option19: userdata<br>
 
option20: userdata<br>
 
shipcargolabel: userdata<br>
 
unloadquantityedit: userdata<br>
 
unloadsellquantityedit: userdata<br>
 

Latest revision as of 02:03, 18 February 2009

WARNING: This index is is mostly based on guesswork and experimentation. A lot of entries may be incomplete or inaccurate.

Somewhat out of date. See API_Index2 for current descriptions.

Contents

Functions

AbbrLocationStr

Definition:
AbbrLocationStr(int sectorid) -> string name
Description:
Get abbreviated sector name for sectorid
Arguments:
sectorid sectorid
Returns:
name shortened sector name
Example:

AbbrLocationStr(5000) -> "Sed H9"


AbortMission

Definition:
AbortMission(int itemid) -> nil
Description:
Abort a mission
Arguments:
itemid itemid of mission (optional)

AccomplishmentTemplate

Definition:
AccomplishmentTemplate(function cb(string desc)) -> userdate box
Description:
Create box with accomplishment icons (targetinfo dialog). see: AccomplishmentTemplate
Arguments:
cb function to call when clicking
desc description of clicked accomplishment
Returns:
box AccomplishmentTemplate

AccomplishmentTemplate2

Definition:
AccomplishmentTemplate2(function cb(string desc, int type, level)) -> userdate box
Description:
Create list with accomplishment icons (pda playerinfo dialog). see: AccomplishmentTemplate
Arguments:
cb function to call when clicking icons
desc description of clicked accomplishment
type type of clicked accomplishment
level level of clicked accomplishment
Returns:
box AccomplishmentTemplate

Article

Definition:
Article(string word) -> string out
Description:
prepends the appropriate article to the string word
Arguments:
word string to prepend an article to.
Returns:
out the string with an article prepended.
Example:

Article("apple") -> "an apple"


CanUseAddon

Definition:
CanUseAddon(int itemid) -> bool ret1, {string l1 ..}
Description:
check if the player can equip the addon itemid
Arguments:
itemid itemid of addon to check
Returns:
ret1 can use
l1 license requirements of the item at the current station (1-5) (only returned for local addons and if the player is docked with a station)

Example:

CanUseAddon(12345) -> true {1, 2, 2, 2, 2}


CanUseMerchandise

Definition:
CanUseMerchandise(table iteminfo) -> bool ret1, {string l1 ..}
Description:
check if the player can use the item iteminfo
Arguments:
iteminfo iteminfo of item to check
Returns:
ret1 can use
l1 license requirements of the item

CancelPurchaseShipLoadout

Definition:
CancelPurchaseShipLoadout() -> nil
Description:
Interrupt purchase of ship loadout

ChatLogTemplate

Definition:
ChatLogTemplate(string bg, string scrolledbg, function updatecb, string editbg, bool clickable) -> table container
Description:
Create rudimentary chet container. See ChatLogTemplate
Arguments:
bg iupcolor of background
scrolledbg iupcolor of background when scrolled up
updatecb function called whenever contents of the container changes
editbg image for background of entry
clickable if true the container will respond to mouse clicks
Returns:
container ChatLogTemplate

CheckCharProximity

Definition:
CheckCharProximity(int dist, charid) -> bool inrange
Description:
Tell if a character at a given distance is within proximity range. The function only returns true once for every character in radar proximity range. Any further checks will return false until the character leaves the range.
Arguments:
dist distance of character
charid charid
Returns:
inrange true if a character is within proximity range and hasn't left it since the last check

CheckProximityWarning

Definition:
CheckProximityWarning() -> nil
Description:
Trigger the PROXIMITY_ALERT event if a character, that hasn't been before, is within proximity range

CheckStorageAndUnloadCargo

Definition: CheckStorageAndUnloadCargo({{int itemid, int quantity} ..}, function cb) -> nil
Description:
Unload cargo items and quantities according to the provided table also checks station storage and pops up a dialog if not enough available
Arguments:
itemid itemid of cargo item
quantity amount of this cargo to unload
cb optional function to call on success
Example:

CheckStorageAndUnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}

unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235

ClearGeneralChatLog

Definition:
ClearGeneralChatLog() -> nil
Description:
clears general chat log..

ClearLastShipLoadout

Definition:
ClearLastShipLoadout() -> nil
Description:
clear last shiploadout. prevents client from asking to rebuy ship after destruction

ClearMissionChatLog

Definition:
ClearMissionChatLog() -> nil
Description:
clears mission log..

ClearProximityCache

Definition:
ClearProximityCache() -> nil
Description:
Clear list of characters in proximity range. Stops CheckCharProximity and CheckProximityWarning from ignoring them.

ClearStationChatLog

Definition:
ClearStationChatLog() -> nil
Description:
clears station log (bar)..

ConfigureMultipleWeaponGroups

Definition:
ConfigureMultipleWeaponGroups({table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}, function cb) -> nil
Description:
configures weapon groups according to given tables.
Arguments:
group*key* Each table represents one group key. Key 1-6 map to the primary trigger, 7-12 secondary and 13-18 tertiary. Each index in the tables represents a port. Weapon ports start at index 2. Valid values for each port are nil or true.
cb function to call on completition (optional)
Example:

-- enable port 1 for the primary trigger and port 2 for the secondary 
-- index 1 is the power cell port
ConfigureMultipleWeaponGroups{[1]={nil, true, nil}, [2]={nil, nil, true}}

ConfigureWeaponGroup

Definition:
ConfigureWeaponGroup(int id, table port_ids, function cb) -> nil
Description:
Configures one weapon group
Arguments:
id is number of group. 0-5 primary, 6-11 secondary and 12-17 tertiary trigger
ports_ids is list of ports active for that group (2-numweaponports)
cb function to call on completition (optional)
Example:

-- enable port 1 and 2 for the primary trigger
ConfigureWeaponGroup(0, {2,3})

ConnectAddon

Definition:
ConnectAddon(int portid, int itemid, function cb) -> bool canconnect
Description:
Attaches the addon itemid to the active ship in port portid
Arguments:
portid portid of the the port
itemid itemid of the addon
cb function to call on completition (optional)
Returns:
canconnect returns true if the player is docked and has an active ship otherwise nil
Example:

-- put the addon 123 into port 2 while the player is docked to a station
ConnectAddon(2, 123) -> true

CreateBig3DViewMenu

Definition:
CreateBig3DViewMenu() -> userdata dialog
Description:
Create Big3DViewDialog a Big3DViewDialog
Returns:
dialog Big3DViewDialog

CreateCancelLoadoutMenu

Definition:
CreateCancelLoadoutMenu() -> userdata dialog
Description:
Create fullscreen dialog with button and message. See MessageDialog

Returns:
dialog MessageDialog

CreateCapShipChatTab

Definition:
CreateCapShipChatTab() -> userdata box
Description:
Create box with "Ship Com" tab. See ChatLogTemplate
Returns:
box box with "Ship Com" tab

CreateCapShipFactionInfo

Definition:
CreateCapShipFactionInfo() -> userdata box
Returns:
box CapShipFactionInfo

CreateCapShipPDATab

Definition:
CreateCapShipPDATab() -> userdata box
Returns:
box CapShipTabPDA

CreateCapShipRepairTab

Definition:
CreateCapShipRepairTab() -> userdata box
Returns:
box CapShipRepairTab

CreateCapShipTacticalTab

Definition:
CreateCapShipTacticalTab() -> userdata box
Returns:
box CapShipTacticalTab

CreateCapShipTurretTab

Definition:
CreateCapShipTurretTab() -> userdata box, button
Description:
Create CapShipTurretTab and the select button
Returns:
box CapShipTurretTab
button select button

CreateCharCreateFailedMenu

Definition:
CreateCharCreateFailedMenu() -> userdata dialog
Description:
Create fullscreen dialog with button and message. See MessageDialog
The created variant pops up CharCreateDialog after clicking the button
Returns:
dialog MessageDialog

CreateCharCreateMenu

Definition:
CreateCharCreateMenu() -> userdata dialog
Returns:
dialog CharCreateDialog

CreateCharSelectFailedMenu

Definition:
CreateCharSelectFailedMenu() -> userdata dialog
Description:
Create fullscreen dialog with button and message. See MessageDialog
The created variant pops up CharSelectDialog after clicking the button
Returns:
dialog MessageDialog

CreateCharSelectMenu

Definition:
CreateCharSelectMenu() -> userdata dialog
Returns:
dialog CharSelectDialog

CreateCharacter

Definition:
CreateCharacter(int name, int nation) -> nil
Description:
Creates the character of the given nation
Arguments:
name name of character
nation nation of character

CreateCharacterPDATab

Definition:
CreateCharacterPDATab() -> userdata box, tab1, tab2, tab3
Returns:
box PDACharacterTab
tab1 PDACharacterStatsTab
tab2 PDACharacterFactionTab
tab3 PDACharacterAccomTab

CreateCommPDATab

Definition:
CreateCommPDATab() -> userdata box
Returns:
box PDACommTab

CreateConnectingMenu

Definition:
CreateConnectingMenu() -> userdata dialog
Description:
Create fullscreen dialog with button and message. See MessageDialog
The created variant logs out after clicking the button
Returns:
dialog MessageDialog

CreateCreditsDialog

Definition:
CreateCreditsDialog(userdata parent) -> userdata dialog
Description:
Create credits dialog
Arguments:
parent dialog to show on clicking "Close"
Returns:
dialog credits dialog

CreateEULAMenu

Definition:
CreateEULAMenu() -> userdata dialog
Returns:
dialog EULADialog

CreateInvalidAmountMenu

Definition:
CreateInvalidAmountMenu() -> userdata dialog
Description:
Create fullscreen dialog with button and message. See msgdlgtemplate1
Returns:
dialog msgdlgtemplate1

CreateInventoryPDATab

Definition:
CreateInventoryPDATab() -> userdata dialog, tab1, tab2
Returns:
dialog PDAInventoryTab
tab1 PDAInventoryInventoryTab
tab2 PDAInventoryJettisonTab

CreateKilledByPDATab

Definition:
CreateKilledByPDATab() -> userdata box
Returns:
dialog KilledByPDATab

CreateKilledPDATab

Definition:
CreateKilledPDATab() -> userdata box
Returns:
box KilledPDATab

CreateLoadingMenu

Definition:
CreateLoadingMenu() -> userdata dialog
Returns:
dialog LoadingDialog

CreateLoginDialog

Definition:
CreateLoginDialog() -> userdata dialog
Returns:
dialog LoginDialog

CreateLoginHelpDialog

Definition:
CreateLoginHelpDialog(userdata parent) -> userdata dialog
Description:
Create fullscreen dialog with help text for the login screen and a close button
Arguments:
parent dialog to show on clicking close
Returns:
dialog login help dialog

CreateLowGridPowerDialog

Definition:
CreateLowGridPowerDialog() -> userdata dialog
Description:
Create fullscreen dialog with low grid power error
Returns:
dialog low grid power dialog

CreateMissionAbortMenu

Definition:
CreateMissionAbortMenu() -> userdata dialog
Returns:
dialog MissionAbortDialog

CreateMissionPromptMenu

Definition:
CreateMissionPromptMenu() -> userdata dialog
Returns:
dialog MissionPromptDialog

CreateMissionsPDATab

Definition:
CreateMissionsPDATab() -> userdata box, tab1, tab2, tab3, tab4, infobutton
Returns:
box PDAMissionsTab
tab1 PDAMissionNotesTab
tab2 PDAMissionAdvancementTab
tab3 PDAMissionLogTab
tab4 PDAMissionBoardTab
infobutton PDAMissionBoardTabInfoButton

CreateNavigationPDATab

Definition:
CreateNavigationPDATab() -> userdata box
Returns:
box PDAShipNavigationTab

CreateNearbyShipsPDATab

Definition:
CreateNearbyShipsPDATab() -> userdata box
Returns:
box PDASensorNearbyTab

CreateNewsMenu

Definition:
CreateNewsMenu() -> userdata dialog
Returns:
dialog NewsDialog

CreateNotEnoughStorageMenu

Definition:
CreateNotEnoughStorageMenu() -> userdata dialog
Description:
Create fullscreen dialog with button and message. See msgdlgtemplate1
Returns:
dialog msgdlgtemplate1

CreateNotificationMenu

Definition:
CreateNotificationMenu() -> userdata dialog
Returns:
dialog NotificationDialog

CreateOptionsMenu

Definition:
CreateOptionsMenu() -> userdata dialog
Returns:
dialog OptionsDialog

CreatePDA

Definition:
CreatePDA() -> userdata dialog
Returns:
dialog PDADialog

CreatePDATab1

Definition:
CreatePDATab1() -> userdata box
Returns:
box PDATab1

CreatePVPTab

Definition:
CreatePVPTab() -> userdata box
Returns:
box PVPTab

CreateQuantityPurchaseMenu

Definition:
CreateQuantityPurchaseMenu() -> userdata dialog
Returns:
dialog API_Index#SellItemDialog

CreateSensorPDATab

Definition:
CreateSensorPDATab() -> userdata box, tab1, tab2, tab3, tab4, tab5
Returns:
box PDASensorTab
tab1 PDASensorNearbyTab
tab2 PDAKilledTab
tab3 PDAKilledByTab
tab4 PDAStationVisitsTab
tab5 PVPTab

CreateShipCargoPDATab

Definition:
CreateShipCargoPDATab() -> userdata box
Returns:
box PDAInventoryJettisonTab

CreateShipPDATab

Definition:
CreateShipPDATab() -> userdata box, tab1
Returns:
box PDAShipTab
tab1 PDAShipNavigationTab

CreateStation

Definition:
CreateStation() -> userdata dialog
Returns:
dialog StationDialog

CreateStationBlankTab

Definition:
CreateStationBlankTab() -> userdata box
Returns:
box StationBlankTab

CreateStationChatTab

Definition:
CreateStationChatTab() -> userdata box
Returns:
box StationChatTab

CreateStationCommerceTab

Definition:
CreateStationCommerceTab() -> userdata box
Returns:
box StationCommerceTab

CreateStationCommoditiesBuyTab

Definition:
CreateStationCommoditiesBuyTab() -> userdata box
Returns:
box StationCommoditiesBuyTab

CreateStationCommoditiesLoadTab

Definition:
CreateStationCommoditiesLoadTab() -> userdata box
Returns:
box StationCommoditiesLoadTab

CreateStationCommoditiesSellTab

Definition:
CreateStationCommoditiesSellTab() -> userdata box
Returns:
box StationCommoditiesSellTab

CreateStationCommoditiesTab

Definition:
CreateStationCommoditiesTab() -> userdata box
Returns:
box StationCommerceCommoditiesTab

CreateStationEquipmentBuyTab

Definition:
CreateStationEquipmentBuyTab() -> userdata box
Returns:
box StationEquipmentBuyTab

CreateStationEquipmentManageTab

Definition:
CreateStationEquipmentManageTab() -> userdata box
Returns:
box StationEquipmentManageTab

CreateStationEquipmentSellTab

Definition:
CreateStationEquipmentSellTab() -> userdata box
Description:
Unused. Creates old equipment sell tab.
Returns:
box OldStationEquipmentSellTab

CreateStationEquipmentTab

Definition:
CreateStationEquipmentTab() -> userdata box
Returns:
box StationEquipmentTab

CreateStationFactionInfo

Definition:
CreateStationFactionInfo() -> userdata dialog
Description:
Create StationFactionInfo
Returns:
dialog StationFactionInfo

CreateStationHelpMenu

Definition:
CreateStationHelpMenu() -> userdata dialog
Returns:
dialog StationHelpDialog

CreateStationMissionBuyTab

Definition:
CreateStationMissionBuyTab() -> userdata box, button
Returns:
box PDAMissionBoardTab
button info button in box

CreateStationPDATab

Definition:
CreateStationPDATab() -> userdata box
Returns:
box StationTabPDA

CreateStationPortConfigTab

Definition:
CreateStationPortConfigTab() -> userdata box
Returns:
box StationEquipmentManagePortConfigTab

CreateStationShipPurchaseTab

Definition:
CreateStationShipPurchaseTab() -> userdata box, button
Returns:
box StationEquipmentBuyShipTab
button buy button in box

CreateStationShipSelectionTab

Definition:
CreateStationShipSelectionTab() -> userdata box
Returns:
box StationEquipmentManageShipSelectionTab

CreateStationShipStatusTab

Definition:
CreateStationShipStatusTab() -> userdata box
Description:
Unused. Creates old ship status tab.
Returns:
box StationEquipmentManageShipStatusTab

CreateStationVisitsPDATab

Definition:
CreateStationVisitsPDATab() -> userdata box
Returns:
box StationVisitsTab

CreateStationWelcomeTab

Definition:
CreateStationWelcomeTab() -> userdata box
Returns:
box StationCommerceWelcomeTab

CreateStorageRentalDialog

Definition:
CreateStorageRentalDialog() -> userdata dialog
Description:
Create storage rental dialog
Returns:
dialog StorageRentalDialog

CreateSurveyMenu

Definition:
CreateSurveyMenu() -> userdata dialog
Returns:
dialog SurveyDialog

CreateTargetInfo

Definition:
CreateTargetInfo() -> userdata box
Returns:
box PDATargetInfo

CreateVoiceChatOptions

Definition:
CreateVoiceChatOptions() -> userdata dialog
Description:
Create Voicechat options dialog
Returns:
dialog VoiceChatOptions

DeleteCharacter

Definition:
DeleteCharacter(int slot) -> nil
Description:
Deletes the character in the character slot slot
Arguments:
slot which character to delete

DisableProximityWarning

Definition:
DisableProximityWarning() -> nil
Description:
disable the proximity warning ...

DisconnectAddon

Definition:
DisconnectAddon(int itemid) -> bool ret1
Description:
detaches the addon itemid and stores it in the station
Note: detached items will likely have a different itemid in the station
Arguments:
itemid id of the item to detach
Returns:
ret1 returns true if the player is docked and has an active ship otherwise nil
Example:

DisconnectAddon(123) -> true

remove the item 123 from the active ship while the player is docked to a station

DisconnectAllAddons

Definition: DisconnectAllAddons() -> nil
Description:
Detach all addons from the active ship and store them in the current station

EnableProximityWarning

Definition:
DisableProximityWarning() -> nil
Description:
enable the proximity warning ...

EnableVoiceChat

Definition:
EnableVoiceChat(bool enable) -> nil
Description:
Toggle Voice chat
Arguments:
enable enable voice chat if true

FactionStandingTemplate

Definition:
FactionStandingTemplate(function cb, frame, filler, string expand) -> userdata container
Description:
Creates a container with a list of faction standings of a character. Details: FactionStandingTemplate
Arguments:
cb called on clicking an item in the list. factionid of selected item is passed to it
frame iup.*frame function
filler iup.*filler function
expand iup expand parameter that is applied to the container
Returns:
container FactionStandingTemplate

FactionStandingWithInfoTemplate

Definition:
FactionStandingWithInfoTemplate() -> userdata container
Description:
Wrapper around FactionStandingTemplate that adds faction descriptions to the list.
Returns:
container FactionStandingWithInfoTemplate

FadeControl

Definition:
FadeControl(userdata control, int timetofade, float startalpha, endalpha, function cb, ...) -> nil
Description:
Fade an iup control by modifying its alpha field. Usually a label.
Arguments:
control iup control to fade
timetofade time to fade in seconds
startalpha alpha value before fading (0-1)
endalpha alpha value after fading(0-1)
cb function to call when done
... arguments to pass to cb
Example:

-- shows a dialog with a label that will fade away on clicking "Fade"
-- clicking on "Stop" interrupts the process
 
local d, label, fadebutton, stopbutton 
label = iup.label{title="Fade me!"}
 
local function fadebutton_cb()
	local function fade_cb()
		label.alpha = "255" -- reset the alpha when done
	end
	FadeControl(label, 5, 1, 0, fade_cb) -- fade for 5 seconds from full to zero alpha
end
 
local function stopbutton_cb()
      	local fadeinfo = FadeLookup(label) -- get the fade info table for the label
	if fadeinfo then -- check if the control is still being faded
	    print("Fading was stopped after "..tostring(fadeinfo.counter).." seconds") -- print elapsed time
	end
 
	FadeStop(label) -- interrupt fading
	label.alpha = "255" -- reset alpha
end
 
fadebutton = iup.button{title="Fade", action=fadebutton_cb} 
stopbutton = iup.button{title="Stop", action=stopbutton_cb} 
d = iup.dialog{iup.vbox{label, fadebutton, stopbutton}}
d:show()


FadeLookup

Definition:
FadeLookup(userdata control) -> table fi
Description:
Get a fade info table of a control that is currently being faded.
Arguments:
control faded iup control
Returns
fi fade info table or nil if the given control isn't currently being faded
fi.timetofade time to fade in seconds
fi.startalpha alpha value before fading (0-1)
fi.endalpha alpha value after fading(0-1)
fi.endfunc function to call when done
fi.endfuncargs table with arguments for fi.endfunc
fi.counter elapsed fade time
fi.control control that is being faded
Example:
see Fadecontrol

FadeStop

Definition:
FadeStop(userdata control) -> nil
Description:
Stop fading a control
Arguments:
control control that is being faded
Example:
see Fadecontrol

FillInObjectInfo

Definition:
FillInObjectInfo(string name, desc) -> nil
Description:
Put given name and description into the character info dialog
Arguments:
name object name
desc object description

FillInPlayerInfo

Definition:
FillInPlayerInfo(int charid) -> nil
Description:
Fill character info dialog with info of given character
Arguments:
charid charid

FindAndReplaceTags

Definition:
FindAndReplaceTags(string text, table matches) -> string ret1
Description:
Replaces all occurances of with < and > enclosed substrings in text with matching values from the provided table
Arguments:
test string to replace tags in
matches table with tags/replacement pairs
Returns:
ret1: converted text
Example:

FindAndReplaceTags("hi this is a<br>linebreak", {br="\n"})<br>
-> "hi this is a
linebreak"


FindAndReplaceTagsCB

Definition:
FindAndReplaceTagsCB(string text, function cb) -> string ret1
Description:
Pass each occurances of with < and > enclosed substrings in text to cb and replace them with the return value
Arguments:
test string to replace tags in
cb called with the content of each tag as argument
Returns:
ret1: converted text
Example:

local function find_cb(t)
      if t == "br" then
      	 return "\n"
      end
end
FindAndReplaceTags("hi this is a<br>linebreak", find_cb)<br>
-> "hi this is a
linebreak"


ForEachBuddy

Definition:
ForEachBuddy(function func(string name, bool isonline, int sectorid)) -> nil
Description:
calls func with the name, if the player is online for each of your buddies as well as his position if the player is currently online
Arguments:
func gets called for each buddy
name name of the buddy
isonline true if the player is online else false
sectorid location of player as sectorid
Example:

ForEachBuddy(function (name, isonline, pos) print(name .." "..tostring(isonline).." "..tostring(pos)) end)

prints a list with your buddies and their status

ForEachPlayer

Definition:
ForEachPlayer(function func(int charid)) -> nil
Description:
calls func with the character id of each player in the sector. that includes bots and the sector thingy itself
This function is called by the toplist when you open it.
Arguments:
func gets called for each buddy
ncharid character id

Example:

ForEachPlayer(function (id) print(id) end)

prints a list with all players in the sector

ForgiveKiller

Definition:
ForgiveKiller(bool forgive) -> nil
Description:
Forgive the last killer.
Arguments:
forgive if true forgive the last killer if not don't

GeneratePlayerDiedMessage

Definition:
GeneratePlayerDiedMessage(string name1, name2, int weapon) -> string msg
Description:
generate appropiate kill message for the arguments.
Arguments:
name1 character that died
name2 character that killed name1
weapon weaponid of weapon with which the kill was made(?)
Returns:
msg kill message
Example:

GeneratePlayerDiedMessage("foo", "bar", 0) -> "bar destroyed foo"
GeneratePlayerDiedMessage("foo", "foo", 0) -> "foo is having issues"


GetAccomplishmentBigSize

Definition:
GetAccomplishmentBigSize(int type, level) -> string bigsize
Description:
Get size of accomplishment medal
Arguments:
type accomplishment type
level accomplishment level
Returns:
bigsize iup size string of medal

GetAccomplishmentBigTexture

Definition:
GetAccomplishmentBigTexture(int type, level) -> string tex
Description:
Get texture of accomplishment medal
Arguments:
type accomplishment type
level accomplishment level
Returns:
tex filename of medal texture

GetAccomplishmentBigUV

Definition:
GetAccomplishmentBigUV(int type, level) -> string uv
Description:
Get uv mapping of accomplishment medal
Arguments:
type accomplishment type
level accomplishment level
Returns:
uv iup uv mapping of medal texture

GetAccomplishmentCategory

Definition:
GetAccomplishmentCategory(int type, level) -> string category
Description:
Get category of accomplishment
Arguments:
type accomplishment type
level accomplishment level
Returns:
category accomplishment category

GetAccomplishmentDescription

Definition:
GetAccomplishmentDescription(int type, level) -> string desc
Description:
Get description of accomplishment
Arguments:
type accomplishment type
level accomplishment level
Returns:
desc accomplishment description

GetAccomplishmentLevels

Definition:
GetAccomplishmentLevels(int accomid) -> int curlevel int reqlevel
Description:
returns the current and the required level for the selected accomplishment
Arguments:
accomid id of the accomplishment
Returns:
curlevel current level of the accomplishment
reqlevel what is required to get the accomplishment

Example:

GetAccomplishmentLevels(9) -> 34 50

assuming 9 is buskills this player has 34 kills of the 50 required

GetAccomplishmentName

Definition:
GetAccomplishmentName(int type, level) -> string name
Description:
Get name of accomplishment
Arguments:
type accomplishment type
level accomplishment level
Returns:
name name of accomplishment

GetAccomplishmentSize

Definition:
GetAccomplishmentSize(int type, level) -> string size
Description:
Get size of accomplishment badge
Arguments:
type accomplishment type
level accomplishment level
Returns:
size iup size of badge

GetAccomplishmentTexture

Definition:
GetAccomplishmentTexture(int type, level) -> string tex
Description:
Get texture of accomplishment badge
Arguments:
type accomplishment type
level accomplishment level
Returns:
tex filename of badge texture

GetAccomplishmentTitle

Definition:
GetAccomplishmentTitle(int type, level) -> string title
Description:
Get title of accomplishment
Arguments:
type accomplishment type
level accomplishment level
Returns:
title accomplishment title

GetAccomplishmentType

Definition:
GetAccomplishmentType(int accomindex, char) -> int accomplishmenttype int accomplishmentlevel
Description:
returns some numbers..
Arguments:
accomindex index of the accomplishment
char charid of character whose accomplishment to look up
Returns:
accomplishmenttype type of accomplishment
accomplishmentlevel what level the accomplishment is, starting at 1.

Example:

local accomtype, accomlevel = GetAccomplishmentType(accomindex)<br>
local description = GetAccomplishmentDescription(accomtype, accomlevel)


GetAccomplishmentUV

Definition:
GetAccomplishmentUV(int type, level) -> string uv
Description:
Get uv mapping of accomplishment badge
Arguments:
type accomplishment type
level accomplishment level
Returns:
uv iup uv mapping of badge

GetActiveChatChannel

Definition:
GetActiveChatChannel() -> int channel
Description:
returns the active channel
Returns:
channel active chat channel
Example:

GetActiveChatChannel() -> 1

you are currently in channel 1

GetActiveMissionInfo

Definition:
GetActiveMissionInfo(int num) -> string mname table mmsg int itemid
Description:
Get information about the selcted active mission
Arguments:
num index of active mission (always 1)
Returns:
mname string containing name of active mission
mmsg array where each index contains a mission log entry + optional interface elements and their properties
itemid itemid of the mission
Example:

GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234

The active mission is called "awesome mission" and the first mission log entry contains the text "awesome mission question" with a button labaled "awesome button text" which triggers the action 1. item id for this mission is 1234

GetActiveShipCargoCount

Definition:
GetActiveShipCargoCount() -> int cargocount
Description:
returns amount of cargo in the ship
Returns:
cargocount amount of cargo in the ship

GetActiveShipEnergy

Definition:
GetActiveShipEnergy() -> float eng fraction
Description:
returns the energy level of the active ship
Returns:
eng energy level in game units 0 .. maxcapacacity
fraction energy level as float from 0.0-1.0
Example:

GetActiveShipEnergy() -> 150.0 0.5

the battery of this ship is half empty and has a capacity of 300

GetActiveShipHealth

Definition:
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max
Description:
returns information about the active ships health
Returns:
d? damage to subsection 0 = no damage
dmg accumulated damage of subsections
max max health of ship
Example:

GetActiveShipHealth() -> 500 10 10 0 0 0 520 10000

ship has 500 damagei n frontal region 520 dmg overall and a max health of 10000

GetActiveShipGridPowerAndUsage

Definition:
GetActiveShipGridPowerAndUsage() -> int power usage
Description:
returns the energy grid power and usage of the current ship..
Returns:
power energy grid power
fraction power usage
Example:

GetActiveShipGridPowerAndUsage() -> 20 12

the ships power grid has a capacity of 20 and 12 are currently used

GetActiveShipID

Definition:
GetActiveShipID() -> int itemid
Description:
returns itemid of active ship
Returns:
itemid item id of active ship

GetActiveShipItemIDAtPort

Definition:
GetActiveShipItemIDAtPort(int portid) -> int itemid
Description:
returns itemid of addon in selected port
Arguments:
portid portid
Returns:
itemid itemid of addon in port
Example:

GetActiveShipItemIDAtPort(1) -> 1234

addon in port 1 has itemid 1234

GetActiveShipMass

Definition:
GetActiveShipMass() -> int mass
Description:
returns mass of active ship
Returns:
mass mass of active ship
Example:

GetActiveShipMAss() -> 15.0000

ship weights 15000kg

GetActiveShipMaxCargo

Definition:
GetActiveShipMaxCargo() -> int cargo
Description:
returns amount of cargo space of the active ship in cu
Returns:
cargo cargospace

GetActiveShipMaxSpeed

Definition:
GetActiveShipMaxSpeed() -> int speed
Description:
returns max nonturbo speed of active ship
Returns:
speed ...

GetActiveShipName

Definition:
GetActiveShipName() -> string name
Description:
returns a string with the active ships name
Returns:
name ...

GetActiveShipNumAddonPorts

Definition:
GetActiveShipNumAddonPorts() -> int ports
Description:
returns number of ports in active ship
Returns:
ports number of ports, including engine and battery
Example:

GetActiveShipNumAddonPorts() -> 4

this ship has 3 ports

GetActiveShipPortIDOfItem

Definition:
GetActiveShipPortIDOfItem(int itemid) -> int portid
Description:
returns portid of the given addon in active ship
Arguments:
itemid itemid of an addon
Returns:
portid portid of port the addon is in or nil if addon is not on the ship or invalid
Example:

GetActiveShipPortIDOfItem(1234) -> 3


GetActiveShipPortInfo

Definition:
GetActiveShipPortInfo(int portid) -> table portinfo
Description:
returns information about the given port
Arguments:
portid portid
Returns:
portinfo table with port info
fields include:
type: int holding the type of port
name string describing port
position: vector with port position on ship
orientation: quaternion holding orientation of port

Example:

GetActiveShipPortInfo(1) -> {type=4 name="PowerCell" position=(0, 0, 0) orientation=(0.000 0.000 0.000 1.000)}

portinfo of a ragnaroks battery port

GetActiveShipSelectedWeaponGroupIDs

Definition:
GetActiveShipSelectedWeaponGroupIDs() -> int id1 id2 id3
Description:
returns ids of the selected weapon groups ...
Returns:
id? id's of weapon groups. Probably mapping to those key buttons.
Example:

GetActiveShipSelectedWeaponGroupIDs() -> 0 6 12

default mapping

GetActiveShipSpeed

Definition:
GetActiveShipSpeed() -> int speed
Description:
returns current speed of active ship
Returns:
speed ...

GetActiveShipWeaponGroup

Definition:
GetActiveShipWeaponGroup(int id) -> table group
Description:
return which ports are enabled in the provided group
Arguments:
id id of weapon group correspondents to group key[0-5] + (trigger group[0-2] * 6)
Returns:
port table where the indexes are the port ids and values bools that are true when the port is active
Example:

GetActiveShipWeaponGroup(6) -> {2=true 3=true}

6 -> 6 % 6 = 1 R 0 thus 6 represents first group key and and second trigger group. port 2 and 3 are active for example this could be the 2 s ports on a vult

GetAddonItemInfo

Definition:
GetAddonItemInfo(int itemid) -> int current maximum
Description:
Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
Arguments:
itemid itemid of an addon or ship.
Returns:
current Current ammo/armor, or -1.
maximum Maximum ammo/armor, or -1.

GetAvailableMissionInfo

Definition:
GetAvailableMissionInfo(int midx) -> {int itemtype, string name, bool active, int category, string icon, string desc}
Description:
Returns information about the mission with the given index.
Arguments:
midx index of mission in missionlist (1 based)
Returns:
itemtype no idea
name name of mission
active is this mission active
category mission category
icon path to icon
desc mission description

GetBarPatrons

Definition:
GetBarPatrons() -> {[charid1], [charid2]...}
Description:
get people in the current station bar
Returns:
charid? index of returned table are charids of characters in the bar

GetBestPriceInfoOfItem

Definition:
GetBestPriceInfoOfItem(int item) -> int price, station
Description:
Get highest sell price of a cargo item in the active ship in the currentsystem
Arguments:
item itemid of cargo item
Returns:
price highest price in system
station locationid of station with highest price
Example:

-- print best prices in system for all cargo items in the ship
for _,item in ipairs(GetShipInventory(GetActiveShipID()).cargo) do
	local price, station = GetBestPriceInfoOfItem(item)
	print(GetInventoryItemName(item).." "..tostring(price).."c at "..LocationStr(math.floor(station / 100)))
end


GetBotSightedInfoForSector

Definition:
GetBotSightedInfoForSector(int sectorid) -> string botinfo
Description:
returns bot ihnfo text for the given sector
Arguments:
sectorid sectorid
Returns:
botinfo string with bots in given sector or an empty string

GetBuddyInfo

Definition:
GetBuddyInfo(int char) -> string name, bool isonline, int sectorid
Description:
Get name, online status and location of a buddy
Arguments:
char charid of a buddy
Returns:
name name of buddy
isonline online status
sectorid sectorid of location of buddy

GetCargoValue

Definition:
GetCargoValue() -> int value, price
Description:
Get value and buy price of the cargo and equipped addons on the active ship at the current station
Returns:
value value of cargo and addons
price buy price of cargo and addons at the current station

GetCharacterDescription

Definition:
GetCharacterDescription(int charid) -> string desc
Description:
Get the character description of a character
Arguments:
charid charid of a character
Returns:
desc character description

GetCharacterID

Definition:
GetCharacterID(int nodeid) -> int charid
Description:
returns character id of the provided node id
Arguments:
nodeid node id of one of the characters in the sector
Returns:
charid character id of the given node if a valid nodeid is valid otherwise the players charid

GetCharacterIDByName

Definition:
GetCharacterIDByName(string name) -> int charid
Description:
get character id by name
Arguments:
name name of a character
Returns:
charid a character id or nil


GetCharacterInfo

Definition:
GetCharacterInfo(int cslot) -> string name faction int money kills deaths loc home cl ll hl tl ml
Description:
Get information about your characters
Arguments:
cslot a character slot (1-6)
Returns:
name
faction
money
kills all kills
deaths
loc sectorid of current location
home sectorid of characters homestation
cl combat level
ll light weapon level
hl heavy weapon level
tl trade level
ml mining level
Example:

GetCharacterInfo(1) -> "Dude" "Corvus" 10000 10 100 4444 4444 1 1 1 0 0<br>

This players first character is called "Dude" is of the "Corvus" faction has 10000c killed 10 things died 100 times is in sector 4444, homed in 4444 and has level 1/1/1/0/0

GetCharacterKillDeaths

Definition:
GetCharacterKillDeaths(int charid) -> int kills deaths pks
Description:
get info about kills and deaths. returns your own info if no charid given or a lua error if an invalid one ...
Arguments:
charid character id or nil
Returns:
kills total kills deaths total deaths pks player kills

GetChatLogReadState

Definition: GetChatLogReadState() -> bool read
Description:
Tell if the general chat log was displayed. SetChatLogRead was called since the last line was added to the log.
Returns:
read true if the log was displayed

GetCurrentChatTab

Definition: GetCurrentChatTab() -> int tab
Description:
Unused. Get The current chat tab (general chat or mission chat)
Returns:
tab 1 = general, 2 = mission

GetCurrentSectorid

Definition: GetCurrentSectorid() -> int sectorid
Description:
get current sector id
Returns:
sectorid sectorid of current sector

GetCurrentStationType

Definition: GetCurrentStationType() -> int type
Description:
return the current station type..
Returns:
type current station type. seems be usually 0 except when docked to a capship then 1

GetCurrentSystemid

Definition: GetCurrentSystemid() -> int systemid
Description:
get current system id..
Returns:
systemid id of current system

GetEULA

Definition: GetEULA() -> string eula
Description:
return eula
Returns:
eula string containing the eula

GetFactionInfo

Definition: GetFactionInfo(int faction) -> string info
Description:
get faction info text for the provided faction
Arguments:
faction id of a faction
Returns:
info string containing faction info

GetFinishedMissionInfo

Definition: GetFinishedMissionInfo() -> string name table msg int itemid
Description:
see GetActiveMissionInfo

GetFriendlyStatus

Definition: GetFriendlyStatus(int char) -> int fstatus
Description:
get friendlyness of a character
Arguments:
char nodeid
Returns:
fstatus Returns 0 to 3. Target is friendly if 3, unfriendly otherwise

GetFullPath

Definition: GetFullPath(int sector, table navroute) -> table fullpath
Description:
Get the full path, including wormhole sectors, from sector along navroute
Arguments:
sector sectorid of starting sectors
navroute list of sectorids
Returns:
fullpath navroute plus sectorids of wormhole sectors
Example:

-- get full path from Sol a1 to betheshee a1 via sol b1
-- the function adds some duplicate entries
GetFullPath(1, {2, 257}) -> {1, 2, 2, 226, 351, 257}


GetGeneralChatLog

Definition: GetGeneralChatLog() -> table log
Description:
returns the chatlog
Returns:
log table containing chatlog


GetGroupMemberID

Definition: GetGroupMemberID(int index) -> int charid
Description:
get charid of group member with given index
Arguments:
index group member index (1-8)
Returns:
charid character id

GetGroupMemberLocation

Definition: GetGroupMemberLocation(int charid) -> int loc
Description:
get location of a groupmember
Arguments:
charid character ids of a groupmember
Returns:
loc sectorid of groupmember or 0 for yourself

GetGroupOwnerID

Definition: GetGroupOwnerID() -> int charid
Description:
get charid of group owner
Returns:
charid character id

GetGuildAcronym

Definition:
GetGuildAcronym() -> string acronym
Description:
get your guilds acronym
Returns:
acronym string containing guild acronym

GetGuildBalance

Definition:
GetGuildBalance() -> int balance
Description:
get amount of money in guild bank
Returns:
balance money in bank

GetGuildBankPrivileges

Definition:
GetGuildBankPrivileges() -> table deposit withdraw logview
Description:
get your guilds bank privileges as three tables. they contain the ranks carrying each privilege.
see [API_Index#Guild]
Returns:
deposit table with ranks that can deposit money
withdraw table with ranks that can withdraw money
logview table with ranks that can view the transfer log

GetGuildBankWithdrawalLimits

Definition:
GetGuildBankWithdrawalLimits() -> int ret1 ret2 ret3
Description:
get withdrawal limits? returns three numbers
Returns:
ret1
ret4
ret3

GetGuildMOTD

Definition:
GetGuildMOTD() -> string motd
Description:
get your guilds message of the day
Returns:
motd string containing the motd

GetGuildMemberInfo

Definition: GetGuildMemberInfo(int index) -> int charid rank string name
Description:
get information about the guildmember of the given index
Arguments:
index index of online guildmembers 1-n
Returns:
charid character id
rank rank: 0=member, 1=lieutenant, 2=council member, 3=council member and lieutenant, 4=commander
name name of member

Example:

for i=1,GetNumGuildMembers()do
  local id, rank, name = GetGuildMemberInfo(i)
  print("guild member: "..name)
end


GetGuildMemberInfoByCharID

Definition: GetGuildMemberInfoByCharID(int charid) -> int charid rank string name
Description:
get information about the guildmember
Arguments:
charid charid of online guildmember
Returns:
charid character id
rank rank: 0=member, 1=lieutenant, 2=council member, 3=council member and lieutenant, 4=commander
name name of member
Example:

local charid,rank,charname = GetGuildMemberInfoByCharID(GetCharacterID())


GetGuildName

Definition: GetGuildName() -> string name
Description:
get guild name
Returns:
name string containing guild name

GetGuildTag

Definition: GetGuildTag(int charid) -> string tag
Description:
get guild tag of self or another character.
Arguments:
charid character id or nil to get self's guild tag.
Returns:
tag string containing guild tag or empty string if character not known or not in a guild.
Example:
local guildtag = GetGuildTag() if guildtag ~= "" then

 print('['..guildtag..'] You are a member of the guild '..(GetGuildName() or guildtag)..'\n')

else

 print('Not a member of a guild.\n')

end</source>

GetHomeStation

Definition: GetHomeStation() -> int sectorid
Description:
get sectorid of home station
Returns:
sectorid sectorid of home station

GetInventoryItemClassSubType

Definition: GetInventoryItemClassSubType(int itemid) -> int subtype
Description:
get subclass of an item
Arguments:
itemid inventory item
Returns:
subtype sub type of item
known types:
0 = light weapon or ship
1 = heavy weapon
3 = engine
4 = battery
10 = trade goods

GetInventoryItemClassType

Definition: GetInventoryItemClassType(int itemid) -> int type
Description:
get class of an item
Arguments:
itemid inventory item
Returns:
type class of item. you can use those CLASSTYPE_* constants to identify types

GetInventoryItemContainerID

Definition: GetInventoryItemContainerID(int itemid) -> int container
Description:
get container of item
Arguments:
itemid inventory item
Returns:
container itemid of container of or null if it's not in one (a ship)

GetInventoryItemExtendedDesc

Definition: GetInventoryItemExtendedDesc(int itemid) -> string desc
Description:
get description of item
Arguments:
itemid inventory item
Returns:
desc item description text.

GetInventoryItemIcon

Definition: GetInventoryItemIcon(int itemid) -> string path
Description:
get path to icon of inventory item
Arguments:
itemid inventory item
Returns:
path path to icon

GetInventoryItemInfo

Definition: GetInventoryItemInfo(int itemid) -> string ipath name int quant float mass string sdesc desc1 desc2 int container class subtype
Description:
get most info about inventory item
Arguments:
itemid inventory item
Returns:
ipath icon path
name name or item
quant amount of items
mass per item mass as float in tons
sdesc short description
desc1 long description
desc2 long description again, sometimes omitted don't know what's the difference
container itemid of container this item is in
class type of item (see GetInventoryItemClassType)
subtype subtype of item (see GetInventoryItemClassSubType)

GetInventoryItemLocation

Definition: GetInventoryItemLocation(int itemid) -> int stationid
Description:
get location of an inventory item
Arguments:
itemid itemid of an inventory item
Returns:
stationid stationid or nil if itemid is invalid
Example:

ShortLocationStr(SplitStationID(GetInventoryItemLocation(1234))) -> "Dau L-10"

get the stationid of the item 1234
get the sectorid part of that stationid
print out the sectors name

GetInventoryItemLongDesc

Definition: GetInventoryItemLongDesc(int itemid) -> string desc
Description:
get long description of an inventory item
Arguments:
itemid itemid of an inventory item
Returns:
desc long description of an inventory item
Example:

GetInventoryItemLongDesc(1234) -> 
"Damage: 1100|Velocity: 190m/s|Energy: 30/blast|Delay: 0.4s|Mass: 1000 kg| \
Volume (as cargo): 1 cu|Good auto-targeting||KC-Cannon housing with PR-11 plasma cells"


GetInventoryItemMass

Definition: GetInventoryItemMass(int itemid) -> float mass
Description:
get mass of inventory item
Arguments:
itemid inventory item
Returns:
path mass of item as float in tons
Example:

GetInventoryItemMass(1234) -> 4.000

the mass of item 1234 is 4000kg

GetInventoryItemName

Definition: GetInventoryItemName(int itemid) -> string name
Description:
get name of inventory item
Arguments:
itemid inventory item
Returns:
name name

GetInventoryItemQuantity

Definition: GetInventoryItemQuantity(int itemid) -> int quant
Description:
get quantity of inventory item..
Arguments:
itemid inventory item
Returns:
quant quantity

GetInventoryItemType

Definition: GetInventoryItemType(int itemid) -> int type
Description:
get item type
Arguments:
itemid inventory item
Returns:
type type

GetInventoryItemUnitCost

Definition: GetInventoryItemUnitCost(int itemid) -> int cost
Description:
get price paid for the given item(?)
Arguments:
itemid itemid of an inventory item
Returns:
cost price of item

GetInventoryItemVolume

Definition: GetInventoryItemVolume(int itemid) -> int volume
Description:
get per unit volume of item in cu
Arguments:
itemid itemid of an inventory item
Returns:
volume volume in cu

GetItemFullDesc

Definition: GetItemFullDesc(table item) -> string desc
Description:
get full description of an inventory item
Arguments:
item iteminfo table
Returns:
desc full description of item

GetItemPartialDesc

Definition: GetItemPartialDesc(table item) -> string desc
Description:
get partial description of an inventory item
Arguments:
item iteminfo table
Returns:
desc partial description of item

GetLastAggressor

Definition: GetLastAggressor(int itemid) -> int nodeid ret1
Description:
get node id of last aggressor and some number
Returns:
nodeid node id of last aggressor ret1 no clue

GetJoinedChannels

Definition: GetJoinedChannels() -> table channels
Description:
get array with currently joined channels
Returns:
channels array with joined channels

GetLastPrivateSpeaker

Definition: GetLastPrivateSpeaker(int itemid) -> string name
Description:
get name of last character that pmed you
Returns:
name last messager

GetLastShipLoadout

Definition: GetLastShipLoadout() -> {groups = {1 = group1 .. 18 = group18}, int ship, ports= {1 = port1 ..}, int shipcolor}
Description:
get last ship loadout, color and weapon groups. this function only works in space
Returns:
groups table containing the weapon group setup group? group information. array indices correspondent to ports, is the value of an index set to true the port is enabled ship type of ship ports array indices correspondent to ports, value of index is the type of addon shipcolor ship color 1-255(?)

GetLastShipLoadoutPurchaseCost

Definition: GetLastShipLoadoutPurchaseCost() -> int cost
Description:
what you payed for your last ship(?)
Returns:
cost

GetLicenseLevel

Definition: GetLicenseLevel(int type) -> int level
Description:
get the level of the provided license
Arguments:
type type of license (1-5)
Returns:
level license level or 0 if invalid type given

GetLicenseRequirement

Definition: GetLicenseRequirement(int level) -> int xp
Description:
get xp required for given level
Arguments:
level license level
Returns:
xp

GetListOfSeenNames

Definition: GetListOfSeenNames() -> table names
Description:
get table with names of characters that have been in the same sector as the player or have sent messages
Returns:
names table with names of characters

GetMaxRadarDistance

Definition: GetMaxRadarDistance() -> int dist
Description:
get current(?) max radar range
Returns:
dist max radar range

GetMinJumpDistance

Definition: GetMinJumpDistance() -> int dist
Description:
get minimum distance from large objects to jump
Returns:
dist min jump distance

GetMissionChatLog

Definition: GetMissionChatLog() -> {bool updated, string 1.. }
Description:
get advancement log
Returns:
1-n advancement log updated no clue

GetMissionLogReadState

Definition: GetMissiontLogReadState() -> bool read
Description:
Tell if the mission chat/advanmcement log was displayed. SetMissionLogRead was called since the last line was added to the log.
Returns:
read true if the log was displayed

GetMissionTimers

Definition: GetMissionTimers() -> int time
Description:
get time left on the current mission. may have some functionality for multiple missions
Returns:
time time left on this timer in 1000th seconds

GetMoney

Definition: GetMoney() -> int money
Description:
get how many credits you own
Returns:
money

GetNationKills

Definition: GetNationKills(int nation) -> int kills
Description:
get number of player kills for the given nation
Arguments:
nation id of nation (1-3)
Returns:
kills number of player kills or 0 if invalid nation

GetNewsHeadline

Definition: GetNewsHeadline(int index) -> string title int time ret1
Description:
get headline, post time and some number
Arguments:
index index of headline newest is 1
Returns:
title the headline time post date in unix time ret1 no clue, always 1

GetNumAccomplishments

Definition: GetNumAccomplishments(int charid) -> int accomplishments
Description:
get number of accomplishments for the given character
Arguments:
charid charid of a character
Returns:
accomplishments number of accomplishments

GetNumActiveMissions

Definition: GetNumActiveMissions() -> int missions
Description:
get number of active missions.
Returns:
missions number of active missions

GetNumAvailableMissions

Definition: GetNumAvailableMissions() -> int missions
Description:
get number of available missions
Returns:
missions

GetNumCharacters

Definition: GetNumCharacters() -> int chars
Description:
get number of characters you have defined
Returns:
chars

GetNumCompletedMissions

Definition: GetNumCompletedMissions() -> int missions
Description:
get number of completed missions
Returns:
missions

GetNumFinishedMissions

Definition: GetNumFinishedMissions() -> int missions
Description:
get number of finished missions. as displayed in the mission log panel
Returns:
missions

GetNumGroupMembers

Definition: GetNumCharacters() -> int chars
Description:
get number of characters in your group
Returns:
chars number of characters in your group or 0 if player is not in group

GetNumGuildMembers

Definition: GetNumGuildMembers() -> int numchars
Description:
get number of online guildmembers
Returns:
chars number of guildmembers currently online or 0 if player is not in a guild
Example:

for i=1,GetNumGuildMembers() do
  local id, rank, name = GetGuildMemberInfo(i)
  print("member: "..name)
end


GetNumNewsHeadlines

Definition: GetNumNewsHeadlines() -> int num
Description:
get number of news headlines..
Returns:
num

GetNumStationDesiredItems

Definition: GetNumStationDesiredItems() -> int num
Description:
Get number of items this station desires. The names of the items can then be fetched with GetStationDesiredItem.
Returns:
num The number of items the station wants.
Example:

for i = 1, GetNumStationDesiredItems(), 1 do
    print("This station wants: "..GetStationDesiredItem(i))
done


GetNumStationMerch

Definition: GetNumStationMerch() -> int num
Description:
get number of addons, ships an cargo this station sells
Returns:
num

GetNumStationTurrets

Definition: GetNumStationTurrets() -> int num
Description:
get number of turrets on this station or ship
Returns:
num number of turrets attached to this station or ship. 0 if not docked

GetNumTips

Definition: GetNumTips() -> int num
Description:
get size of load screen tips pool
Returns:
num

GetParentHealth

Definition: GetParentHealth() -> float ret1 ret2
Description:
get health of object this one is attached to (turret to capship). untested!
Returns:
ret1 health in percent(?) ret2 health as float (1-0)(?)

GetPlayerDistance

Definition: GetPlayerDistance(int charid) -> float distance
Description:
get distance to another character
Arguments:
charid character id of another character in this sector
Returns:
distance distance to character in m

GetPlayerFaction

Definition: GetPlayerFaction(int charid) -> int factionid
Description:
get nation of a player
Arguments:
charid character id or nil
Returns:
factionid number representing the faction (1-13, 99)

GetPlayerFactionStanding

Definition: GetPlayerFactionStanding(int factionid, charid) -> int standing
Description:
get a players standing with a faction
Arguments:
factionid a number representing a faction. Only 1 to 3 work for other players. factionid
charid charid of a player (in the current sector?). nil is equivalent of own id.
Returns:
standing number representing faction standing 0-65535, (0 in-game being -1000, 32768 in-game being 0 and 65535 being 1000 in-game)
Example:
If the player's Itani Faction Standing was 0:

print( GetPlayerFactionStanding(1) )  -> "32768"

Or used in conjunction with GetPlayerFaction:

print( GetPlayerFactionStanding( GetPlayerFaction(charid) )
-> "Will return the players faction standing of the faction that charid belongs to." )


GetPlayerHealth

Definition: GetPlayerHealth(int charid) -> float health
Description:
get health of provided character
Arguments:
charid character id
Returns:
health health of character in percent or -1 if character is not in the current sector

GetPlayerName

Definition: GetPlayerName(int charid) -> string name
Description:
get name of character
Arguments:
charid character id
Returns:
name

GetPlayerNodeID

Definition: GetPlayerNodeID(int charid) -> int nodeid
Description:
get nodeid of a character in the sector
Arguments:
charid character id
Returns:
nodeid nodeid or nil if charid is invalid

GetPrimaryShipIDOfPlayer

Definition: GetPrimaryShipIDOfPlayer(int charid) -> int shipid
Description:
get shipid of a character (= objectid?)
Arguments:
charid character id
Returns:
shipid

GetPrimaryShipNameOfPlayer

Definition: GetPrimaryShipNameOfPlayer(int charid) -> string name
Description:
get ship name (type) of provided character
Arguments:
charid character id
Returns:
name

GetProfitColor

Definition: GetProfitColor(int price, cost) -> string color
Description:
get color depending on the given prices
Arguments:
price sell price
cost buy price
Returns:
color iup color string

GetProfitHexColor

Definition: GetProfitHexColor(int price, cost) -> string color
Description:
get color in hex format depending on the given prices
Arguments:
price sell price
cost buy price
Returns:
color hex color string. format: "rrggbb"

GetProximityWarningDistance

Definition: GetProximityWarningDistance() -> int dist
Description:
get proxy warnign distance
Note: even returns the distance when proxy warning is disabled
Returns:
dist proxy distance.

GetSectorAlignment

Definition: GetSectorAlignment() -> int alignment
Description:
returns the alignment of the current sector

Returns:
alignment int representing alignment of the current sector. see: FactionName

GetSectorMonitoredStatus

Definition: GetSectorMonitoredStatus() -> int monitor
Description:
returns the monitor status of the current sector (Unmonitored, Guarded ...) see: FactionMonitor and FactionMonitorStr

Returns:
monitor monitor status

GetShipAmmoPrices

Definition: GetShipAmmoPrices(int ship) -> table prices
Description:
get cost of ship ammo
Arguments:
ship itemid of a ship
Returns:
prices weapon itemid ammo price pairs
prices.allammoprice cost of reloading all weapons
prices.allammoquantity amoutn of ammo to reload

GetShipCargoCount

Definition: GetShipCargoCount(int itemid) -> int num
Description:
get amount of cargo in the ship
Arguments:
itemid item id of a ship
Returns:
num amount of argo in ship in cu

GetShipInventory

Definition: GetShipInventory(int itemid) -> {cargo = {int cargoitemid ..}, addons = {int addonitemid ..}}
Description:
get itemids of items attached to a ship
Arguments:
itemid item id of a ship
Returns:
cargo array with cargo items
addons array with addons
cargoitemid itemids of cargo items
addonitemid itemids of addons

GetShipList

Definition: GetShipList() -> {int itemid ..}
Description:
get list of your ships in the current station. produces error when called outside station..
Returns:
itemid itemid of a ship

GetShipMaxCargo

Definition: GetShipMaxCargo(int itemid) -> int cargo
Description:
get amount of cargo the given ship can hold
Arguments:
itemid itemid of a ship
Returns:
cargo cargo in cu

GetShipMeshInfo

Definition: GetShipMeshInfo(int itemid) -> string id model int color
Description:
get mesh information about equipment in your inventory. if an invalid itemid is given the info about the current ship is returned
Arguments:
itemid itemid of one of your ships or nil
Returns:
id of the ship
model filename of the model(?)
color colorid of the item see ShipPalette
Example:

GetShipMeshInfo(1234) -> "ship_generic_behemoth" "gaf/ship_generic_behemoth.dfs" 166


GetShipPortIDOfItem

Definition: GetShipPortIDOfItem(int itemid1, int itemid2) -> int portid
Description:
get port of weapon in one of your ships
Arguments:
itemid1 itemid of one of your ships
itemid2 itemid of a weapon or nil
Returns:
portid port of a wweapon or first free port if itemid2 is nil

GetShipPurchaseColor

Definition: GetShipPurchaseColor() -> int color
Description:
get selected color from the color picker
Returns:
colorid number representing color (0-255)

GetSkillLevel

Definition: GetSkillLevel(int licenseid) -> int current next
Description:
get current and required xp for next level or provided skill
Arguments:
licenseid type of license (1-5)
Returns:
current current xp next xp required for next level

GetSkirmishInfo

Definition:
GetSkirmishInfo() -> int crew1 crew2 init1 init2 string name1 name2 bool active
Description:
returns crew info for skirmish missions
Returns:
crew1 crew members left for side 1 (top bar)
crew2 crew members left for side 2 (bottom bar)
init1 initial crew strength for side 1
init2 initial crew strength for side 2
name1 name of side 1
name2 name of side 2
active true if mission active(?)

GetStationAddonList

Definition: GetStationAddonList() -> {int itemid ..}
Description:
get array with your addons in the station hold
Returns:
itemid itemid of one of your addons

GetStationAmmoInfoByID

Definition: GetStationAmmoByID(int itemid) -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, bool locallyproduced, int itemid, string icon}
Description:
get info about ammo based weapons in the station by item id
Arguments:
itemid itemid

GetStationCargoList

Definition: GetStationCargoList() -> {int itemid ..}
Description:
get list of cargo items in the current station. produces error when called outside station..
Returns:
itemid itemid of a trade item

GetStationChatLog

Definition: GetStationChatLog() -> {string msg ..}
Description:
get table with messages in the station chat
Returns:
msg chat message

GetStationCurrentCargo

Definition: GetStationCurrentCargo() -> int cargo
Description:
get amount of cargo currently in this station. including cargo, equipment, ships ..
Returns:
cargo amount of cargo in cu

GetStationDesiredItem

Definition: GetStationDesiredItem(int index) -> string ditem
Description:
Get the string name of an item that this station desires. The index ranges from 1 to GetNumStationDesiredItems().
Arguments:
index index in list of strings
Returns:
ditems desired item

GetStationFaction

Definition: GetStationFaction(int stationid) -> int factionid
Description:
get faction of the given station
Arguments:
stationid stationid
Returns:
factionid factionid or 0 if stationid invalid

GetStationFactionAppraisalModifier

Definition: GetStationFactionAppraisalModifier() -> float modifier
Description:
Returns a number that seems to affect the price of storage space. depends on faction standing or something
Returns:
modifier

GetStationLocation

Definition: GetStationLocation() -> int stationid
Description:
get the stationid of the current station
Returns:
stationid stationid or nil if not docked to a station

GetStationLogReadState

Definition: GetStationLogReadState() -> bool read
Description:
Tell if the stationlog/bar was displayed. SetStationLogRead was called since the last line was added to the log.
Returns:
read true if the log was displayed

GetStationMaxCargo

Definition: GetStationMaxCargo() -> int cargo
Description:
return amount of cargo this station can hold.
Returns:
cargo amount of cargo in cu purchaseable max purchaseincrement purchase price mincargo rent

GetStationMerchInfo

Definition: GetStationMerchInfo(int merchid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
Description:
get info about items this station sells
Arguments:
merchid id of sold items (1-n), where n = GetNumStationMerch()
Example:

for item = 1, GetNumStationMerch() do
    local haveitem = GetStationMerchInfo(item);
    console_print("Station has item: ".. haveitem.name);
end


GetStationMerchInfoByID

Definition: GetStationMerchInfoByID(int itemid) -> { neededlevels = {int l1 .. l5}, int price, string longdesc, float mass, string sortgroup, int volume, string extendeddesc, string type, string meshfile, bool usable, int itemid, string icon }
Description:
get info about items this station sells by itemid
Arguments:
itemid itemid of sold items



GetStationMerchPriceByID

Definition: GetStationMerchInfoByID(int itemid) -> int price
Description:
get price of an item this station sells
Arguments:
itemid itemid of sold items
Returns:
price price of an item or 0 if this item isn't sold



GetStationName

Definition: GetStationName(int stationid) -> string name
Description:
Get the name of a station. If the provided stationid is invalid the function produces a lua error.
Arguments:

  • stationid stationid or nil for the current station


Returns:

  • name Long name of the current station if no argument is given, otherwise the sector name and coordinates of a station.


Example:

GetStationName(200*256+1) --returns "Sol II H-13" (200 is the sectorid for Sol II, H-13)
GetStationName() -- returns "SkyCommand" when in the station at Sol II, H-13


GetStationSellableInventoryInfoByID

Definition: GetStationSellableInventoryInfoByID() -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, string name, bool locallyproduced, neededlevels = {string l1 .. l5}, int itemid, string icon }
Description:
get sellable inventory info by id ...

GetStationSellableInventoryPriceByID

Definition: GetStationSellableInventoryPriceByID(int itemid, int quantity) -> int value, unitprice
Description:
Get value of inventory items and price per unit in the current station
Arguments:
itemid itemid of an inventory item in the current station
quantity number of units of this item (optional)
Returns:
value value of item(s)
unitprice price per unit
Example:

GetStationSellableInventoryPriceByID(1234, 2) -> 2000, 1400
-- Two units of item 1234 are worth 2000c. The station sells a unit for 1400c.


GetStationShipList

Definition: GetStationShipList(int itemid) -> {int itemid1 ..}
Description:
get array of your ships in the current station
Returns:
itemid? itemid of ship in the current station

GetStationTurretInfo

Definition: GetStationTurretInfo(int turretid) -> {int objectid, int nodeid, float armorpercent, int itemid}
Description:
get information about a stations or ships turrets
Arguments:
turretid' id of a turret
Returns:
objectid
nodeid
armorpercent armor level
itemid

GetStationType

Definition: GetStationType() -> string stype
Description:
get station type
Returns:
stype station type. returns "frigate" when docked to a cruiser otherwise nil

GetStorageItemInfo

Definition: GetStorageItemInfo() -> ??
Description:
no clue. can't make it return anything

GetStorageLocationSector

Definition: GetStorageLocationSector(int arg1) -> int ret1
Description:
returns some number when fed with an itemid

GetSurveyChoices

Definition: GetSurveyChoices() -> {}
Description:
returns an empty table!

GetSurveyQuestion

Definition: GetSurveyQuestion() -> string ret1
Description:
returns an empty string!
Returns:
ret1 an empty string!

GetSystemID

Definition: GetSystemID(int sectorid) -> int systemid
Description:
get systemid of the given sector. lua error on nil
Arguments:
sectorid sectorid
Returns:
systemid systemid

GetTargetDistance

Definition: GetTargetDistance() -> float dist
Description:
get distance to target
Returns:
dist distance to target in m

GetTargetFriendlyStatus

Definition: GetTargetFriendlyStatus() -> int fstatus
Description:
get friendlyness of target
Returns:
fstatus Returns 0 to 3. Target is friendly if 3, unfriendly otherwise

GetTargetInfo

Definition: GetTargetInfo() -> string name float health dist int factionid string guild ship
Description:
get info about target
Returns:
name
health health in percent
dist distance in m
factionid faction of target
guild guild tag of target
ship name of targets ship

GetTip

Definition: GetTip(int tipid) -> string tip
Description:
get loading screen with given index
Arguments:
tipid tip id (1-n)
Returns:
tip loading screen tip

GetTurretNamesByStationType

Definition: GetTurretNamesByStationType(string stype) -> {string tur1 ..}
Description:
get turret name of provided station type
Arguments:
stype station type
Returns:
tur1 turret name (2-n)(?)
Example:

GetTurretNameByStationType("frigate") -> {2 = "LeftAft", 3 = "Left Front", 4 = "Left Lower Fin" ..}


GetTutorialLevel

Definition: GetTutorialLevel() -> int num
Description:
return if the player has done the tutorial(?)
Returns:
num 0 if tutorial wasn'T done -1 if it was, I think ...

GetUserName

Definition: GetUserName() -> string Name
Description:
Returns the username.
Returns:
Name <test:username> or <dev:username> if you are on the test or dev server, otherwise <username>.

GiveMoney

Definition: GiveMoney(string char, int amount) -> nil
Description:
transfer money to a character
Arguments:
char name of a character within the sector
amount amount of money to transfer

HasActiveShip

Definition: HasActiveShip() -> bool aship
Description:
return true if the player has an active ship
Returns:
aship true if the player has an activer ship otherwise false

HasLastShipLoadout

Definition: HasLastShipLoadout() -> bool loadout
Description:
return true if the player has a last ship loadout saved. (see ClearLastShipLoadout)
Returns:
loadout true if the player has a last shiploadout saved otherwise false

HelpCharAccom

Description:
helpfunc

HelpCharFaction

Description:
helpfunc

HelpCharGuild

Description:
helpfunc

HelpCharInventory

Description:
helpfunc

HelpCharStats

Description:
helpfunc

HelpCommoditiesAction

Description:
helpfunc

HelpGridPower

Description:
helpfunc

HelpIgnore

Description:
helpfunc

HelpLargeAddonsAction

Description:
helpfunc

HelpOtherAddonsAction

Description:
helpfunc

HelpPDAAdvancementLog

Description:
helpfunc

HelpPDAJettison

Description:
helpfunc

HelpPDAKilledByList

Description:
helpfunc

HelpPDAKilledList

Description:
helpfunc

HelpPDAMissionLog

Description:
helpfunc

HelpPDAMissionNotes

Description:
helpfunc

HelpPDANearbyShips

Description:
helpfunc

HelpPDAPVPList

Description:
helpfunc

HelpPDAStationVisitsList

Description:
helpfunc

HelpSellAction

Description:
helpfunc

HelpSellAddons

Description:
helpfunc

HelpSellCommodities

Description:
helpfunc

HelpShipAmmo

Description:
helpfunc

HelpShipCargo

Description:
helpfunc

HelpShipEquip

Description:
helpfunc

HelpShipGroup

Description:
helpfunc

HelpShipPurchase

Description:
helpfunc

HelpShipSelect

Description:
helpfunc

HelpShipStatus

Description:
helpfunc

HelpSmallAddonsAction

Description:
helpfunc

HelpStationAddonEquip

Description:
helpfunc

HelpStationAddonGroups

Description:
helpfunc

HelpStationBuddies

Description:
helpfunc

HelpStationMission

Description:
helpfunc

HelpStationNav

Description:
helpfunc

HelpStationNews

Description:
helpfunc

HelpStationWelcome

Description:
helpfunc

HelpSystemNotes

Description:
helpfunc

HelpVoiceChat

Description:
helpfunc

HideAllDialogs

Definition: HideAllDialogs() -> nil
Description:
Hide all dialogs that were shown with ShowDialog or PopupDialog

HideDialog

Definition: HideDialog(userdata dialog) -> nil
Description:
Hide a dialog that was shown with ShowDialog or PopupDialog
Arguments:
dialog a currently shown dialog

HideTooltip

Definition: HideTooltip() -> nil
Description:
Hide ToolTip, the tooltip dialog

IsConnected

Definition: IsConnected() -> bool connected
Description:
return true if the player is connected to the game
Returns:
connected true if the player is connected otherwise false

IsEnemy

Definition: IsEnemy(charid) -> bool enemy
Description:
Part of the base radar functionality. Used in conjunction with GetFriendlyStatus.
Returns:
enemy returns true if someone is an enemy, otherwise false. Totally unreliable.

IsGroupMember

Definition: IsGroupMember(int charid) -> bool grmember
Description:
tell if the provided character is a group member
Arguments:
charid character id
Returns:
grmember true if character is a groupmember false if not or you aren't member of a group

IsGuildMember

Definition: IsGuildMember(int charid) -> bool guildmember
Description:
tell if the provided character is a guild member
Arguments:
charid character id
Returns:
gumember true if character is a guildmember false if not or you aren't member of a guild

IsInDuel

Definition: IsInDuel() -> bool duel
Description:
Returns true if the player is in a duel
Returns:
duel true if dueling

IsPlayerRequestingBuddy

Definition: IsPlayerRequestingBuddy(string name) -> bool req
Description:
Tell if the given player is requesting to become a buddy
Arguments:
name player name
Returns:
req true if player is requesting to become a buddy

IsPlayerRequestingDuel

Definition: IsPlayerRequestingDuel(string name) -> bool req
Description:
Tell if the given player is requesting a duel
Arguments:
name player name
Returns:
req true if player is requesting a duel

IsPlayerRequestingGroupInvite

Definition: IsPlayerRequestingGroupInvite(string name) -> bool req
Description:
Tell if the given player has sent a group invite
Arguments:
name player name
Returns:
req true if invited by player

IsProximityWarningEnabled

Definition: IsProximityWarningEnabled() -> bool isproxy
Description:
tell if proximity warning is enabled
Returns:
isproxy true if proximity warning is enabled otherwise false

IsStormPresent

Definition: IsStormPresent() -> bool isstorm
Description:
tell if there's a storm in the current sector
Returns:
isstorm true if storm is present otherwise false

IsTransactionInProgress

Definition: IsTransactionInProgress() -> bool trans
Description:
tell if a transaction is in progress (like selling a ship, items ..)
Returns:
trans true if transaction in progress

IsVoiceChatEnabled

Definition: IsVoiceChatEnabled() -> bool vc
Description:
tell if voice chat is enabled
Returns:
vc true if voice chat is enabled

JettisonAll

Definition: JettisonAll() -> nil
Description:
Jettison all of your ships cargo

JettisonMultiple

Definition: JettisonMultiple{item1 = {int id, int quantity} ..} -> nil
Description:
Jettison cargo items and quantitiss according to the provided table
Arguments:
item1 table containing quantity and itemid of cargo to jettison id itemid of cargo item quantity amount of this cargo to jettison
Example:

JettisonMultiple{{id=1234, quantity=2}, {id=1235, quantity=3}}

jettison 2 untis of the cargo with the itemid 1234 and 3 with the id 1235

JettisonSingle

Definition: JettisonSingle(int itemid, int quantity) -> nil
Description:
Jettison provided type and amount of cargo
Arguments:
itemid itemid of cargo item quantity amount of cargo to jettison
Example:

JettisonMultiple(1234, 2)

jettison 2 units of the cargo with the itemid 1234

JoinChannel

Definition: JoinChannel{channelid1 ..} -> nil
Description:
join the provided channels without leaving existing channels
Arguments:
channelid1 channel number (1 - 2^32) the last index is the active channel

LeaveChannel

Definition: LeaveChannel{channelid1 ..} -> nil
Description:
leave the provided channels
Arguments:
channelid1 channel number (1 - 2^32)

ListChannels

Definition: ListChannels() -> nil
Description:
print list of currently joined channels and usage info to the chatarea

LoadCargo

Definition: LoadCargo({{int itemid, int quantity} ..}, function cb) -> nil
Description:
Load cargo items and quantitiss according to the provided table
Arguments:
itemid itemid of cargo item
quantity amount of this cargo to load
cb optional function to call on success
Example:

LoadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}

load 2 units of the cargo with the itemid 1234 and 3 with the id 1235

LoadChannels

Definition: LoadChannels() -> nil
Description:
restore chat channels from config file(?)

LoadMissionNotes

Definition: LoadMissionNotes() -> string notes
Description:
read and return players notes from playernotes.txt. See also: Function_Index#SaveMissionNotes
Returns:
notes mission notes text

LoadNavpath

Definition: LoadNavpath(string navpath) -> {int sectorid1 ..}
Description:
load navroute by name and return array with hops
Returns:
sectorid1 sectorid of a hop on this navroute first index is first hop (1-n)

LoadShipPresets

Definition: LoadShipPresets() -> nil
Description:
read ship presets from config file and setup buyback dialog

LoadSystemNotes

Definition: LoadSystemNotes(int systemid) -> string notes
Description:
load system notes from settings/<charactername>/system<systemid>notes.txt
Arguments:
sectorid systemid
Returns:
notes string with system notes

LocationStr

Definition: LocationStr(int sectorid) -> string sname
Description:
translate a sectorid into a sector name. error if no argument provided
Arguments:
sectorid sectorid
Returns:
sname sector name
Example:

LocationStr(5000) -> "Sedina System, Sector H-9"


Login

Definition: Login(string username, string password) -> nil
Description:
Login to the game. crashes game when arguments are missing...
Arguments:
username vendetta account name
password password

Logout

Definition: Logout() -> nil
Description:
Inititate logout sequence.

MakeBotName

Definition: MakeBotName(string nameset, int seed) -> string name
Description:
Generate a name fromthe given nameset and optional random seed
Arguments:
nameset nameset from which to generate a name
seed optional random seed

Returns:
name a random name based on the nameset

MakeBuyBackQuestionDlg

Definition: MakeBuyBackQuestionDlg() -> userdata dialog
Description:
Create the buyback dialog
Returns:
dialog buyback dialog

NPlural

Definition: NPlural(string arg1, string arg2) -> string pstring
Description:
concaterates the two provided strings together and pluralizes the result
Arguments:
arg1 first substring
arg2 second substring

Returns:
pstring concaterated and pluralized string
Example:

NPlural("Serco", "Cookie") -> "Serco Cookies"


MakeBuyBackQuestionDlg

Definition: MakeBuyBackQuestionDlg() -> userdata dialog
Description:
Create the buyback dialog
Returns:
dialog buyback dialog

OnIdle

Definition: OnIdle(float delta) -> nil
Description:
Idle handler
Arguments:
delta seconds since last call(?)

OpenAlarm

Definition: OpenAlarm(string title, text, buttontext) -> nil
Description:
Show ConfirmationDialog with the given message
Arguments:
title title text
text body text
buttontext text on button

OverlapPrevention

Definition: OverlapPrevention(table ip) -> bool overlap
Description:
Adjust icon positions in a viewport so that they don't overlap
Arguments:
ip table with viewport dimensions and icon positions
ip.icon_positions table with icon_postions
ip.width width of viewport
ip.height height of viewport
Returns:
overlap true if icons overlapped

ParseXML

Definition: ParseXML(string xmlstring) -> {dom}
Description:
returns the provided string as a collection of substrings and nodes as subtables ..see example
Arguments:
xmlstring string containing xml tags
Returns:
dom table with xml nodes and substrings
Example:

ParseXML("a <xml>test</xml>woohoo<tag>subtext<bla>subsubtext</bla></tag>") -> 
{"a ", {"test", "xml"}, "woohoo", {"subtext", {"subsubtext", "bla" }, "tag"}}


PlayerInStation

Definition: PlayerInStation() -> bool instation
Description:
tell if the player is in a station or capship
Returns:
instation true if the player is in a station otherwise false

PlayerInventoryPairs

Definition: PlayerInventoryPairs() -> int itemid table iteminfo
Description:
Iterator function that returns information about an item in the players inventory each time it is called. works like pairs()
Returns:
itemid itemid
iteminfo inventory iteminfo
Example:

for i,v in PlayInventoryPairs() do console_print(i) printtable(v) end

prints the info of every item in the players inventory to the console

PopupDialog

Definition: PopupDialog(userdata dialog, int x, y) -> nil
Description:
Wrapper around iup.Popup that allows the dialog to be closed with HideDialog or HideAllDialogs
Arguments:
dialog dialog to show
x horizontal position
y vertical position

PrintJoinUsage

Definition: PrintJoinUsage() -> nil
Description:
prints how to use /join to the chatarea

PrintLeaveUsage

Definition: PrintLeaveUsage() -> nil
Description:
prints how to use /leave to the chatarea

PrintPurchaseTransaction

Definition: PrintPurchaseTransaction(string name, int quantity, totalvalue, totalcost) -> nil
Description:
Print a sale summery message to the chat log
Arguments:
name sold item
quantity number items sold
totalvalue value of items
totalcost price of items

Example:

-- prints "100x of Stuff sold for a total amount of 1000c (profit of 1c)" to the chat log
PrintPurchaseTransaction("Stuff", 100, 1000, 999)


PrintTransactionTable

Definition: PrintTransactionTable() -> nil
Description:
print pending transactions.
Returns:
{[x]={trackback="...(tail call): ?", wantcount=0, count=0}} for current transactions, otherwise returns nil.

ProcessEvent

Definition: ProcessEvent(string eventtype, data) -> nil
Description:
Processes various events. Trigger a with Function_Index#RegisterEvent defined event
Arguments:
eventtype eventtype
data varies depending on eventtype. Sometimes it's a table, sometimes it's a string.

PurchaseMerchandiseItem

Definition: PurchaseMerchandiseItem(int itemid, int amount, func callback) -> nil
Description:
buy the provided item
Arguments:
itemid itemid of cargo merch item
amount number of items to purchase
callback function that gets called when transaction is finished, callback is called with no arguments in case of success or with numeric errorcode in case of failure

PurchaseShipLoadout

Definition: PurchaseShipLoadout(func arg1) -> ??
Description:
no clue takes function as first argument

RegisterEvent

Definition: RegisterEvent(object eventhandler, string eventtype) -> nil
Description:
Hook up object to event. The object is a function or a table with a method called OnEvent or the name of the event. See Event Intro
Arguments:
eventhandler object to register with event
eventtype eventtype
Example:
see Event Intro

RegisterUserCommand

Definition: RegisterUserCommand(string commandname, func callback(dataarg, {arguments1, ..}), data) -> nil
Description:
hook up object to command
Arguments:
commandname string containing the command
callback function accepting two arguments to run when command is executed
dataarg see data
arguments1 arguments of the command (Note: if there are no arguments the table is nil not an empty table.)
data data to pass callback
Example:

-- function to call when the command is entered
local function printfunc(data, args)
  -- data contains the third parameter of RegisterUserCommand
  local str = tostring(data)
  -- if the command was entered without parameters args is nil otherwise a table containing the parameters
  if args then
    str = str..tostring(args[1])
  end
  print(str)
end
RegisterUserCommand("printsomething", printfunc, "test")

Registers the command "printsomething" that calls a function that prints the text "test" and the first argument appended

ReinitIconPositions

Definition: ReinitIconPositions(timer icontimer, int ship, userdata viewport, table iconlist, userdata iconcontainer, table ipcache) -> nil
Description:
Setup icons in a viewport
Arguments:
icontimer timer for overlap prevention animation
ship itemid of ship to use
viewport target viewport
iconlist table to portdata to portids
iconcontainer target box
ipcache table that maps icon_positions to ship types that acts as a cache

ReloadInterface

Definition: ReloadInterface() -> nil
Description:
Reloads everything related to the interface that isn't a texture. This means VO lua scripts as well as scripts in the /plugins directory.

RentStorage

Definition: RentStorage(int storage) -> nil
Description:
Rent storage space at the current station.
Arguments:
storage amount of space to rent. value is rounded up to a multiple of 10K

RepairShip

Definition: RepairShip() -> ??
Description:
not tested

ReplenishAll

Definition: ReplenishAll(int itemid, func cb) -> nil
Description:
replenish all weapons on provided ship
Arguments:
itemid itemid of ship
cb function to be called once the transaction is complete

ReplenishWeapon

Definition: ReplenishWeapon() -> ??
Description:
not tested

RequestCharacterStats

Definition: RequestCharacterStats() -> nil
Description:
no clue

RequestLaunch

Definition: RequestLaunch() -> bool ret
Description:
Launches from the station. Any issues preventing launch are reported via pop-up window. Otherwise, the player's ship undocks.
Returns:
ret always true (?)

RequestMissionDetails

Definition: RequestMissionDetails(int missionid) -> nil
Description:
Request information about the given mission (aka the info button) and pop up API_Index#MissionPromptDialog if id is valid
Arguments:
missionid mission id (1-n)

RequestMissionList

Definition: RequestMissionList() -> nil
Description:
no clue. maybe used by /updatestation

RequestNewsArticle

Definition: RequestNewsArticle(int newsindex) -> nil
Description:
ask server for news item(?)
fills API_Index#NewsDialog with given news item
Arguments:
newsindex index of news item, newest first

RequestNewsHeadlines

Definition: RequestNewsHeadlines() -> nil
Description:
ask server for news item list?

RequestTargetStats

Definition: RequestTargetStats() -> int charid
Description:
get character id of target (considreing the name maybe more?)
Returns:
charid character id of torgat or yours if no target selected

ResetTutorial

Definition: ResetTutorial() -> nil
Description:
Reset the tutorial flag. the player will have to go through it again after docking.

RunTutorial

Definition: RunTutorial() -> nil
Description:
launch tutorial

SaveChannels

Definition: SaveChannels() -> nil
Description:
Save joined channels(?). Kinda useless since trhat's done as soon as you join one

SaveMissionNotes

Definition: SaveMissionNotes(string notes) -> nil
Description:
Save the provided string to the characters mission notes file. See also: API Index#LoadMissionNotes
Arguments:
notes text to be saved in the notes file

SaveShipPresets

Definition: SaveShipPresets(int index) -> nil
Description:
Save ship preset(s) and recreate buyback dialog
Arguments:
index ship preset to save if omitted all presets are save

SaveSystemNotes

Definition: SaveSystemNotes(string notes, int systemid) -> nil
Description:
save system notes to settings/<charactername>/system<systemid>notes.txt
Arguments:
notes Notes to save. Normally a spickled version of an API Index#SystemNotes entry, but it accepts anything
sectorid systemid

SaveNavpath

Definition: SaveNavpath({int sectorid1 ..}, string name) -> nil
Description:
Save the provided navroute
Arguments:
sectorid1 sectorid of each hop
name name of this route
Example:

SaveNavpath({5000, 5001, 5002}, "sedina") -> nil

a route that hops around in sedina called "sedina"

SaveShipLoadout

Definition: SaveShipLoadout() -> ??
Description:
save shiploadout? after a ClearLastShipLoadout() this function causes the buy back dialog to pop up again but the ship won't be rebought.. maybe it needs a loadout as arg

SectorIDFromLocationStr

Definition: SectorIDFromLocationStr(string location) -> int sectorid
Description:
Convert a location string into a sectorid.
Arguments:
location location string. output of API_Index#ShortLocationStr
Returns:
sectorid sectorid
Example:

SectorIDFromLocationStr("Sedina H-9") -> 5000

SelectActiveShip

Definition: SelectActiveShip(int itemid) -> nil
Description:
Set the given ship active
Arguments:
itemid itemid of ship in the current station

SelectCharacter

Definition: SelectCharacter(int charslot) -> nil
Description:
Select characteri in given slot and enter the game with it (only "works" when you haven'T one selected yet)
Arguments:
charslot a character slot (1-5)

SellInventoryItem

Definition: SellInventoryItem(int itemid, int amount) -> nil
Description:
Sell the provided amount of an inventory item from the current station or ship when docked to a station
Arguments:
itemid itemid of an item at the current station
amount how many to sell
Example:

SendChat

Definition: SendChat(string msg, string dst, string dstparam) -> nil
Description:
Send a message to the provided destination.
Arguments:
msg the message
dst destination
known destinations:
"SAY" sector chat
"SECTOR" sector chat
"STATION" station chat
"PRIVATE" private chat. requires char parameter
"CHANNEL" chat chat
"SYSTEM" system chat
"GROUP" group chat
"GUILD" guild chat
"MISSION" mission chat. to activate reply buttons in the mission log send numbers. where 1 correspondends to the top most button
dstparam if dst = PRIVATE, the player to send the message, if dst = CHANNEL the channel to send the message (nil for current channel)
Example:

SendChat("Hi", "PRIVATE", "dude") -> nil

send the message "Hi" to player dude

SendMissionQuestionResponse

Definition: SendMissionQuestionResponse(int num) -> nil
Description:
called by the initial info dialog 1 = accept, 0 = decline
Arguments:
num 1 or 0

SetChatLogRead

Definition: SetChatLogRead() -> nil
Description:
Mark the general chat log as read/displayed

SetChatLogReceiver

Definition: SetChatLogReceiver(table chatcontainer) -> nil
Description:
Point the general chat log to a chat container
Example:
see ChatLogTemplate Example

SetCurrentChatTab

Definition: SetCurrentChatTab() -> ??
Description:
does nothing. maybe a leftover from the general/mission chat system

SetHomeStation

Definition: SetHomeStation() -> nil
Description:
set current station as your home station

SetMissionLogRead

Definition: SetMissionLogRead() -> nil
Description:
Mark the advancement log as read/displayed

SetMissionLogReceiver

Definition: SetMissionLogReceiver(table chatcontainer) -> nil
Description:
Point the advancement log to a chat container
Example:
see ChatLogTemplate Example

SetProximityWarningDistance

Definition: SetProximityWarningDistance(int dist) -> nil
Description:
set proximity warning distance ..
Arguments:
dist proximity distance

SetShipPurchaseColor

Definition: SetShipPurchaseColor(int color) -> nil
Description:
color of the next ship the player will buy
Arguments:
color color value (0-255)

SetStationLogRead

Definition: SetStationLogRead() -> nil
Description:
Mark the station log as read/displayed

SetStationLogReceiver

Definition: SetStationLogReceiver(table chatcontainer) -> nil
Description:
Point the station log to a chat container
Example:
see ChatLogTemplate Example

SetViewObject

Definition: SetViewObject(userdata modelview, string meshname, string meshfile, int color) -> nil
Description:
Change the ship in a modelview
Arguments:
modelview modelview to change
meshname mesh name of ship
meshfile filename of mesh
color colorid

SHA1

Definition: SHA1(string text) -> string hash
Description:
generate SHA1 hash of the given string
Arguments:
text text to hash
Returns:
hash hash of text
Example:

SHA1("hi there!") -> "a903cda4b5b93d3204af0fd6b7b92d24af1923a5"


ShortLocationStr

Definition: ShortLocationStr(int sectorid) -> string loc
Description:
string representing the provided sector
Arguments:
sectorid sectorid
Returns:
loc short sector description
Example:

ShortLocationStr(5000) -> "Sedina H-9"


ShouldTutorialRun

Definition: ShouldTutorialRun() -> bool tut
Description:
tell if the player has done the tutorial
Returns:
tut true if the player still has to do the tutorial otherwise false

ShowDialog

Definition: ShowDialog(userdata dialog, int x, y) -> nil
Description:
Wrapper around iup.Show that allows the dialog to be closed with HideDialog or HideAllDialogs
Arguments:
dialog dialog to show
x horizontal position (optional)
y vertical position (optional)

ShowTooltip

Definition: ShowTooltip(int x, y, string text) -> nil
Description:
Show the ToolTip the tooltip dialog with the given text
Arguments:
x horizontal position
y vertical position
text text in tooltip

SplitSectorID

Definition: SplitSectorID(int sectorid) -> int systemid sectorh sectorv
Description:
split up a sectorid into systemid and axis on the system grid
Arguments:
sectorid sectorid
Returns:
systemid
sectorh horizonatal axis
sectorv vertical axis
Example:

SplitSectorID(5000) -> 20 8 9

Sedina h9

SplitStationID

Definition: SplitStationID(int stationid) -> int systemidl sectorhv
Description:
split up a stationid into systemid -1 and sector in system. this may be totally wrong
Arguments:
stationid a stationid
Returns:
systemidl systemid - 1
secttorhv sector in system

StartSellInventoryItem

Definition: StartSellInventoryItem(int itemid, function cb) -> nil
Description:
Receive instant price updates for the given item.
Arguments:
itemid itemid of inventory item for which to receive instant price updates. Pass 0 to disable updates. cb function to call on success

StationPlayerAmmoPairs

Definition: StationPlayerAmmoPairs() -> int itemid table ammoinfo
Description:
Iterator function that prints information about ammo based weapons in the players inventory at the current station each time it is called. works like pairs()
Returns:
itemid itemid
iteminfo ammoinfo
Example:

for i,v in StationPlayerAmmoPairs() do console_print(i) printtable(v) end

prints the ammo info of every ammo based weapon at the current station

StationSellableInventoryPairs

Definition: StationSellableInventoryPairs() -> int itemid table iteminfo
Description:
Iterator function that prints information about an item in the players inventory at the current station each time it is called. works like pairs()
Returns:
itemid itemid
iteminfo iteminfo
Example:

for i,v in StationSellableInventoryPairs() do console_print(i) printtable(v) end

prints the item info of every inventory item at the current station to the console

StationSellItem

Definition: StationSellItem(userdata button, table item, int quantity, function cb) -> nil
Description:
Sell items with aconfirmation dialog
Arguments:
button button that clalled this function. it will be activated if sale failed
item iteminfo
quantity how many units to sell cb optional function to call when done. an error code is passed to it

StopTutorial

Definition: StopTutorial() -> nil
Description:
does nothing..

StrTable

Definition: StopTutorial() -> nil
Description:
seems to be another serialisation function. similar (the same?) to splickle

SubmitSurvey

Definition: SubmitSurvey() -> nil
Description:
does nothing..

SwapAddons

Definition: SwapAddons(int portid1 itemid1 porid1 itemid2 function cb) -> nil
Description:
Swap two addons equipped to the current ship (crashes client after undocking)
Arguments:
portid1 port of first item
itemid1 itemid of addon that is supposed to go into port with id portid1
portid2 port of second item
itemid2 itemid of addon that is supposed to go into port with id portid2
cb function to call on success
Example:
assuming 1234 is currently in port 3 and 1235 in port 2 this could be used to swap them

SwapAddons(2, 1234, 3, 1235)


TabCompleteName

Definition: TabCompleteName(string name) -> string completename
Description:
Attempts to fill out name with the best match the client has seen since startup. If TabCompleteName cannot find a match for name it returns nil, otherwise, completename will be a string containing the best match.
Arguments:
name name to be completed
Returns:
completename completed name

TutorialEnd

Definition: TutorialEnd() -> nil
Description:
finish up the tutorial

TutorialPart1

Definition: TutorialPart1() -> nil
Description:
Launch a tutorial segment

TutorialPart2

Definition: TutorialPart2() -> nil
Description:
Launch a tutorial segment

TutorialPart3

Definition: TutorialPart3() -> nil
Description:
Launch a tutorial segment

TutorialPart4

Definition: TutorialPart4() -> nil
Description:
Launch a tutorial segment

TutorialPart5

Definition: TutorialPart5() -> nil
Description:
Launch a tutorial segment

TutorialPart6

Definition: TutorialPart6() -> nil
Description:
Launch a tutorial segment

TutorialPart7

Definition: TutorialPart7() -> nil
Description:
Launch a tutorial segment

TutorialPart8

Definition: TutorialPart8() -> nil
Description:
Launch a tutorial segment

TutorialPart9

Definition: TutorialPart9() -> nil
Description:
Launch a tutorial segment

TutorialPart10

Definition: TutorialPart10() -> nil
Description:
Launch a tutorial segment

TutorialPart11

Definition: TutorialPart11() -> nil
Description:
Launch a tutorial segment

TutorialPart12

Definition: TutorialPart12() -> nil
Description:
Launch a tutorial segment

TutorialPart13

Definition: TutorialPart13() -> nil
Description:
Launch a tutorial segment

UnloadCargo

Definition: UnloadCargo({{int itemid, int quantity} ..}, function cb) -> nil
Description:
Unload cargo items and quantities according to the provided table
Arguments:
itemid itemid of cargo item
quantity amount of this cargo to unload
cb optional function to call on success
Example:

UnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}

unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235

UnloadSellCargo

Definition: UnloadSellCargo({{int itemid, int quantity} ..}, function cb) -> nil
Description:
Unload and sell cargo items and quantities according to the provided table
Arguments:
itemid itemid of cargo item
quantity amount of this cargo to unload and sell
cb optional function to call on success
Example:

UnloadSellCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}

unload and sell 2 units of the cargo with the itemid 1234 and 3 with the id 1235

UnregisterEvent

Definition: UnregisterEvent(object, string eventtype) -> nil
Description:
Unregister an object registered with RegisterEvent
Arguments:
eventhandler object to unregister
eventtype eventtype

UnregisterUserCommand

Definition: UnregisterUserCommand(string command) -> nil
Description:
Unregister a command registered with RegisterUserCommand
Arguments:
command command to unregister

UnrentStorage

Definition: UnrentStorage(int storage) -> nil
Description:
Unrent storage space at the current station.
Arguments:
storage amount of space to unrent. value is rounded down to multiple of 10K

UpdateFade

Definition: UpdateFade(float delta) -> nil
Description:
Do a fade step on controls registered with FadeControl
Arguments:
delta time since last update

XMLTagToString

Definition: XMLTagToString() -> nil
Description:
might the reverse of ParseXML

_ERRORMESSAGE

Definition: _ERRORMESSAGE(string msg) -> nil
Description:
creates an error message with the provided string. probably more
Arguments:
msg a message

assert

Definition:
Description:
[1]

bbhash

Definition: bbhash(string input, int arg2) -> string hash
Description:
Seems to be some kind of hash function
Arguments:
input string from which to generate hash
arg2 initializer(?)
Returns:
hash generated hash

calc_health_color

Definition: calc_health_color(float health, int alpha, mode) -> string color
Description:
Create an iup color string corresponding to the given health
Arguments:
health health (0-100)
alpha optional alpha value (0-255)
mode optional premultiply mode "*" or "&"
Returns:
color iup color string. format: "RRR GGG BBB AAA M"

chatareatemplate

Definition: chatareatemplate(string statontabname, bool expanded) -> table container
Description:
create old style chatarea that combines general, mission and station log. the container seems to be incompatible with the chatareatemplate2 based maximized chat containers which breaks the maximize button
Arguments:
stationtabnaem "Station", "ShipCom" or nil. determines which maximized chat container to show on clicking the maximize button and whether to show the station log
expanded create a maximized chat container
Returns:
container chat container
container.area the chat area box
container.chatlog ChatLogTemplate for the general chat
container.missionlog ChatLogTemplate for the mission log
container.stationlog optional ChatLogTemplate for the station log
container.setup setup the chatarea

chatareatemplate2

Definition: chatareatemplate2(bool maximized) -> userdata box
Description:
create a chatarea control. wrapper around ChatLogTemplate
Arguments:
maximized create maximized control
Returns:
box chataretemplate2

clear_accomlistbox

Definition: clear_accomlistbox(userdata control, table itemlist) -> int selection
Description:
Clear an accomplishment list control. See: AccomplishmentTemplate
Arguments:
control accomplishment list to clear
itemlist list of accomplishment list items. return value of fill_accomlistbox
Returns:
selection index of selected item

clear_listbox

Definition: clear_listbox(userdata control, table itemlist) -> int selection
Description:
Clear a list control
Arguments:
control list to clear
itemlist list of list items. return value of fill_listbox
Returns:
selection index of selected item

clearscene

Definition: clearscene() -> nil
Description:
removes al objects from the game world

create_char_guild_tab

Definition:
create_char_guild_tab(bool sub) -> userdata box
Description:
Create guild tab
Arguments:
sub create as a sub tab
Returns:
box CharGuildTab

create_char_inventory_tab

Definition:
create_char_guild_tab(bool expand_local_branches, show_prices, showsellbutton) -> userdata box, tree
Description:
Create inventory tab
Arguments:
expand_local_branches expand the "Local Inventory" branch by default
show_prices show item prices while docked to station
showsellbutton show a sell button. the sell button is inactive unless show_pricess is set
Returns:
box CharInventoryTab
tree the tree control in the tab

create_jettison_tab

Definition:
create_jettison_tab() -> userdata box
Returns:
box PDAInventoryJettisonTab

create_ship_group_template

Definition:
create_ship_group_template(table iconlist, bool sub) -> userdata box
Description:
Create weapon groups tab
Arguments:
iconlist list of portdata
sub create as a sub tab
Returns:
box GroupsTab

collectgarbage

Definition:
Description:
[2]

comma_value

Definition: comma_value(float number) -> string formatted_number
Description:
returns a formatted version of the provided number according to API_Index#SI_unit
Arguments:
number: unformatted number
Returns:
formatted_number formatted number
Example:
assuming SI_unit is 3:

comma_value(1000.00) -> "1,000.00"


console_clear

Definition: console_clear() -> nil
Description:
clear console on the next API_Index#ReloadInterface

console_print

Definition: console_print(string text) -> nil
Description:
print the given string to the ingame console
Arguments:
text string to print

debugprint

Definition: debugprint() -> ??
Description:
does nothing..

declare

Definition: declare(string name, value) -> nil
Description:
declare a variable and assign a value
Arguments:
name name of the variable
value it's value. can be any type

deviceByMode

Definition: deviceByMode(table arg1, mode) -> table ret
Description:
not sure. possibly to find audio devices by capability

dofile

Definition:
Description:
[3]

error

Definition:
Description:
[4]

factioncontroltemplate3

Definition: factioncontroltemplate3(userdata frame, function cb, float font) -> userdata container
Description:
Create a fancy progressbar/faction standing indicator
Arguments:
frame iup frame to use for progressbar
cb optional function to call on click
font optional font size. see Font
Returns:
container factioncontroltemplate3

factionfriendlyness

Definition: factionfriendlyness(int standing) -> string name
Description:
get string that represents the given faction standing
Arguments:
standing standing (0-65535)
Returns:
name standing as string
Example:

factionfriendlyness(1000) -> "Hate"


factionfriendlynesscolor

Definition: factionfriendlynesscolor(int standing) -> string color
Description:
get iup color that represents that given faction standing
Arguments:
standing standing (0-65535)
Returns:
color iup color string
Example:

factionfriendlynesscolor(1000) -> "195 3 0"


factionfriendlynessrange

Definition: factionfriendlynessrange(int standing) -> float range
Description:
get progress within the current faction standing level
Arguments:
standing standing (0-65535)
Returns:
float progress within faction standing level
Example:

-- a standing of 7000 is about halfway into "Hate"
factionfriendlynessrange(7000) -> 0.534...


fill_accomlistbox

Definition: fill_accomlistbox(userdata control, table itemlist, function setup_cb, click_cb) -> table dialoglist
Description:
fill an accomplishement listbox with accomlistsubdialogs according to given values. normally called from AccomplishmentTemplate2
Arguments:
control iup list to fill
itemlist itemlist
setup_cb function called for each item in itemlist. see: setup_cb
click_cb function to after clicking on an item
Returns:
dialoglist list of accomlistsubdialog
Example:
see: Example

fill_listbox

Definition: fill_listbox(userdata control, table itemlist, int curselindex, function setup_cb, bool show_quantity, show_price) -> table dialoglist
Description:
fill a listbox with listsubdialogs according to given values
Arguments:
control iup list to fill
itemlist list of iteminfo
curselindex index of current selection setup_cb function called for each item in itemlist. see: setup_cb
click_cb function to after clicking on an item
show_quantity show item quantity in list
show_price show item price in list
Returns:
dialoglist list of listsubdialog
Example:
see: Example

fillModesDropdown

Definition: fillModesDropdown() -> ?
Description:
no clue. fill some kind of drop down menu(?)

filter_colorcodes

Definition: filter_colorcodes(string in) -> string out
Description:
strips colorcodes from the provided string
Arguments:
in inputstring
Returns:
out outputstring

format_time

Definition: format_time(int msecs) -> string tstring
Description:
get string representation of the provided time
Arguments:
msecs time in microseconds
Returns:
tstring time string
Example:

format_time(60001) -> "01:00.001"


generalprint

Definition:
generalprint(string str) -> nil
Description:
print given string to the chat area via CHAT_MSG_PRINT event. Results is printed in the active channel text color.
Arguments:
str string to print

get_itemdlg

Definition:
get_itemdlg(bool showquantity, showprice) -> table dialog
Description:
Get a new listsubdialog or recycle one from the cache
Arguments:
showquantity show quantity in dialog
showprice show price
Returns:
dialog listsubdialog

get_jettisonitemdlg

Definition:
get_jettisonitemdlg(int itemid) -> userdata dialog
Description:
Get a new jettisonlistsubdialog or recycle one from the cache
Arguments:
itemid itemid of item to show in dialog
Returns:
dialog jettisonlistsubdialog

getheight

Definition:
getheight(userdata control) -> int height
Description:
Get height of an iup control
Arguments:
control iup control
Returns:
height height of control

getwidth

Definition:
getwidth(userdata control) -> int width
Description:
Get width of an iup control
Arguments:
control iup control
Returns:
width width of control

guildaccessdialogtemplate

Definition:
guildaccessdialogtemplate() -> userdata dialog
Description:
create guild access dialog
Returns:
''dialog guild access dialog

guildactivitylogdialogtemplate

Definition:
guildactivitylogdialogtemplate() -> userdata dialog
Description:
create guild activity dialog
Returns:
dialog guildactivitydialog

guildbanklogdialogtemplate

Definition:
guildbanklogdialogtemplate() -> userdata dialog
Description:
create guild bank dialog
Returns:
dialog guildactivitydialog

hextorgb

Definition: hextorgb(string hexcolors) -> string deccolors
Description:
Convert hexadecimal formated color string into a decimal one used by iup
Arguments:
hexcolors hexadecimal color string
Returns:
deccolors decimal color string
Example:

hextorgb("ff00ff") -> "255 0 255"


ipairs

Definition:
Description:
[5]

listpromptdlgtemplate

Definition:
listpromptdlgtemplate(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons, a title and a listbox
Arguments:
msg message to display in the dialog
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog listpromptdlgtemplate

load

Definition:
Description:
[6]

loadfile

Definition:
Description:
[7]

loadscene

Definition: loadscene(string scene) -> ??
Description:
load a scene(?). don't know how it works though
Arguments:
scene filename of a scene

loadstring

Definition:
Description:
[8]

log_chat

Definition:
log_chat(string str) -> nil
Description:
Writes current time and given string to the errors.log
Arguments:
str string to write to log

log_print

Definition: log_print(string str) -> nil
Description:
Writes string to the errors.log
Arguments:
str string to write to log

msgdlgtemplate1

Definition:
msgdlgtemplate1(string msg, buttontext, function button_cb, string size, posx, posy, bgcolor) -> userdata dialog
Description:
Create fullscreen dialog with button and message
Arguments:
msg dialog message
buttontext text on button
button_cb function called on button click
size iup size string
posx iup size string
posy iup size string
bgcolor iup color string
Returns:
dialog msgdlgtemplate1

msgdlgtemplate1a

Definition:
msgdlgtemplate1a(string msg, size, posx, posy, userdata control, string bgcolor) -> userdata dialog
Description:
Create a dialog and optionally disable input to the background except to the given control. Note: if a control is given display the dialog with :show_all() if not use ShowDialog or :show()
Arguments:
msg dialog message
size iup size of dialog
posx iup horizontal position
posy iup vertical position
control control to unmask
bgcolor iup background color
Returns:
dialog message dialog
Example:
Note: The dialogs in both examples can't be closed without some extra work

-- with unmasked control
-- run from station menu
local d = msgdlgtemplate1aNext("bla", "200x200", 10, 10, StationLaunchButton)
d:show_all()
-- without unmasked control
local d = msgdlgtemplate1aNext("bla", "200x200", 10, 10)
ShowDialog(d)


msgdlgtemplate1aDone

Definition:
msgdlgtemplate1aDone(function button_cb, string msg, size, posx, posy, userdata control, string bgcolor) -> userdata dialog
Description:
Same as msgdlgtemplate1a but with a "Close" button
Arguments:
nutton_cb function called on clicking "Close"
msg dialog message
size iup size of dialog
posx iup horizontal position
posy iup vertical position
control control to unmask
bgcolor iup background color
Returns:
dialog message dialog
Example:

local d
local function button_cb()
	HideDialog(d)
end
-- with unmasked control
d = msgdlgtemplate1aDone(button_cb, "bla", "200x200", 10, 10, StationLaunchButton)
d:show_all()
-- without unmasked control
-- local d = msgdlgtemplate1aNext("bla", "200x200", 10, 10)
-- ShowDialog(d)


msgdlgtemplate1aNext

Definition:
msgdlgtemplate1aNext(function button_cb, string msg, size, posx, posy, userdata control, string bgcolor) -> userdata dialog
Description:
Same as msgdlgtemplate1a but with a "Next" button
Arguments:
nutton_cb function called on clicking "Next"
msg dialog message
size iup size of dialog
posx iup horizontal position
posy iup vertical position
control control to unmask
bgcolor iup background color
Returns:
dialog message dialog
Example:
see msgdlgtemplate1aDone

msgdlgtemplate2

Definition:
msgdlgtemplate2(string msg, ltitle, function lcb, string rtitle, function rcb, string bgcolor, alignment) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons and a message
Arguments:
msg message to display in the dialog
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
bgcolor iup color of background
alignment iup alignment of msg
Returns:
dialog msgdlgtemplate2

msgdlgtemplate2withcheck

Definition:
msgdlgtemplate2withcheck(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons, a checkbox and a message
Arguments:
msg message to display in the dialog
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog msgdlgtemplate2withcheck

msgpromptdlgtemplate2

Definition:
msgpromptdlgtemplate2(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons, an entry field and a message
Arguments:
msg message to display in the dialog
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog msgpromptdlgtemplate2

msgpromptdlgtemplate2

Definition:
msgpromptdlgtemplate2(string msg, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons, an entry field and a message
Arguments:
msg message to display in the dialog
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog msgpromptdlgtemplate2

msgpromptdlgtemplate2lines

Definition:
msgpromptdlgtemplate2lines(string msg, msg2, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons, two entry fields and two messages
Arguments:
msg message to display in the dialog
msg2 second message
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog msgpromptdlgtemplate2lines

multidlgtemplate1

Definition:
multidlgtemplate1(string msg, msg2, buttontitle, function cb) -> userdata dialog
Description:
Create a fullscreen dialog with a button and two messages (one in a multiline control)
Arguments:
msg message to display in the dialog
msg2 second message. shown in a multiline control
buttontitle right button title
cb right button callback
Returns:
dialog multidlgtemplate1

multidlgtemplate2

Definition:
multidlgtemplate2(string msg, msg2, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons and two messages (one in a multiline control)
Arguments:
msg message to display in the dialog
msg2 second message. shown in a multiline control
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog multidlgtemplate2

multilistdlgtemplate

Definition:
multilistdlgtemplate(string msg, msg2, table tbl, ltitle, function lcb, string rtitle, function rcb) -> userdata dialog
Description:
Create a fullscreen dialog with two buttons, a dialog title, a dropdown menu, a title for the dropdown menu and a listbox
Arguments:
msg dialog title
msg2 listbox title
tbl unused
ltitle left button title
lcb left button callback
rtitle right button title
rcb right button callback
Returns:
dialog multilistdlgtemplate

navmenu_template

Definition: navmenu_template(bool showjumpbutton, function close_cb, bool issubsub) -> userdata container, distancetext, jumpbutton, zoombutton, undolastbutton
Description:
Create a control with a navmenu description box and some control buttons Arguments:
showjumpbutton show the jump button if true
close_cb function to call after clicking the jump button while the player is able to jump
issubsub create a sub sub tab
Returns:
container navmenu_template
distancetext distance label
' jumpbutton jump button or nil
zoombutton zoom button
undolastbutton undo button

next

Definition:
Description:
[9]

oper

Definition:
Description:
not gonna bother

pairs

Definition:
Description:
[10]

pcall

Definition:
Description:
[11]

print

Definition:
print(string str) -> nil
Description:
print given string to the chat area
Arguments:
str string to print

printtable

Definition: printtable{in} -> nil
Description:
print contents of a table to the console
Arguments:
in table to print

purchaseprint

Definition:
purchaseprint(string str) -> nil
Description:
print given string to the chat area via CHAT_MSG_CONFIRMATION event. Results in white text by default. Same as when buying or selling things.
Arguments:
str string to print

rawequal

Definition:
Description:
[12]

rawget

Definition:
Description:
[13]

rawset

Definition:
Description:
[14]

require

Definition:
Description:
[15]

rgbtohex

Definition:
rgbtohex(string deccolor) -> string hexcolor
Description:
Returns string containing escaped hexadecimal version of the in decimal given color
Arguments:
deccolor string with color in decimal format (format: "r g b")
Returns:
hexcolor string starting with ascii code 127 followed by the color in hexadecimal format. (format: '\127RRGGBB') on failure it returns your input value
Example:
The following prints "hi!" in red to the chat area. The by rgbtohex() returned string is the equivalent of "\127ff0000"

print(rgbtohex("255 0 0").."hi!")


roper

Definition:
Description:
not gonna bother

sectorprint

Definition:
sectorprint(string str) -> nil
Description:
print given string to the chat area via CHAT_MSG_SERVER_SECTOR event. Results in white text by default.
Arguments:
str string to print

select

Definition:
Description:
[16]

setup_accomrow

Definition:
setup_accomrow(int index, table itemlist, userdata subdlg, function click_cb) -> int newindex
Description:
Initializes a list item in an accomplishment list. (used as setup_cb argument of fill_accomlistbox)
Arguments:
index position within itemlist
itemlist see itemlist
subdialog an itemlist dialog
click_cb function called after clicking on subdialog
Returns:
newindex position within itemlist + items consumed

singletab_template

Definition:
singletab_template(string title, userdata contents) -> userdata tab
Description:
Wrap a control into a tab like frame
Arguments:
title tab title
contents iup control

Returns:
tab tabbified control

sort_commodities

Definition:
sort_commodities(table a, b) -> bool order
Description:
Sort function for iteminfo tables. See table.sort in the lua reference
Arguments:
a iteminfo
b iteminfo
Returns:
order sort order

sort_sellable_commodities

Definition:
sort_sellable_commodities(table a, b) -> bool order
Description:
Sort function for iteminfo tables that prioritizes items in the active ship. See table.sort in the lua reference

Arguments:
a iteminfo
b iteminfo
Returns:
order sort order

spickle

Definition: spickle(table intab) -> string
Description:
Converts a table into a string roughly of the format "value","value",{"tablevalue","tablevalue";tablekey="value"};key="value",key="value"
Arguments:
intab input table
Returns:
The spickled string
Example:
Given table blah with index 1 and 3 containing strings, index 2 containing an empty table, key "apple" containing the string "orange", and key fulltable containing a table with two ints and a string

spickle(blah) returns "string1",{},"string2";apple="orange",fulltable={3,4,"string3"}


storagelocationcompare

Definition:
storagelocationcompare(int a, b) -> bool order
Description:
Sort function for locationid values. See table.sort in the lua reference
Arguments:
a locationid
b locationid
Returns:
order sort order

store_itemdlg

Definition:
store_itemdlg(userdata dlg) -> nil
Description:
Store a reference to an itemlist subdialog in the item dialog cache
Arguments:
dlg itemlist sub dialog

store_jettisonitemdlg

Definition:
store_jettisonitemdlg(userdata dlg) -> nil
Description:
Store a reference to an jettisonlist subdialog in the jettison dialog cache
Arguments:
dlg jettisonlist sub dialog

strip_whitespace

Definition: strip_whitespace(string in) -> string out
Description:
strip whitespace from beginning and end of string
Arguments:
int input string
Returns:
out output string

substitute_vars

Definition: substitute_vars(string in) -> string out
Description:
replace variables like %target% in input with their corresponding value
Arguments:
int input string
Returns:
out output string

tabcomplete

Definition:
Description:
produces lua error..
Example:

testsurvey

Definition:
testsurvey() -> nil
Description:
Test function for the survey feature

tonumber

Definition:
Description:
[17]
Example:

tostring

Definition:
Description:
[18]
Example:

type

Definition:
Description:
[19]

unpack

Definition:
Description:
[20]
Example:

undeclare

Definition: undeclare(string name) -> nil
Description:
undeclare a variable created with Function_Index#declare
Arguments:
name name of a variable

unspickle

Definition: unspickle(string in) -> table outtab
Description:
Converts a spickled string into a table
Arguments:
in input string
Returns:
outtab The unspickled table

xpcall

Definition:
Description:
[21]

Tables

Bitlib

Description:
functions to manipulate the bitwise operations


Details:
Bitlib

Buddy

Description:
functions to manipulate the characters buddylist


Details:
Buddy


CapShipLog

Description:
table with parts of a cap ship chat area.

Details:
CapShipLog


Duel

Description:
Duel related methods


Details:
Duel


FactionColor

Description:
table with faction colors. indices represent factionid

Details:
FactionColor


FactionColor_RGB

Description:
table that maps factionid's to colors in RGB format

Details:
FactionColor_RGB


FactionMonitor

Description:
table with monitoring types. indices represent numeric monitoring types and values, string representations of that type

Details:
FactionMontor


FactionMonitorStr

Description:
table with monitoring types. values represent numeric monitoring types and indices, string representations of that type

Details:
FactionMontorStr


FactionName

Description:
Array with short names of the ingame faction


Details:
FactionName


FactionNameFull

Description:
Array with long names of the ingame faction


Details:
FactionNameFull


FactionStanding

Description:
table for mapping names of standing levels to it#s int value


Details:
FactionStanding


Font

Description:
table that maps font names to sizes


Details:
Font


Font1

Description:
table that maps font names to sizes


Details:
Font1


Font2

Description:
table that maps font names to sizes


Details:
Font2


Game

Description:
functions to control a few game features ..


Details:
Game


GeneralChatPanel

Description:
table with parts of a chat area. seems to point to PDA or HUD chat panel depending on what is visible(?)

Details:
GeneralChatPanel


Group

Description:
Group related functions


Details:
Group


Guild

Description:
Guild related functions


Details:
Guild


HUD

Description:
table with HUD all hud releted functions and parts


Details:
HUD


Ignore

Description:
Ignorelist related functions


Details:
Ignore


InterfaceManager

Description:
table with event handler for some interface related events and function initialize the interface


Details:
InterfaceManager


InvManager

Description:
functions to get information about inventory items


Details:
InvManager


ListColors

Description:
colors for list widgets


Details:
ListColors


Mentor

Description:
Mentor related functions


Details:
Mentor


MissionLogPanel

Description:
table with parts of the mission log

Details:
MissionLogPanel


NavRoute

Description:
functions to manipulate your NavRoute


Details:
NavRoute


ShipOrder

Description:
table containing the ordering of ships in lists(?)


Details:
ShipOrder


ShipPalette

Description:
array that maps palette color values to rgb values


Details:

ShipPalette


ShipPalette_strings

Description:
array that maps palette color values to string representations of rgb values


Details:
ShipPalette_string


ShipPresets

Description:
array with properties of ship presets


Details:
ShipPresets


Skills

Description:
table to translate skillid's into skill names and back


Details:
Skills


StationLog

Description:
table with parts of a stations chat area.

Details:
StationLog


StationLogPanel

Description:
table with parts of a chat area.


Details:
StationLogPanel


SystemNames

Description:
Table to translate systemid's into system names and back


Details:
SystemNames

SystemNotes

Description:
System Notes public table. Used for adding notes to the navmap.


Details:
SystemNotes

TagFuncs

Description:
Text markup callbacks(?)


Details:
TagFuncs

TCPSocket

Description:
socket class


Details:
TCPSocket


Thread

Description:
Thread library


Details:
Thread


Timer

Description:
Timer class


Details:
Timer


VoiceChat

Description:
voice chat related functions


Details:
VoiceChat


Vote

Description:
functions to use the voting feature


Details:
Vote


_generalchatlog

Description:
array with log with chatlog

Details:
_generalchatlog


_missionlog

Description:
array with mission log

Details:
_missionlog


_stationlog

Description:
array with log of visisted stations

Details:
_stationlog


accomthing

Description:
no clue

Details:
accomthing


chatinfo

Description:
table with display options for each chat event


Details:
chatinfo


chatreceiver

Description:
event handler for chat events


Details:
chatreceiver


command_pretty_names

Description:
table that maps commands to their descriptions


Details:
command_pretty_names


coroutine

Description:
coroutine class


Details:
coroutine


debug

Description:
debugging helpers


Details:
debug


gkini

Description:
functions to manipulate the games config file


Details:
gkini


gkinterface

Description:
interface related functions..


Details:
gkinterface


gkmisc

Description:
misc functions ..


Details:
gkmisc


gknet

Description:
network related functions


Details:
gknet


gksound

Description:
audio related functions


Details:
gksound


gvector

Description:
gvector class. to create and manipulate vectors


Details:
gvector


ignore_time

Description:
array with with ignored name and period entries


Details:
ignore_time


iup

Description:
functions realted to iup. create and manipulate ui elements


Details:
iup


joystick

Description:
functions to change joystick settings


Details:
joystick


math3d

Description:
functions to do some vector math


Details:
math3d


math

Description:
standard math library


Details:
math


os

Description:
functions to interface with the operating system


Details:
os


quaternion

Description:
quaternion class. to create and manipulate quats


Details:
quaternion


preset_buttons

Description:
table with preset button controls


Details:
preset_buttons

radar

Description:
functions to query and set radar parameters


Details:
radar


string

Description:
string manipulation functions


Details:
string


table

Description:
the standard table library


Details:
table

Variables

CLASSTYPE_ADDON

Description
constant with inventory item class of addons
Value
2


CLASSTYPE_FLAG

Description
constant with inventory item class of flags(?)
Value
3


CLASSTYPE_GENERIC

Description
constant with inventory item class of generic items
Value
0


CLASSTYPE_MISSION

Description
constant with inventory item class of missions
Value
5


CLASSTYPE_SHIP

Description
constant with inventory item class of ships
Value
1


CLASSTYPE_STORAGE

Description
constant with inventory item class of storage containers (station hold)
value
4

ColorChatInput

Description
Boolean that controls coloring


DEFAULT_LICENSE_WATCH

Description
license to display in the HUD if not set by player
Value
2

FlashIntensity

Description
Alpha value of the Bloodflash
Value
1

FontScale

Description
font scaling
Value
1


HUD_SCALE

Description
HUD scaling. set via rHUDxscale cvar. 1 means 640. the higher the resolution the lower the value
Value
1


IMAGE_DIR

Description
subdirectory in the game directory where to look for images (skin option in config.ini)


MAX_ACCOMICON_COLUMNS

Description
number of ribbons per column to show in the char info screen(?)
Value
5


MAX_ACCOMICON2_COLUMNS

Description
number of ribbons per column to show in pda accomplishments tab(?)
Value
4


MAX_ACCOMICONS

Description
number of ribbons to show in char info(?)
Value
20


Platform

Description
Constant with string representing the platform the game is running on
Value
"Unix", "MacOS" or "Windows"


SI_unit

Description
Number format
Value
1: unformatted
2: space as thousands separator, comma as decimal separator
3: comma as thousands separator, point as decimal separator

SensorSort

Description
Current sort order of nearby ship list
Value
1: Name
2: Faction
3: Ship
4: Distance

ShowLogoffDialog

Description
Show logoff confirmation dialog if true


ShowSetHomeDialog

Description
Show homing confirmation dialog if true


SortItems

Description
Sort order for lists
Value
1: Name
2: Price
3: Group>Name>Price
4: Group>Price>Name



VO_VERSION

Description
constant with the games major version.
Value
3


_VERSION

Description
lua version.
Value
"Lua 5.1"


defaulttutorialbgcolor

Description
color of the not highlighted parts while the tutorial is active(?)
Value "0 0 0 64 *"


lcd

Description
functions for the Logitech G-series keyboard screens

tabseltextcolor

Description
color of unselected tab
Value "1 241 255"


tabunseltextcolor

Description
text color of unselected tab
Value "0 185 199"


Userdata

Mostly UI componoents

AskForgivenessDialog

Description
the forgive dialog. see QuestionDialog


Big3DViewDialog

Description
dialog that is shown after clicking on the maximize button in the "Ship"->"Buy->"Buy Ship" tab. created with CreateBig3DViewMenu

Details:
Big3DViewDialog


BuybackQuestionPrompt

Description
dialog that is shown when arriving at the home station after dieing


CancelLoadoutPurchaseDialog

Description
"Purchasing ..." dialog that is shown while buying a preset. created with CreateCancelLoadoutMenu

Details:
MessageDialog

CapShipChatArea

Description
vbox with contents the cap ship interface chat area (entry, log, radios ...)


CapShipChatTab

Description
vbox with contents of the "Commerce"->"Ship Com" tab


StationCurrentLocationInfo

Description
label in the top right corner of the cap ship interface with the current system and sector name


StationDialog

Description
the base dialog of the cap ship interface


CapShipFactionInfo

Description
vbox in the cap ship interface with faction information. contains API_Index#CapShipNameLabel and API_Index#CapShipNameInfo. created with CreateCapShipFactionInfo

Details:
CapShipFactionInfo


CapShipFactionLabel

Description
label in the cap ship interface with the name of the faction that owns the current cap ship ("a ... ship")


CapShipLaunchButton

Description
button in the cap ship interface that launches the ship


CapShipNameLabel

Description
label in the cap ship interface with the name of the current cap ship (top right)


CapShipOptionsButton

Description
button in the cap ship interface that opens the options dialog


CapShipPDACharacterTab

Description
hbox with contents of the PDAs "Your PDA"->"Character"->"Statistics" tab


CapShipPDACharacterTab

Description
frame with contents of the PDAs "Your PDA"->"Character" tab


CapShipPDACommTab

Description
frame with contents of the PDAs "Your PDA"->"Comm" tab


CapShipPDAInventoryInventoryTab

Description
hbox with contents of the PDAs "Your PDA"->"Inventory"->"Inventory" tab


CapShipPDAInventoryJettisonTab

Description
vbox with contents of the PDAs "Your PDA"->"Inventory"->"Cargo" tab


CapShipPDAInventoryTab

Description
frame with contents of the PDAs "Your PDA"->"Inventory" tab


CapShipPDAMissionAdvancementTab

Description
hbox with contents of the PDAs "Your PDA"->"Missions"->"Advancement Logs" tab


CapShipPDAMissionBoardTab

Description
frame with contents of the PDAs "Your PDA"->"Missions"->"Mission Board" tab


CapShipPDAMissionBoardTabInfoButton

Description
button in the cap ship interface "Your PDA"->"Missions"->"Mission Board" tab to request mission info


CapShipPDAMissionLogTab

Description
hbox with contents of the cap ship interface "Your PDA"->"Missions"->"Mission Logs" tab


CapShipPDAMissionNotesTab

Description
vbox with contents of the cap ship interface "Your PDA"->"Missions"->"Mission Notes" tab


CapShipPDAMissionsTab

Description
frame with contents of the cap ship interface "Your PDA"->"Missions" tab


CapShipPDASensorNearbyTab

Description
vbox with contents of the cap ship interface "Your PDA"->"Sensor Log"->"Nearby Ships" tab


CapShipPDASensorTab

Description
frame with contents of the cap ship interface "Your PDA"->"Sensor Log" tab


CapShipPDAShipNavigationTab

Description
hbox with contents of the cap ship interface "Your PDA"->"Navigation"->"Navigation" tab


CapShipPDAShipTab

Description
frame with contents of the cap ship interface "Your PDA"->"Navigation" tab


CapShipRepairTab

Description
frame with contents of the cap ship interface "Tactical"->"Repair/Refill" tab. created with CreateCapShipRepairTab

Details:
CapShipRepairTab


CapShipSecondaryInfo

Description
label with character info (Money, Ship, Licenses ...) displayed in the bottom right of the cap ship interface


CapShipTabPDA

Description
box with contents of the cap ship interface "Your PDA" tab. created with CreateCapShipPDATab

Details:
CapShipTabPDA


CapShipTabs

Description
vbox with contents of the cap ship interface tabs


CapShipTacticalTab

Description
frame with contents of the cap ship interface "Tactical" tab. created with CreateCapShipTacticalTab

Details:
CapShipTacticalTab


CapShipTurretTab

Description
frame with contents of the cap ship interface "Tactical"->"Turrets" tab. created with CreateCapShipTurretTab

Details:
CapShipTurretTab


CharCreateDialog

Description
the character creation dialog


CharCreateFailedDialog

Description
error dialog that is shown the character creation failed. created with CreateCharCreateFailedMenu

Details:
MessageDialog


CharDeleteVerifierConfirmButton

Description
continue button in API_Index#CharDeleteVerifierDialog


CharDeleteVerifierDialog

Description
the verification dialog that shown by the "Delete Character" button


CharDeleteVerifierEditbox

Description
entry in API_Index#CharDeleteVerifierDialog


CharInfoDialog

Description
the character info dialog. opened with k in space.


CharSelectDialog

Description
the character selection dialog.


CharSelectFailedDialog

Description
error dialog with title "Character selection failed". created with CreateCharSelectFailedMenu

Details:
MessageDialog


ChatColorOptionsDialog

Description
dialog opened via "Options"->"Interface"->"Chat Color Settings"


ConfirmationDialog

Description
dialog with an ok button. no clue where it's used


ConnectingDialog

Description
"Connecting..." dialog shown during login. created with CreateConnectingMenu

Details:
MessageDialog


CreditsDialog

Description
dialog with credits. opened with the credits button at the log in prompt


EULADialog

Description
dialog that with the Eula shown at login


HUDHelpMenu

Description
dialog with common keybindings. opened with the F1 key while in space


HUDInterfaceOptionsDialog

Description
dialog with the HUD options, opened with the "HUD Settings" buttons in the Interface options dialog


InterfaceOptionsDialog

Description
dialog with the interface options


InvalidAmountDialog

Description
error dialog with the text "Invalud Amount". no idea where it's used


LoadingDialog

Description
dialog with the loading screen that is shown during sector load


LoginHelpDialog

Description
dialog with help text that is shown by the "Help" button in the login screen


LowGridPowerDialog

Description
error dialog that is shown when trying to connect an that requires more grid power than the ship can provide


MaximizedCapShipChat

Description
dialog with the maximized cap ship chat


MaximizedSpaceChat

Description
dialog with the maximized space chat


MaximizedStationChat

Description
dialog with the maximized station chat


MissionAbortDialog

Description
dialog to confirm abortion of missions


MissionPromptDialog

Description
dialog with mission description and buttons to accept or decline


NewsDialog

Description
dialog showing a news article


NotEnoughStorageDialog

Description
error dialog that pops when trying to put more than the storage limit into a station


NotificationDialog

Description
A borderless iup dialog with a message. It's displayed during non interruptible processes, like launching.

Details:
NotificationDialog

OptionsDialog

Description
the Options dialog


PDACharacterAccomTab

Description
hbox with contents of the PDAs "Your PDA"->"Character"->"Accomplishments" tab


PDACharacterFactionTab

Description
hbox with contents of the PDAs "Your PDA"->"Character"->"Faction Standings" tab


PDACharacterStatsTab

Description
hbox with contents of the PDAs "Your PDA"->"Character"->"Statistics" tab


PDACharacterTab

Description
frame with contents of the PDAs "Your PDA"->"Character" tab


PDAChatArea

Description
vbox with contents a the PDA chat area (entry, log, radios ...)


PDACloseButton

Description
button to close the PDA


PDACommTab

Description
frame with contents of the PDAs "Your PDA"->"Comm" tab


PDACurrentLocationInfo

Description
label in the top right corner of the PDA with the current system and sector name


PDADialog

Description
the base dialog of the PDA


PDAInventoryInventoryTab

Description
hbox with contents of the PDAs "Your PDA"->"Inventory"->"Inventory" tab


PDAInventoryJettisonTab

Description
vbox with contents of the PDAs "Your PDA"->"Inventory"->"Cargo" tab


PDAInventoryTab

Description
frame with contents of the PDAs "Your PDA"->"Inventory" tab


PDAMissionAdvancementTab

Description
hbox with contents of the PDAs "Your PDA"->"Missions"->"Advancement Logs" tab


PDAMissionBoardTab

Description
frame with contents of the PDAs "Your PDA"->"Missions"->"Mission Board" tab


PDAMissionBoardTabInfoButton

Description
button in the PDAs "Your PDA"->"Missions"->"Mission Board" tab to request mission info


PDAMissionLogTab

Description
hbox with contents of the PDAs "Your PDA"->"Missions"->"Mission Logs" tab


PDAMissionNotesTab

Description
vbox with contents of the PDAs "Your PDA"->"Missions"->"Mission Notes" tab


PDAMissionsTab

Description
frame with contents of the PDAs "Your PDA"->"Missions" tab


PDASecondaryInfo

Description
label with character info (Money, Ship, Licenses ...) displayed in the bottom right of the PDA


PDASensorNearbyTab

Description
vbox with contents of the PDAs "Your PDA"->"Sensor Log"->"Nearby Ships" tab


PDASensorTab

Description
frame with contents of the PDAs "Your PDA"->"Sensor Log" tab


PDAShipNavigationTab

Description
hbox with contents of the PDAs "Your PDA"->"Navigation"->"Navigation" tab


PDAShipTab

Description
frame with contents of the PDAs "Your PDA"->"Navigation" tab


PDATab1

Description
not sure


PDATabs

Description
vbox with contents of the PDAs "Your PDA" tab


PDATargetInfo

Description
vbox with contents of the target info in the top right of the PDA (name, health, faction ...)


QuestionDialog

Description
A dialog with two buttons and a message


Details:
QuestionDialog


QuestionWithCheckDialog

Description
A dialog with two buttons, check box and a message

SellItemDialog

Description
dialog that pops up after clicking on the "Sell Selected" button

StationChatArea

Description
vbox with contents a stations chat area (entry, log, radios ...)


StationChatTab

Description
vbox with contents of the "Commerce"->"The Bar" tab


StationCommerceCommoditiesTab

Description
vbox with contents of the "Commerce"->"Commodities" tab


StationCommerceTab

Description
frame with contents of the "Commerce" tab


StationCommerceWelcomeTab

Description
vbox with contents of the "Commerce"->"Welcome" tab


StationCommoditiesBuyTab

Description
frame with contents of the "Commerce"->"Commodities"->"Buy" tab


StationCommoditiesLoadTab

Description
vbox with contents of the "Commerce"->"Load/Unload" tab


StationCommoditiesSellTab

Description
vbox with contents of the "Commerce"->"Commodities"->"Sell" tab


StationCurrentLocationInfo

Description
label in the top right corner of the station dialog with the current system and sector name


StationDialog

Description
the base dialog of the station interface


StationEquipmentBuyLargeTab

Description
frame with contents of the "Ship"->"Buy"->"Large" tab


StationEquipmentBuyOtherPurchaseButton

Description
"Purchase Selected" button in the "Ship"->"Buy"->"Other" tab


StationEquipmentBuyOtherTab

Description
frame with contents of the "Ship"->"Buy"->"Other" tab


StationEquipmentBuyShipPurchaseButton

Description
"Purchase Selected" button in the "Ship"->"Buy"->"Buy Ship" tab


StationEquipmentBuyShipTab

Description
frame with contents of the "Ship"->"Buy"->"Buy Ship" tab


StationEquipmentBuySmallPurchaseButton

Description
"Purchase Selected" button in the "Ship"->"Buy"->"Small Addons" tab


StationEquipmentBuySmallTab

Description
frame with contents of the "Ship"->"Buy"->"Small Addons" tab


StationEquipmentBuyTab

Description
frame with contents of the "Ship"->"Buy" tab


StationEquipmentManagePortConfigTab

Description
hbox with contents of the "Ship"->"Manage"->"Configure Ship" tab


StationEquipmentManageShipSelectionTab

Description
frame with contents of the "Ship"->"Manage"->"Select Ship" tab


StationEquipmentManageTab

Description
frame with contents of the "Ship"->"Manage" tab


StationEquipmentSellTab

Description
frame with contents of the "Ship"->"Sell" tab


StationEquipmentTab

Description
frame with contents of the "Ship" tab


StationFactionInfo

Description
vbox in the station window with faction information. contains API_Index#StationNameLabel and API_Index#StationNameInfo. created with CreateStationFactionInfo

Details:
StationFactionInfo


StationFactionLabel

Description
label in the station window with the name of the faction that owns the current station ("a ... station")


StationHelpDialog

Description
dialog shown via help buttons that contains a help text


StationHomeButton

Description
button in the station window that sets the current station as home station


StationLaunchButton

Description
button in the station window that launches the ship


StationNameLabel

Description
label in the station window with the name of the current station (top right)


StationOptionsButton

Description
button in the station window that opens the options dialog


StationPDACharacterStatsTab

Description
hbox with contents of the "Your PDA"->"Character"->"Statistics" tab


StationPDACharacterTab

Description
frame with contents of the "Your PDA"->"Character" tab


StationPDACommTab

Description
frame with contents of the "Your PDA"->"Comm" tab


StationPDAInventoryInventoryTab

Description
hbox with contents of the "Your PDA"->"Inventory"->"Inventory" tab


StationPDAInventoryJettisonTab

Description
vbox with contents of the "Your PDA"->"Inventory"->"Cargo" tab


StationPDAInventoryTab

Description
frame with contents of the "Your PDA"->"Inventory" tab


StationPDAMissionAdvancementTab

Description
hbox with contents of the "Your PDA"->"Missions"->"Advancement Logs" tab


StationPDAMissionBoardTab

Description
frame with contents of the "Your PDA"->"Missions"->"Mission Board" tab


StationPDAMissionBoardTabInfoButton

Description
info button displayed in the "Your PDA"->"Missions"->"Mission Board" tab


StationPDAMissionLogTab

Description
hbox with contents of the "Your PDA"->"Missions"->"Mission Logs" tab


StationPDAMissionNotesTab

Description
vbox with contents of the "Your PDA"->"Missions"->"Mission Notes" tab


StationPDAMissionsTab

Description
frame with contents of the "Your PDA"->"Missions" tab


StationPDASensorNearbyTab

Description
vbox with contents of the "Your PDA"->"Sensor Log"->"Nearby Ships" tab


StationPDASensorTab

Description
frame with contents of the "Your PDA"->"Sensor Log" tab


StationPDAShipNavigationTab

Description
hbox with contents of the "Your PDA"->"Navigation"->"Navigation" tab


StationPDAShipTab

Description
frame with contents of the "Your PDA"->"Navigation" tab


StationSecondaryInfo

Description
label with character info (Money, Ship, Licenses ...) displayed in the bottom right of the station interface


StationTabPDA

Description
frame with contents of the "You PDA" tab


StationTabs

Description
vbox housing the main station tabs ("Commerce", "Ship" and "You PDA")


StorageRentalDialog

Description
dialog for renting station storage


SurveyDialog

Description
A survey dialog. probably unused


ToolTip

Description
dialog with the current/last tooltip


VoiceChatOptions

Description
dialog with voice chat options


shipcargolabel

Description
label in the "Load/Unload" tab with number of cu and mass of cargo on the ship


sandbox

ColorName: true
Show3000mNavpoint: true
ShowBarUpdateNotification: false
ShowGroupKillNotification: true
ShowLowGridPowerDialog: true
ShowTooltips: true
UseFontScaling: false