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

Syntax:
(plyComposeString player string)

Argument List:
player: The player.
string: The formatted string.

Returns:
string: the string with the special escape strings replaced with the appropriate things.

Category:
player, string

Description:
Takes a string with the escape strings with appropriate strings.

Example:

Comment:
%him% him or her depending on sex of player
%Name% name of the player
%sir% sir or ma'am
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyDestroyed

Syntax:
(plyDestroyed player string)

Argument List:
player: The player.
string: The ending string.

Returns:
condition: True (I don't really know)

Category:
player

Description:
Ends the game with the string on the last screen.

Example:

Code: Select all

(plyDestroyed gplayer "ha ha you lose")
The player loses with an ending screen with ha ha you lose on it.

Comment:
Nice function allowing to end the game without the fighting death.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyGetCredits

Syntax:
(plyGetCredits player)

Argument List:
player: The player.

Returns:
number: The number of credits that the player has.

Category:
player

Description:
Returns the amount of credits the player has.

Example:

Code: Select all

(plyGetCredits gplayer)
Returns the amount of credits the player has.

Comment:
Basic credit function for the player, most useful for comparison.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyGetInsuranceClaims

Syntax:
(plyGetInsuranceClaims player)

Argument List:
player: The player.

Returns:
number: The number of insurance claims the player has had.

Category:
player, Insurance

Description:
Returns the amount of insurance claims the player has had.

Example:

Code: Select all

(plyGetInsuranceClaims gplayer)
Returns the amount of insurance claims the player has had.

Comment:
Basic credit function for the player, used to see how much the insurance company should charge.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyGetRedirectMessage

Syntax:
(plyGetRedirectMessage player)

Argument List:
player: The player.

Returns:
string: The stored redirected messages.

Category:
player, message

Description:
Returns the stored redirect messages. When a message is stored it is concatenated onto the redirect string.

Example:

Code: Select all

(block Nil
	(plyRedirectMessage gplayer True)
	(plyMessage gplayer "This string will be stored for later use")
	(plyMessage gplayer "cat example.")
	(plyGetRedirectMessage gplayer)
)
Returns the string "This string will be stored for later usecat example.".

Comment:
Interesting function that is helpful in storing messages for later display like when you are in a dockscreen.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyIncreaseDominaRel

Syntax:
(plyIncreaseDominaRel player number)

Argument List:
player: The player.
number: The amount you want to raise your domina relationship by number.

Returns:
True

Category:
player

Description:
Increases the players domina relationship.

Example:

Code: Select all

(plyIncreaseDominaRel gplayer 20)
Increases the players relationship with Domina.

Comment:
Basic player function. Will be more useful once there are more powers.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyIncreaseOracusRel

Syntax:
(plyIncreaseDominaOracusRel player number)

Argument List:
player: The player.
number: The amount you want to raise your Oracus relationship by number.

Returns:
True

Category:
player

Description:
Increases the players Oracus relationship.

Example:

Code: Select all

(plyIncreaseOracusRel gplayer 20)
Increases the players relationship with Oracus.

Comment:
Basic player function. Will be more useful once there are any powers for Oracus.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyInsure

Syntax:
(plyInsure player)

Argument List:
player: The player.

Returns:
True

Category:
player, Insurance

Description:
Insures the players ship.

Example:

Code: Select all

(plyInsure gplayer)
Insures the players ship.

Comment:
Basic player 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:
plyIsInsured

Syntax:
(plyIsInsured player)

Argument List:
player: The player.

Returns:
condition: True if the player is insured, Nil otherwise.

Category:
player, Insurance

Description:
Returns wether or not the player is insured.

Example:

Code: Select all

(plyIsInsured gplayer)
Returns whether or not the player is insured.

Comment:
Basic player 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:
plyMessage

Syntax:
(plyMessage player string)

Argument List:
player: The player.
string: The message string.

Returns:
condition: True

Category:
player, message

Description:
Attempts to message the player. If the RedirectMessage is set then cat onto the stored messages.

Example:

Code: Select all

(plyMessage gplayer "Success")
Displays Success if the RedirectMessage isn't set.

Comment:
Basic player function. Allowing you to display messages in flight.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
plyRedirectMessage

Syntax:
(plyRedirectMessage player condition)

Argument List:
player: The player.
condition: If Nil makes any future plyMessages display during flight, otherwise sets the redirect message to "" and makes any future plyMessages cat onto the redirect message.

Returns:
condition: True

Category:
player, message

Description:
Controls the activity of plyMessage and if the condition is true clears the stored redirect messages.

Example:

Code: Select all

(block Nil
	(plyRedirectMessage gplayer True)
	(plyMessage gplayer "This string will be stored for later use")
	(plyMessage gplayer "cat example.")
	(plyGetRedirectMessage gplayer)
)
Returns the string "This string will be stored for later usecat example.".

Comment:
Interesting function that is helpful in storing messages for later display like when you are in a dockscreen.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
random

Syntax:
(random number number)

Argument List:
number: The numbers you want to a random number between them.
number: The numbers you want to a random number between them the second must be greater than the first number.

Returns:
number: A random number in between the two numbers.

Category:
random

Description:
A random number in between the two numbers.

Example:

Code: Select all

(random 1 10)
Can return any number between 1 and 10 like 3.

Comment:
Very useful function for making variation 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:
rollDice

Syntax:
(rollDice number number number)

Argument List:
number: The number of dice you want to roll.
number: The number of sides you want each of the dice to have.
number: A bonus that is added at the end.

Returns:
number: A random number made from "rolling" that many dice and adding them together then adds the bonus.

Category:
random

Description:
Returns a random number made from "rolling" that many dice and adding them together then adds the bonus.

Example:

Code: Select all

(rollDice 1 6 10)
Returns a number between 11 and 16.

Comment:
Very useful function for making variation in code. Is basically just a helper function for random.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrEnableAction

Syntax:
(scrEnableAction screen number condition)

Argument List:
screen: The screen where you want to enable or disable an action.
number: What number starting from zero at the top of the screen the action you want to work with is.
condition: If Nil disables the action otherwise enables the action.

Returns:
condition: True if successful.

Category:
screen

Description:
Enables or disables actions on the screen. A disabled action looks grayed out and can not be selected.

Example:

Code: Select all

(scrEnableAction gScreen 0 Nil)
Disables the top action on the calling screen.

Comment:
Basic screen function that allows you to control what the player can and can not select.
Crying is not a proper retort!
User avatar
Betelgeuse
Fleet Officer
Fleet Officer
Posts: 1920
Joined: Sun Mar 05, 2006 6:31 am

Name:
scrExitDock

Syntax:
(scrExitDock screen)

Argument List:
screen: The screen you want to exit after this code.

Returns:
condition: True if successful.

Category:
screen

Description:
Returns the player to normal fight after this function is done.

Example:

Code: Select all

(scrExitDock gScreen)
Exits the current screen and returns to normal flight.

Comment:
Basic screen function that allows you to say when you are done with the screen and want to go back to the normal game.
Last edited by Betelgeuse on Sat Jan 19, 2008 2:06 am, edited 1 time in total.
Crying is not a proper retort!
Post Reply