This page will contain a legend for terms often used when talking about Transcendence functions and their syntax.
An atom is anything that is not a list. In Transcendence this boils down to numbers, strings, literals, primitives, and lambdas.
A list is an ordered sequence of atoms and/or other lists. Items can be added and removed from lists in place, and lists can be searched and accessed with various functions. There are many Transcendence functions that return lists of various kinds of game objects based on location and criteria.
Lists are the only container data structure available in transcendence. However, a list of lists such as ( (key1 value1) (key2 value2) …) can be used as a relational array with the (lookup) function.
Numbers in Transcendence are signed integers of a limited size (2^32-1?). They behave pretty much as integers could be expected to.
A literal is a sequence of non-whitespace characters or a parenthesis enclosure prefixed with a ' (apostrophe), such as 'theLiteral or '(literal (list)). Once created, a literal is indistinguishable from a string. Literals tend to be used when code-like tokens are desired, such as in (set 'name (objGetName theShip)), or (shpOrder theShip 'wait).
Trivia: The “q” in (setq) is short for “quote”, as the function is a shorthand for and optimization of (set 'varname data), or (set quote…).
A string is a sequence of characters surrounded by ” (double quotes). Strings are used for nearly all text output to the player, as well as for some internal utility.
Despite being sequences, strings are considered atoms, and most of the list manipulation functions do not work on them.
A lambda is a function stored as data: it is a list of arguments to take and an expression to substitute the arguments into. Typically that expression is a block, to allow for multiple sequential expressions and local variables, but this is not required.
If a lambda is referenced anywhere but as first element of a parenthesis contraption, it is considered data, so you can copy the functionality to another lambda or overwrite its containing variable with a different lambda. If a lambda is printed, its code is shown.
Lambdas-as-data are always truth values, regardless of their return values, so you can have variables containing optional functions (or nil) and gate their execution such as with (if a (a)) to avoid errors about expected function names.
A primitive is an in-built native function provided by Transcendence.exe to the tlisp environment, such as (for) or (if) or (objUnregisterForSystemEvents). There's not much you can do with primitives aside from call them, copy them to other names (e.g., (setq * multiply)), or accidentally mask them with variables ((setq list (list 10 20 30)) could give you no end of confusion, for example…).
This section needs to be expanded
Game object references are numbers or lists that represent specific instances or configurations of objects. They are internal representations that should be considered black boxes which can be created or retrieved, stored, and then passed back to functions that manipulate them, but never directly altered in script.
An itemStruct describes a specific qunatity of a specific item in a specific condition (installed, damaged, enhancement type/level, etc). They do not, however, represent a specific location of an item; 5 helium3 fuel rods on your ship will have the same itemStruct as 5 helium3 fuel rods stored on a Charon frigate.
A spaceObject is an instance of a station (star, planet, space station) or a ship that exists somewhere within one of the star systems that make up Transcendence's game field.
An item is considered unknown if the player does not know anything about the item except for its general type. Items are unknown at the start of the game if their ItemType definition has a unknownType=”<UNID>” field, in which case they will appear as if they were of the unknownType until identified. (The engine will randomly pick one of the list of names given for each item type at startup.)
Some kinds of equipment will be identified when installed (such as cargo expansions) or used (such as weapons), but many types of item that use the identification feature need to set the known status in script. Once an item is known, via any means, the status cannot be revoked.
An item is considered referenced when is statistics (such as damage or resistance) are known by the player. This only applies to equipment items. Reference status cannot be revoked once applied.
While the functions to manage referenced status are still available, this feature has been unused since sometime around version 1.0 of Transcendence. All items are now natively referenced from the beginning of the game. The functions only appear in the Rowena's Weapons and Armor ROMs, which now never spawn.
When dealing with fonts in DockScreens there are several sizes that can be used:
Small Text TextBold Medium MediumBold MediumHeavyBold Large LargeBold Header SubTitle SubTitleBold Title
G Stargates only G:xyz; Stargate with ID 'xyz' s Include ships t Include stations (including planets) T Include structure-scale stations T:xyz; Include stations with attribute 'xyz' A Active objects only (i.e., objects that can attack) B:xyz; Only objects with attribute 'xyz' D:xyz; Only objects with data 'xyz' E Enemy objects only F Friendly objects only H Only objects whose base = source M Manufactured objects only (i.e., no planets or asteroids) N Return only the nearest object to the source N:nn; Return only objects within nn light-seconds O:abc; Ships whose order is abc [docked, patrol, escort etc...] P only objects visible to source J only objects from a given sovereign K only objects that cannot attack R:nn; Return only objects greater than nn light-seconds away V Include Virtual objects Z Exclude player z Only include player b Beam Objects m Missile Objects X Objects targeting Source S:d returns objects sorted by distance (in ascending order) S:D returns objects sorted by distance (in descending order) I:angle returns only objects that intersect a line from the source at the given angle +xyz; Include objects with the given attribute -xyz; Exclude objects with the given attribute +unid:abc Return all ships in the system with +unid:&someUNID; or +unid:0xFFFFFFFF (special hard-coded attribute)
a = an adventure UNID b = item table UNID c = effect type UNID d = dock screen UNID e = space environment UNID f = energy field UNID h = ship table UNID i = item type UNID m = image UNID p = power UNID s = ship class UNID t = station type UNID u = sound UNID v = sovereign UNID y = system type UNID V = Only find virtual items $ = Currencies Use +attrib and -attrib to select attributes isPlayerClass:true/false is a special attribute
These flags are used for controlling the formatting of names of items, ships and stations.
Flags can be added together to create a certain formatting, ie. 3 would be pluralized and capitalized.
1 - capitalize 2 - pluralize 4 - prefix with 'the' or 'a' 8 - prefix with count
Damage types are represented as integers or hexadecimal values in script
-1 - Generic 0 (0x0) - Laser 1 (0x1) - Kinetic 2 (0x2) - Particle 3 (0x3) - Blast 4 (0x4) - Ion 5 (0x5) - Thermo 6 (0x6) - Positron 7 (0x7) - Plasma 8 (0x8) - Antimatter 9 (0x9) - Nano 10 (0xA) - Graviton 11 (0xB) - Singularity 12 (0xC) - DarkAcid 13 (0xD) - DarkSteel 14 (0xE) - DarkLightning 15 (0xF) - DarkFire
The game uses frequency values to say how often something appears in the game. The known values are:
* Common: 20 * Uncommon: 10 * Rare: 4 * VeryRare: 1
A string with series of 5 characters separated by spaces. Each character represents a level. '-' means no chance for an occurance at that level. 'c' means it is common for an occurance at that level. 'u' means it is uncommon for an occurance at that level. 'r' means it is rare for an occurance at that level and 'v' means it is very rare for an occurance at that level.
An example LevelString would be
vrucu rv---
Which translates to
In practice this means more level 4 items will be generated than level 5 and 3, which in turn will generate more than level 2 and 6, which in turn will generate more than level 1 and 7.
Enhancements on items are reported as hexadecimal values (sometimes converted to integers) This is a list of known enhancements and their values:
Y and X are hexadecimal values (0-F)
-- SHIELD
-- DAMAGE REFLECT - Damage Bounces off shields
0x03YX - Refect damage type Y with X chance
-- DAMAGE TRANSPARENCY - Damage Passes throught shield
0x83YX - Pass throught damage type Y with X change
-- ARMOR
-- REGENERATION
0x0200
-- DECAY
0x8200
-- IMUNITIES
0x0B00 - RADIATION
0x0B10 - BLINDING
0x0B20 - EMP
0x0B30 - DEVICE DAMAGE
0x0B40 - DISINTEGRATION
0x0C00 - BLINDING/EMP/DEVICE DAMAGE
-- INTERFERES WITH SHIELDS
0x8C00
-- REGENERATES NEAR SUN
0x0D00
-- REFUELS REACTOR NEAR SUN
0x0E00
-- WEAPON
-- DAMAGE BONUS - Adds from 10 to 150% damage bonus
0x010X
-- DAMAGE PENALTY - Adds from 10 to 150% damage penalty
0x810X
-- SPEED - Increases shooting speed of weapon up till 30/sec
0x100X - X can be 2, 4, 6 or 8
-- DECREASE SPEED
0x900X - X can be 2, 4, 6 or 8
-- SHIELD/ARMOR
-- HP BONUS - Adds from 10 to 150% HP bonus of armor/shield
0x010X
-- HP PENALTY
0x810X
-- DAMAGE REDUCTION
0x060X - reduce ENERGY damage
0x070X - reduce MATTER damage
0x08YX - reduce Y and Y+1 type damage
0x09YX - reduce Y type damage
0x0AYX - reduce type Y damage and Y+2 type damage with 1.5X
-- DAMAGE INCREASE
0x860X - increase ENERGY damage
0x870X - increase MATTER damage
0x88YX - increase Y and Y+1 type damage
0x89YX - increase Y type damage
0x8AYX - increase type Y damage and Y+2 type damage with 1.5X
-- SHIELD/WEAPON
-- EFFICIENCY - Decreases the energy consumption of weapon
0x0F0X
-- DECREASE EFFICIENCY
0x8F0X
When you retrieve the category of an item in script, it is given as an integer. The category can be inferred from this list:
1 (0x0001) - Misc Item 2 (0x0002) - Armor 4 (0x0004) - Weapon 8 (0x0008) - Special Devices (Patch Spider, Jumpdrive, Enhancers) 16 (0x0010) - Missile Launcher 64 (0x0040) - Reactor 128 (0x0080) - Shield 256 (0x0100) - Cargo bay 512 (0x0200) - Fuel 1024 (0x0400) - Ammo 2048 (0x0800) - Drive 4096 (0x1000) - Useable
When retrieving items based on item criteria, these are the flags used:
* all categories a armor b Special Devices (Patch Spider, Jumpdrive, Enhancers) c cargo hold d device (weapon, shield, drive, etc.) f fuel l launcher m missile/ammo r reactor s shields t miscellaneous u useful (armor coating, ROM, etc.) v drive w weapon (including launchers) I is installed D is damaged N is not damaged S is usable V is Virtual U is not installed
Some special attributes
canBeDamaged:true only items that can be damaged damageType:Laser only items that have a certain damage type. Also limits to weapons (obviously) unid:0xXXXX only items with matching UNID
In addition there exists a special syntax for negating, filtering on levels etc…
~ Negate. Eg. w~l will match weapons that are not launchers. ^ Force. Eg. a^u will match armors that are usable < and > Less than and Greater than. There are several ways to use these operators <=$500 Items that cost less than 500 credits >=#25 Items where there are greater than 25 in the stack. Used when getting items from objects <=6 Items below level 6 L New in 1.04. Level Constraint. Eg. L:1-5 selects levels between 1 and 5 (inclusive). Replaces above syntax. F Rarity. Eg. F:cu will only select Common or Uncommon items
There are some modifiers which can be used. Modifiers are case sensitive. Modifiers can be added freely in mods.
These modifiers are given in Transcendence.xml
Alien Item is not found in Human Space AntiMatter Item is involved in AntiMatter industry Auton Item is an auton BlackMarketID This is a black market ID Bushido Item is sold by Bushido corp Food Item is human food or drink Fuel Item is starship fuel HaloGem Item is a halo gem ID Item is an ID Illegal Item is illegal in Human Space Info Item consists of digital information Lux Item is human luxury good Makayev Item is sold by Makayev corp Meds Item is human medicine Military Item is restricted to military in Human Space MilitaryID Item is a military ID Missile Item is ammo or missile Nuclear Item is involved in nuclear industry Rasiermesser Item is sold by Rasiermesser corp Res Item is a resource needed for industry RingerValuable Item is used by Ringers Soul Item contains (possibly dormant) intelligence of HIG III or above Specialty Item is not a commodity; for sale only in specific stations ZeroPoint Item is used in Zero-point energy industry Consumable Item is consumable (missiles/ammo/treasure) MajorItem Device/Shield/Weapon MinorItem Armor/Enhancements
The following modifiers are not given in Transcendence.xml
EI NAMI
These are the orders used in vanilla or known to exist. They all have slightly different function signatures. The number preceding is the internal order number. Not all of the orders can be used with shpOrder. See this thread for more information:
http://www.neurohack.com/transcendence/forums/viewtopic.php?p=42708#p42708
needs to be expanded with signatures and more descriptions
1 guard Guard target 2 dock Dock with target 3 attack Attack target 4 wait Unsure. Wait at position for a time (or for a target?) 5 gate Go to nearest gate (or specified gate) and use it 6 gateOnThreat 7 gateOnStationDestroyed 8 patrol Patrol a target at a set distance (in ls) 9 escort Escort target 10 scavenge 11 followPlayerThroughGate 12 attackNearestEnemy Name says it all 13 tradeRoute 14 wander Wander around the system 15 loot Loot target (must be a wreck) 16 hold Hold position (optionally for a certain period) 17 mine Mine a target object (only for Ferian Controller) 18 waitForPlayer 19 attackPlayerOnReturn 20 follow Follow target 21 navPath 22 goto Go to target 23 waitForTarget 24 waitForEnemy 25 bombard Bombard target 26 approach Approach a marker until a certain distance? 27 aim Aim at target 28 orbit Orbit around a target at a set distance (in ls) 29 holdCourse Hold a certain course for a certain time (in ticks) 30 turnTo Turn the ship in direction (angular) 31 attackHold Attack target but hold position (no chasing)
The functions objGetDataField and typGetDataField access predetermined data tags, of which these are known:
cargoSpace explosion fireAccuracy fireRangeAdj fireRateAdj launcher launcherUNID level maxSpeed maneuver manufacturer name - combined class and type primaryArmor primaryArmorUNID primaryWeapon primaryWeaponRange primaryWeaponRangeAdj primaryWeaponUNID score shield shieldsUNID thrustToWeight speed - speed of missile or a weapons projectile
new fields in 1.04
deviceSlots - available for ships, used for devices deviceSlotsNonWeapons - total number of device slots that take non-weapons deviceSlotsWeapons - total number of device slots that take weapons genericName - <del>manufactuer/</del>class/type as string - unlike ticket says, does not give manuf. hullMass - mass of hull without items/devices in tons maxArmorMass - max size of compatable armor segments in kilograms maxCargoSpace - max possible cargo space with expansions in tons fuelCapacity - max fuel in reactor/shipclass, fuel provided by fuel items fuelCriteria - criteria string of fuel that reactorDevice/shipClass takes fuelEfficency - reactorDevice (and shipclass) attribute power - max power output of reactorDevice/shipclass maxSpeed - driveDevice max speed provided thrust - thrust provided by driveDevice, maybe ship? cargoSpace - amount that a cargoDevice will increase cargospace armorItems - list of armor items from shipClass deviceItems - list of device items from shipclass category - data field on item for 'weapon' 'shield' etc
Friendly Will not fight back (unless scripted or prompted by AI) Neutral Will attack if attacked. Enemy Will openly attack.
All Sovereigns are Friendly to others of same Sovereign.
Destructive Chaos Enemy to all not of exactly same Sov
Constructive Chaos Enemy to Destructive. Neutral to Neutral.
and Constructive Order, Friendly to Constructive Chaos
Destructive Order Enemy to Constructive. Neutral to Neutral and Destructive Order.
Enemy to Destructive Chaos.
Constructive Order Enemy to Destructive. Neutral to Neutral
and Constructive Chaos. Friendly to Constructive Order.
Neutral Enemy to Destructive Chaos. Neutral to everyone else.
These are the IDs of the messages sent to the player throughout the game. Use plyEnableMessage to turn them on or off.
commsHint dockHint mapHint autopilotHint gateHint useItemHint refuelHint enableDeviceHint switchMissileHint fireMissileHint
Also, you can use allHints to enable/disable all hints