function list

This is a moderated forum that collects tutorials, guides, and references for creating Transcendence extensions and scripts.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysGetLevel

Syntax:
(sysGetLevel)

Argument List:

Returns:
number: The level of the current system.

Category:
system

Description:
Returns the level of the current system.

Example:

Code: Select all

(sysGetLevel)
If called in the Charon system will return a 3.

Comment:
Useful for seeing the general level of a system. The level of a system determines what level of random stations and random items will appear.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysGetName

Syntax:
(sysGetName)

Argument List:

Returns:
string: The name of the current system.

Category:
system

Description:
Returns the name of the current system.

Example:

Code: Select all

(sysGetName)
If called in St. K's system will return a "St. Katharine's Star".

Comment:
Not that useful. Maybe if you had multiple star systems possible in a node you can use this to differentiate.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysGetNode

Syntax:
(sysGetNode)

Argument List:

Returns:
string: The name of the node of the current system.

Category:
system

Description:
Returns the name of the node of the current system.

Example:

Code: Select all

(sysGetNode)
If called in St. K's system will return a "SK".

Comment:
Very useful for telling where in the network you are.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysGetNavPathPoint

Syntax:
(sysGetNavPathPoint number spaceObject spaceObject number)

Argument List:
number: The UNID of the sovereign of the path.
spaceObject: Where the path starts.
spaceObject: Where the path ends.
number: Path% ? (not sure what this means)

Returns:
vector: The path between those two points.

Category:
system

Description:
Makes a path for a ship to follow between the two given points.

Example:

Comment:
Useful for giving a line. One way it is used is to say where to lay out mines.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysGetObjectByName

Syntax:
(sysGetObjectByName spaceObject string)

Argument List:
spaceObject: A space object in the same system as the thing you are looking for.
string: The name of the space object you are looking for.

Returns:
spaceObject: A space object with the given name, if nothing is found returns Nil.

Category:
system, spaceObject

Description:
Finds and returns a space object from a given name.

Example:

Comment:
Useful for finding stations with a given name such as outbound stargates and arena walls.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysGlobals

Syntax:
(sysGlobals)

Argument List:

Returns:
list: A list of strings naming all the globals.

Category:
system, function, variable

Description:
Returns a list of all the names of the global functions and global variables.

Example:

Comment:
Not useful for general use but useful for finding the names of all the functions.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysPoolUsage

Syntax:
(sysPoolUsage)

Argument List:

Returns:
list: A list of numbers representing how much resources the game is using.

Category:
system

Description:
Returns a list of numbers representing how much resources the game is using.

Example:

Comment:
Not useful for general use at all.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysTicks

Syntax:
(sysTicks)

Argument List:

Returns:
number: A timer from your computer.

Category:
system, time

Description:
Returns the current time from your computer in ticks.

Example:

Comment:
Use unvGetTick, sysTicks may not be synchronized with Transcendence ticks.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysStopTime

Syntax:
(sysStopTime number spaceObject)

Argument List:
number: How many ticks you want to stop time for.
spaceObject: A space object that you want immune from the time stop can not be Nil.

Returns:
condition: True if successful, Nil otherwise.

Category:
system, time

Description:
Stops time for the game except for the given spaceObject.

Example:

Code: Select all

(sysStopTime 500 gplayership)
Stops time for everything except for the player.

Comment:
Used with the Gem of Contrition.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysVectorPolarOffset

Syntax:
(sysVectorPolarOffset vector number number)

Argument List:
vector: The origin of the new vector. Same as the systems origin if Nil.
number: The angle of the vector from 0 to 360. 0 is to the right.
number: The length of the vector in light seconds.

Returns:
vector: A new vector based on the origin and polar coordinates given.

Category:
system, vector operator

Description:
Makes a vector from the given origin and polar coordinates.

Example:

Code: Select all

(sysVectorPolarOffset gplayership 0 10)
Returns a vector that points to a position 10 light seconds to the right of the player.

Comment:
Essential if you want to use vectors of a certain length or direction.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sysVectorRandom

Syntax:
(sysVectorRandom vector number number criteria)

Argument List:
vector: The origin of the new vector. Same as the systems origin if Nil.
number: The max length of the vector in light seconds.
number: The minimum length of the vector in light seconds.
criteria: A filter.

Returns:
vector: A new random vector between the min and max length that follows the filter.

Category:
system, vector operator

Description:
Makes a random vector from the given min and max length that follows the filter.

Example:

Comment:
Useful if you want a random vector with a filter.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
unvUNID

Syntax:
(unvUNID string)

Argument List:
string: Part of the name of the item or ship you want.

Returns:
list: A list that has a random item or ship that matches part of the name. The list looks like if a ship (UNID 'shipclass name) and if a item (UNID 'itemtype name)

Category:
system, random

Description:
Finds a random ship or item that matches the name you passed in. Returns its UNID in a list with some other information.

Example:

Comment:
Like itmCreateByName but with both ships and items. It doesn't create the ship or item.
Crying is not a proper retort!
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Name
sysVectorAdd

Syntax:
(sysVectorAdd vector vector)

Argument List:
vector: first vector to add
vector: second vector to add

Returns:
vector: the sum of the 2 vectors

Category:
vector operator, system

Description:
Function used to sum 2 vectors.

Example:


Comment:
Basic function for summing 2 vectors
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Name
sysVectorDivide

Syntax:
(sysVectorDivide vector number)

Argument List:
vector: the vector you want to be divided by
number: the integer that divide the vector

Returns:
vector: the resulting position after the division

Category:
vector operator, system

Description:
This function returns a position (vector) after dividing the submitted vector by the integer

Example


Comment:
Basic vector operator function
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Name:
sysVectorSubtract

Syntax:
(sysVectorSubtract vector vector)

Argument List:
vector: the first vector to be subtracted
vector: the subtracting vector

Returns:
vector: resulting position after the subtraction.

Category:
vector operator, system

Description:
This function returns a position (vector) from a subtraction of the two given vectors.

Example:


Comment:
Basic vector operator function
Post Reply