API Index2: Difference between revisions
Chocolateer (talk | contribs) m →Tables: cleaned up ShipPalette & ShipPalette_string descriptions |
Ravenwolf397 (talk | contribs) Link GetPrimaryShipIDOfPlayer |
||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
See also [[:Category:API]]. | See also [[:Category:API]]. | ||
= | = [[API_Interface_Index|Interface]] = | ||
'''[[ | '''[[AdditionalHUDText]]''' | ||
= General = | = General = | ||
Line 70: | Line 70: | ||
'''[[API_EnableVoiceChat|EnableVoiceChat]]'''(bool enable) -> nil :: Toggle Voice chat | '''[[API_EnableVoiceChat|EnableVoiceChat]]'''(bool enable) -> nil :: Toggle Voice chat | ||
'''[[API_FactionToSignedFaction|FactionToSignedFaction]]'''(int faction) -> int :: Convert absolute faction values (0 to 65535) into signed faction values (-1000 to 1000). Results are rounded down. | |||
'''[[API_FindAndReplaceTags|FindAndReplaceTags]]'''(string text, table matches) -> string ret1 :: Replaces all occurances of with < and > enclosed substrings in ''text'' with matching values from the provided table | '''[[API_FindAndReplaceTags|FindAndReplaceTags]]'''(string text, table matches) -> string ret1 :: Replaces all occurances of with < and > enclosed substrings in ''text'' with matching values from the provided table | ||
Line 172: | Line 174: | ||
'''[[API_GetCurrentSectorid|GetCurrentSectorid]]'''() -> int sectorid :: get current sector id | '''[[API_GetCurrentSectorid|GetCurrentSectorid]]'''() -> int sectorid :: get current sector id | ||
'''[[API_GetCurrentStationID|GetCurrentStationID]]'''() -> int stationid :: get current station id | |||
'''[[API_GetCurrentStationType|GetCurrentStationType]]'''() -> int type :: return the current station type.. | '''[[API_GetCurrentStationType|GetCurrentStationType]]'''() -> int type :: return the current station type.. | ||
Line 329: | Line 333: | ||
'''[[API_GetPlayerNodeID|GetPlayerNodeID]]'''(int charid) -> int nodeid :: get [[nodeid]] of a character in the sector | '''[[API_GetPlayerNodeID|GetPlayerNodeID]]'''(int charid) -> int nodeid :: get [[nodeid]] of a character in the sector | ||
'''[[ | '''[[API_GetPlayerNodeID|GetPlayerNodeID]]'''(int charid) -> int nodeid :: get [[nodeid]] of a character in the sector | ||
'''[[API_GetPOI|GetPOI]]'''() -> table :: returns a table of all discovered points-of-interest in the current system. | |||
'''[[API_GetPrimaryShipIDOfPlayer|GetPrimaryShipIDOfPlayer]]'''(int charid) -> int objectid :: get objectid of provided character | |||
'''[[API_GetPrimaryShipNameOfPlayer|GetPrimaryShipNameOfPlayer]]'''(int charid) -> string name :: get ship name (type) of provided character | '''[[API_GetPrimaryShipNameOfPlayer|GetPrimaryShipNameOfPlayer]]'''(int charid) -> string name :: get ship name (type) of provided character | ||
Line 337: | Line 345: | ||
'''[[API_GetProximityWarningTimeout|GetProximityWarningTimeout]]'''() -> int timeout :: Get minimum time between proximity warnings | '''[[API_GetProximityWarningTimeout|GetProximityWarningTimeout]]'''() -> int timeout :: Get minimum time between proximity warnings | ||
'''[[API_GetRadarDistance|GetRadarDistance]]'''(int charid) -> float distance :: get distance to another character | |||
'''[[API_GetRegisteredCommands|GetRegisteredCommands]]'''() -> table commands :: get all commands | |||
'''[[API_GetRegisteredUserCommands|GetRegisteredUserCommands]]'''() -> table commands :: get all user registered commands | |||
'''[[API_GetSectorAlignment|GetSectorAlignment]]'''() -> int alignment :: returns the alignment of the current sector | '''[[API_GetSectorAlignment|GetSectorAlignment]]'''() -> int alignment :: returns the alignment of the current sector | ||
Line 540: | Line 554: | ||
'''[[API_RentStorage|RentStorage]]'''(int storage) -> nil :: Rent storage space at the current station. | '''[[API_RentStorage|RentStorage]]'''(int storage) -> nil :: Rent storage space at the current station. | ||
'''[[API_RepairShip|RepairShip]]'''() -> | '''[[API_RepairShip|RepairShip]]'''(int itemid, int x, func cb) -> nil :: Repairs the ship itemid in the station | ||
'''[[API_ReplenishAll|ReplenishAll]]'''(int itemid, func cb) -> nil :: replenish all weapons on provided ship | '''[[API_ReplenishAll|ReplenishAll]]'''(int itemid, func cb) -> nil :: replenish all weapons on provided ship | ||
Line 551: | Line 565: | ||
'''[[API_RequestMissionDetails|RequestMissionDetails]]'''(int missionid) -> nil :: '''(Deprecated)'''Request information about the given mission (aka the info button) | '''[[API_RequestMissionDetails|RequestMissionDetails]]'''(int missionid) -> nil :: '''(Deprecated)'''Request information about the given mission (aka the info button) | ||
'''[[API_RequestMissionExtendedDescription|RequestMissionExtendedDescription]]'''(string missionid, int stationid) -> bool :: Requests an extended mission description; result is received via the MISSION_QUESTION_OPEN event | |||
'''[[API_RequestMissionList|RequestMissionList]]'''() -> nil :: no clue. maybe used by /updatestation | '''[[API_RequestMissionList|RequestMissionList]]'''() -> nil :: no clue. maybe used by /updatestation | ||
Line 839: | Line 855: | ||
'''[[ShipPresets]]''' :: array with properties of ship presets | '''[[ShipPresets]]''' :: array with properties of ship presets | ||
'''[[ShipSkinNames]]''' :: array containing livery names | |||
'''[[ShipSkinDescriptions]]''' :: array containing livery descriptions | |||
'''[[Skills]]''' :: table to translate skillid's into skill names and back | '''[[Skills]]''' :: table to translate skillid's into skill names and back |
Latest revision as of 08:51, 5 December 2023
See also Category:API.
Interface
General
Functions
AbbrLocationStr(int sectorid) -> string name :: Get abbreviated sector name for sectorid
AbortMission(int itemid) -> nil :: Abort a mission
Article(string word) -> string out :: prepends the appropriate article to the string word
AssignOwnerKey(string keyid) -> nil :: Assign an owner key to this station
CanUseAddon(int itemid) -> bool ret1, {string l1 ..} :: check if the player can equip the addon itemid
CanUseMerchandise(table iteminfo) -> bool ret1, {string l1 ..} :: check if the player can use the item iteminfo
CancelPurchaseShipLoadout() -> nil :: Interrupt purchase of ship loadout
CheckCharProximity() -> nil :: stub
CheckProximityWarning() -> nil :: Trigger the PROXIMITY_ALERT event if a character, that hasn't been before, is within proximity range
CheckStorageAndUnloadCargo({{int itemid, int quantity} ..}, function cb) -> nil :: Unload cargo items and with storage space check
ClearGeneralChatLog() -> nil :: clears general chat log..
ClearLastShipLoadout() -> nil :: clear last shiploadout
ClearMissionChatLog() -> nil :: clears mission log..
ClearProximityCache() -> nil :: Clear list of characters in proximity range
ClearStationChatLog() -> nil :: clears station log (bar)..
ConfigureMultipleWeaponGroups({table group1key1, table group1key2 ... table group1key6, table group2key1, table group2key2...}, function cb) -> nil :: configures weapon groups according to given tables.
ConfigureWeaponGroup(int id, table port_ids, function cb) -> nil :: Configures one weapon group
ConnectAddon(int portid, int itemid, function cb) -> bool canconnect :: Attaches the addon itemid to the active ship in port portid
CreateCharacter(int name, int nation) -> nil :: Creates the character of the given nation
DeleteCharacter(int slot) -> nil :: Deletes the character in the character slot slot
DisableNPCProximityWarning() -> nil :: Disable proximity warnings for NPC
DisableOneOffProximityWarning() -> nil :: Disable one off proximity warning. Trigger proximity warning more than once for the same ship.
DisablePlayerProximityWarning() -> nil :: Disable proximity warnings for players
DisableProximityWarning() -> nil :: disable the proximity warning ...
DisconnectAddon(int itemid) -> bool ret1 :: detaches the addon itemid and stores it in the station
DisconnectAllAddons() -> nil :: detaches all addons from the active ship and stores them in the current station
EnableNPCProximityWarning() -> nil :: Enable proximity warnings for NPC
EnableOneOffProximityWarning() -> nil :: Enable one off proximity warning. Trigger proximity warning only once for the same ship.
EnablePlayerProximityWarning() -> nil :: Enable proximity warnings for players
EnableProximityWarning() -> nil :: enable the proximity warning ...
EnableVoiceChat(bool enable) -> nil :: Toggle Voice chat
FactionToSignedFaction(int faction) -> int :: Convert absolute faction values (0 to 65535) into signed faction values (-1000 to 1000). Results are rounded down.
FindAndReplaceTags(string text, table matches) -> string ret1 :: Replaces all occurances of with < and > enclosed substrings in text with matching values from the provided table
FindAndReplaceTagsCB(string text, function cb) -> string ret1 :: Pass each occurances of with < and > enclosed substrings in text to cb and replace them with the return value
ForEachBuddy(function func(string name, bool isonline, int sectorid)) -> nil :: 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
ForEachPlayer(function func(int charid)) -> nil :: calls func with the character id of each player in the sector
ForgiveKiller(bool forgive) -> nil :: Forgive the last killer.
GeneratePlayerDiedMessage(string name1, name2, int weapon) -> string msg :: generate appropiate kill message for the arguments.
GetAccomplishmentBigSize(int type, level) -> string bigsize :: Get size of accomplishment medal
GetAccomplishmentBigTexture(int type, level) -> string tex :: Get texture of accomplishment medal
GetAccomplishmentBigUV(int type, level) -> string uv :: Get uv mapping of accomplishment medal
GetAccomplishmentCategory(int type, level) -> string category :: Get category of accomplishment
GetAccomplishmentDescription(int type, level) -> string desc :: Get description of accomplishment
GetAccomplishmentLevels(int accomid) -> int curlevel int reqlevel :: returns the current and the required level for the selected accomplishment
GetAccomplishmentName(int type, level) -> string name :: Get name of accomplishment
GetAccomplishmentSize(int type, level) -> string size :: Get size of accomplishment badge
GetAccomplishmentTexture(int type, level) -> string tex :: Get texture of accomplishment badge
GetAccomplishmentTitle(int type, level) -> string title :: Get title of accomplishment
GetAccomplishmentType(int accomindex, char) -> int accomplishmenttype int accomplishmentlevel :: returns some numbers..
GetAccomplishmentUV(int type, level) -> string uv :: Get uv mapping of accomplishment badge
GetActiveChatChannel() -> int channel :: returns the active channel
GetActiveMissionInfo(int num) -> string mname table mmsg int itemid :: Get information about the selcted active mission
GetActiveShipCargoCount() -> int cargocount :: returns amount of cargo in the ship in cu
GetActiveShipEnergy() -> float eng fraction :: returns the energy level of the active ship
GetActiveShipHealth() -> int d1 d2 d3 d4 d5 d6 dmg max :: returns information about the active ships health
GetActiveShipGridPowerAndUsage() -> int power usage :: returns the energy grid power and usage of the current ship..
GetActiveShipID() -> int itemid :: returns itemid of active ship
GetActiveShipItemIDAtPort(int portid) -> int itemid :: returns itemid of addon in selected port
GetActiveShipMass() -> int mass :: returns mass of active ship
GetActiveShipMaxCargo() -> int cargo :: returns amount of cargo space of the active ship in cu
GetActiveShipMaxSpeed() -> int speed :: returns max nonturbo speed of active ship
GetActiveShipName() -> string name :: returns a string with the active ships name
GetActiveShipNumAddonPorts() -> int ports :: returns number of ports in active ship
GetActiveShipPortIDOfItem(int itemid) -> int portid :: returns portid of the given addon in active ship
GetActiveShipPortInfo(int portid) -> table portinfo :: returns information about the given port
GetActiveShipSelectedWeaponGroupIDs() -> int id1 id2 id3 :: returns ids of the selected weapon groups ...
GetActiveShipSpeed() -> int speed :: returns current speed of active ship
GetActiveShipWeaponGroup(int id) -> table group :: return which ports are enabled in the provided group
GetAddonItemInfo(int itemid) -> int current maximum :: Returns current and maximum ammo if itemid is a weapon with ammo, or current/maximum armor if itemid is a ship.
GetAvailableMissionInfo(int midx) -> {int itemtype, string name, bool active, int category, string icon, string desc} :: Returns information about the mission with the given index.
GetBarPatrons() -> {[charid1], [charid2]...} :: get people in the current station bar
GetBestPriceInfoOfItem(int item) -> int price, station :: Get highest sell price of a cargo item in the active ship in the currentsystem
GetBotSightedInfoForSector(int sectorid) -> string botinfo :: returns bot ihnfo text for the given sector
GetBuddyInfo(int char) -> string name, bool isonline, int sectorid :: Get name, online status and location of a buddy
GetCargoValue() -> int value, price :: Get value and buy price of the cargo and equipped addons on the active ship at the current station
GetCharacterDescription(int charid) -> string desc :: Get the character description of a character
GetCharacterID(int nodeid) -> int charid :: returns character id of the provided node id
GetCharacterIDByName(string name) -> int charid :: get character id by name
GetCharacterInfo(int cslot) -> string name faction int money kills deaths loc home cl ll hl tl ml :: Get information about your characters
GetCharacterKillDeaths(int charid) -> int kills deaths pks :: get info about kills and deaths
GetConqueredSectorsInSystem(int systemid) -> table sectors :: Get table with conquered sectors in the given system
GetConqueredStatus(int sectorid) -> int faction :: Get faction that conquered the given sector
GetCurrentSectorid() -> int sectorid :: get current sector id
GetCurrentStationID() -> int stationid :: get current station id
GetCurrentStationType() -> int type :: return the current station type..
GetCurrentSystemid() -> int systemid :: get current system id..
GetEULA() -> string eula :: return eula
GetFactionInfo(int faction) -> string info :: get faction info text for the provided faction
GetFinishedMissionInfo() -> string name table msg int itemid :: see GetActiveMissionInfo
GetFriendlyStatus(int char) -> int fstatus :: get friendlyness of a character
GetFullPath(int sector, table navroute) -> table fullpath :: Get the full path, including wormhole sectors, from sector along navroute
GetGeneralChatLog() -> table log :: returns the chatlog
GetGroupMemberID(int index) -> int charid :: get charid of group member with given index
GetGroupMemberLocation(int charid) -> int loc :: get location of a groupmember
GetGroupOwnerID() -> int charid :: get charid of group owner
GetGuildAcronym() -> string acronym :: get your guilds acronym
GetGuildBalance() -> int balance :: get amount of money in guild bank
GetGuildBankPrivileges() -> table deposit withdraw logview :: get your guilds bank privileges as three tables
GetGuildBankWithdrawalLimits() -> int ret1 ret2 ret3 :: get withdrawal limits? returns three numbers
GetGuildMOTD() -> string motd :: get your guilds message of the day
GetGuildMemberInfo(int index) -> int charid rank string name :: get information about the guildmember of the given index
GetGuildMemberInfoByCharID(int charid) -> int charid rank string name :: get information about the guildmember
GetGuildName() -> string name :: get guild name
GetGuildTag(int charid) -> string tag :: get guild tag of self or another character.
GetHomeStation() -> int sectorid :: get sectorid of home station
GetInventoryItemClassSubType(int itemid) -> int subtype :: get subclass of an item
GetInventoryItemClassType(int itemid) -> int type :: get class of an item
GetInventoryItemContainerID(int itemid) -> int container :: get container of item
GetInventoryItemExtendedDesc(int itemid) -> string desc :: get description of item
GetInventoryItemIcon(int itemid) -> string path :: get path to icon of inventory item
GetInventoryItemInfo(int itemid) -> string ipath name int quant float mass string sdesc desc1 desc2 int container class subtype :: get most info about inventory item
GetInventoryItemLocation(int itemid) -> int stationid :: get location of an inventory item
GetInventoryItemLongDesc(int itemid) -> string desc :: get long description of an inventory item
GetInventoryItemMass(int itemid) -> float mass :: get mass of inventory item
GetInventoryItemName(int itemid) -> string name :: get name of inventory item
GetInventoryItemQuantity(int itemid) -> int quant :: get quantity of inventory item..
GetInventoryItemType(int itemid) -> int type :: get item type
GetInventoryItemUnitCost(int itemid) -> int cost :: get price paid for the given item(?)
GetInventoryItemVolume(int itemid) -> int volume :: get per unit volume of item in cu
GetItemFullDesc(table item) -> string desc :: get full description of an inventory item
GetItemPartialDesc(table item) -> string desc :: get partial description of an inventory item
GetJoinedChannels() -> table channels :: get array with currently joined channels
GetKeyInfo(int keyindex) -> string keyid, string desc :: Get information about the key with the given index in the keychain
GetLastAggressor(int itemid) -> int nodeid ret1 :: get node id of last aggressor and some number
GetLastPrivateSpeaker() -> string name :: get name of last character that pmed you
GetLastShipLoadout() -> {groups = {1 = group1 .. 18 = group18}, int ship, ports= {1 = port1 ..}, int shipcolor} :: get last ship loadout, color and weapon groups
GetLastShipLoadoutPurchaseCost() -> int cost :: what you payed for your last ship(?)
GetLicenseLevel(int type) -> int level :: get the level of the provided license
GetLicenseRequirement(int level) -> int xp :: get xp required for given level
GetListOfSeenNames() -> table names :: get table with names of characters that have been in the same sector as the player or have sent messages
GetMaxRadarDistance() -> int dist :: get current(?) max radar range
GetMinJumpDistance() -> int dist :: get minimum distance from large objects to jump
GetMissionChatLog() -> {bool updated, string 1.. } :: get advancement log
GetMissionTimers() -> int time :: get time left on the current mission. may have some functionality for multiple missions
GetMoney() -> int money :: get how many credits you own
GetNationKills(int nation) -> int kills :: get number of player kills for the given nation
GetNewsHeadline(int index) -> string title int time ret1 :: get headline, post time and some number
GetNewspostItem(int index) -> int id, time, string subject, bool important :: Get news post info
GetNumAccomplishments(int charid) -> int accomplishments :: get number of accomplishmeants for given character
GetNumActiveMissions() -> int missions :: get number of active missions.
GetNumAvailableMissions() -> int missions :: get number of available missions
GetNumCharacters() -> int chars :: get number of characters you have defined
GetNumCompletedMissions() -> int missions :: get number of completed missions
GetNumFinishedMissions() -> int missions :: get number of finished missions
GetNumGroupMembers -> int chars :: get number of characters in your group
GetNumGuildMembers() -> int numchars :: get number of online guildmembers
GetNumKeysInKeychain() -> nil :: Get number of keys in the keychain
GetNumNewsHeadlines() -> int num :: get number of news headlines..
GetNumNewsposts() -> int num :: Get number of news posts
GetNumOccasions() -> int num :: Get number of ccassion announcments (events)
GetNumStationDesiredItems() -> int num :: Get number of items this station desires
GetNumStationMerch() -> int num :: get number of addons, ships an cargo this station sells
GetNumStationTurrets() -> int num :: get number of turrets on this station or ship
GetNumTips() -> int num :: get size of load screen tips pool
GetOccasionItem(int index) -> int id, time, duration, string name, bool important, int timestamp :: Get occasion (event) info
GetParentHealth() -> float ret1 ret2 :: get health of object this one is attached to (turret to capship). untested!
GetPlayerDistance(int charid) -> float distance :: get distance to another character
GetPlayerFaction(int charid) -> int factionid :: get nation of a player
GetPlayerFactionStanding(int factionid, charid) -> int standing :: get a players standing with a faction
GetPlayerHealth(int charid) -> float health :: get health of provided character
GetPlayerName([int charid]) -> string name :: get name of character
GetPlayerNodeID(int charid) -> int nodeid :: get nodeid of a character in the sector
GetPlayerNodeID(int charid) -> int nodeid :: get nodeid of a character in the sector
GetPOI() -> table :: returns a table of all discovered points-of-interest in the current system.
GetPrimaryShipIDOfPlayer(int charid) -> int objectid :: get objectid of provided character
GetPrimaryShipNameOfPlayer(int charid) -> string name :: get ship name (type) of provided character
GetProximityWarningDistance() -> int dist :: get proxy warnign distance Note: even returns the distance when proxy warning is disabled
GetProximityWarningTimeout() -> int timeout :: Get minimum time between proximity warnings
GetRadarDistance(int charid) -> float distance :: get distance to another character
GetRegisteredCommands() -> table commands :: get all commands
GetRegisteredUserCommands() -> table commands :: get all user registered commands
GetSectorAlignment() -> int alignment :: returns the alignment of the current sector
GetSectorIDOfStation(int stationid) -> int sectorid :: Get sector id of the given station
GetSectorMonitoredStatus() -> int monitor :: returns the monitor status of the current sector (Unmonitored, Guarded ...)
GetShipAmmoPrices(int ship) -> table prices :: get cost of ship ammo
GetShipCargoCount(int itemid) -> int num :: get amount of cargo in the ship
GetShipInventory(int itemid) -> {cargo = {int cargoitemid ..}, addons = {int addonitemid ..}} :: get itemids of items attached to a ship
GetShipList() -> {int itemid ..} :: get list of your ships in the current station. produces error when called outside station..
GetShipMaxCargo(int itemid) -> int cargo :: get amount of cargo the given ship can hold
GetShipMeshInfo(int itemid) -> string id model int color :: get mesh information about equipment in your inventory
GetShipPortIDOfItem(int itemid1, int itemid2) -> int portid :: get port of weapon in one of your ships
GetShipPurchaseColor() -> int color :: get selected color from the color picker
GetSkillLevel(int licenseid) -> int current next :: get current and required xp for next level or provided skill
GetSkirmishInfo() -> int crew1 crew2 init1 init2 string name1 name2 bool active :: returns crew info for skirmish missions
GetStartingSectors(int factionid) -> table sectors :: get list of starting sectors for the given faction
GetStationAddonList() -> {int itemid ..} :: get array with your addons in the station hold
GetStationAmmoInfoByID(int itemid) -> {bool is_ammorepair, string type, int unitcost, int price, string longdesc, string desc, bool locallyproduced, int itemid, string icon} :: get info about ammo based weapons in the station by item id
GetStationCargoList() -> {int itemid ..} :: get list of cargo items in the current station. produces error when called outside station..
GetStationChatLog() -> {string msg ..} :: get table with messages in the station chat
GetStationCurrentCargo() -> int cargo :: get amount of cargo currently in this station. including cargo, equipment, ships ..
GetStationDesiredItem(int index) -> string ditem :: Get the string name of an item that this station desires
GetStationFaction(int stationid) -> int factionid :: get faction of the given station
GetStationFactionAppraisalModifier() -> float modifier :: Returns a number that seems to affect the price of storage space. depends on faction standing or something
GetStationLocation(int stationid1) -> int stationid2 :: get the stationid of the current station
GetStationMaxCargo() -> int cargo :: return amount of cargo this station can hold.
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 } :: get info about items this station sells
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 } :: get info about items this station sells by itemid
GetStationMerchPriceByID(int itemid) -> int price :: get price of an item this station sells
GetStationName(int stationid) -> string name :: Get the name of a station. If the provided stationid is invalid the function produces a lua error.
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 } :: get sellable inventory info by id ...
GetStationSellableInventoryPriceByID(int itemid, int quantity) -> int value, unitprice :: Get value of inventory items and price per unit in the current station
GetStationShipList(int itemid) -> {int itemid1 ..} :: get array of your ships in the current station
GetStationTurretInfo(int turretid) -> {int objectid, int nodeid, float armorpercent, int itemid} :: get information about a stations or ships turrets
GetStationType() -> string stype :: get station type
GetStorageItemInfo(int itemid) -> int stationid :: get stationid of a storage container
GetStorageLocationSector(int arg1) -> int ret1 :: returns some number when fed with an itemid
GetSurveyChoices() -> {} :: returns an empty table!
GetSurveyQuestion() -> string ret1 :: returns an empty string!
GetSystemID(int sectorid) -> int systemid :: get systemid of the given sector. lua error on nil
GetTargetDistance() -> float dist :: get distance to target
GetTargetFriendlyStatus() -> int fstatus :: get friendlyness of target
GetTargetInfo() -> string name float health dist int factionid string guild ship :: get info about target
GetTip(int tipid) -> string tip :: get loading screen with given index
GetTurretNamesByStationType(string stype) -> {string tur1 ..} :: get turret name of provided station type
GetTutorialLevel() -> int num :: return if the player has done the tutorial(?)
GetUserName() -> string Name :: Returns the username.
GiveMoney(string char, int amount) -> nil :: transfer money to a character
HasActiveShip() -> bool aship :: return true if the player has an active ship
HasLastShipLoadout() -> bool loadout :: return true if the player has a last ship loadout saved
IsConnected() -> bool connected :: return true if the player is connected to the game
IsEnemy(charid) -> bool enemy :: Part of the base radar functionality. Used in conjunction with GetFriendlyStatus.
IsGroupMember(int charid) -> bool grmember :: tell if the provided character is a group member
IsGuildMember(int charid) -> bool guildmember :: tell if the provided character is a guild member
IsInDuel() -> bool duel :: Returns true if the player is in a duel
IsNPCProximityWarningEnabled() -> bool state :: Get NPC proximity warning state
IsOneOffProximityWarningEnabled() -> bool state :: Get one off proximity warning state
IsPlayerProximityWarningEnabled() -> bool state :: Get Player proximity warning state
IsPlayerRequestingBuddy(string name) -> bool req :: Tell if the given player is requesting to become a buddy
IsPlayerRequestingDuel(string name) -> bool req :: Tell if the given player is requesting a duel
IsPlayerRequestingGroupInvite(string name) -> bool req :: Tell if the given player has sent a group invite
IsProximityWarningEnabled() -> bool isproxy :: tell if proximity warning is enabled
IsStormPresent() -> bool isstorm :: tell if there's a storm in the current sector
IsTrainingSector(int sectorid) -> bool tsector :: tell if the given sector is a training sector
IsTransactionInProgress() -> bool trans :: tell if a transaction is in progress (like selling a ship, items ..)
IsVoiceChatEnabled() -> bool vc :: tell if voice chat is enabled
JettisonAll() -> nil :: Jettison all of your ships cargo
JettisonMultiple{item1 = {int id, int quantity} ..} -> nil :: Jettison cargo items and quantitiss according to the provided table
JettisonSingle(int itemid, int quantity) -> nil :: Jettison provided type and amount of cargo
JoinChannel{channelid1 ..} -> nil :: join the provided channels without leaving existing channels
LeaveChannel{channelid1 ..} -> nil :: leave the provided channels
ListChannels() -> nil :: print list of currently joined channels and usage info to the chatarea
LoadCargo({{int itemid, int quantity} ..}, function cb) -> nil :: Load cargo items and quantitiss according to the provided table
LoadChannels() -> nil :: restore chat channels from config file(?)
LoadMissionNotes() -> string notes :: read and return players notes from playernotes.txt. See also: Function_Index#SaveMissionNotes
LoadNavpath(string navpath) -> {int sectorid1 ..} :: load navroute by name and return array with hops
LoadShipPresets() -> nil :: read ship presets from config file and setup buyback dialog
LoadSystemNotes(int systemid) -> string notes :: load system notes from settings/<charactername>/system<systemid>notes.txt
LocationStr(int sectorid) -> string sname :: translate a sectorid into a sector name. error if no argument provided
Login(string username, string password) -> nil :: Login to the game. crashes game when arguments are missing...
Logout() -> nil :: Inititate logout sequence.
MakeBotName(string nameset, int seed) -> string name :: Generate a name fromthe given nameset and optional random seed
MakeBuyBackQuestionDlg() -> userdata dialog :: Create the buyback dialog
NPlural(string arg1, string arg2) -> string pstring :: concaterates the two provided strings together and pluralizes the result
MakeBuyBackQuestionDlg() -> userdata dialog :: Create the buyback dialog
OnIdle(float delta) -> nil :: Idle handler
OpenAlarm(string title, text, buttontext) -> nil :: Show ConfirmationDialog with the given message
OverlapPrevention(table ip) -> bool overlap :: Adjust icon positions in a viewport so that they don't overlap
ParseXML(string xmlstring) -> {dom} :: returns the provided string as a collection of substrings and nodes as subtables ..see example
PlayerInStation() -> bool instation :: tell if the player is in a station or capship
PlayerInventoryPairs() -> int itemid table iteminfo :: Iterator function that returns information about an item in the players inventory each time it is called
PrintJoinUsage() -> nil :: prints how to use /join to the chatarea
PrintLeaveUsage() -> nil :: prints how to use /leave to the chatarea
PrintPurchaseTransaction(string name, int quantity, totalvalue, totalcost) -> nil :: Print a sale summery message to the chat log
PrintTransactionTable() -> nil :: print pending transactions.
ProcessEvent(string eventtype, data) -> nil :: Processes various events. Trigger a with RegisterEvent defined event
PurchaseMerchandiseItem(int itemid, int amount, function callback) -> nil :: buy the provided item
PurchaseShipLoadout(function buybackdone_cb(boolean success), loadout) -> nil :: Buys ship presets as stored in ShipPresets table. buybackdone_cb is called on success/failure.
RegisterEvent(object eventhandler, string eventtype) -> nil :: Hook up object to event
RegisterUserCommand(string commandname, func callback(dataarg, {arguments1, ..}), data) -> nil :: hook up object to command
ReinitIconPositions(timer icontimer, int ship, userdata viewport, table iconlist, userdata iconcontainer, table ipcache) -> nil :: Setup icons in a viewport
ReloadInterface() -> nil :: Reloads everything related to the interface that isn't a texture
RentStorage(int storage) -> nil :: Rent storage space at the current station.
RepairShip(int itemid, int x, func cb) -> nil :: Repairs the ship itemid in the station
ReplenishAll(int itemid, func cb) -> nil :: replenish all weapons on provided ship
ReplenishWeapon() -> ?? :: not tested
RequestCharacterStats() -> nil :: no clue
RequestLaunch() -> bool ret :: Launches from the station. Any issues preventing launch are reported via pop-up window. Otherwise, the player's ship undocks.
RequestMissionDetails(int missionid) -> nil :: (Deprecated)Request information about the given mission (aka the info button)
RequestMissionExtendedDescription(string missionid, int stationid) -> bool :: Requests an extended mission description; result is received via the MISSION_QUESTION_OPEN event
RequestMissionList() -> nil :: no clue. maybe used by /updatestation
RequestNewsArticle(int newsindex) -> nil :: ask server for news item(?) fills API_NewsDialog with given news item
RequestNewsHeadlines() -> nil :: ask server for news item list?
RequestNewspostInfo(int id) -> nil :: Request a news item. The result is returned with the UPDATE_NEWS event
RequestOccasionInfo(int id) -> nil :: Request an occassion item (event). The result is returned with the UPDATE_NEWS event
RequestTargetStats() -> int charid :: get character id of target (considreing the name maybe more?)
ResetTutorial() -> nil :: Reset the tutorial flag. the player will have to go through it again after docking.
RunTutorial() -> nil :: launch tutorial
SaveChannels() -> nil :: Save joined channels(?). Kinda useless since trhat's done as soon as you join one
SaveMissionNotes(string notes) -> nil :: Save the provided string to the characters mission notes file. See also: API Index#LoadMissionNotes
SaveShipPresets(int index) -> nil :: Save ship preset(s) and recreate buyback dialog
SaveSystemNotes(string notes, int systemid) -> nil :: save system notes to settings/<charactername>/system<systemid>notes.txt
SaveNavpath({int sectorid1 ..}, string name) -> nil :: Save the provided navroute
SaveShipLoadout(int itemid) -> table preset :: create a preset from the given ships loadout
SectorIDFromLocationStr(string location) -> int sectorid :: Convert a location string into a sectorid.
SelectActiveShip(int itemid) -> nil :: Set the given ship active
SelectCharacter(int charslot) -> nil :: Select character in given slot and enter the game with it
SellInventoryItem(int itemid, int amount) -> nil :: Sell the provided amount of an inventory item from the current station or ship
SendChat(string msg, string dst, string dstparam) -> nil :: Send a message to the provided destination.
SendMissionQuestionResponse(int num) -> nil :: (Deprecated)called by the initial info dialog 1 = accept, 0 = decline
SetChatLogRead() -> nil :: Mark the general chat log as read/displayed
SetChatLogReceiver(table chatcontainer) -> nil :: Point the general chat log to a chat container
SetCurrentChatTab() -> ?? :: does nothing. maybe a leftover from the general/mission chat system
SetHomeStation() -> nil :: set current station as your home station
SetMissionLogRead() -> nil :: Mark the advancement log as read/displayed
SetMissionLogReceiver(table chatcontainer) -> nil :: Point the advancement log to a chat container
SetProximityWarningDistance(int dist) -> nil :: set proximity warning distance ..
SetProximityWarningTimeout(int timeout) -> nil :: Set minimum time between proximity warnings
SetShipPurchaseColor(int color) -> nil :: color of the next ship the player will buy
SetStationLogRead() -> nil :: Mark the station log as read/displayed
SetStationLogReceiver(table chatcontainer) -> nil :: Point the station log to a chat container
SetViewObject(userdata modelview, string meshname, string meshfile, int color) -> nil :: Change the ship in a modelview
SHA1(string text) -> string hash :: generate SHA1 hash of the given string
ShortLocationStr(int sectorid) -> string loc :: string representing the provided sector
ShouldTutorialRun() -> bool tut :: tell if the player has done the tutorial
SplitLocationID(int stationid) -> int sectorid stationidx :: split up a stationid into sectorid and station index
SplitSectorID(int sectorid) -> int systemid sectorh sectorv :: split up a sectorid into systemid and axis on the system grid
SplitStationID(int stationid) -> int systemidl sectorhv :: :: split up a stationid into sectorid and station index
StartSellInventoryItem(int itemid, function cb) -> nil :: Receive instant price updates for the given item.
StationPlayerAmmoPairs() -> int itemid table ammoinfo :: 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()
StationSellableInventoryPairs() -> int itemid table iteminfo :: Iterator function that prints information about an item in the players inventory at the current station each time it is called. works like pairs()
StationSellItem(userdata button, table item, int quantity, function cb) -> nil :: Sell items with aconfirmation dialog
StrTableStopTutorial() -> nil :: seems to be another serialisation function. similar (the same?) to splickle
SubmitSurvey() -> nil :: does nothing..
SwapAddons(int portid1 itemid1 porid1 itemid2 function cb) -> nil :: Swap two addons equipped to the current ship (crashes client after undocking)
TabCompleteName(string name) -> string completename :: 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.
UnloadCargo({{int itemid, int quantity} ..}, function cb) -> nil :: Unload cargo items and quantities according to the provided table
UnloadSellCargo({{int itemid, int quantity} ..}, function cb) -> nil :: Unload and sell cargo items and quantities according to the provided table
UnregisterEvent(object, string eventtype) -> nil :: Unregister an object registered with RegisterEvent
UnregisterUserCommand(string command) -> nil :: Unregister a command registered with RegisterUserCommand
UnrentStorage(int storage) -> nil :: Unrent storage space at the current station.
UpdateAllRadarFriendlyStatus() -> nil :: Update the radar with the new status when overriding GetFriendlyStatus
UpdateRadarFriendlyStatus(int nodeid) -> nil :: Update the radar with the new status when overriding GetFriendlyStatus
XMLTagToString() -> nil :: might the reverse of ParseXML
_ERRORMESSAGE(string msg) -> nil :: creates an error message with the provided string. probably more
bbhash(string input, int arg2) -> string hash :: Seems to be some kind of hash function
calc_health_color(float health, int alpha, mode) -> string color :: Create an iup color string corresponding to the given health
clearscene() -> nil :: removes al objects from the game world
comma_value(float number) -> string formatted_number :: returns a formatted version of the provided number according to API_Index#SI_unit
console_clear() -> nil :: clear console on the next API_ReloadInterface
console_print(string text) -> nil :: print the given string to the ingame console
debugprint() -> ?? :: does nothing..
declare(string name, value) -> nil :: declare a variable and assign a value
deviceByMode(table arg1, mode) -> table ret :: not sure. possibly to find audio devices by capability
factionfriendlyness(int standing) -> string name :: get string that represents the given faction standing
factionfriendlynesscolor(int standing) -> string color :: get iup color that represents that given faction standing
factionfriendlynessrange(int standing) -> float range :: get progress within the current faction standing level
fillModesDropdown() -> ? :: no clue. fill some kind of drop down menu(?)
filter_colorcodes(string in) -> string out :: strips colorcodes from the provided string
format_time(int msecs) -> string tstring :: get string representation of the provided time
generalprint(string str) -> nil :: print given string to the chat area via CHAT_MSG_PRINT event. Results is printed in the active channel text color.
hextorgb(string hexcolors) -> string deccolors :: Convert hexadecimal formated color string into a decimal one used by iup
loadscene(string scene) -> ?? :: load a scene(?). don't know how it works though
loadstring :: [8]
log_chat(string str) -> nil :: Writes current time and given string to the errors.log
log_print(string str) -> nil :: Writes string to the errors.log
oper :: not gonna bother
print(string str) -> nil :: print given string to the chat area
printtable{in} -> nil :: print contents of a table to the console
purchaseprint(string str) -> nil :: print given string to the chat area via CHAT_MSG_CONFIRMATION event.
rgbtohex(string deccolor) -> string hexcolor :: Returns string containing escaped hexadecimal version of the in decimal given color
roper :: not gonna bother
sectorprint(string str) -> nil :: print given string to the chat area via CHAT_MSG_SERVER_SECTOR event. Results in white text by default.
sort_commodities(table a, b) -> bool order :: Sort function for iteminfo tables. See table.sort in the lua reference
sort_sellable_commodities(table a, b) -> bool order :: Sort function for iteminfo tables that prioritizes items in the active ship. See table.sort in the lua reference
storagelocationcompare(int a, b) -> bool order :: Sort function for locationid values. See table.sort in the lua reference
spickle(table intab) -> string :: Converts a table into a string roughly of the format "value","value",{"tablevalue","tablevalue";tablekey="value"};key="value",key="value"
strip_whitespace(string in) -> string out :: strip whitespace from beginning and end of string
substitute_vars(string in) -> string out :: replace variables like %target% in input with their corresponding value
tabcomplete :: produces lua error..
testconquered(int sectorid, factionid) -> nil :: test function. sets conquerer of the given sector
undeclare(string name) -> nil :: undeclare a variable created with Function_Index#declare
unspickle(string in) -> table outtab :: Converts a spickled string into a table
Tables
Bitlib :: functions to manipulate the bitwise operations
Buddy :: functions to manipulate the characters buddylist
Duel :: Duel related methods
FactionArticle :: table with faction articles. indices represent factionid. see: Article
FactionColor :: table with faction colors. indices represent factionid
FactionColor_RGB :: table that maps factionid's to colors in RGB format
FactionMonitor :: table with monitoring types. indices represent numeric monitoring types and values, string representations of that type
FactionMonitorStr :: table with monitoring types. values represent numeric monitoring types and indices, string representations of that type
FactionName :: Array with short names of the ingame faction
FactionNameFull :: Array with long names of the ingame faction
FactionStanding :: table for mapping names of standing levels to it#s int value
FriendKeys :: taable friend key related functions
Game :: functions to control a few game features ..
GeneralChatPanel :: table with parts of a chat area. seems to point to PDA or HUD chat panel depending on what is visible(?)
Group :: Group related functions
Guild :: Guild related functions
Gunner :: Gunner related functions for multiplayer ships
HUD :: HUD related functions
Ignore :: Ignorelist related functions
InvManager :: functions to get information about inventory items
lcd -> :: functions for the Logitech G-series keyboard screens
Keychain :: keychain management
Mentor :: Mentor related functions
MissionLogPanel :: table with parts of the mission log
NavRoute :: functions to manipulate your NavRoute
ShipOrder :: table containing the ordering of ships in lists(?)
ShipPalette :: array that maps palette color values (1-256) to rgb values represented as gvectors
ShipPalette_string :: array that maps palette color values (1-256) to rgb values represented as strings
ShipPresets :: array with properties of ship presets
ShipSkinNames :: array containing livery names
ShipSkinDescriptions :: array containing livery descriptions
Skills :: table to translate skillid's into skill names and back
SystemNames :: Table to translate systemid's into system names and back.
SystemNotes :: System Notes public table. Used for adding notes to the navmap.
TagFuncs :: Text markup callbacks(?)
TCPSocket :: socket class
Thread :: Thread library
Timer :: Timer class
VoiceChat :: voice chat related functions
Vote :: functions to use the voting feature
_generalchatlog :: array with chatlog
_missionlog :: array with mission log
_stationlog :: array with log of visisted stations
chatinfo :: table with display options for each chat event
chatreceiver :: event handler for chat events
command_pretty_names :: table that maps commands to their descriptions
coroutine :: coroutine class
debug :: debugging helpers
gkini :: functions to manipulate the games config file
gkinterface :: interface related functions..
gkmisc :: misc functions ..
gknet :: network related functions
gksound :: audio related functions
gvector :: gvector class. to create and manipulate vectors
ignore_time :: array with with ignored name and period entries
joystick :: functions to change joystick settings
math3d :: functions to do some vector math
math :: standard math library
os :: functions to interface with the operating system
quaternion :: quaternion class. to create and manipulate quats
radar :: functions to query and set radar parameters
string :: string manipulation functions
table :: standard table library
Variables
CLASSTYPE_ADDON -> 2 :: inventory item class of addons
CLASSTYPE_FLAG -> 3 :: inventory item class of flags(?)
CLASSTYPE_GENERIC -> 0 :: inventory item class of generic items
CLASSTYPE_MISSION -> 5 :: inventory item class of missions
CLASSTYPE_SHIP -> 1 :: inventory item class of ships
CLASSTYPE_STORAGE -> 4 :: inventory item class of storage containers (station hold)
Platform -> "Unix", "MacOS", "Windows", "iOS", and "Android" :: string representing the platform the game is running on
SubPlatform -> Windows: "Metro"; Android: "OUYA", "NvidiaShield", "GameStick", "XperiaPlay", "SonyS2", "ASB" (Amazon Fire TV)
SubSubPlatform -> Metro: "ARM" or "x86"; Android: "ARM", "x86", "mips" (x86 is AndroidTV)
VO_VERSION -> 3 :: games major version
_VERSION -> "Lua 5.1" :: lua version