function list for 1.0RC5

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

Created by alterecco, re-checked by me.

FUNCTIONS WITHOUT SIGNATURES
============================

<
<=
>
>=
apply
atmAddEntry
atmAtomTable
atmDeleteEntry
atmList
atmLookup
block
eq
errblock
eval
fncHelp
if
int
isatom
iserror
isfunction
isint
isprimitive
lambda
link
plyCharge
plyClearShowHelpRefuel
plyCredit
plyDestroyed
plyGetCredits
plyGetRedirectMessage
plyMessage
plyRedirectMessage
scrEnableAction
scrExitDock
scrGetCounter
scrGetInputText
scrGetItem
scrGetListEntry
scrIsFirstOnInit
scrRemoveItem
scrSetActionLabel
scrSetCounter
scrSetInputText
scrSetListFilter
scrShowPane
set
setq
switch
symAddEntry
symCreate
symDeleteEntry
symList
symLookup
sysGlobals
sysPoolUsage
sysTicks
vecVector

FUNCTIONS WITH SIGNATURES
=========================

(abs x) -> z
(add x1 x2 ... xn) -> z
(and exp1 exp2 ... expn) -> True/Nil
(append a b [...]) -> lists are concatenated
(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
(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)
(filter list var boolean-exp) -> filtered list
(find source target [keyIndex]) -> position of target in source (0-based)
(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
(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
(itmGetTypes criteria) -> list of itemUNIDs
(itmGetUNID item) -> itemUNID
(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})
(itmSetReference item)
(leq a b) -> True if a <= b
(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
(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
(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)
(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
(plyComposeString player string [arg1 arg2 ... argn]) -> string
(plyGetGenome player) -> 'humanMale | 'humanFemale
(power x y) -> z
(random from to)\n(random list)
(rollDice count sides bonus)
(scrSetDesc screen text [text...])
(scrSetDisplayText screen ID text [text...])
(scrShowAction screen action shown)
(scrShowScreen screenGlobal screen [pane])
(seededRandom seed from to)\n(seededRandom seed list)
(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
(shpGetDirection ship) -> angle
(shpGetDockObj ship) -> dockObj
(shpGetFuelLeft ship) -> fuel left
(shpGetFuelNeeed 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])
(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
(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)
(staGetType station) -> UNID
(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
(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 71620949ath) -> vector
(sysGetNode) -> nodeID
(sysGetNodes) -> list of nodeIDs
(sysGetObjectByName source name) -> obj
(sysGetStargateDestinationNode [nodeID] gateID) -> nodeID
(sysGetStargates [nodeID]) -> list of gateIDs
(sysGetSystemType [nodeID]) -> systemUNID
(sysHasAttribute [nodeID] attrib) -> True/Nil
(sysSetData [nodeID] attrib data) -> data
(sysStopTime duration except)
(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)


DEPRECATED FUNCTIONS
====================

envHasAttribute: DEPRECATED: Use typHasAttribute instead
itmAtCursor: DEPRECATED
itmGetTypeData: DEPRECATED: Use itmGetStaticData instead
itmHasModifier: DEPRECATED: Use itmHasAttribute instead.
objGetStaticDataForStationType: DEPRECATED: Use typGetStaticData instead.
plyGetInsuranceClaims: DEPRECATED: Use resurrection infrastructure instead.
plyInsure: DEPRECATED: Use resurrection infrastructure instead.
plyIsInsured: DEPRECATED: Use resurrection infrastructure instead.
scrGetItemListCursor: DEPRECATED: Use scrGetItem instead
scrRefreshItemListCursor: DEPRECATED
shpAddEnergyField: DEPRECATED: Use objAddOverlay instead
shpGetDataField: DEPRECATED: Use typGetDataField instead
shpGetGlobalData: DEPRECATED: Use typGetGlobalData instead
shpGetItemCharges: DEPRECATED: Use itmGetCharges instead
shpSetGlobalData: DEPRECATED: Use typSetGlobalData instead
staGetGlobalData: DEPRECATED: Use typGetGlobalData instead
staSetGlobalData: DEPRECATED: Use typSetGlobalData instead


GLOBALS AT START OF GAME
========================

gSource: Nil
gTrans: 8727168
gItem: Nil
gPlayer: 9273328
gPlayerShip: 9271232
QUARANTINE_RADIUS: 940
QUARANTINE_RESEARCH_NEEDED: 3


TRANSCENDENCE HELPER FUNCTIONS
==============================

arcQuestionHandler
bamComputeArmorLevel
bamComputeOpponentList
bamComputePrize
bamComputeReputation
bamComputeSkill
bamComputeWeaponLevel
bamCreateGladiator
bamCreateGladiatorBySkill
bamCreateMeleeOpponents
bamDoorsOpen
chrCancelRaiderOrders
chrComputeAmbushPos
chrCreateRaider
chrDeployFrigateRaid
chrDeployKronosaurus
chrGetPrimaryStronghold
chrOrderRaiders
chrRaidTransport
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
intBlackMarketOnInit
intBlackMarketSellPrice
intBushidoArmorEnhancement
intBushidoShieldEnhancement
intBushidoWeaponEnhancement
intBuyItems
intCalcExplosionType
intCommonwealthOnDestroy
intCommonwealthOnInit
intComputeRandomEncounterCourse
intComputeRandomEncounterPos
intComputeRandomEncounterPosEx
intComputeSellPrice
intConsumeItem
intContainerGetExplosionType
intContainerOnDamage
intCorporateCrime
intCorporateGenerateEnhancement
intCorporateOnDestroy
intCorporateOnInit
intDestroyItems
intFieldCrystalInstall
intFieldCrystalUse
intFleetCreateWingmen
intFleetCrime
intFleetDisperseWingmen
intFleetOnInit
intFleetPromotion
intGetGateToSystem
intHPEnhancement1
intHPEnhancement2
intHPEnhancement3
intInstallAfterPurchase
intInstallDevicePrep
intItemEnhanceStatus
intJettisonItem
intLootAllItems
intMakayevArmorEnhancement
intMakayevWeaponEnhancement
intMassString
intRandomMessage
intRasiermesserArmorEnhancement
intRasiermesserWeaponEnhancement
intRingerBuyMargin
intRingerCrime
intRingerInstallDevicePrep
intRingerOnInit
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
milCanEnterCC
milInit
milMissionSuccess
milShowPromotionScreen
mneAllTargetsDestroyed
mradDisplay
neuConsumeCharge
neuGetCharges
srvFindRepairArmor
stkDistanceToStK
stkFreshFoodPrice
stkFreshFoodStatus
stkFreshFoodUpdate
strNumber
sunAttackTarget
sunOrderWing
useRepairArmor
terCreateDefender
intIsGateToSystem

DOCKSCREEN FRAMEWORK GLOBALS
============================

dsf_CanvasScreenHeight: 400
dsf_CanvasScreenWidth: 600
dsf_DebugToScreen: Nil
dsf_ReturnData: Nil
dsf_ScreenData: Nil
dsf_ScreenHistory: ()
dsf_ScreenState: ()

dsf_AppendScreenStore
dsf_BackAction
dsf_Benchmark
dsf_BuildPaneDesc
dsf_ClearPaneDesc
dsf_ClearScreen
dsf_CustomFilterScreen
dsf_DecToHex
dsf_DisplayCanvas
dsf_DisplayInitialize
dsf_DoDebug
dsf_DoFunc
dsf_DoUntil
dsf_DrawText
dsf_ExitAction
dsf_GetActiveHooks
dsf_GetData
dsf_GetHookActions
dsf_GetHookData
dsf_GetHookImage
dsf_GetHookPane
dsf_GetHookPaneDesc
dsf_GetHookScreen
dsf_GetHookScreenData
dsf_GetHookSubtitle
dsf_GetHookTitle
dsf_GetListEntryData
dsf_GetPaneDesc
dsf_GetPreHook
dsf_GetScreenData
dsf_GetScreenName
dsf_GetScreenState
dsf_GetScreenType
dsf_GetShipDetails
dsf_HashFind
dsf_HashGet
dsf_HashMerge
dsf_HashRemove
dsf_HashSet
dsf_HashToKeys
dsf_HashToList
dsf_HookActivate
dsf_HookDisable
dsf_IncData
dsf_IncScreenState
dsf_InitializeScreenHook
dsf_IsCustomPickerScreen
dsf_IsHookActive
dsf_IsItemPickerScreen
dsf_ItemListFilter
dsf_ListFromOID
dsf_ListInitialize
dsf_ListReverse
dsf_ListToOID
dsf_OverrideHookScreen
dsf_PaneInitialize
dsf_RemoveData
dsf_RemoveScreenState
dsf_ResetData
dsf_ResetScreen
dsf_ResetScreenState
dsf_RunAction
dsf_ScreenHookData
dsf_ScreenTypeToUNID
dsf_SetData
dsf_SetHookActions
dsf_SetHookImage
dsf_SetHookPane
dsf_SetHookPaneDesc
dsf_SetHookScreenData
dsf_SetHookSubtitle
dsf_SetHookTitle
dsf_SetPaneDesc
dsf_SetPreHook
dsf_SetScreenData
dsf_SetScreenState
dsf_SetupDockScreen
dsf_ShipBrowserScreen
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

1.0RC6 new functions

(objGetEventHandler obj) -> UNID or Nil
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

These aren't in the Xelerus list yet.

logical operator

<

(if (< 1 3) (plyMessage gplayer "One is less than three"))

See also ls

<=

(if (<= 4 4) (plyMessage gplayer "Four is less than or equal to four"))

See also leq

>

(if (> 4 3) (plyMessage gplayer "Four is greater than three"))

See also gr

>=

(if (>= 2 1) (plyMessage gplayer "Two is greater or equal to one"))

See also geq

******

What about a = (or ==) function like the above? Doable?

[Atom Table] functions

atmAddEntry
atmAtomTable
atmDeleteEntry
atmList
atmLookup

See post by alterecco

Function functions

isPrimitive

Determines if a function is inbuilt or a lambda thing.

(if (isPrimitive apply) (plyMessage gplayer "The apply function is primitive"))

Don't know what they do

link

(link ...) ?

Screen functions

scrGetListEntry

(scrGetListEntry gScreen) returns currently selected item.

Described in Periculi's post

Is this depreciated?

See also scrGetItem

Symbol table functions?

(symAddEntry symTable symbol entry) -> entry
(symCreate) -> symTable
(symDeleteEntry symTable symbol) -> True
symList ?
(symLookup symTable symbol) -> entry

Not sure if these work.

Math functions

abs

Returns absolute value of a number.

(abs 32)
32
(abs -26)
26

Armor functions

(armGetHitPoints (objGetArmorType gPlayerShip 0)) -> Hit point value of armor type in slot zero of player ship.

armGetHitPoints will probably be replaced with a function that takes a UNID instead of a type at some point.

Canvas functions

(cnvDrawImage x y imageDesc [screen] [ID])
(cnvDrawRect x y width height color [screen] [ID])
(cnvDrawText x y text font color alignment [screen] [ID])

See PKodan's post.

For some reason cnvDrawImage is not included in the list of 1.0RC5 functions. Maybe it was added later?

Game functions

(gamSetCrawlImage imageUNID) -> True/Nil
(gamSetCrawlText text) -> True/Nil

These set the image and scrolling text used when starting a new game. Only usable in OnGameStart (and OnGameEnd ?)

Item functions

(itmGetArmorType item)

The armor type returned is presumably that used in armor functions like armGetHitPoints, making this a likely candidate for future depreciation.

(itmGetAverageAppearing item) -> average number that appear randomly

Presumably the average number of these items when they appear in station sell lists (unless specified individually)?

(itmGetImageDesc item) -> imageDesc

Gets the image associated with an item - that can then be used in selecting from a list of type 'customPicker'.

(itmGetInstallPos item) -> installPos

I presume that 'installPos' is a number starting at 0 (or 1?) depending on where 'item' is installed in a ship (or station?). Possibly could be used with weapon slots to determine in which direction they fire?

(itmGetTypes criteria) -> list of itemUNIDs

Returns a list of all items that match the criteria string given.

(itmGetTypes "*") -> every item in the game?

itmHasAttribute

(itmHasAttribute item attrib) -> True/Nil

Code: Select all

(enum gList auton
    (if (itmHasAttribute auton 'Military)
        (setq gCost (multiply 10 gCost))
    )
)
Make military autons cost 10 times as much. (Code taken from alterecco's post.

itmSetCharges

(itmSetCharges item charges) -> item

Sets the charges on an item.

See example of how to reduce charges by one - from Huari.xml

Code: Select all

<Actions>
   <Action name="Continue" key="C" default="1" cancel="1">
      (if gResult
         (block Nil
            ; Use up a charge
            (scrShowPane gScreen "Recover")
            (objRemoveItem gSource gItem)
            (objAddItem gSource (itmSetCharges gItem (subtract (itmGetCharges gItem) 1)))
         )
         (scrExitDock gScreen)
      )
   </Action>
</Actions>
Last edited by ptbptb on Thu May 20, 2010 6:19 pm, edited 4 times in total.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

ptbptb wrote:These aren't in the Xelerus list yet.
Afaik digdug is maintaining a list of functions missing on xelerus. In the near future I plan to spend some more time and update it. I am actually going through all of the functions and making sure the syntax is consistent, updating explanations and so on, but maybe I should put in the missing functions first?
ptbptb wrote:logical operator
Personally I never liked the logical operators. They don't really fit in well imo. I am not sure how xelerus will handle them, but I guess it will be fine. I will give it a try at least.
ptbptb wrote:What about a = (or ==) function like the above? Doable?

Code: Select all

(setq = setq) (setq == eq)
That should work fine. Note: I did not test it, but have tried similar things in the past
ptbptb wrote:[Atom Table] functions
These should imo not go on xelerus since they are broken and will not likely be fixed. The same goes for the symbol table functions...

Anyways, thanks for taking notice and putting in the time. Any help is appreciated! :D
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

alterecco wrote:but maybe I should put in the missing functions first?
The order makes no difference to me. I'm just checking for gaps and seeing what I can find on them.
These should imo not go on xelerus since they are broken and will not likely be fixed. The same goes for the symbol table functions...
I suggest adding a category "broken" alongside "depreciated".
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

ptbptb wrote:I suggest adding a category "broken" alongside "depreciated".
I think I will get to them so late that they could as well be "missing" :twisted:
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

I suggest adding a category "broken" alongside "depreciated".
I was marking the functions with these criteria:

not marked: function that is part of 0.98d
0.98: deprecated functions and some changed functions are marked like this
0.99: function appeared in 0.99
1.0: function added in the RC1-9 or 1.0 or 1.01

but i see the limits of this system.
I'm open to suggestions for a better one, I like for example the "deprecated" category.
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

digdug wrote:I like for example the "deprecated" category.
And, hey, you can spell it - which is more than I managed. ;-)
User avatar
ptbptb
Militia Lieutenant
Militia Lieutenant
Posts: 143
Joined: Mon May 10, 2010 7:34 pm

Nice to see that more of the 'missing' functions are being added to Xelerus.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

You can follow the slow progress on this paste http://paste.pocoo.org/show/d3YltV3Ty6unxMweYu0C/

Click the "Paste Details" link, and then "show paste tree". The last paste will contain the current status.
Post Reply