function list 1.04

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
Post Reply
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

Don't mean to step on digdug's toes, but I was collecting this data anyway.

New Functions

(itmGetType item) -> itemUNID
(map list var exp) -> list
(objGetShipwreckType obj) -> unid
(objIsRadioactive obj)
(scrAddAction screen actionID pos label [key] [special] code)
(scrExitScreen screen ['forceUndock])
(shpOrderImmediate ship order [target] [count]) -> True/Nil

Changed Functions

(itmGetUNID ...) DEPRECATED: Use itemGetType instead
(itmSetKnown {item | itemUNID} [True/Nil])
(scrExitDock ...) DEPRECATED: Use scrExitScreen instead.
(scrSetActionLabel screen action label [key] [special])
(shpIsRadioactive ...) DEPRECATED: Use objIsRadioactive instead
(sysGetNavPathPoint sovereignID objFrom objTo 54F14D5Bath) -> vector Different random numbers in help string, interesting.

Per http://neurohack.com/transcendence/foru ... php?t=3537,
(scrEnableAction screen action enabled) now accepts string action ids


Function list

(< ...)
(<= ...)
(> ...)
(>= ...)
(abs x) -> z
(add x1 x2 ... xn) -> z
(and exp1 exp2 ... expn) -> True/Nil
(append a b [...]) -> lists are concatenated
(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
(atmAddEntry ...) Probably Depreciated
(atmAtomTable ...) Probably Depreciated
(atmDeleteEntry ...) Broken, Probably Depreciated
(atmList ...) Probably Depreciated
(atmLookup ...) Probably Depreciated
(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)
(envHasAttribute ...) DEPRECATED: Use typHasAttribute instead
(eq ...)
(errblock ...)
(error msg) -> error
(eval ...)
(filter list var boolean-exp) -> filtered list
(find source target [keyIndex]) -> position of target in source (0-based)
(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
(if ...)
(int ...)
(isatom ...)
(iserror ...)
(isfunction ...)
(isint ...)
(isprimitive ...)
(item list index)
(itmAtCursor ...) DEPRECATED
(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) -> type
(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
(itmGetType item) -> itemUNID
(itmGetTypeData ...) DEPRECATED: Use itmGetStaticData instead
(itmGetTypes criteria) -> list of itemUNIDs
(itmGetUNID ...) DEPRECATED: Use itemGetType instead
(itmGetUseScreen item)
(itmHasAttribute item attrib) -> True/Nil
(itmHasModifier ...) 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} [True/Nil])
(itmSetReference item)
(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 keyIndex) -> found entry
(loop condition exp)
(ls a b) -> True if a < b
(map list var exp) -> list
(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
(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 item|armorSegment) -> type
(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
(objGetDisposition obj targetObj) -> disposition of obj towards targetObj
(objGetDistance obj destObj) -> distance in light-seconds
(objGetEventHandler obj) -> unid or Nil
(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
(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
(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)
(objGetShipwreckType obj) -> unid
(objGetSovereign obj) -> sovereignID
(objGetStaticData obj attrib) -> data
(objGetStaticDataForStationType ...) DEPRECATED: Use typGetStaticData instead.
(objGetTarget obj) -> obj
(objGetType obj) -> unid
(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
(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
(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)
(objSetDeviceActivationDelay obj deviceItem [delay]) -> True/Nil
(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
(plyChangeShip player newShip) -> True/Nil
(plyCharge player [currency] charge)
(plyClearShowHelpRefuel ...)
(plyComposeString player string [arg1 arg2 ... argn]) -> string
(plyCredit ...)
(plyDestroyed ...)
(plyGetCredits ...)
(plyGetGenome player) -> 'humanMale | 'humanFemale
(plyGetInsuranceClaims ...) DEPRECATED: Use resurrection infrastructure instead.
(plyGetItemStat player stat criteria) -> value
(plyGetRedirectMessage ...)
(plyGetStat player stat) -> value
(plyInsure ...) DEPRECATED: Use resurrection infrastructure instead.
(plyIsInsured ...) DEPRECATED: Use resurrection infrastructure instead.
(plyMessage ...)
(plyRecordBuyItem player item totalPrice [count])
(plyRecordSellItem player item totalPrice [count])
(plyRedirectMessage ...)
(power x y) -> z
(quote exp) -> unevaluated exp
(random from to)
(random list)
(randomTable chance1 exp1 chance2 exp2 ... chancen expn) -> exp
(resCreateImageDesc imageUNID x y width height) -> imageDesc
(rollDice count sides bonus)
(scrAddAction screen actionID pos label [key] [special] code)
(scrEnableAction screen action enabled)
(scrExitDock ...) DEPRECATED: Use scrExitScreen instead.
(scrExitScreen screen ['forceUndock])
(scrGetCounter ...)
(scrGetInputText ...)
(scrGetItem ...)
(scrGetItemListCursor ...) DEPRECATED: Use scrGetItem instead
(scrGetListEntry ...)
(scrIsFirstOnInit ...)
(scrRefreshItemListCursor ...) DEPRECATED
(scrRemoveItem ...)
(scrSetActionLabel screen action label [key] [special])
(scrSetCounter ...)
(scrSetDesc screen text [text...])
(scrSetDisplayText screen ID text [text...])
(scrSetInputText ...)
(scrSetListFilter ...)
(scrShowAction screen action shown)
(scrShowPane ...)
(scrShowScreen screenGlobal screen [pane])
(seededRandom seed from to)
(seededRandom seed list)
(set ...)
(setq ...)
(shpAddEnergyField ...) DEPRECATED: Use objAddOverlay instead
(shpCancelOrders ship)
(shpCanInstallArmor ship item) -> result
(shpCanInstallDevice ship item) -> result
(shpCanRemoveDevice ship item) -> result
(shpConsumeFuel ship fuel)
(shpDamageArmor obj armorSegment damageType damage)
(shpDamageItem ship item)
(shpDecontaminate ship)
(shpEnhanceItem ship item [mods]) -> True/Nil
(shpEnhanceSRS ship)
(shpFixBlindness ship [noMessage])
(shpGetArmor ship armorSegment) -> item struct
(shpGetArmorCount ship) -> number of armor segments
(shpGetArmorMaxHitPoints obj armorSegment) -> damage to armor segment
(shpGetClass ...) DEPRECATED: Use objGetType instead
(shpGetClassName class flags) -> class name
(shpGetDataField ...) DEPRECATED: Use typGetDataField instead
(shpGetDirection ship) -> angle
(shpGetDockObj ship) -> dockObj
(shpGetFuelLeft ship) -> fuel left
(shpGetFuelNeeded ship item) -> items needed
(shpGetGlobalData ...) DEPRECATED: Use typGetGlobalData instead
(shpGetImageDesc class [rotationAngle]) -> imageDesc
(shpGetItemCharges ...) 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 ...) DEPRECATED: Use objIsRadioactive instead
(shpIsSRSEnhanced ship)
(shpIsTargetingComputerInstalled ship)
(shpMakeBlind ship blindTime)
(shpMakeRadioactive ship)
(shpOrder ship order [target] [count]) -> True/Nil
(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
(shpOrderImmediate ship order [target] [count]) -> True/Nil
(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 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
(shpSetGlobalData ...) 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
(staGetGlobalData ...) DEPRECATED: Use typGetGlobalData instead
(staGetImageVariant station) -> variant
(staGetMaxStructuralHP station) -> hp
(staGetStructuralHP station) -> hp
(staGetSubordinates station) -> list of subordinates (e.g., guardians)
(staGetType ...) DEPRECATED: Use objGetType instead
(staIsEncountered type) -> True/Nil
(staIsReconned station) -> True/Nil
(staSetActive station)
(staSetFireReconEvent station)
(staSetGlobalData ...) 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
(switch ...)
(symAddEntry ...) Has never done anything
(symCreate ...) Has never done anything
(symDeleteEntry ...) Has never done anything
(symList ...) Has never done anything
(symLookup ...) Has never done anything
(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
(sysCalcFireSolution targetPos targetVel speed) -> angle to shoot (Nil, if no solution)
(sysCalcTravelDistance speed time) -> distance in light-seconds
(sysCalcTravelTime distance speed) -> time in ticks
(sysCancelTimerEvent obj event) -> True/Nil
(sysCreateEffect effectID anchorObj posVector [rotation]) -> True/Nil
(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] [bonus]) -> obj
(sysFindObject source filter) -> list of objects
(sysGetData [nodeID] attrib) -> data
(sysGetEnvironment vector) -> environmentUNID
(sysGetLevel [nodeID]) -> level
(sysGetName [nodeID]) -> name
(sysGetNavPathPoint sovereignID objFrom objTo 54F14D5Bath) -> vector
(sysGetNode) -> nodeID
(sysGetNodes) -> list of nodeIDs
(sysGetObjectByName source name) -> obj
(sysGetStargateDestinationNode [nodeID] gateID) -> nodeID
(sysGetStargates [nodeID]) -> list of gateIDs
(sysGetSystemType [nodeID]) -> systemUNID
(sysGlobals ...)
(sysHasAttribute [nodeID] attrib) -> True/Nil
(sysPlaySound unid [sourceObj]) -> True/Nil
(sysPoolUsage ...)
(sysSetData [nodeID] attrib data) -> data
(sysStopTime duration except)
(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)
(vecSetElement ...)
(vecVector ...)



Function list with Deprecated and Broken functions removed

(< ...)
(<= ...)
(> ...)
(>= ...)
(abs x) -> z
(add x1 x2 ... xn) -> z
(and exp1 exp2 ... expn) -> True/Nil
(append a b [...]) -> lists are concatenated
(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
(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)
(eq ...)
(errblock ...)
(error msg) -> error
(eval ...)
(filter list var boolean-exp) -> filtered list
(find source target [keyIndex]) -> position of target in source (0-based)
(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
(if ...)
(int ...)
(isatom ...)
(iserror ...)
(isfunction ...)
(isint ...)
(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) -> type
(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
(itmGetType item) -> itemUNID
(itmGetTypes criteria) -> list of itemUNIDs
(itmGetUseScreen item)
(itmHasAttribute item attrib) -> True/Nil
(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} [True/Nil])
(itmSetReference item)
(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 keyIndex) -> found entry
(loop condition exp)
(ls a b) -> True if a < b
(map list var exp) -> list
(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
(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 item|armorSegment) -> type
(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
(objGetDisposition obj targetObj) -> disposition of obj towards targetObj
(objGetDistance obj destObj) -> distance in light-seconds
(objGetEventHandler obj) -> unid or Nil
(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
(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
(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)
(objGetShipwreckType obj) -> unid
(objGetSovereign obj) -> sovereignID
(objGetStaticData obj attrib) -> data
(objGetTarget obj) -> obj
(objGetType obj) -> unid
(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
(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
(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)
(objSetDeviceActivationDelay obj deviceItem [delay]) -> True/Nil
(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
(plyChangeShip player newShip) -> True/Nil
(plyCharge player [currency] charge)
(plyClearShowHelpRefuel ...)
(plyComposeString player string [arg1 arg2 ... argn]) -> string
(plyCredit ...)
(plyDestroyed ...)
(plyGetCredits ...)
(plyGetGenome player) -> 'humanMale | 'humanFemale
(plyGetItemStat player stat criteria) -> value
(plyGetRedirectMessage ...)
(plyGetStat player stat) -> value
(plyMessage ...)
(plyRecordBuyItem player item totalPrice [count])
(plyRecordSellItem player item totalPrice [count])
(plyRedirectMessage ...)
(power x y) -> z
(quote exp) -> unevaluated exp
(random from to)
(random list)
(randomTable chance1 exp1 chance2 exp2 ... chancen expn) -> exp
(resCreateImageDesc imageUNID x y width height) -> imageDesc
(rollDice count sides bonus)
(scrAddAction screen actionID pos label [key] [special] code)
(scrEnableAction screen action enabled)
(scrExitScreen screen ['forceUndock])
(scrGetCounter ...)
(scrGetInputText ...)
(scrGetItem ...)
(scrGetListEntry ...)
(scrIsFirstOnInit ...)
(scrRemoveItem ...)
(scrSetActionLabel screen action label [key] [special])
(scrSetCounter ...)
(scrSetDesc screen text [text...])
(scrSetDisplayText screen ID text [text...])
(scrSetInputText ...)
(scrSetListFilter ...)
(scrShowAction screen action shown)
(scrShowPane ...)
(scrShowScreen screenGlobal screen [pane])
(seededRandom seed from to)
(seededRandom seed list)
(set ...)
(setq ...)
(shpCancelOrders ship)
(shpCanInstallArmor ship item) -> result
(shpCanInstallDevice ship item) -> result
(shpCanRemoveDevice ship item) -> result
(shpConsumeFuel ship fuel)
(shpDamageArmor obj armorSegment damageType damage)
(shpDamageItem ship item)
(shpDecontaminate ship)
(shpEnhanceItem ship item [mods]) -> True/Nil
(shpEnhanceSRS ship)
(shpFixBlindness ship [noMessage])
(shpGetArmor ship armorSegment) -> item struct
(shpGetArmorCount ship) -> number of armor segments
(shpGetArmorMaxHitPoints obj 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)
(shpInstallAutopilot ship)
(shpInstallDevice ship item)
(shpInstallTargetingComputer ship)
(shpIsAutopilotInstalled ship)
(shpMakeBlind ship)
(shpIsFuelCompatible ship item) -> True/Nil
(shpIsRadiationImmune ship [item])
(shpIsSRSEnhanced ship)
(shpIsTargetingComputerInstalled ship)
(shpMakeBlind ship blindTime)
(shpMakeRadioactive ship)
(shpOrder ship order [target] [count]) -> True/Nil
(shpOrderImmediate ship order [target] [count]) -> True/Nil
(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
(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
(staGetImageVariant station) -> variant
(staGetMaxStructuralHP station) -> hp
(staGetStructuralHP station) -> hp
(staGetSubordinates station) -> list of subordinates (e.g., guardians)
(staIsEncountered type) -> True/Nil
(staIsReconned station) -> True/Nil
(staSetActive station)
(staSetFireReconEvent station)
(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
(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
(sysCalcFireSolution targetPos targetVel speed) -> angle to shoot (Nil, if no solution)
(sysCalcTravelDistance speed time) -> distance in light-seconds
(sysCalcTravelTime distance speed) -> time in ticks
(sysCancelTimerEvent obj event) -> True/Nil
(sysCreateEffect effectID anchorObj posVector [rotation]) -> True/Nil
(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] [bonus]) -> obj
(sysFindObject source filter) -> list of objects
(sysGetData [nodeID] attrib) -> data
(sysGetEnvironment vector) -> environmentUNID
(sysGetLevel [nodeID]) -> level
(sysGetName [nodeID]) -> name
(sysGetNavPathPoint sovereignID objFrom objTo 54F14D5Bath) -> vector
(sysGetNode) -> nodeID
(sysGetNodes) -> list of nodeIDs
(sysGetObjectByName source name) -> obj
(sysGetStargateDestinationNode [nodeID] gateID) -> nodeID
(sysGetStargates [nodeID]) -> list of gateIDs
(sysGetSystemType [nodeID]) -> systemUNID
(sysGlobals ...)
(sysHasAttribute [nodeID] attrib) -> True/Nil
(sysPlaySound unid [sourceObj]) -> True/Nil
(sysPoolUsage ...)
(sysSetData [nodeID] attrib data) -> data
(sysStopTime duration except)
(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)
(vecSetElement ...)
(vecVector ...)


Global Lambdas in TranscendenceSoruce

arcQuestionHandler
bamComputeArmorLevel
bamComputeOpponentList
bamComputePrize
bamComputeReputation
bamComputeShieldLevel
bamComputeSkill
bamComputeWeaponLevel
bamCreateGladiator
bamCreateGladiatorBySkill
bamCreateMeleeOpponents
bamDoorsClose
bamDoorsOpen
chrCancelRaiderOrders
chrComputeAmbushPos
chrCreateRaider
chrDeployFrigateRaid
chrDeployKronosaurus
chrGetPrimaryStronghold
chrOrderRaiders
chrRaidTransport
comSealedContainerHack
comShowBuyScreen
comShowSellScreen
comTrafficControl
domGainXP
domGetLevel
domGetTimeRequired
domInitRelationship
domInvokePower
domShowPower
fltOrderCheckPosition
herAttackInProgress
herStatus
herStatusClear
herStatusSet
huaCheckExperience
huaHuariDestroyed
huaIsGateToHuaramarca
huaSungDestroyed
intAmmoBoxOpen
intArmorEnhanceStatus
intArmorRepairAll
intAsteroidOnMining
intAutoInstall
intBarricadeUse
intBlackMarketBuyPrice
intBlackMarketOnDestroy
intBlackMarketPromotion
intBlackMarketSellPrice
intBushidoArmorEnhancement
intBushidoShieldEnhancement
intBushidoWeaponEnhancement
intBuyItems
intCalcExplosionType
intCommonwealthCrime
intCommonwealthOnDestroy
intComputeBuyPrice
intComputeRandomEncounterCourse
intComputeRandomEncounterPos
intComputeRandomEncounterPosEx
intComputeSellPrice
intConsumeItem
intContainerGetExplosionType
intContainerOnDamage
intCorporateCrime
intCorporateGenerateEnhancement
intCorporateOnDestroy
intDestroyItems
intEnhanceWeaponUse
intFieldCrystalInstall
intFieldCrystalUse
intFleetCreateWingmen
intFleetCrime
intFleetDisperseWingmen
intFleetPromotion
intGetGateToSystem
intGetGlobalAchievements
intHPEnhancement1
intHPEnhancement2
intHPEnhancement3
intInstallAfterPurchase
intInstallDevicePrep
intIsGateToSystem
intItemEnhanceStatus
intJettisonItem
intLootAllItems
intMakayevArmorEnhancement
intMakayevWeaponEnhancement
intMassString
intMissionAchievementString
intMissionRewardPayment
intRandomMessage
intRasiermesserArmorEnhancement
intRasiermesserWeaponEnhancement
intRingerBuyMargin
intRingerCrime
intRingerInstallDevicePrep
intRingerOnDestroy
intRingerSellMargin
intRoundDown
intRoundUp
intSellItems
intSetCompatibleFuel
intShowContractDeliveryScreen
intTaikonBuyMargin
intTeratonBuyMargin
intTeratonGetLevelCurve
intTeratonGetValue
intTeratonMugging
intTeratonSellMargin
intTranslate
intZoanthropeOnObjDestroyed
intZoanthropeOnOrderChanged
korComputePlayerLevel
korEmptyFreighter
korEscortRecord
korFillFreighter
korFrigateDestroyed
korInitialize
korMissionFailure
korMissionStrongholdSuccess
korMissionSuccess
korMsgWelcome
korOnShipDestroyed
milCanEnterCC
milInit
milMissionSuccess
milShowPromotionScreen
mneAllTargetsDestroyed
mradDisplay
neuConsumeCharge
neuGetCharges
srvFindRepairArmor
stkDistanceToStK
stkFreshFoodPrice
stkFreshFoodStatus
stkFreshFoodUpdate
strNumber
sunAttackTarget
sunOrderWing
terCreateDefender
useRepairArmor
Last edited by Star Weaver on Thu Dec 23, 2010 1:46 am, edited 4 times in total.
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

You know, this should really go in the wiki. :) That is a hint for you. :)
Image
Image
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

yay! thanks StarWeaver, I always appreaciate some help :D
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Good stuff!

Also, TTech, wiki ;)
User avatar
Star Weaver
Militia Commander
Militia Commander
Posts: 311
Joined: Sun Nov 07, 2010 10:20 pm
Location: . . . between the stars and the warm black sky . . .

Because the top post really needs to be longer, I added a list of global lambda functions defined in the vanilla xml's
User avatar
Ttech
Fleet Admiral
Fleet Admiral
Posts: 2767
Joined: Tue Nov 06, 2007 12:03 am
Location: Traveling in the TARDIS
Contact:

Thanks alterecco! I knew I could count on you. :lol:


Saves me the time of having to enforce that rule!

I shall quietly wonder off, leaving everyone not on IRC confused, officially though wiki I shall wiki force wiki no more.
Image
Image
User avatar
Darth Saber
Militia Commander
Militia Commander
Posts: 290
Joined: Mon Aug 04, 2008 4:53 pm
Location: Korriban

This is all well and good, but as I learned in using DOS 6.22: knowledge without comprehensive examples of syntax usage is well nigh useless to those who are just learning to program / script. That said, could we please have a knowledgeable scripter volunteer to create the aforementioned examples? In a world of Dummies Guides, I (like many) am a frequent reader. :twisted:
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

Look at the Xelerus functions page. It doesn't have all the functions and a few explanations/examples can be a bit confusing, but it is invaluable as a modders tool.
http://xelerus.de/index.php?s=functions

But I agree that we really need someone to explain the rest of the functions. Some functions I found in the source XML isn't on Xelerus, and it's hard to find what I need for coding.
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

um, DS could you please explain what you dont under stand a bit more??
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

I said a couple function descriptions can be slightly confusing. When I first looked at the enum description, I was a bit confused. That's all I can think of now, because usually I mod either early in the day or late in the day, and late in the day I'm too tired to remember the functions for longer than it takes to put it into my code.
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Weird... DS could mean Darth Saber or Drako Slyith.. :lol:
One thing that confused me while reading a function on Xelerus is itemStruct. What is it?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
Drako Slyith
Fleet Officer
Fleet Officer
Posts: 1036
Joined: Wed Feb 03, 2010 4:28 am
Location: Researching how to make St. Kats star go supernova.
Contact:

an itemStruct is a reference to a specific item. Some functions like (objInstall) require an itemStruct, and some require an item Type (UNID). To use an itemStruct use some code to get the item, then usually set it as a variable:

Code: Select all

(block (ItemExample)
       (setq ItemExample (itmCreate &itWhatever;))
;;ItemExample is now storing the item as an itemStruct.

)
Image
Image
Play in over 100 systems in a network. Play the 2011 Mod Of the Year
and the highest rated mod on Xelerus, The Network.
Play the July Mod of the Month, Fellow Pilgrims!
Play My other mods as well
(Drako Slyith)* I am a person
(Eliza chatbot)> Do you believe it is normal to be a person?
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

An itemstruct is just a type. You should not care what it contains (as in how it is composed), just that it represents an instance of an item (with a count, enhancements, damaged, etc...)

If you study the above function list thoroughly, you will notice that several functions return itemStructs. Those returned values are what you can use in other functions that require itemStructs as arguments.

Xelerus is currently the most in depth source. There is also some info on the wiki, but it is mostly a mirror of xelerus. There is the function legend page on the wiki which explains some concepts. And then there is vanilla, the one and only reference. When I was learning tscript I studied the vanilla files extensively and picked apart mods as well. And, finally. When in doubt, test! I really mean that. If you are a modder, you should be spending a lot of time testing anyways. Get used to whipping up a small mod that lets you test some function or some concept.

And when you find and error, or find out how a previously undocumented function works, time permitted, update xelerus (yes, you /can/ edit it) or update the wiki (yes, you /can/ edit it)

alterecco .]
Post Reply