function help list 1.0RC4

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: 2607
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Sat Jan 02, 2010 11:41 pm

created and filtered by Betel using the new isprimitive function ! :D

([primitive: <] ...)
([primitive: <=] ...)
([primitive: >] ...)
([primitive: >=] ...)
(add x1 x2 ... xn) -> z
(and exp1 exp2 ... expn) -> True/Nil
(append a b [...]) -> lists are concatenated
([primitive: apply] ...)
(armGetHitPoints type) -> Hit points of armor
(armGetName type) -> Name of the armor
(armGetRepairCost type) -> Cost to repair 1 hit point
(armGetRepairTech type) -> Tech level required to repair
(armIsRadiationImmune type) -> True/Nil
([primitive: atmAddEntry] ...)
([primitive: atmAtomTable] ...)
([primitive: atmDeleteEntry] ...)
([primitive: atmList] ...)
([primitive: atmLookup] ...)
([primitive: block] ...)
(cat s1 s2 ... sn) -> string
(cnvDrawImage x y imageDesc [screen] [ID])
(cnvDrawRect x y width height color [screen] [ID])
(cnvDrawText x y text font color alignment [screen] [ID])
(count list) -> number of items
(dbgLog string [string]*)
(dbgOutput string [string]*)
(divide x y) -> z
(enum list itemVar exp)
(enum list condition itemVar exp)
DEPRECATED: Use typHasAttribute instead
([primitive: eq] ...)
([primitive: errblock] ...)
([primitive: eval] ...)
(filter list var boolean-exp) -> filtered list
(find source target [keyIndex]) -> position of target in source (0-based)
([primitive: fncHelp] ...)
(for var from to exp)
(gamSetCrawlImage imageUNID) -> True/Nil
(gamSetCrawlText text) -> True/Nil
(geq a b) -> True if a >= b
(gr a b) -> True if a > b
([primitive: if] ...)
([primitive: int] ...)
([primitive: isatom] ...)
([primitive: iserror] ...)
([primitive: isfunction] ...)
([primitive: isint] ...)
([primitive: isprimitive] ...)
(item list index)
(itmCreate itemUNID count) -> item
(itmCreateByName criteria name [count]) -> item
(itmCreateRandom criteria levelDistribution) -> item
(itmEnumTypes criteria item-var exp)
(itmGetActualPrice item) -> actual price of a single item
(itmGetArmorInstalledLocation item) -> segment #
(itmGetArmorType item)
(itmGetAverageAppearing item) -> average number that appear randomly
(itmGetCategory item) -> item category
(itmGetCharges item) -> charges
(itmGetCount item)
(itmGetDamageType item) -> damage type
(itmGetData item attrib) -> data
(itmGetFrequency item) -> frequency
(itmGetGlobalData item attrib) -> data
(itmGetImageDesc item) -> imageDesc
(itmGetInstallCost item) -> cost
(itmGetInstallPos item) -> installPos
(itmGetLevel item) -> level
(itmGetMass item) -> mass of single item in Kg
(itmGetMaxAppearing item) -> max number that appear randomly
(itmGetName item flags)
(itmGetPrice item) -> price of a single item
(itmGetStaticData item attrib) -> data
DEPRECATED: Use itmGetStaticData instead
(itmGetTypes criteria) -> list of itemUNIDs
(itmGetUNID item) -> itemUNID
(itmGetUseScreen item)
(itmHasAttribute item attrib) -> True/Nil
DEPRECATED: Use itmHasAttribute instead.
(itmHasReference item)
(itmIsDamaged item)
(itmIsEnhanced item) -> Nil or mods
(itmIsInstalled item)
(itmIsKnown item)
(itmMatches item criteria)
(itmSetCharges item charges) -> item
(itmSetCount item count) -> item
(itmSetDamaged item [True/Nil]) -> item
(itmSetData item attrib data [count]) -> item
(itmSetEnhanced item mods) -> item
(itmSetGlobalData item attrib data) -> True/Nil
(itmSetKnown {item | itemUNID})
(itmSetReference item)
([primitive: lambda] ...)
(leq a b) -> True if a <= b
([primitive: 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 keyIndex) -> found entry
(loop condition exp)
(ls a b) -> True if a < b
(max x1 x2 ... xn) -> z
(min x1 x2 ... xn) -> z
(modulo x y) -> z
(multiply x1 x2 ... xn) -> z
(not exp) -> True/Nil
(objAddBuyOrder obj criteria priceAdj) -> True/Nil
(objAddItem obj item [count])
(objAddItemEnhancement obj item enhancementType [lifetime]) -> enhancementID
(objAddOverlay obj overlayType [lifetime]) -> overlayID\n(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
(objCharge obj amount) -> remaining balance
(objClearIdentified obj)
(objClearShowAsDestination obj)
(objCommunicate obj senderObj msg [obj] [data])
(objCredit obj amount) -> new balance
(objDamage obj weaponType objSource [posVector])
(objDepleteShields obj)
(objDestroy obj [objSource]) -> True/Nil
(objEnumItems obj criteria itemVar exp)
(objFireEvent obj event) -> result of event
(objFireItemEvent obj item event) -> result of event
(objFireOverlayEvent obj overlayID event) -> result of event
(objFixParalysis obj)
(objGateTo obj node entrypoint [effectID])
(objGetArmorDamage obj armorSegment) -> damage to armor segment
(objGetArmorLevel obj item|armorSegment) -> 0-100
(objGetArmorName obj armorSegment) -> name of armor (e.g., 'forward', etc.)
(objGetArmorType obj armorSegment) -> CArmorClass *
(objGetBalance obj) -> balance
(objGetBuyPrice obj item) -> price
(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
(objGetDistance obj destObj) -> distance in light-seconds
(objGetGlobalData obj attrib) -> data
(objGetID obj) -> objID
(objGetImageDesc obj) -> imageDesc
(objGetInstalledItemDesc obj item) -> 'installed as forward armor'
(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
(objGetNameItems 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
(objGetOverlayRotation obj overlayID) -> rotation
(objGetOverlays obj) -> list of overlayIDs
(objGetOverlayType obj overlayID) -> type
(objGetPos obj) -> vector
(objGetSellPrice obj item) -> price
(objGetShieldLevel obj) -> 0-100 (or -1 for no shields)
(objGetSovereign obj) -> sovereignID
(objGetStaticData obj attrib) -> data
DEPRECATED: Use typGetStaticData instead.
(objGetTarget obj) -> obj
(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
(objIncItemCharges obj item [increment] [count]) -> itemStruct
(objIncOverlayData obj overlayID attrib [increment]) -> new value
(objIncVel obj velVector) -> velVector
(objIsAbandoned obj) -> True/Nil
(objIsDeviceSlotAvailable ship) -> True/Nil
(objIsDockedAt obj stationObj) -> True/Nil
(objIsEnemy obj target) -> True/Nil
(objIsIdentified obj) -> True/Nil
(objIsKnown obj)
(objIsShip obj) -> True/Nil
(objIsUnderAttack obj) -> True/Nil
(objJumpTo obj posVector)
(objLowerShields obj)
(objMakeParalyzed obj ticks)
(objMatches obj source filter) -> True/Nil
(objMoveTo obj posVector)
(objProgramDamage obj hacker progName aiLevel code)
(objRegisterForEvents target obj)
(objRegisterForSystemEvents target range)
(objRemoveItem obj item [count])
(objRemoveItemEnhancement obj item enhancementID)
(objRemoveOverlay obj overlayID)
(objRepairArmor ship armorSegment [hpToRepair]) -> hp repaired
(objResume obj)
(objSendMessage obj sender msg)
(objSetData obj attrib data)
(objSetEventHandler obj unid) -> True/Nil
(objSetGlobalData obj attrib data)
(objSetIdentified obj)
(objSetItemCharges obj item charges [count]) -> itemStruct
(objSetItemData obj item attrib data [count]) -> itemStruct
(objSetKnown obj)
(objSetName obj name [flags])
(objSetObjRefData obj attrib obj)
(objSetOverlayData obj overlayID attrib data)
(objSetOverlayRotation obj overlayID rotation)
(objSetPos obj vector)
(objSetShowAsDestination obj [show dist/bearing] [autoclear])
(objSetSovereign obj sovereignID) -> True/Nil
(objSetVel obj velVector)
(objSuspend obj)
(objUnregisterForEvents target obj)
(objUnregisterForSystemEvents target obj)
(or exp1 exp2 ... expn) -> True/Nil
([primitive: plyCharge] ...)
([primitive: plyClearShowHelpRefuel] ...)
(plyComposeString player string [arg1 arg2 ... argn]) -> string
([primitive: plyCredit] ...)
([primitive: plyDestroyed] ...)
([primitive: plyGetCredits] ...)
(plyGetGenome player) -> 'humanMale | 'humanFemale
DEPRECATED: Use resurrection infrastructure instead.
([primitive: plyGetRedirectMessage] ...)
DEPRECATED: Use resurrection infrastructure instead.
DEPRECATED: Use resurrection infrastructure instead.
([primitive: plyMessage] ...)
([primitive: plyRedirectMessage] ...)
(power x y) -> z
(random from to)\n(random list)
(rollDice count sides bonus)
([primitive: scrEnableAction] ...)
([primitive: scrExitDock] ...)
([primitive: scrGetCounter] ...)
([primitive: scrGetInputText] ...)
([primitive: scrGetItem] ...)
DEPRECATED: Use scrGetItem instead
([primitive: scrGetListEntry] ...)
([primitive: scrIsFirstOnInit] ...)
([primitive: scrRemoveItem] ...)
(scrSetActionLabel screen action label [key])
([primitive: scrSetCounter] ...)
(scrSetDesc screen text [text...])
(scrSetDisplayText screen ID text [text...])
([primitive: scrSetInputText] ...)
([primitive: scrSetListFilter] ...)
(scrShowAction screen action shown)
([primitive: scrShowPane] ...)
(scrShowScreen screenGlobal screen [pane])
(seededRandom seed from to)\n(seededRandom seed list)
([primitive: set] ...)
([primitive: setq] ...)
DEPRECATED: Use objAddOverlay instead
(shpCancelOrders ship)
(shpCanInstallArmor ship item) ->
(shpCanInstallDevice ship item) ->
(shpCanRemoveDevice ship item) ->
(shpConsumeFuel ship fuel)
(shpDamageArmor obj armorSegment damageType damage)
(shpDamageItem ship item)
(shpDecontaminate ship)
(shpEnhanceItem ship item [mods]) -> True/Nil
(shpEnhanceSRS ship)
(shpFixBlindness ship)
(shpGetArmor ship armorSegment) -> item struct
(shpGetArmorCount ship) -> number of armor segments
(shpGetArmorMaxHitPoints obj armorSegment) -> damage to armor segment
(shpGetClass ship) -> class UNID
(shpGetClassName class flags) -> class name
DEPRECATED: Use typGetDataField instead
(shpGetDirection ship) -> angle
(shpGetDockObj ship) -> dockObj
(shpGetFuelLeft ship) -> fuel left
(shpGetFuelNeeed ship item) -> items needed
DEPRECATED: Use typGetGlobalData instead
(shpGetImageDesc class [rotationAngle]) -> imageDesc
DEPRECATED: Use itmGetCharges instead
(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)
(shpInstallAutopilot ship)
(shpInstallDevice ship item)
(shpInstallTargetingComputer ship)
(shpIsAutopilotInstalled ship)
(shpMakeBlind ship)
(shpIsFuelCompatible ship item) -> True/Nil
(shpIsRadiationImmune ship [item])
(shpIsRadioactive ship)
(shpIsSRSEnhanced ship)
(shpIsTargetingComputerInstalled ship)
(shpMakeBlind ship blindTime)
(shpMakeRadioactive ship)
(shpOrder ship order [target] [count]) -> True/Nil
(shpOrderAttack ship target) -> True/Nil
(shpOrderDock ship destination) -> True/Nil
(shpOrderEscort ship protect [formation]) -> True/Nil
(shpOrderFollow ship follow) -> True/Nil
(shpOrderGate ship [gate]) -> True/Nil
(shpOrderGoto ship obj) -> True/Nil
(shpOrderGuard ship base) -> True/Nil
(shpOrderHold ship [waitTime]) -> True/Nil
(shpOrderLoot ship station) -> True/Nil
(shpOrderMine ship base) -> True/Nil
(shpOrderPatrol ship center dist) -> True/Nil
(shpOrderWait ship waitTime)
(shpRechargeItem ship item charges)
(shpRechargeShield ship hpToRecharge)
(shpRefuelFromItem ship item) -> True/Nil
(shpRemoveDevice ship item) -> item
(shpRepairItem ship item)
(shpSetCommandCode ship code) -> True/Nil
(shpSetController ship controller) -> True/Nil
DEPRECATED: Use typSetGlobalData instead
(shpSetPlayerWingman ship [isWingman]) -> True/Nil
(shuffle list) -> shuffled list
(sovGetDisposition sovereignID targetSovereignID) -> disposition of sovereign to target
(sovSetDisposition sovereignID targetSovereignID disposition)
(sqrt x) -> z
(staClearFireReconEvent station)
(staClearReconned station)
(staGetDockedShips station) -> list of docked ships
DEPRECATED: Use typGetGlobalData instead
(staGetImageVariant station) -> variant
(staGetMaxStructuralHP station) -> hp
(staGetStructuralHP station) -> hp
(staGetSubordinates station) -> list of subordinates (e.g., guardians)
(staGetType station) -> UNID
(staIsEncountered type) -> True/Nil
(staIsReconned station) -> True/Nil
(staSetActive station)
(staSetFireReconEvent station)
DEPRECATED: Use typSetGlobalData instead
(staSetImageVariant station variant)
(staSetInactive station)
(staSetShowMapLabel station True/Nil)
(staSetStructuralHP station hp)
(strCapitalize string) -> string
(strFind string target) -> pos of target in string (0-based)
(subset list pos [count]) -> list
(subst string arg1 arg2 ... argn) -> string
(subtract x y) -> z
([primitive: switch] ...)
([primitive: symAddEntry] ...)
([primitive: symCreate] ...)
([primitive: symDeleteEntry] ...)
([primitive: symList] ...)
([primitive: symLookup] ...)
(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
(sysCalcTravelDistance speed time) -> distance in light-seconds
(sysCalcTravelTime distance speed) -> time in ticks
(sysCancelTimerEvent obj event) -> True/Nil
(sysCreateEffect effectID anchor posVector)
(sysCreateEncounter classID) -> True/Nil
(sysCreateMarker name pos sovereignID) -> marker
(sysCreateShip classID pos sovereignID [controller]) -> ship
(sysCreateShipwreck classID pos sovereignID) -> shipwreck
(sysCreateStargate classID posVector gateID destNodeID destGateID) -> stargate
(sysCreateStation classID posVector) -> station
(sysCreateWeaponFire weaponID objSource posVector dir speed objTarget [detonateNow]) -> obj
(sysFindObject source filter) -> list of objects
(sysGetData [nodeID] attrib) -> data
(sysGetEnvironment vector) -> environmentUNID
(sysGetLevel [nodeID]) -> level
(sysGetName [nodeID]) -> name
(sysGetNavPathPoint sovereignID objFrom objTo 754C8E63ath) -> vector
(sysGetNode) -> nodeID
(sysGetNodes) -> list of nodeIDs
(sysGetObjectByName source name) -> obj
(sysGetStargateDestinationNode [nodeID] gateID) -> nodeID
(sysGetStargates [nodeID]) -> list of gateIDs
(sysGetSystemType [nodeID]) -> systemUNID
([primitive: sysGlobals] ...)
(sysHasAttribute [nodeID] attrib) -> True/Nil
([primitive: sysPoolUsage] ...)
(sysSetData [nodeID] attrib data) -> data
(sysStopTime duration except)
([primitive: sysTicks] ...)
(sysVectorAdd vector vector) -> vector
(sysVectorAngle vector) -> angle of vector
(sysVectorDistance vector [vector]) -> distance in light-seconds
(sysVectorDivide vector scalar) -> vector
(sysVectorMultiply vector scalar) -> 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
(typFind criteria) -> list of UNIDs
(typFireObjEvent unid obj event) -> result of event
(typGetDataField unid field) -> data
(typGetGlobalData unid attrib) -> data
(typGetStaticData unid attrib) -> data
(typHasAttribute unid attrib) -> True/Nil
(typIncGlobalData unid attrib [increment]) -> new value
(typSetGlobalData unid attrib data) -> True/Nil
(unvGetRealDate) -> (year month day) GMT
(unvGetTick) -> time
(unvUNID string) -> (unid 'itemtype name) or (unid 'shipclass name)
([primitive: vecSetElement] ...)
([primitive: vecVector] ...)
Last edited by digdug on Sun Jan 03, 2010 12:22 am, edited 1 time in total.

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

Sun Jan 03, 2010 12:22 am

new functions added after 1.0RC1
(please double check them)

(itmGetInstallPos item) -> installPos
(objAddItemEnhancement obj item enhancementType [lifetime]) -> enhancementID
(objGetArmorLevel obj item|armorSegment) -> 0-100
(objGetNameItems obj name) -> list of items
(objRemoveItemEnhancement obj item enhancementID)
(objSetEventHandler obj unid) -> True/Nil
(shpGetDockObj ship) -> dockObj
(shpGetOrderDesc obj) -> orderDesc
(sysCalcTravelDistance speed time) -> distance in light-seconds
(sysCreateEncounter classID) -> True/Nil
(sysVectorPolarVelocity angle speed) -> velVector
(typHasAttribute unid attrib) -> True/Nil
(isprimitive ...)


changed functions (diff from RC1 to RC4)

(objDestroy obj [objSource]) -> True/Nil
new second argument

(objRepairArmor ship armorSegment [hpToRepair]) -> hp repaired
returns the hp repaired


(envHasAttribute environmentUNID attrib) -> True/Nil
DEPRECATED: Use typHasAttribute instead

(itmGetTypeData item)
DEPRECATED: Use itmGetStaticData instead

Post Reply