Function list 1.7b4

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
Fleet Admiral
Fleet Admiral
Posts: 2615
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Mon Jan 02, 2017 11:10 pm

Transcendence 1.7b4 (apiVersion 33)

Diff from 1.7b1-1.7b4


(getAPIVersion) -> version
(make 'sequence count) -> list from 1 to count
(make 'sequence start end [inc]) -> list from start to end
(objRecordBuyItem buyerObj sellerObj item [currency] price) -> True/Nil
(sysIncData [nodeID] attrib increment) -> new value
(uiSetSoundtrackMode mode [soundtrackUNID])


(itmGetProperty item|type property) -> value
now accepts 'lifetime as a valid property

(objCanInstallItem obj item [armorSeg|deviceSlot]) -> (True/Nil resultCode resultString [itemToReplace])


'notCompatible ***

Fixed typo in:
(objGetBuyPrice obj item [options]) -> price (at which obj ***buys item)



(objSetProperty obj property value) -> True/Nil

property (ships)

'alwaysLeaveWreck True|Nil
'dockingEnabled True|Nil
'commsKey key
'known True|Nil
'playerWingman True|Nil
'rotation angle
'selectedMissile type|item
'selectedWeapon type|item

property (stations)

'angry True|Nil|ticks ***
'barrier True|Nil
'ignoreFriendlyFire True|Nil
'hp hitPoints
'immutable True|Nil
'known True|Nil
'maxHP hitPoints
'maxStructuralHP hitPoints
'orbit orbit|Nil
'paintLayer 'overhang|Nil
'parallax factor
'playerBlacklisted True|Nil
'shipConstructionEnabled True|Nil
'shipReinforcementEnabled True|Nil
'structuralHP hitPoints

(plyChangeShip player newShip [options]) -> True/Nil



(sysCreateShip unid pos sovereignID [options|eventHandler|controller]) -> ship or list


'target (for ship tables)


(rpgCharacterGetStatus ...)
(rpgCharacterIsAliveAndWell ...)
(rpgCharacterSetStatus ...)
(rpgMissionAssignmentOnScreenInit ...)



(!= ...)
(* x1 x2 ... xn) -> z
(+ x1 x2 ... xn) -> z
(- x y) -> z
(- x) -> -x
(/ x y) -> z
(< ...)
(<= ...)
(= ...)
(> ...)
(>= ...)
(@ list index)
(abs x) -> z
(add x1 x2 ... xn) -> z
(and exp1 exp2 ... expn) -> True/Nil
(append a b [...]) -> lists are concatenated
(apply exp arg1 arg2 ... argn list) -> Result
(armGetRepairCost type) -> Cost to repair 1 hit point
(armGetRepairTech type) -> Tech level required to repair
(atmAddEntry ...)
(atmAtomTable ...)
(atmDeleteEntry ...)
(atmList ...)
(atmLookup ...)
(block ...)
(cat s1 s2 ... sn) -> string
(ceil x) -> y
(cnvDrawImage x y imageDesc [screen] [ID])
(cnvDrawLine xFrom yFrom xTo yTo width color [screen] [ID])
(cnvDrawRect x y width height color [screen] [ID])
(cnvDrawText x y [width] text font color alignment [screen] [ID])
(convertTo type value) -> result
(count list) -> number of items
(dbgLog [string]*)
(dbgOutput [string]*)
(divide x y) -> z
(double ...)
(ecoExchange amount fromCurrency toCurrency) -> amount
(enum list itemVar exp)
(enumwhile list condition itemVar exp)
(eq ...)
(errblock ...)
(error msg) -> error
(eval ...)
(filter list var boolean-exp) -> filtered list
(find source target ['ascending|'descending] [keyIndex]) -> position of target in source (0-based)
(floor x) -> y
(fmtCurrency currency [amount]) -> string
(fmtNoun name nameFlags count formatFlags) -> string
(fmtNumber value) -> string
(fmtPower powerInKWs) -> string
(fncHelp ...)
(for var from to exp)
(gamEnd endGameReason epitaph [scoreBonus]) -> True/Nil
(gamSave [options]) -> True/Nil


'checkpoint (or Nil)

(gamSetCrawlImage imageUNID) -> True/Nil
(gamSetCrawlSoundtrack soundtrackUNID) -> True/Nil
(gamSetCrawlText text) -> True/Nil
(geq a b) -> True if a >= b
(getAPIVersion) -> version
(gr a b) -> True if a > b
(help) -> all functions
(help partial-name) -> all functions starting with name
(help function-name) -> help on function
(if ...)
(int ...)
(objTranslate obj textID [data] [default]) -> text (or Nil)
(isatom ...)
(iserror ...)
(isfunction ...)
(isint ...)
(isprimitive ...)
(itmCreate itemUNID count) -> item
(itmCreateByName criteria name [count]) -> item
(itmCreateRandom criteria levelDistribution) -> item
(itmEnumTypes criteria item-var exp)
(itmFireEvent item|type event [data]) -> result of event
(itmGetActualPrice item|type) -> actual price of a single item
(itmGetArmorInstalledLocation item) -> segment #
(itmGetArmorType item) -> type
(itmGetAverageAppearing item|type) -> average number that appear randomly
(itmGetCategory item|type) -> item category
(itmGetCount item)
(itmGetDamageType item|type) -> damage type
(itmGetData item attrib) -> data
(itmGetFrequency item|type [level]) -> frequency
(itmGetImageDesc item|type) -> imageDesc
(itmGetInstallCost item|type [currency]) -> cost
(itmGetInstallPos item) -> installPos
(itmGetLevel item|type) -> level
(itmGetMass item|type) -> mass of single item in Kg
(itmGetMaxAppearing item|type) -> max number that appear randomly
(itmGetName item|type flags)
(itmGetPrice item|type [currency]) -> price of a single item
(itmGetProperty item|type property) -> value



(itmGetStaticData item attrib) -> data
(itmGetType item) -> itemUNID
(itmGetTypeData item|type attrib) -> data
(itmGetTypes criteria) -> list of itemUNIDs
(itmGetUseScreen item|type)
(itmHasAttribute item|type attrib) -> True/Nil
(itmHasReference item|type)
(itmIsEnhanced item) -> Nil or mods
(itmIsEqual item1 item2 [options]) -> True/Nil



(itmIsInstalled item)
(itmIsKnown item|type)
(itmMatches item|type criteria)
(itmSetCount item count) -> item
(itmSetData item attrib data [count]) -> item
(itmSetEnhanced item mods) -> item
(itmSetKnown type|item [True/Nil])
(itmSetProperty item property value) -> item


'charges charges
'damaged [True|Nil]
'disrupted [True|Nil|ticks]
'incCharges charges
'installed [True|Nil]

(itmSetReference item)
(itmSetTypeData item attrib data) -> True/Nil
(join list [separator]) -> string
(join list 'oxfordComma) -> string
(lambda ...)
(leq a b) -> True if a <= b
(link ...)
(list i1 i2 ... in) -> list
(lnkAppend list item) -> list
(lnkRemove list index) -> list
(lnkRemoveNil list) -> list
(lnkReplace list index item) -> list
(lookup source target ['ascending|'descending] [keyIndex]) -> found entry
(loop condition exp)
(ls a b) -> True if a < b
(make 'sequence count) -> list from 1 to count
(make 'sequence start end [inc]) -> list from start to end
(map list ['excludeNil|'original|'reduceMax|'reduceMin] var exp) -> list
(match list var boolean-exp) -> first item that matches
(max x1 x2 ... xn) -> z
(min x1 x2 ... xn) -> z
(mod ['degrees] x y) -> z
(modulo ['degrees] x y) -> z
(msnAccept missionObj)
(msnAddRecurringTimerEvent missionObj interval event)

interval in ticks

(msnAddTimerEvent missionObj delay event)

delay in ticks

(msnCancelTimerEvent missionObj event) -> True/Nil
(msnCreate unid owner [data]) -> missionObj|Nil
(msnCreate unid-list owner [data]) -> missionObj|Nil

(msnDecline missionObj)
(msnDestroy missionObj) -> True/Nil
(msnFailure missionObj [data])
(msnFind [source] criteria) -> list of missionObjs


* Include all missions states
a Include active player missions
o Include open missions
r Include already debriefed (recorded) missions
u Include unavailable missions
S Only missions owned by source
+/-{attrib} Require/exclude missions with given attribute
+/-ownerID:{id} Require/exclude missions with given owner
+/-unid:{unid} Require/exclude missions of given unid

(msnFireEvent missionObj event [data]) -> result of event
(msnGetData missionObj attrib) -> data
(msnGetObjRefData missionObj attrib) -> obj
(msnGetProperty missionObj property) -> value


'acceptedOn Tick on which player accepted mission (or Nil)
'canBeDeleted Mission can be deleted by player
'debrieferID ID of the object that will debrief the player
'id Mission object ID
'isActive Is an active player mission
'isCompleted Is a completed mission (player or non-player)
'isDebriefed Player has been debriefed
'isDeclined Player has declined mission
'isFailure Mission has failed
'isIntroShown Player has been shown intro text
'isOpen Mission is available to player
'isSuccess Mission has succeeded
'isUnavailable Mission is unavailable to player
'name The name of the mission
'nodeID ID of the mission's owner system
'ownerID ID of the mission's owner object
'summary A summary description of the mission
'unid Mission type UNID

(msnGetStaticData missionObj attrib) -> data
(msnIncData missionObj attrib [increment]) -> new value
(msnRegisterForEvents missionObj obj)
(msnReward missionObj [data])
(msnSetData missionObj attrib data)
(msnSetObjRefData missionObj attrib obj)
(msnSetPlayerTarget missionObj)
(msnSetProperty obj property value) -> True/Nil


'debrieferID obj
'isDebriefed True|Nil
'isDeclined True|Nil
'isIntroShown True|Nil
'name newName
'summary newSummary

(msnSetUnavailable missionObj)
(msnSuccess missionObj [data])
(msnTranslate missionObj textID [data] [default]) -> text (or Nil)
(multiply x1 x2 ... xn) -> z
(neq ...)
(not exp) -> True/Nil
(objAccelerate obj angle thrust [ticks]) -> velVector
(objAddBuyOrder obj criteria priceAdj) -> True/Nil
(objAddItem obj item|type [count])
(objAddItemEnhancement obj item enhancementType [lifetime]) -> enhancementID
(objAddOverlay obj overlayType [lifetime]) -> overlayID
(objAddOverlay obj overlayType pos rotation [lifetime]) -> overlayID
(objAddRandomItems obj table count)
(objAddSellOrder obj criteria priceAdj) -> True/Nil
(objAddSubordinate obj subordinate) -> True/Nil
(objCanAttack obj) -> True/Nil
(objCanDetectTarget obj target) -> True/Nil
(objCanInstallItem obj item [armorSeg|deviceSlot]) -> (True/Nil resultCode resultString [itemToReplace])



(objChangeEquipmentStatus obj equipment command [duration] [options]) -> True/Nil





duration is in ticks



(objCharge obj [currency] amount) -> remaining balance
(objClearIdentified obj)
(objClearShowAsDestination obj)
(objCommunicate obj senderObj msg [obj] [data]) -> result


(objCredit obj [currency] amount) -> new balance
(objDamage obj weaponType objSource [pos] [options]) -> result




(objDepleteShields obj)
(objDestroy obj [objSource]) -> True/Nil
(objEnumItems obj criteria itemVar exp)
(objFireEvent obj event [data]) -> result of event
(objFireItemEvent obj item event [data]) -> result of event
(objFireItemInvoke obj item) -> True/Nil
(objFireOverlayEvent obj overlayID event [data]) -> result of event
(objFixParalysis obj)
(objGateTo obj node entrypoint [effectID])
(objGetArmorCriticality obj item|armorSegment) -> criticalityType
(objGetArmorDamage obj item|armorSegment) -> damage to armor segment
(objGetArmorLevel obj item|armorSegment) -> 0-100
(objGetArmorName obj item|armorSegment) -> name of armor (e.g., 'forward', etc.)
(objGetArmorRepairPrice obj [shipObj] armorItem hpToRepair) -> price (at which obj repairs)
(objGetArmorReplacePrice obj armorItem) -> price
(objGetArmorType obj item|armorSegment) -> type
(objGetBalance obj [currency]) -> balance
(objGetBuyPrice obj item [options]) -> price (at which obj buys item)



(objGetCargoSpaceLeft obj) -> space left in Kg
(objGetCombatPower obj) -> 0-100
(objGetDamageType obj) -> damage type
(objGetData obj attrib) -> data
(objGetDataField obj field) -> data
(objGetDestiny obj) -> 0-359
(objGetDisposition obj targetObj) -> disposition of obj towards targetObj



(objGetDistance obj destObj) -> distance in light-seconds
(objGetEquipmentStatus obj equipment) -> status





(objGetEventHandler obj) -> unid or Nil
(objGetID obj) -> objID
(objGetImageDesc obj) -> imageDesc
(objGetInstalledItemDesc obj item) -> 'installed as forward armor'
(objGetItemProperty obj item property) -> value



All properties for itmGetProperty are also valid.

(objGetItems obj criteria) -> list of items
(objGetLevel obj) -> level
(objGetMass obj) -> mass in tons
(objGetMaxPower obj) -> power (in 1/10 MWs)
(objGetName obj [flags]) -> Name of the object
(objGetNamedItems obj name) -> list of items
(objGetNearestStargate obj) -> obj
(objGetObjByID objID) -> obj
(objGetObjRefData obj attrib) -> obj
(objGetOpenDockingPortCount obj) -> count of open docking ports
(objGetOrderGiver obj [destroyReason]) -> obj
(objGetOverlayData obj overlayID attrib) -> data
(objGetOverlayPos obj overlayID) -> vector
(objGetOverlayProperty obj overlayID property) -> value



(objGetOverlayRotation obj overlayID) -> rotation
(objGetOverlays obj [criteria]) -> list of overlayIDs
(objGetOverlayType obj overlayID) -> type
(objGetPlayerPriceAdj obj [data]) -> priceAdj (or Nil if no adj)
(objGetPos obj) -> vector
(objGetProperty obj property) -> value

property (all)


property (ships)


property (stations)


property (missiles)


NOTE: All type properties (accessed via typGetProperty) are also valid object properties.

(objGetRefuelItemAndPrice obj objToRefuel) -> (item price)
(objGetSellPrice obj item ['noInventoryCheck]) -> price (at which obj sells item)
(objGetShieldLevel obj) -> 0-100 (or -1 for no shields)
(objGetShipBuyPrice obj shipObj) -> price (at which obj buys ship)
(objGetShipSellPrice obj shipObj) -> price (at which obj sells ship)
(objGetShipwreckType obj) -> unid
(objGetSovereign obj) -> sovereignID
(objGetStargateID obj) -> gateID
(objGetStaticData obj attrib) -> data
(objGetTarget obj) -> obj
(objGetType obj) -> unid
(objGetTypeData obj attrib) -> data
(objGetVel obj) -> velVector
(objGetVisibleDamage obj) -> damage
(objHasAttribute obj attrib) -> True/Nil
(objHasItem obj item [count]) -> number of items (or Nil)
(objIncData obj attrib [increment]) -> new value
(objIncOverlayData obj overlayID attrib [increment]) -> new value
(objIncVel obj velVector) -> velVector
(objIsAngryAt obj targetObj) -> True/Nil
(objIsDeviceSlotAvailable ship) -> True/Nil
(objIsDockedAt obj stationObj) -> True/Nil
(objIsEnemy obj target) -> True/Nil
(objIsIdentified obj) -> True/Nil
(objIsKnown obj)
(objIsParalyzed obj)
(objIsRadioactive obj)
(objIsShip obj) -> True/Nil
(objJumpTo obj pos)
(objLowerShields obj)
(objMakeParalyzed obj ticks)
(objMatches obj source filter) -> True/Nil
(objProgramDamage obj hacker progName aiLevel code)
(objRecordBuyItem buyerObj sellerObj item [currency] price) -> True/Nil
(objRegisterForEvents target obj)
(objRegisterForSystemEvents target range)
(objRemoveItem obj item [count])
(objRemoveItemEnhancement obj item enhancementID)
(objRemoveOverlay obj overlayID)
(objRepairArmor ship item|armorSegment [hpToRepair]) -> hp repaired
(objResume obj [gateObj])
(objSendMessage obj sender text) -> True/Nil
(objSetData obj attrib data)
(objSetDeviceActivationDelay obj deviceItem [delay]) -> True/Nil
(objSetEventHandler obj unid) -> True/Nil
(objSetIdentified obj)
(objSetItemData obj item attrib data [count]) -> item
(objSetItemProperty obj item property value [count]) -> item


'charges charges
'damaged [True|Nil]
'disrupted [True|Nil|ticks]
'enabled [True|Nil|'silentDisabled|'silentEnabled]
'fireArc Nil|(min max)|'omnidirectional
'hp hitPoints
'incCharges charges
'linkedFireOptions list-of-options
'pos (angle radius [z])
'secondary [True|Nil]

(objSetKnown obj)
(objSetName obj name [flags])


0x0001 Definite article
0x0002 Pluralize first word
0x0004 Add 'es' to pluralize
0x0008 Custom plural after semicolon
0x0010 Pluralize second word
0x0020 Reverse 'a' vs 'an'
0x0040 No article
0x0080 Personal name

(objSetObjRefData obj attrib obj)
(objSetOverlayData obj overlayID attrib data)
(objSetOverlayEffectProperty obj overlayID property value)
(objSetOverlayPos obj overlayID pos)
(objSetOverlayProperty obj overlayID property value)


'pos position
'rotation angle

(objSetOverlayRotation obj overlayID rotation)
(objSetPos obj vector [rotation])
(objSetProperty obj property value) -> True/Nil

property (ships)

'alwaysLeaveWreck True|Nil
'dockingEnabled True|Nil
'commsKey key
'known True|Nil
'playerWingman True|Nil
'rotation angle
'selectedMissile type|item
'selectedWeapon type|item

property (stations)

'angry True|Nil|ticks
'barrier True|Nil
'ignoreFriendlyFire True|Nil
'hp hitPoints
'immutable True|Nil
'known True|Nil
'maxHP hitPoints
'maxStructuralHP hitPoints
'orbit orbit|Nil
'paintLayer 'overhang|Nil
'parallax factor
'playerBlacklisted True|Nil
'shipConstructionEnabled True|Nil
'shipReinforcementEnabled True|Nil
'structuralHP hitPoints

(objSetShowAsDestination obj [options]) -> True/Nil


'autoClear Clear when in SRS range
'autoClearOnDestroy Clear when destroyed
'autoClearOnDock Clear when player docks
'showDistance Show distance
'showHighlight Show target highlight

(objSetSovereign obj sovereignID) -> True/Nil
(objSetTradeDesc obj currency [maxCurrency replenishCurrency]) -> True/Nil
(objSetTypeData obj attrib data)
(objSetVel obj velVector)
(objSuspend obj)
(objTranslate obj textID [data] [default]) -> text (or Nil)
(objUnregisterForEvents target obj)
(objUnregisterForSystemEvents target)
(or exp1 exp2 ... expn) -> True/Nil
(plyChangeShip player newShip [options]) -> True/Nil



(plyCharge player [currency] charge) -> credits left
(plyComposeString player string [arg1 arg2 ... argn]) -> string
(plyCredit player [currency] credit) -> credits left
(plyDestroyed player epitaph)
(plyEnableMessage player messageID True/Nil) -> True/Nil


(plus all messageIDs for plyIsMessageEnabled)

(plyGetCredits player [currency]) -> credits left
(plyGetGenome player) -> 'humanMale | 'humanFemale
(plyGetItemStat player stat criteria|type) -> value



(plyGetKeyEventStat player stat nodeID typeCriteria) -> value



(plyGetRedirectMessage ...)
(plyGetStat player stat) -> value



(plyIsMessageEnabled player messageID) -> True/Nil



(plyMessage ...)
(plyRecordBuyItem player item [currency] totalPrice)
(plyRecordSellItem player item [currency] totalPrice)
(plyRedirectMessage ...)
(plyUseItem player item)
(pow x y) -> z
(power x y) -> z
(print [string]*)
(printTo output [string]*)

output is one or more of:


(quote exp) -> unevaluated exp
(random from to)
(random list)
(randomGaussian low mid high) -> random number between low and high
(randomTable chance1 exp1 chance2 exp2 ... chancen expn) -> exp
(regex source pattern ['offset|'subex]) -> result
(resColorBlend rgbDest rgbSource srcOpacity) -> rgbColor
(resCreateImageDesc imageUNID x y width height) -> imageDesc
(rollDice count sides bonus)
(round ['stochastic] x) -> y
(scrAddAction screen actionID pos label [key] [special] code)
(scrAddMinorAction screen actionID pos label [key] [special] code)
(scrEnableAction screen actionID enabled)
(scrExitScreen screen ['forceUndock])
(scrGetCounter ...)
(scrGetData screen attrib) -> data
(scrGetDesc screen)
(scrGetInputText ...)
(scrGetItem ...)
(scrGetListCursor screen) -> cursor
(scrGetListEntry ...)
(scrGetScreen gScreen) -> screenDesc


'screen: Current screen
'pane: Current pane
'data: Associated data
(scrIncData screen attrib [increment])
(scrIsActionEnabled screen actionID) -> True/Nil
(scrIsFirstOnInit ...)
(scrRefreshScreen screen)
(scrRemoveAction screen actionID)
(scrRemoveItem ...)
(scrSetActionDesc screen actionID descID)
(scrSetActionLabel screen actionID label [key] [special])
(scrSetBackgroundImage screen imageDesc)
(scrSetControlValue screen controlID value) -> True/Nil
(scrSetControlValueTranslate screen controlID textID [data]) -> True/Nil
(scrSetCounter ...)
(scrSetData screen attrib data)
(scrSetDesc screen text [text...])
(scrSetDescTranslate screen textID [data]) -> True/Nil
(scrSetDisplayText screen ID text [text...])
(scrSetInputText ...)
(scrSetListCursor screen cursor)
(scrSetListFilter ...)
(scrShowAction screen actionID shown)
(scrShowPane ...)
(scrShowScreen screenGlobal screen [pane] [data])
(scrTranslate screen textID [data]) -> text or Nil
(seededRandom seed from to)
(seededRandom seed list)
(set ...)
([email protected] list-var index value) -> list
([email protected] struct-var key value) -> struct
([email protected] struct-var struct) -> merged structs
(setq ...)
(shpCancelOrders ship)
(shpCanRemoveDevice ship item) -> result
(shpConsumeFuel ship fuel)
(shpDamageArmor ship armorSegment damageType damage ['noSRSFlash]) -> damage done
(shpDecontaminate ship)
(shpEnhanceItem ship item [mods]) -> True/Nil
(shpGetAISetting ship setting)
(shpGetArmor ship armorSegment) -> item struct
(shpGetArmorCount ship) -> number of armor segments
(shpGetArmorMaxHitPoints obj item|armorSegment) -> damage to armor segment
(shpGetClassName class flags) -> class name
(shpGetDirection ship) -> angle
(shpGetDockObj ship) -> dockObj
(shpGetFuelLeft ship) -> fuel left
(shpGetFuelNeeded ship item) -> items needed
(shpGetImageDesc class [rotationAngle]) -> imageDesc
(shpGetItemDeviceName ship item) -> device name of item (or -1)
(shpGetMaxSpeed ship) -> max speed in of lightspeed
(shpGetOrder obj) -> order
(shpGetOrderDesc obj) -> orderDesc
(shpGetOrderTarget obj) -> obj
(shpGetShieldDamage ship) -> damage to shields
(shpGetShieldItemUNID ship) -> UNID (or Nil)
(shpGetShieldMaxHitPoints ship) -> max hp of shields
(shpInstallArmor ship item armorSegment)
(shpInstallDevice ship item [deviceSlot])
(shpIsBlind ship)
(shpIsFuelCompatible ship item) -> True/Nil
(shpIsRadiationImmune ship [item])
(shpMakeRadioactive ship)
(shpOrder ship order [target] [count]) -> True/Nil
(shpOrderImmediate ship order [target] [count]) -> True/Nil
(shpRechargeShield ship hpToRecharge)
(shpRefuelFromItem ship item) -> True/Nil
(shpRemoveDevice ship item) -> item
(shpRepairItem ship item)
(shpSetAISetting ship setting value)


= 'advanced
= 'chase
= 'flyby
= 'noRetreat
= 'standard
= 'standOff

'aggressor (True/Nil)
'ascendOnGate (True/Nil)
'flockFormation (True/Nil)
'ignoreShieldsDown (True/Nil)
'noAttackOnThreat (True/Nil)
'noDogfights (True/Nil)
'noFriendlyFire (True/Nil)
'noFriendlyFireCheck (True/Nil)
'noNavPaths (True/Nil)
'noOrderGiver (True/Nil)
'noTargetsOfOpportunity (True/Nil)

'combatSeparation {pixels}
'fireAccuracy {percent}
'fireRangeAdj {percent}
'fireRateAdj {value; 10 = normal; 20 = twice as slow}
'perception {value}

(shpSetCommandCode ship code) -> True/Nil
(shpSetController ship controller) -> True/Nil
(shuffle list) -> shuffled list
(sort list ['ascending|'descending] [keyIndex]) -> sorted list
(sovGetDisposition sovereignID targetSovereignID) -> disposition of sovereign to target
(sovMessage sovereignID text) -> True/Nil
(sovMessageFromObj sovereignID obj text) -> True/Nil
(sovSetDisposition sovereignID targetSovereignID disposition)
(split string [characters]) -> list
(sqrt x) -> z
(sqrtn x) -> z
(staClearFireReconEvent station)
(staClearReconned station)
(staGetDockedShips station) -> list of docked ships
(staGetImageVariant station) -> variant
(staGetSubordinates station) -> list of subordinates (e.g., guardians)
(staIsEncountered type) -> True/Nil
(staIsReconned station) -> True/Nil
(staSetActive station [True/Nil])
(staSetFireReconEvent station)
(staSetImageVariant station variant)
(staSetShowMapLabel station True/Nil)
(strCapitalize string) -> string
(strFind string target) -> pos of target in string (0-based)
(struct key1 value1 key2 value2 ...) -> struct
(struct (key1 value1) (key2 value2) ..) -> struct
(struct { key1:value1 key2:value2 ... } ...) -> struct
(subset list pos [count]) -> list
(subst string arg1 arg2 ... argn) -> string
(subtract x y) -> z
(switch ...)
(sysAddEncounterEvent delay target encounterID gate)
(sysAddEncounterEventAtDist delay target encounterID distance)
(sysAddObjRecurringTimerEvent interval obj event)
(sysAddObjTimerEvent delay obj event)
(sysAddStargateTopology [nodeID] gateID destNodeID destGateID) -> True/Nil
(sysAddTypeRecurringTimerEvent interval type event)
(sysAddTypeTimerEvent delay type event)
(sysAscendObject obj) -> True/Nil
(sysCalcFireSolution targetPos targetVel speed) -> angle to shoot (Nil, if no solution)
(sysCalcStdCombatStrength level) -> standard combat strength for level
(sysCalcTravelDistance speed time) -> distance in light-seconds
(sysCalcTravelTime distance speed) -> time in ticks
(sysCancelTimerEvent obj event) -> True/Nil
(sysCancelTypeTimerEvent type event) -> True/Nil
(sysCreateEffect effectID anchorObj pos [rotation]) -> True/Nil
(sysCreateEncounter unid) -> True/Nil
(sysCreateFlotsam item|unid pos sovereignID) -> obj
(sysCreateHitEffect weaponUNID hitObj hitPos hitDir damageHP) -> True/Nil
(sysCreateLookup tableName orbit) -> True/Nil
(sysCreateMarker name pos sovereignID) -> marker
(sysCreateShip unid pos sovereignID [options|eventHandler|controller]) -> ship or list


'target (for ship tables)

(sysCreateShipwreck unid pos sovereignID) -> shipwreck
(sysCreateStargate unid pos gateID [destNodeID destGateID]) -> obj
(sysCreateStation unid pos [eventHandler]) -> obj
(sysCreateTerritory orbit minRadius maxRadius attributes [criteria]) -> True/Nil
(sysCreateWeaponFire weaponID objSource pos dir speed objTarget [options] [bonus]) -> obj



(sysDescendObject objID pos) -> obj
(sysFindObject source filter) -> list of objects


b Include beams
k Include markers
m Include missiles
s Include ships
t Include stations (including planets)
z Include the player

A Active objects only (i.e., objects that can attack)
D:xyz; Only objects with data 'xyz'
E Enemy objects only
F Friendly objects only
G Stargates only
G:xyz; Stargate with ID 'xyz'
H Only objects whose base = source
I:angle Only objects that intersect line from source
J Same sovereign as source
J:unid; Sovereign unid = unid
K Killed objects only (i.e., objects that cannot attack)
L:x-y; Objects of level x to y.
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:docked; Ships that are currently docked at source
O:escort; Ships ordered to escort source
O:guard; Ships ordered to guard source
P Only objects that can be detected (perceived) by source
R Return only the farthest object to the source
R:nn; Return only objects greater than nn light-seconds away
S:sort Sort order ('d' = distance ascending; 'D' = distance descending
T Include structure-scale stations
T:xyz; Include stations with attribute 'xyz'
V Include virtual objects
X Only objects whose target is the source
Y Only objects angry at the player (or enemies)
Z Exclude the player

+xyz; Exclude objects without the given attribute
-xyz; Exclude objects with the given attribute

=n Level comparisons

(sysFindObjectAtPos source criteria pos [destPos]) -> list of objects
(sysGetData [nodeID] attrib) -> data
(sysGetEnvironment pos) -> environmentUNID
(sysGetLevel [nodeID]) -> level
(sysGetLightIntensity pos) -> intensity (0-100)
(sysGetName [nodeID]) -> name
(sysGetNavPathPoint sovereignID objFrom objTo ath) -> vector
(sysGetNode) -> nodeID
(sysGetNodes) -> list of nodeIDs
(sysGetObjectByName [source] name) -> obj
(sysGetProperty [nodeID] property) -> value


'level The level of the system
'name The name of the system
'pos Node position on map (x y)

(sysGetRandomLocation criteria [options]) -> location or Nil


'objType Type (UNID) of object to place (optional)
'remove If True, remove location


'attribs The attributes for the location
'orbit The orbital parameters
'pos The location position

(sysGetStargateDestination [nodeID] gateID) -> (nodeID gateID)
(sysGetStargateDestinationNode [nodeID] gateID) -> nodeID
(sysGetStargates [nodeID]) -> list of gateIDs
(sysGetSystemType [nodeID]) -> systemUNID
(sysGetTopologyDistance fromID toID) -> distance (or Nil)
(sysGlobals ...)
(sysHasAttribute [nodeID] attrib) -> True/Nil
(sysHitScan [source] startPos endPos) -> (obj hitPos) or Nil
(sysIncData [nodeID] attrib increment) -> new value
(sysIsKnown [nodeID]) -> True/Nil
(sysMatches [nodeID] criteria) -> True/Nil
(sysOrbit center radius angle [eccentricity rotation]) -> orbit
(sysOrbitPos orbit [options]) -> vector

Options parameter is a struct with the following fields:

'angleOffset:n +/- n degrees along orbit arc
'arcOffset:n +/- n light-seconds along orbit arc
'radiusOffset:n +/- n light-seconds radius

For arcOffset and radiusOffset, n may also be a list with the followingformats:

(list 'gaussian min max)

(sysPlaySound unid [sourceObj]) -> True/Nil
(sysPoolUsage ...)
(sysSetData [nodeID] attrib data) -> data
(sysSetEnvironment unid shape options) -> True/Nil


Creates an arc along an orbit. Options must include the
following fields:

'orbit: This is the orbit to use. The arc will be
centered on the current orbit position (e.g., the
planet location).
'length: The length of the arc (in degrees).
'width: The width at the center of the arc (in light-

Creates a random environment along the orbit. Options
must include the following fields:

'orbit: This is the orbit to use.
'width: The average width of the ring, in light-

Creates a square patch. Options must include the
following fields:

'center: The center position of the patch.
'height: The height of the patch (in light-seconds).
'width: The width of the patch (in light-seconds).

(sysSetKNown [nodeID] [True/Nil]) -> True/Nil
(sysSetPOV obj|vector) -> True/Nil
(sysSetProperty [nodeID] property value) -> True/Nil


'pos Node position on map (x y)

(sysStartTime) -> True/Nil
(sysStopTime duration except) -> True/Nil
(sysStopTime targetList duration) -> True/Nil
(sysTicks ...)
(sysVectorAdd vector vector) -> vector
(sysVectorAngle vector) -> angle of vector
(sysVectorAngle pos1 pos2) -> angle of pos1 relative to pos2
(sysVectorDistance vector [vector]) -> distance in light-seconds
(sysVectorDivide vector scalar) -> vector
(sysVectorMultiply vector scalar) -> vector
(sysVectorPixelOffset center x y) -> vector
(sysVectorPolarOffset center angle radius) -> vector
(sysVectorPolarVelocity angle speed) -> velVector
(sysVectorRandom center radius minSeparation [filter]) -> vector
(sysVectorSpeed velVector) -> of light speed
(sysVectorSubtract vector vector) -> vector
(typAddRecurringTimerEvent unid interval event)

interval in ticks

(typAddTimerEvent unid delay event)

delay in ticks

(typCancelTimerEvent unid event) -> True/Nil
(typCreate unid XML) -> True/Nil
(typDynamicUNID uniqueName) -> UNID
(typeof item) -> type



(typFind criteria) -> list of UNIDs


a AdventureDesc
b ItemTable
c EffectType
d DockScreen
e SpaceEnvironmenType
f OverlayType
h ShipTable
i ItemType
m Image
n MissionType
p Power
q SystemTable
s ShipClass
t StationType
u Sound
v Sovereign
y SystemType
z SystemMap
$ EconomyType
+/-{attrib} Require/exclude types with given attribute

(typFireEvent unid event [data]) -> result of event
(typFireObjEvent unid obj event) -> result of event
(typGetData unid attrib) -> data
(typGetDataField unid field) -> data
(typGetProperty unid property) -> value

property (all):


property (player ships):


property (ships):


(typGetStaticData unid attrib) -> data
(typGetXML unid) -> xmlElement
(typHasAttribute unid attrib) -> True/Nil
(typHasEvent unid event) -> True/Nil
(typIncData unid attrib [increment]) -> new value
(typMarkImages unid) -> True/Nil
(typMatches unid criteria) -> True/Nil
(typSetData unid attrib data) -> True/Nil
(typTranslate unid textID [data] [default]) -> text (or Nil)
(uiCanPlayMusic filename) -> True/Nil
(uiGetMusicCatalog) -> list of files
(uiGetMusicState) -> ('playing filename position length)
(uiPlayMusic filename [pos]) -> True/Nil
(uiSetSoundtrackMode mode [soundtrackUNID])
(unvFindObject [nodeID] criteria) -> list of entries


s ShipClass
t StationType
+/-{attrib} Require/exclude types with given attribute


({objID} {type} {nodeID} {objName} {objNameFlags})

(unvGetCurrentExtensionUNID) -> UNID
(unvGetElapsedGameTime [startTick] endTick format) -> result


display: Elapsed time in display format.
seconds: Elapsed time in game seconds.

(unvGetExtensionData scope attrib) -> data
(unvGetRealDate) -> (year month day) GMT
(unvGetTick) -> time
(unvSetExtensionData scope attrib data) -> True/Nil



(unvSetObjectKnown [nodeID] criteria [True/Nil]) -> True/Nil
(unvUNID string) -> (unid 'itemtype name) or (unid 'shipclass name)
(v* scalar vec1) -> result of scalar multiplication of scalar and vec1
(v+ vec1 vec2) -> result of vector addition of vec1 and vec2
(v-> vec1 indexlist) -> get the elements of vec1 based on indexlist
(v<- vec1 indexlist datalist) -> set the elements of vec1 with datalist based on the indices in indexlist
(v= vec1 vec2) -> compare vec1 and vec2 for equality
(v^ vec1 vec2) -> result of element-wise multiplication of vec1 and vec2
(vdot vec1 vec2) -> result of vector dot product of vec1 and vec2
(vecCreate) -> empty vector
(vecSetElement ...)
(vector contentlist) -> vector form of contentlist
(vfilled scalar shapelist) -> vector filled with scalar's value
(xmlAppendSubElement xml xmlToAdd [index]) -> True/Nil
(xmlAppendText xml text [index]) -> True/Nil
(xmlCreate xml) -> xml
(xmlDeleteSubElement xml index) -> True/Nil
(xmlGetAttrib xml attrib) -> value
(xmlGetAttribList xml) -> list of attribs
(xmlGetSubElement xml tag|index) -> xml
(xmlGetSubElementCount xml) -> number of sub-elements
(xmlGetSubElementList xml [tag]) -> list of xml
(xmlGetTag xml) -> tag
(xmlGetText xml [index]) -> text
(xmlSetAttrib xml attrib value) -> value
(xmlSetText xml text [index]) -> True/Nil



armGetHitPoints: DEPRECATED: Use (itmGetProperty item 'maxHP) instead.
armGetName: DEPRECATED: Use itmGetName instead.
armIsRadiationImmune: DEPRECATED: Use itmGetProperty instead.
envHasAttribute: DEPRECATED: Use typHasAttribute instead
item: DEPRECATED: Alias of @
itmGetCharges: DEPRECATED: Use (itmGetProperty item 'charges) instead.
itmGetDefaultCurrency: DEPRECATED: Use (itmGetProperty item 'currency) instead.
itmGetGlobalData: DEPRECATED: Use itemGetTypeData instead.
itmGetUNID: DEPRECATED: Use itemGetType instead
itmHasModifier: DEPRECATED: Use itmHasAttribute instead.
itmIsDamaged: DEPRECATED: Use (itmGetProperty item 'damaged) instead
itmSetCharges: DEPRECATED: Use (itmSetProperty item 'charges ...) instead
itmSetDamaged: DEPRECATED: Use (itmSetProperty item 'damaged ...) instead
itmSetGlobalData: DEPRECATED: Use itmSetTypeData instead.
objGetDefaultCurrency: DEPRECATED: Use (objGetProperty obj 'currency) instead.
objGetDeviceFireArc: DEPRECATED: Use objGetItemProperty instead.
objGetDeviceLinkedFireOptions: DEPRECATED: Use objGetItemProperty instead.
objGetDevicePos: DEPRECATED: Use objGetItemProperty instead.
objGetGlobalData: DEPRECATED: Use objGetTypeData instead.
objGetStaticDataForStationType: DEPRECATED: Use typGetStaticData instead.
objIncItemCharges: DEPRECATED: Use (objSetItemProperty obj item 'incCharges ...) instead
objIsAbandoned: DEPRECATED: Use objGetProperty instead.
objIsDeviceEnabled: DEPRECATED: Use objGetItemProperty instead.
objIsUnderAttack: DEPRECATED: Use objGetProperty instead.
objMoveTo: DEPRECATED: Use objSetPos instead
objSetDeviceFireArc: DEPRECATED: Use objSetItemProperty instead.
objSetDeviceLinkedFireOptions: DEPRECATED: Use objSetItemProperty instead.
objSetDevicePos: DEPRECATED: Use objSetItemProperty instead.
objSetGlobalData: DEPRECATED: Use objSetTypeData instead.
objSetItemCharges: DEPRECATED: Use (objSetItemProperty obj item 'charges ...) instead
plyClearShowHelpRefuel: DEPRECATED: Use (plyEnableMessage player 'refuelHint Nil) instead
plyGetInsuranceClaims: DEPRECATED: Use resurrection infrastructure instead.
plyInsure: DEPRECATED: Use resurrection infrastructure instead.
plyIsInsured: DEPRECATED: Use resurrection infrastructure instead.
scrExitDock: DEPRECATED: Use scrExitScreen instead.
scrGetItemListCursor: DEPRECATED: Use scrGetItem instead
scrRefreshItemListCursor: DEPRECATED
setItem: DEPRECATED: Alias of [email protected]
shpAddEnergyField: DEPRECATED: Use objAddOverlay instead
shpCanInstallArmor: DEPRECATED: Use objCanInstallItem instead.
shpCanInstallDevice: DEPRECATED: Use objCanInstallItem instead.
shpDamageItem: DEPRECATED: Use (objSetItemProperty obj item 'damaged ...) instead
shpEnhanceSRS: DEPRECATED: Use objChangeEquipmentStatus instead
shpFixBlindness: DEPRECATED: Use objChangeEquipmentStatus instead
shpGetClass: DEPRECATED: Use objGetType instead
shpGetDataField: DEPRECATED: Use typGetDataField instead
shpGetGlobalData: DEPRECATED: Use typGetGlobalData instead
shpGetItemCharges: DEPRECATED: Use itmGetCharges instead
shpInstallAutopilot: DEPRECATED: Use objChangeEquipmentStatus instead
shpInstallTargetingComputer: DEPRECATED: Use objChangeEquipmentStatus instead
shpIsAutopilotInstalled: DEPRECATED: Use objGetEquipmentStatus instead
shpIsRadioactive: DEPRECATED: Use objIsRadioactive instead
shpIsSRSEnhanced: DEPRECATED: Use objGetEquipmentStatus instead
shpIsTargetingComputerInstalled: DEPRECATED: Use objGetEquipmentStatus instead
shpMakeBlind: DEPRECATED: Use objChangeEquipmentStatus instead
shpOrderAttack: DEPRECATED: Use (shpOrder ship 'attack target) instead
shpOrderDock: DEPRECATED: Use (shpOrder ship 'dock target) instead
shpOrderEscort: DEPRECATED: Use (shpOrder ship 'escort obj [formation]) instead
shpOrderFollow: DEPRECATED: Use (shpOrder ship 'follow target) instead
shpOrderGate: DEPRECATED: Use (shpOrder ship 'gate [gate]) instead
shpOrderGoto: DEPRECATED: Use (shpOrder ship 'goto obj) instead
shpOrderGuard: DEPRECATED: Use (shpOrder ship 'guard target) instead
shpOrderHold: DEPRECATED: Use (shpOrder ship 'hold [time]) instead
shpOrderLoot: DEPRECATED: Use (shpOrder ship 'loot obj) instead
shpOrderMine: DEPRECATED: Use (shpOrder ship 'mine baseObj) instead
shpOrderPatrol: DEPRECATED: Use (shpOrder ship 'patrol baseObj dist) instead
shpOrderWait: DEPRECATED: Use (shpOrder ship 'wait [time]) instead
shpRechargeItem: DEPRECATED: Use (objSetItemProperty obj item 'incCharges ...) instead
shpSetGlobalData: DEPRECATED: Use typSetGlobalData instead
shpSetPlayerWingman: DEPRECATED: Use (objSetProperty ship 'playerWingman ...) instead.
staGetGlobalData: DEPRECATED: Use typGetGlobalData instead
staGetMaxStructuralHP: DEPRECATED: Use objGetProperty instead.
staGetStructuralHP: DEPRECATED: Use objGetProperty instead.
staGetType: DEPRECATED: Use objGetType instead
staSetGlobalData: DEPRECATED: Use typSetGlobalData instead
staSetInactive: DEPRECATED: Use staSetActive instead
staSetStructuralHP: DEPRECATED: Use objSetProperty instead.
typGetGlobalData: DEPRECATED: Use typGetData instead.
typIncGlobalData: DEPRECATED: Use typIncData instead.
typSetGlobalData: DEPRECATED: Use typSetData instead.
unvFindObj: DEPRECATED: Use unvFindObject instead.


User avatar
Fleet Admiral
Fleet Admiral
Posts: 2615
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Tue Jan 03, 2017 12:43 am


Added two properties: 'capacitor and 'temperature. They can be get/set with objGetItemProperty/objSetItemProperty.
API 30 adds two new properties to manage fuel:

(objGetProperty shipObj 'fuelLeft) -> Fuel left (in standard fuel rod units)
(objGetProperty shipObj 'maxFuel) -> Fuel capacity (in standard fuel rod units)
(objGetProperty shipObj 'powerUse) -> returns the number of kilowatts of power currently being consumed. This only works for player ships (all other ships return 0). The value is returned in a double (floating-point) so we can handle future, large reactors.

(itmGetProperty item|type property) -> value


'averageDamage: Average damage, in HP, for a single shot of the weapon (including all fragments, and adjusted for enhancements).
'category: returns the category of the item (such as 'armor, 'device, 'cargoHold)
'components: returns a list of item structures representing the components for the given item.
There is a new special attribute for items: +hasComponents:true. This special attribute can be used in item criteria to filter items that have components.
'currency: Returns the default currency for the item. This is the same as (itmGetDefaultCurrency item), which is now deprecated.
'damage: For weapons, the average damage per 180 ticks (adjusted for enhancements).
'damageWMD returns the WMD value in the damage definition (from 0 to 7)
'damageWMD180: this property returns the average amount of WMD damage per 180 ticks. Note that this takes into account the fact we always do at least 1 point of WMD damage per hit.
'damageDeviceDisrupt returns the amount of disrupt damage of the weapon.
'damageType returns the damagetype (number between 0-15)
'fireDelay: For weapons, this is the number of ticks elapsed between shots, adjusted for enhancements.
'fuelCapacity: For reactors, returns the fuel capacity (1 = 1 helium fuel rod); includes enhancements.
'fuelCriteria: For reactors, this is a item criteria describing the set of compatible fuel items.
'fuelEfficiency: For reactors, this is the power produced per fuel unit (including enhancements).
'fuelEfficiencyBonus: For reactors, this describes fuel efficiency as a percent change from the standard, which is 15. Includes enhancements.
'hpBonus: For shields and armor, we return the percent bonus to HP for each damage type (returned in a struct). Note that this is the bonus relative to standard armors of this level; it includes any enhancements.
'lifetime (for weapons)
'maxDamage: Maximum damage, in HP, for a single shot of the weapon (including all fragments, and adjusted for enhancements).
'maxHP: For shields, this is the maximum number of HP, taking enhancements into account.
'maxSpeed: For drive devices, returns the maximum speed (0-100). This takes enhancements into account.
'minDamage: Minimum damage, in HP, for a single shot of the weapon (including all fragments, and adjusted for enhancements).
'power: Now takes enhancements into account for all devices.
'range (for weapons)
'speed (for weapons)
'sound (for weapons, returns the UNID of the sound effect)
'thrust: For drive devices, returns the additional thrust (including enhancements).
'tracking: returns True if the missile is tracking.

Also, these values are accepted in weapons to retrieve special damage:
damageRadiation, damageBlinding, damageEMP, damageDeviceDestroy, damageDisintegration, damageMomentum, damageShieldLevel, damageWMD, damageMining, damageDeviceDisrupt, damageWormhole, damageFuel, damageShatter, damageArmorLevel, damageSensor, damageShieldPenetrate

Type Timer Events

API 30 adds functions to add timers on arbitrary types. The events get called in any system (unlike object timers). The new functions are:

(typeAddTimerEvent unid delay event)
(typAddRecurringTimerEvent unid interval event)
(typCancelTimerEvent unid event)

Other Changes

objGetOverlays now accepts a criteria as a second parameter (optionally).
Added scrGetScreen function to return current dock screen.
Added scrAddMinorAction to add a minor action to a dock pane.
Added join function to easily concatenate a list of strings.

Post Reply