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:
shpOrderLoot

Syntax:
(shpOrderLoot ship spaceObject)

Argument List:
ship: The ship that you want to order to loot.
spaceObject: The target to loot.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, order

Description:
Gives the ship the order loot the target.

Example:

Comment:
Allows you to give orders to ships.
Last edited by Betelgeuse on Mon Jan 21, 2008 12:27 am, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpOrderMine

Syntax:
(shpOrderMine ship spaceObject)

Argument List:
ship: The ship that you want to order to mine.
spaceObject: The target to return the mined ore too.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, order

Description:
Gives the ship the order mine the target.

Example:

Comment:
Allows you to give orders to ships.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpOrderPatrol

Syntax:
(shpOrderPatrol ship vector number)

Argument List:
ship: The ship that you want to order to patrol.
vector: Where to patrol around.
number: How far out to patrol.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, order

Description:
Gives the ship the order to patrol around a position.

Example:

Comment:
Allows you to give orders to ships.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpOrderWait

Syntax:
(shpOrderWait ship number)

Argument List:
ship: The ship that you want to order to wait.
number: How long you want the ship to wait.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, order

Description:
Gives the ship the order to wait.

Example:

Comment:
Allows you to give orders to ships.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpRechargeItem

Syntax:
(shpRechargeItem ship expression number)

Argument List:
ship: The ship that has the item to recharge.
expression: An item struct or item list pointer to the item you want to recharge.
number: The number of charges you want to add to the item.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, item

Description:
Adds the given number of charges to the item on the ship.

Example:

Comment:
As with the other charge function I don't know why it is part of the ship 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:
shpRechargeShield

Syntax:
(shpRechargeShield ship number)

Argument List:
ship: The ship that has a shield to recharge.
number: The amount you want to recharge.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, shield, repair/damage

Description:
Recharges the ships shields the given amount. Does not recharge over the shields max hp.

Example:

Code: Select all

(shpRechargeShield gplayership 10)
Adds ten hp to the player's shield.

Comment:
Useful for repairing a shield from in code.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpRefuelFromItem

Syntax:
(shpRefuelFromItem ship itemStruct)

Argument List:
ship: The ship that want to refuel from an item.
itemStruct: The item you want to use.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, item

Description:
Refuels the ship from the given item struct.

Example:

Code: Select all

(shpRefuelFromItem gplayership (itmCreate &itHelium3FuelRod; 1))
Adds 2500 to the player's fuel.

Comment:
Useful for refueling from a given item in code.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpRemoveDevice

Syntax:
(shpRemoveDevice ship expression)

Argument List:
ship: The ship that want to uninstall an device on.
expression: The item you want to uninstall, can be a item struct or item list pointer.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, item, install

Description:
Uninstalls the given item from the ship.

Example:

Comment:
Some cool effects can be done like having random items or an item that removes other items.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpRepairItem

Syntax:
(shpRepairItem ship itemListPointer)

Argument List:
ship: The ship that want to repair an item on.
itemListPointer: The pointer of the item you want to repair.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, item, damage/repair

Description:
Repairs the given item on the ship.

Example:

Comment:
Helpful in repairing damaged items.
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:
staGetSubordinates

Syntax:
(staGetSubordinates station)

Argument List:
station: The station that you want the subordinates from.

Returns:
list: the list of spaceObjects subordinates.

Category:
station

Description:
Returns the list of spaceObjects that are subordinates of the queried station. These include ships and satellites.

Example:

Code: Select all

(staGetsubordinates (sysCreateStation &stStartonEridani; Nil))
Returns the list of subordinates of the newly created Starton Eridani.

Comment
Basic and interesting function used only for the Centauri occupied station.
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpSetController

Syntax:
(shpSetController ship string)

Argument List:
ship: The ship that want to change the ai on.
string: The name of the controller.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, ai

Description:
Changes the ai of the ship.

Example:

Code: Select all

(shpSetController gSource "auton")
Makes the calling ship act like an auton.

Comment:
Very interesting function allowing you to change the way a ship behaves. I don't know what other ai there are than auton.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
shpSetGlobalData

Syntax:
(shpSetGlobalData number string expression)

Argument List:
number: The UNID of the ship class you want to set the global data on.
string: The name of the global data.
expression: The data you want to store.

Returns:
condition: True if successful, Nil otherwise.

Category:
ship, data

Description:
Sets the global data of a ship.

Example:

Code: Select all

(shpSetGlobalData &scCSCTerra; "antarctica" "betrayed")
Sets the global data of the CSC Terra named antarctica to betrayed.

Comment:
Basic data function allowing you to set global data with a UNID instead of a space object.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
sovSetDisposition

Syntax:
(sovSetDisposition number number number)

Argument List:
number: The UNID of the sovereign to change its disposition.
number: The UNID of the sovereign the first one changes its disposition about.
number: 0 means don't attack, anything else means attack.

Returns:
condition: True if successful, Nil otherwise.

Category:
ai

Description:
Sets the disposition of the first sovereign to the second sovereign.

Example:

Code: Select all

(sovSetDisposition &svCSCAntarctica; &svPlayer; 0)
Makes things controlled by the Antarctica sovereign not attack the player.

Comment:
Interesting function allowing you to change how different groups of space objects act tword each other.
Last edited by Betelgeuse on Wed Jan 23, 2008 5:54 am, edited 1 time in total.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
subtract

Syntax:
(subtract number number)

Argument List:
number: The first number you want subtracted.
number: The second number you want subtracted.

Returns:
number: The number that results when you subtracts the two numbers.

Category:
math

Description:
Subtracts the two numbers.

Example:

Code: Select all

(subtract 34 0x20)
Returns the number 2.

Comment:
Basic math function.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
strCapitalize

Syntax:
(strCapitalize string)

Argument List:
string: The string that you want the first character capitalized.

Returns:
string: The passed in string with the first character capitalized.

Category:
string

Description:
Capitalizes the first character of the string.

Example:

Code: Select all

(strCapitalize "abcdef")
Returns the string Abcdef.

Comment:
Basic string function. We need more string functions.
Crying is not a proper retort!
Post Reply