API Index: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
merge
Undo revision 388 by Chefkoch (Talk)
Line 2,729: Line 2,729:
'''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><br>
=== LoadSystemNotes ===
'''Definition:'''
LoadSystemNotes(int systemid) -> string notes
<br><br>
'''Description:'''<br>
load system notes from settings/<charactername>/system<systemid>notes.txt
<br><br>
'''Arguments:'''<br>
'''sectorid''' [[systemid]]
<br><br>
'''Returns:'''<br>
'''notes''' string with system notes
<br><br>


=== LocationStr ===
=== LocationStr ===
Line 3,117: Line 3,101:
'''notes''' text to be saved in the notes file
'''notes''' text to be saved in the notes file
<br><br>
<br><br>
=== SaveSystemNotes ===
'''Definition:'''
SaveSystemNotes(string notes, int systemid) -> nil
<br><br>
'''Description:'''<br>
save system notes to settings/<charactername>/system<systemid>notes.txt
<br><br>
'''Arguments:'''<br>
'''notes''' notes to save<br>
'''sectorid''' [[systemid]]
<br><br>


=== SaveNavpath ===
=== SaveNavpath ===
Line 5,685: Line 5,655:
'''Description'''<br>
'''Description'''<br>
dialog with voice chat options<br>
dialog with voice chat options<br>
=== accombox ===
'''Description'''<br>
A list<br>





Revision as of 01:44, 8 July 2008

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



Functions

AbbrLocationStr

Definition:
AbbrLocationStr(int sectorid) -> string name

Description:
Get abbreviated sector name for sectorid

Arguments:
sectorid sectorid

Returns:
name shortened sector name

Example:
<source lang="lua">AbbrLocationStr(5000) -> "Sed H9"</source>


AbortMission

Definition:
AbortMission() -> nil

Description:
Abort the currently running mission.

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:
<source lang="lua">Article("apple") -> "an apple"</source>


CanUseAddon

Definition:
CanUseAddon(string itemid) -> bool ret1 {string l1 ..}

Description:
check if the player can equip the addon itemid

Arguments:
itemid itemid of addon to check

Returns:
ret1 true or false depending on equipability
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)

Example:
<source lang="lua">CanUseAddon(12345) -> true {1, 2, 2, 2, 2}</source>

CanUseMerchandise

Definition:

Description:


CancelPurchaseShipLoadout

Definition:

Description:


CheckCharProximity

Definition:

Description:


CheckProximityWarning

Definition:

Description:


ClearGeneralChatLog

Definition:

Description:
doesn't seem to do anything ...

ClearLastShipLoadout

Definition:
ClearLastShipLoadout() -> nil

Description:
clear last shiploadout. prevents client from asking to rebuy ship after destruction

ClearMissionChatLog

Definition:

Description:
does nothing..

ClearProximityCache

Definition:

Description:
I guess it clears the proximity cache?

ClearStationChatLog

Definition:

Description:
does nothing...

ConfigureMultipleWeaponGroups

Definition: ConfigureMultipleWeaponGroups{table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}

Description:
configures weapon groups according to given tables

Arguments:
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 ..

Example:
ConfigureMultipleWeaponGroups


ConfigureWeaponGroup

Definition:

Description:


ConnectAddon

Definition:
ConnectAddon(int portid, int itemid) -> 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

Returns:
canconnect returns true if the player is docked and has an active ship otherwise nil

Example:
<source lang="lua">ConnectAddon(2, 123) -> true</source>
put the addon 123 into port 2 while the player is docked to a station


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

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:
<source lang="lua">DisconnectAddon(123) -> true</source> 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


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:
<source lang="lua">FindAndReplaceTags("hi this is a <br> linebreak", {br="\n"})
-> "hi this is a
linebreak"</source>


FindAndReplaceTagsCB

Definition:

Description:


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:
<source lang="lua">ForEachBuddy(function (name, isonline, pos) print(name .." "..tostring(isonline).." "..tostring(pos)) end)</source>
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:
<source lang="lua">ForEachPlayer(function (id) print(id) end)</source>
prints a list with all players in the sector

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:
<source lang="lua"> GeneratePlayerDiedMessage("foo", "bar", 0) -> "bar destroyed foo" GeneratePlayerDiedMessage("foo", "foo", 0) -> "foo is having issues" </source>



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:
<source lang="lua">GetAccomplishmentLevels(9) -> 34 50</source>
assuming 9 is buskills this player has 34 kills of the 50 required

GetAccomplishmentType

Definition:
GetAccomplishmentType(int accomindex) -> int accomplishmenttype int accomplishmentlevel

Description:
returns some numbers..

Arguments:
accomindex index of the accomplishment

Returns:
accomplishmenttype type of accomplishment
accomplishmentlevel what level the accomplishment is, starting at 1.


Example:
<source lang="lua">local accomtype, accomlevel = GetAccomplishmentType(accomindex)
local description = GetAccomplishmentDescription(accomtype, accomlevel)</source>

GetActiveChatChannel

Definition:
GetActiveChatChannel() -> int channel

Description:
returns the active channel

Returns:
channel active chat channel

Example:
<source lang="lua">GetActiveChatChannel() -> 1</source>
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:
<source lang="lua">GetActiveMissionInfo(1) -> "awesome mission" {1={"awesome mission question" 2={0="button" 1="awesome button text" action=1}}} 1234</source>
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:
GetActiveChatChannel() -> 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:
<source lang="lua">GetActiveShipEnergy() -> 150.0 0.5</source>
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:
<source lang="lua">GetActiveShipHealth() -> 500 10 10 0 0 0 520 10000</source>
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:
<source lang="lua">GetActiveShipGridPowerAndUsage() -> 20 12</source>
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:
<source lang="lua">GetActiveShipItemIDAtPort(1) -> 1234</source>
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:
<source lang="lua">GetActiveShipMAss() -> 15.0000</source>
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:
<source lang="lua">GetActiveShipNumAddonPorts() -> 4</source> 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:
<source lang="lua">GetActiveShipPortIDOfItem(1234) -> 3</source>

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:
<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


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:
<source lang="lua">GetActiveShipSelectedWeaponGroupIDs() -> 0 6 12</source> 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:
<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


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


GetBuddyInfo

Definition:
GetBuddyInfo() -> ???

Description:
not figured out yet


GetCharacterDescription

Definition:
GetCharacterDescription() -> string desc

Description:
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.

Arguments:
???

Returns:
desc your character description text whne no argument is provided


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:
<source lang="lua">GetCharacterInfo(1) -> "Dude" "Corvus" 10000 10 100 4444 4444 1 1 1 0 0
</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

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


GetCurrentChatTab

Definition:

Description:
no idea maybe unused. always returns 2 here

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


GetFullPath

Definition:

Description:
sounds obvious but it isn't


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:
<source lang="lua"> for i=1,GetNumGuildMembers()do

 local id, rank, name = GetGuildMemberInfo(i)
 print("guild member: "..name)

end</source>

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:
<source lang="lua">local charid,rank,charname = GetGuildMemberInfoByCharID(GetCharacterID())</source>

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:
<source lang="lua">ShortLocationStr(SplitStationID(GetInventoryItemLocation(1234))) -> "Dau L-10"</source>
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:
<source lang="lua">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"</source>

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:
<source lang="lua">GetInventoryItemMass(1234) -> 4.000</source>
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


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


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 accomplishmeants for given character(?). not well tested, may require caching of the char info

Arguments:
charid character id (?)

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</source>

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:
<source lang="lua"> for i = 1, GetNumStationDesiredItems(), 1 do

   print("This station wants: "..GetStationDesiredItem(i))

done </source>

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) -> int standing

Description:
get your standing with provided faction

Arguments:
factionid number representing a faction

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: <source lang="lua">print( GetPlayerFactionStanding(1) ) -> "32768"</source> 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>

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


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


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:
<source lang="lua">GetShipMeshInfo(1234) -> "ship_generic_behemoth" "gaf/ship_generic_behemoth.dfs" 166</source>

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


GetStationLocation

Definition: GetStationLocation() -> int stationid

Description:
get the stationid of the current station

Returns:
stationid stationid or nil if not docked to a station



GetStationMaxCargo

Definition: GetStationMaxCargo() -> int cargo

Description:
return amount of cargo this station can hold.

Returns:
cargo amount of cargo in cu


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:
<source lang="lua"> for item = 1, GetNumStationMerch() do

   local haveitem = GetStationMerchInfo(item);
   console_print("Station has item: ".. haveitem.name);

end </source>

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:
<source lang="lua"> 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 </source>

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 ...


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:
<source lang="lua">GetTurretNameByStationType("frigate") -> {2 = "LeftAft", 3 = "Left Front", 4 = "Left Lower Fin" ..}</source>


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:
Displays the username.

Returns:
Returns <test:username> if you are on the test 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

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(charid) -> bool

Description:
Returns true if charid is in a duel, otherwise false.

IsPlayerRequestingBuddy

Definition: IsPlayerRequestingBuddy(?) -> ?

Description:
not tried. sounds obvious though

IsPlayerRequestingDuel

Definition: IsPlayerRequestingDuel(?) -> ?

Description:
not tried. sounds obvious though


IsPlayerRequestingGroupInvite

Definition: IsPlayerRequestingGroupInvite(?) -> ?

Description:
not tried. sounds obvious though


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:
<source lang="lua">JettisonMultiple{{id=1234, quantity=2}, {id=1235, quantity=3}}</source>
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:
<source lang="lua">JettisonMultiple(1234, 2)</source>
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{item1 = {int itemid, int quantity} ..} -> nil

Description:
Load cargo items and quantitiss according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo itemid itemid of cargo item quantity amount of this cargo to load

Example:
<source lang="lua">LoadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source>
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)

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:
<source lang="lua">LocationStr(5000) -> "Sedina System, Sector H-9"</source>

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 arg1, int arg2) -> string bname

Description:
no clue. returns the string that's passed to it and requires an int as second argument

Arguments:
arg1: ?
arg2: random seed


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:
<source lang="lua">NPlural("Serco", "Cookie") -> "Serco Cookies"</source>


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:
<source lang="lua">ParseXML("a <xml>test</xml>woohoo<tag>subtext<bla>subsubtext</bla></tag>") -> {"a ", {"test", "xml"}, "woohoo", {"subtext", {"subsubtext", "bla" }, "tag"}}</source>

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:
<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

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


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) -> nil

Description:
buy the provided item

Arguments:
itemid itemid of cargo merch item


PurchaseShipLoadout

Definition: PurchaseShipLoadout(func arg1) -> ??

Description:
no clue takes function as first argument



RegisterEvent

Definition: RegisterEvent({func OnEvent}, string eventtype) -> nil

Description:
hook up object to event. the obect is a table with a method called OnEvent that is called when the event is triggered

Arguments:
OnEvent function to call when event is triggered
eventtype eventtype

Example:
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>

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:
<source lang="lua">RegisterUserCommand("printsomething", function(data, args) print(data..tostring(args or {})[1]) end, "test")</source>
Registers the command "printsomething" that calls a function that prints the text "test" and the first argument appended


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.

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

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:
<source lang="lua">SaveNavpath({5000, 5001, 5002}, "sedina") -> nil</source>
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

Example:


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:
<source lang="lua">SectorIDFromLocationStr("Sedina H-9") -> 5000</source>

SelectActiveShip

Definition: SelectActiveShip(int itemid) -> nil

Description:
Set the given ship active

Arguments:
itemid itemid of ship in the current station

Example:


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:
<source lang="lua">SendChat("Hi", "PRIVATE", "dude") -> nil</source>
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


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

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)


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:
<source lang="lua">SHA1("hi there!") -> "a903cda4b5b93d3204af0fd6b7b92d24af1923a5"</source>


ShortLocationStr

Definition: ShortLocationStr(int sectorid) -> string loc

Description:
string representing the provided sector

Arguments:
sectorid sectorid

Returns:
loc short sector description

Example:
<source lang="lua">ShortLocationStr(5000) -> "Sedina H-9"</source>


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




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:
<source lang="lua">SplitSectorID(5000) -> 20 8 9</source>
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

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:
<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


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:
<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


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
<source lang="lua">SwapAddons(2, 1234, 3, 1235)</source>


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

TutorialPart1ß

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{item1 = {int itemid, int quantity} ..} -> nil

Description:
Unload cargo items and quantities according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo
itemid itemid of cargo item
quantity amount of this cargo to unload

Example:
<source lang="lua">UnloadCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source>
unload 2 units of the cargo with the itemid 1234 and 3 with the id 1235

UnloadSellCargo

Definition: UnloadSellCargo{item1 = {int itemid, int quantity} ..} -> nil

Description:
Unload and sell cargo items and quantities according to the provided table

Arguments:
item1 table containing quantity and itemid of cargo itemid itemid of cargo item quantity amount of this cargo to unload and sell

Example:
<source lang="lua">UnloadSellCargo{{itemid=1234, quantity=2}, {itemid=1235, quantity=3}}</source>
unload and sell 2 units of the cargo with the itemid 1234 and 3 with the id 1235



UnregisterEvent

Definition: UnregisterEvent({func OnEvent}, string eventtype) -> nil

Description:
Unregister an event registered with Function_Index#RegisterEvent

Arguments:
OnEvent function to run when event is triggered
eventtype eventtype

UnregisterUserCommand

Definition: UnregisterUserCommand(string command) -> nil

Description:
Unregister a command registered with RegisterUserCommand

Arguments:
command command to unregister

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(?)

Arguments:
hash generated hash



clearscene

Definition: clearscene() -> nil

Description:
removes al objects from the game world


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: <source lang="lua">comma_value(1000.00) -> "1,000.00"</source>


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


error

Definition:

Description:
[3]


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:
<source lang="lua">format_time(60001) -> "01:00.001" </source>


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


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:
<source lang="lua">hextorgb("ff00ff") -> "255 0 255"</source>


ipairs

Definition:

Description:
[4]


load

Definition:

Description:
[5]


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:
[6]


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


next

Definition:

Description:
[7]


oper

Definition:

Description:
not gonna bother


pairs

Definition:

Description:
[8]


pcall

Definition:

Description:
[9]


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:
[10]


rawget

Definition:

Description:
[11]


rawset

Definition:

Description:
[12]


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"
<source lang="lua">print(rgbtohex("255 0 0").."hi!")</source>

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:
[13]


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
<source lang="lua">spickle(blah) returns "string1",{},"string2";apple="orange",fulltable={3,4,"string3"}</source>


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:


tonumber

Definition:

Description:
[14]

Example:


tostring

Definition:

Description:
[15]

Example:


type

Definition:

Description:
[16]


unpack

Definition:

Description:
[17]

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:
[18]

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. points to API_Index#StationLogPanel or API_Index#CapShipLogPanel depending on what is currently visible


Details:
StationLogPanel


SystemNames

Description:
Table to translate systemid's into system names and back. Note that the "ID to name" translation returns names with capital letters, but the "name to ID" translation only works with all lower-case names.

Example <source lang="lua"> print(SystemNames[4079]) -- Prints the name of the system with ID 4079, "Pelatus" print(SystemNames["pelatus"]) -- Prints 4079 print(SystemNames["Pelatus"]) -- Prints "nil" (note the capital P) </source>


Details:
SystemNames

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


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


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


UserName

Description
currently active account name
Now GetUseName()

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
no clue


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

Big3DViewDialog

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


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


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


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


CapShipSecondaryInfo

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


CapShipTabPDA

Description
framehbox with contents of the cap ship interface "Your PDA" tab


CapShipTabs

Description
vbox with contents of the cap ship interface tabs


CapShipTacticalTab

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


CapShipTurretTab

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


CharCreateDialog

Description
the character creation dialog


CharCreateFailedDialog

Description
error dialog that is shown the character creation failed


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"


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


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


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

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")


SurveyDialog

Description
A survey dialog. probably unused


ToolTip

Description
dialog with the current/last tooltip


VoiceChatOptions

Description
dialog with voice chat options


accombox

Description
A list


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
AccomplishmentTemplate: function
AccomplishmentTemplate2: function
ChatLogTemplate: function
CreateBig3DViewMenu: function
CreateCancelLoadoutMenu: function
CreateCapShipChatTab: function
CreateCapShipFactionInfo: function
CreateCapShipPDATab: function
CreateCapShipRepairTab: function
CreateCapShipTacticalTab: function
CreateCapShipTurretTab: function
CreateCharCreateFailedMenu: function
CreateCharCreateMenu: function
CreateCharSelectFailedMenu: function
CreateCharSelectMenu: function
CreateCharacterPDATab: function
CreateCommPDATab: function
CreateConnectingMenu: function
CreateCreditsDialog: function
CreateEULAMenu: function
CreateInvalidAmountMenu: function
CreateInventoryPDATab: function
CreateKilledByPDATab: function
CreateKilledPDATab: function
CreateLoadingMenu: function
CreateLoginDialog: function
CreateLoginHelpDialog: function
CreateLowGridPowerDialog: function
CreateMissionAbortMenu: function
CreateMissionPromptMenu: function
CreateMissionsPDATab: function
CreateNavigationPDATab: function
CreateNearbyShipsPDATab: function
CreateNewsMenu: function
CreateNotEnoughStorageMenu: function
CreateNotificationMenu: function
CreateOptionsMenu: function
CreatePDA: function
CreatePDATab1: function
CreatePVPTab: function
CreateSensorPDATab: function
CreateShipCargoPDATab: function
CreateShipPDATab: function
CreateStation: function
CreateStationBlankTab: function
CreateStationChatTab: function
CreateStationCommerceTab: function
CreateStationCommoditiesBuyTab: function
CreateStationCommoditiesLoadTab: function
CreateStationCommoditiesSellTab: function
CreateStationCommoditiesTab: function
CreateStationEquipmentBuyTab: function
CreateStationEquipmentManageTab: function
CreateStationEquipmentSellTab: function
CreateStationEquipmentTab: function
CreateStationFactionInfo: function
CreateStationHelpMenu: function
CreateStationMissionBuyTab: function
CreateStationPDATab: function
CreateStationPortConfigTab: function
CreateStationShipPurchaseTab: function
CreateStationShipSelectionTab: function
CreateStationShipStatusTab: function
CreateStationVisitsPDATab: function
CreateStationWelcomeTab: function
CreateSurveyMenu: function
CreateTargetInfo: function
CreateVoiceChatOptions: function
FactionStandingTemplate: function
FactionStandingWithInfoTemplate: function
FadeControl: function
FadeLookup: function
FadeStop: function
FillInObjectInfo: function
FillInPlayerInfo: function
GetAccomplishmentBigSize: function
GetAccomplishmentBigTexture: function
GetAccomplishmentBigUV: function
GetAccomplishmentCategory: function
GetAccomplishmentDescription: function
GetAccomplishmentName: function
GetAccomplishmentSize: function
GetAccomplishmentTexture: function
GetAccomplishmentTitle: function
GetAccomplishmentUV: function
GetCargoValue: function
GetChatLogReadState: function
GetFriendlyStatus: function
GetItemFullDesc: function
GetItemPartialDesc: function
GetMissionLogReadState: function
GetProfitColor: function
GetProfitHexColor: function
GetShipAmmoPrices: function
GetStationLogReadState: function
HelpCharAccom: function
HelpCharFaction: function
HelpCharGuild: function
HelpCharInventory: function
HelpCharStats: function
HelpCommoditiesAction: function
HelpGridPower: function
HelpIgnore: function
HelpLargeAddonsAction: function
HelpOtherAddonsAction: function
HelpPDAAdvancementLog: function
HelpPDAJettison: function
HelpPDAKilledByList: function
HelpPDAKilledList: function
HelpPDAMissionLog: function
HelpPDAMissionNotes: function
HelpPDANearbyShips: function
HelpPDAPVPList: function
HelpPDAStationVisitsList: function
HelpSellAction: function
HelpSellAddons: function
HelpSellCommodities: function
HelpShipAmmo: function
HelpShipCargo: function
HelpShipEquip: function
HelpShipGroup: function
HelpShipPurchase: function
HelpShipSelect: function
HelpShipStatus: function
HelpSmallAddonsAction: function
HelpStationAddonEquip: function
HelpStationAddonGroups: function
HelpStationBuddies: function
HelpStationMission: function
HelpStationNav: function
HelpStationNews: function
HelpStationWelcome: function
HelpVoiceChat: function
HideAllDialogs: function
HideDialog: function
HideTooltip: function
LoadShipPresets: function
MakeBuyBackQuestionDlg: function
OnIdle: function
OpenAlarm: function
OverlapPrevention: function
PopupDialog: function
PrintPurchaseTransaction: function
ReinitIconPositions: function
SaveShipPresets: function
SetChatLogRead: function
SetChatLogReceiver: function
SetMissionLogRead: function
SetMissionLogReceiver: function
SetStationLogRead: function
SetStationLogReceiver: function
SetViewObject: function
ShowDialog: function
ShowTooltip: function
StationSellItem: function
UpdateFade: function
calc_health_color: function
chatareatemplate: function
chatareatemplate2: function
clear_accomlistbox: function
clear_listbox: function
create_char_guild_tab: function
create_char_inventory_tab: function
create_jettison_control: function
create_ship_group_template: function
dofile: function
factioncontroltemplate3: function
factionfriendlyness: function
factionfriendlynesscolor: function
factionfriendlynessrange: function
fill_accomlistbox: function
fill_listbox: function
get_itemdlg: function
get_jettisonitemdlg: function
getheight: function
getwidth: function
guildaccessdialogtemplate: function
guildactivitylogdialogtemplate: function
guildbanklogdialogtemplate: function
loadfile: function
msgdlgtemplate1: function
msgdlgtemplate1a: function
msgdlgtemplate1aDone: function
msgdlgtemplate1aNext: function
msgdlgtemplate2: function
msgdlgtemplate2withcheck: function
msgpromptdlgtemplate2: function
msgpromptdlgtemplate2lines: function
multidlgtemplate2: function
navmenu_template: function
require: function
setup_accomrow: function
singletab_template: function
sort_commodities: function
sort_sellable_commodities: function
storagelocationcompare: function
store_itemdlg: function
store_jettisonitemdlg: function
testsurvey: function