-
Notifications
You must be signed in to change notification settings - Fork 8
System Variables
MicroBlaster edited this page Jan 8, 2023
·
13 revisions
The system values can be accessed from anywhere in a script simply by using their name. Their values will change depending upon the environment.
- ALPHACENTAURI - Returns the sector in which the Class 0 - Alpha Centauri was last sighted.
- ANSI_0 - Returns the ANSI code for the colour black.
- ANSI_1 - Returns the ANSI code for the colour dark blue.
- ANSI_2 - Returns the ANSI code for the colour dark green.
- ANSI_3 - Returns the ANSI code for the colour dark cyan.
- ANSI_4 - Returns the ANSI code for the colour dark red.
- ANSI_5 - Returns the ANSI code for the colour dark purple.
- ANSI_6 - Returns the ANSI code for the colour dark yellow.
- ANSI_7 - Returns the ANSI code for the colour grey.
- ANSI_8- Returns the ANSI code for the colour dark grey.
- ANSI_9 - Returns the ANSI code for the colour light blue.
- ANSI_10 - Returns the ANSI code for the colour light green.
- ANSI_11 - Returns the ANSI code for the colour light cyan.
- ANSI_12 - Returns the ANSI code for the colour light red.
- ANSI_13 - Returns the ANSI code for the colour light purple.
- ANSI_14 - Returns the ANSI code for the colour light yellow.
- ANSI_15 - Returns the ANSI code for the colour white.
- CONNECTED - Returns TRUE (1) if TWX Proxy is connected to the remote server.
- CURRENTANSILINE - Returns the current line that is processing, complete with ANSI codes.
- CURRENTLINE - Returns the current line that is processing, without ANSI codes.
- CURRENTSECTOR = Returns the current sector as last seen at the Command prompt.
- DATE - Returns the current date in system format.
- FALSE - Returns "0".
- GAME - Returns the game letter as stored in the currently selected database.
- GAMENAME - Returns the name of the currently selected database.
- LICENSENAME - Returns the user portion of the current registration.
- LOGINNAME - Returns the login name as stored in the currently selected database.
- PASSWORD - Returns the user password as stored in the currently selected database.
- PORT.BUILDTIME - Returns the number of days remaining until port completion.
- PORT.BUY_EQU[sector] - Returns TRUE (1) if the port in the specified sector buys equipment.
- PORT.BUY_ORE[sector] - Returns TRUE (1) if the port in the specified sector buys fuel ore.
- PORT.BUY_ORG[sector] - Returns TRUE (1) if the port in the specified sector buys organics.
- PORT.CLASS[sector] - Returns the class of a port within a particular sector.
- PORT.EQU[sector] - Returns the amount of onhand equipment in a port in a specified sector.
- PORT.EXISTS[sector] - Returns TRUE (1) if a port exists in the specified sector.
- PORT.NAME[sector] - Returns the name of the port in the specified sector.
- PORT.ORE[sector] - Returns the amount of onhand fuel in a port in a specified sector
- PORT.ORG[sector] - Returns the amount of onhand organics in a port in a specified sector.
- PORT.PERC_EQU[sector] - Returns the onhand percentage of the equipment on a port
- PORT.PERC_ORE[sector] - Returns the onhand percentage of the fuel on a port
- PORT.PERC_ORG[sector] - Returns the onhand percentage of the organics on a port
- PORT.UPDATED - Returns the date and timestamp that a port was last updated in the database.
- RAWPACKET - Returns the unaltered data received in the last transmission from the server.
- RYLOS - Returns the sector in which the Class 0 - Rylos was last sighted.
- SECTOR.ANOMOLY[sector] - Included for backward comparability (Incorrectly Spelled).
- SECTOR.ANOMALY[sector] - Returns 1 (TRUE) if a sector was last recorded with an anomaly.
- SECTOR.BACKDOORCOUNT[sector] - Returns the number of backdoors leading into a sector.
- SECTOR.BACKDOORS[sector][index] - Returns a particular backdoor into a specific sector.
- SECTOR.BEACON - Returns the name of the Beacon in the sector, if present.
- SECTOR.CONSTELLATION - Returns the name of the nebulae of which the sector is a part.
- SECTOR.DENSITY[sector] - Returns the density reading for a specific sector.
- SECTOR.EXPLORED[sector] - Returns the explored status of a specific sector.
- SECTOR.FIGS.OWNER[sector] - Returns the name of the owner of the fighters in a specific sector.
- SECTOR.FIGS.QUANTITY[sector]- Returns the number of fighters in a specific sector.
- SECTOR.FIGS.TYPE - Returns the type of fighter present: Offensive, Defensive, or Toll.
- SECTOR.LIMPETS.OWNER[sector] - Returns the owner of the limpet mines in a specific sector.
- SECTOR.LIMPETS.QUANTITY[sector] - Returns the number of limpet mines in a specific sector.
- SECTOR.MINES.OWNER[sector] - Returns the owner of armid mines in a specific sector.
- SECTOR.MINES.QUANTITY[sector] - Returns the number of armid mines in a sector.
- SECTOR.NAVHAZ[sector] - Returns the amount of navigational hazard in a sector.
- SECTOR.PLANETCOUNT[sector] - Returns the number of planets in a specific sector.
- SECTOR.PLANETS[sector][index] - Returns the name of a specific planet in a specific sector.
- SECTOR.SHIPCOUNT[sector] - Returns the number of ships in a specific sector.
- SECTOR.SHIPS[sector][index] - Returns the name of a specific ship within a specific sector
- SECTOR.TRADERCOUNT[sector] - Returns the number of traders in a specific sector.
- SECTOR.TRADERS[sector][index] - Returns the name of a specific trader within a specific sector.
- SECTOR.UPDATED[sector] - Returns the date and timestamp that a sector was last updated.
- SECTOR.WARPCOUNT[sector] - Returns the number of warps leading out of a specific sector.
- SECTOR.WARPINCOUNT[sector] - Returns the number of warps leading into a specific sector.
- SECTOR.WARPSIN[sector][index] - Returns a particular warp leading into a specific sector.
- SECTOR.WARPS[sector][index] - Returns a particular warp leading out of a specific sector.
- SECTORS - Returns the number of sectors in the currently selected database.
- STARDOCK - Returns the sector in which the game's stardock was last sighted.
- TIME - Returns the current time in system format.
- TRUE - Returns "1".
The following system variables were added in 2.06 for QuickStats information. The valuse of these System Variables is updated by TWXEXTRATOR every time QuickStats '/' is displayed.
- TURNS - Returns the current number of TURNS remaining.
- CREDITS - Returns the current number of Credits available.
- FIGHTERS - Returns the current number of Fighters available.
- SHIELDS - Returns the current number of Shields available.
- TOTALHOLDS - Returns the total number of Holds in the current ship.
- OREHOLDS - Returns the number of Holds containing Fuel Ore in the current ship.
- ORGHOLDS - Returns the number of Holds containing Organics in the current ship.
- EQUHOLDS - Returns the number of Holds containing Equipment in the current ship.
- COLHOLDS - Returns the number of Holds containing Colonists in the current ship.
- EMPTYHOLDS - Returns the number of Empty holds in the current ship.
- PHOTONS - Returns the current number of Photons available.
- ARMIDS - Returns the current number of Armid Mines available.
- LIMPETS - Returns the current number of Limpet Mines available.
- GENTORPS - Returns the current number of Genesis Torpedoes available.
- TWARPTYPE - Returns the current number of Photons available.
- CLOAKS - Returns the current number of Cloaks available.
- BEACONS - Returns the current number of Beacons available.
- ATOMICS - Returns the current number of Atomic Detonators available.
- CORBOMITE - Returns the amount of Corbomite on the current ship.
- EPROBES - Returns the current number of Either Probes available.
- MINEDISR - Returns the current number of Mine Disrupters available.
- PSYCHICPROBE - Returns TRUE (1) if the current ship has a Psychic Probe.
- PLANETSCANNER - Returns TRUE (1) if the current ship has a Planet Scanner.
- SCANTYPE - Returns the type of Long Range scanner on the current ship.
- ALIGNMENT - Returns the players current Alignment.
- EXPERIENCE- Returns the players current Experience.
- CORP- Returns the players current corp number.
- SHIPNUMBER - Returns the number of the current ship.
- SHIPCLASS - returns hte Class od the current ship.
- QUICKSTATS - Returns a formatted string for use by Bots.
- ANSIQUICKSTATS - Returns a formatted string for use by Bots.
- QS - Returns an unformatted string for use by Bots.
- QSTAT - Returns an unformatted string for use by Bots.
Additional system variables added in 2.06
- GAMEDATA - returns the directory for game data (i.e. data\ClassicTW-GameA).
- BOTLIST- returns a list of available bots from twxp.cfg.
- ACTIVEBOT - returns the alias of the currently active bot.
- ACTIVEBOTDIR - returns the base directory of the currently active bot.
- ACTIVEBOTNAME - returns the name of the currently active bot.
- ACTIVEBOTSCRIPT - returns the script name of the currently active bot.
- VERSION - returns the version of TWX Proxy.
- TWGSTYPE - returns 1 for classic TWGS, and 2 for the Anniversary edition.
- TWGSVER - returns the version of TWGS (i.e. 2.20b).
- TW2002VER - returns the version of TW2002 (i.e. 3.34).
- SECTOR.DEADEND - returns TRUE if the sector has 1 warp and no backdoors.
.