Obsolete Functions

Parent Previous Next

Obsolete Functions

There are several functions that were added to ADRIFT 5 before Item functions had been created.  These functions now all have an equivalent Item function, and so are now considered obsolete, as the item functions are easier to use, are often more concise, are more readable, and are much more flexible (for example, you can refine them with additional properties).

CharacterDescriptor

Returns the full descriptor (including article and prefix) of the character.  ADRIFT will need to determine whether the article should be replaced with "the".  A "Bad Function" error will occur in Runner if this function is used on a character that does not have a descriptor.  If the point of view of the player character is switched to another character which does not have a descriptor then this function will return "me" or "myself", but only if they are unaltered in the descriptor field of the character with the blue icon named "Player".


Syntax

%CharacterDescriptor[key]%

Parameters

key

The key of the character you wish to display the descriptor of.


The following item function should be used instead of the above syntax:

%character%.Descriptor



CharacterName

If the character is known to the Player (i.e. the Known property of the character is selected) or the Known property does not exist in your game, then this function will return the Proper name of the character.


If the Known property exists in your game but is not set for the character in question, this function will return the Descriptor of the character.


In any one turn, if the CharacterName function is used more than once for a particular character, it will be substituted with a pronoun. The default pronoun type to be substituted with is the subjective pronoun, however, this can be altered by providing an additional parameter to the function.


For further details of this function, see Character Name substitution.


Syntax

%CharacterName%
%CharacterName[key]%
%CharacterName[key, pronoun_type]%

Parameters

key

The key of the character you wish to display the name of.  If the key is omitted, if the function is used anywhere in a character definition, that character will be used.  If not, the Player character is assumed.

pronoun_type

Specifies the type of pronoun the character name should be substituted with.  If this parameter is omitted, the pronoun is assumed to be subjective.  Possible values for this parameter are subject(ive) (I, you, he, she, it), object(ive)/target (me, you, him, her, it) and possessive (my, your, his, her, its).


Reflective pronouns (myself, yourself, himself, herself, itself) will automatically be substituted if the target of a sentence is also the subject (e.g. "I (subject) throw the ball at me (target)" will become "I (subject) throw the ball at myself (reflective)".


The relevant pronoun will also be selected depending whether the character in question is male, female or unknown, and whether the game is being played in first-person (I, me, my, myself), second-person (you, your, yourself, you) or third-person perspective (him/her/it, his/her/its, himself/herself/itself, he/she/it).


To prevent pronoun substitution from occurring, use the ProperName or CharacterDescriptor functions.


The following item function should be used instead of the above syntax:

%character%.Name



CharacterProper

Returns the proper name of a particular character.  For the default player character, and any character with a blank proper name field, it will return "Anonymous".


Syntax

%CharacterProper[key]%

Parameters

key

The key of the character you wish to display the proper name of.


The following item function should be used instead of the above syntax:

%character%.ProperName



DisplayCharacter

Displays the description of a particular character.


Syntax

%DisplayCharacter[key]%

Parameters

key

The key of the character you wish to display the description of.


The following item function should be used instead of the above syntax:

%character%.Description



DisplayLocation

Displays the description of a particular Location.


If Additionally display the Short Location name when viewing locations is selected in Runner options, then the first thing displayed will be the short description of the location.  It will be in boldface.


Next will be the long description of the location, possibly modified by alternate descriptions.


Static objects with Specifically list objects in location description selected, and dynamic objects, will then be listed.  Objects with a specific When the object is listed in location, display this description, will be shown after the listed objects.  All dynamic objects will be shown after all static objects.


Characters at the location are then listed.  Those with specific What to show when the character is at location descriptions are listed after the list of other characters.


This function does not show characters or objects that are sitting or laying on another object.


Syntax

%DisplayLocation[key]%

Parameters

key

The key of the character you wish to display the location of.


The following item functions should be used instead of the above syntax:

%character%.Location.Description



DisplayObject

Displays the description of a particular object.


Syntax

%DisplayObject[key]%

Parameters

key

The key of the object you wish to display the description of.


The following item function should be used instead of the above syntax:

%object%.Description



ListCharactersIn

Lists all the characters inside a particular object.


Syntax

%ListCharactersIn[key]%

Parameters

key

The key of the object you wish to list the characters that are inside of.


The following item functions should be used instead of the above syntax:

%object%.Contents(Characters).List or %object%.Children(Characters, In).List



ListCharactersOn

Lists all the characters sitting, laying or standing on top of a particular object.  Example output: "Harry, Fred and George"


Syntax

%ListCharactersOn[key]%

Parameters

key

The key of the object you wish to list the characters that are on top of.


The following item functions should be used instead of the above syntax:

%object%.Children(Characters, On).List



ListCharactersOnAndIn

Lists all the characters on and inside a particular object.  This is basically the same as ListCharactersOn and ListCharactersIn, but it also formats the output into a complete sentence. Example output: "Harry and fred are on the box, and George are inside the box"


Syntax

%ListCharactersOnAndIn[key]%

Parameters

key

The key of the object you wish to list the Characters that are on and in.


The following item functions should be used instead of the above syntax:

%object%.Children(Characters).List



ListHeld

Lists all the objects held by a particular character.


Syntax

%ListHeld[key]%

Parameters

key

The key of the character you wish to list the held objects of.


The following item functions should be used instead of the above syntax:

%character%.Held.List



ListExits

Lists all the exits available to a particular character.


Syntax

%ListExits[key]%

Parameters

key

The key of the character you wish to list the exits for.


The following item functions should be used instead of the above syntax:

%character%.Location.Exits.List



ListObjectsAtLocation

Displays a list of all the objects at a particular location. This will include dynamic objects directly at the location (i.e. not inside or on another object) and static objects which have been marked as explicitly list.


Syntax

%ListObjectsAtLocation[key]%

Parameters

key

The key of the location you wish to list the objects at.


The following item functions should be used instead of the above syntax:

%location%.Objects.List



ListObjectsIn

Lists all the objects inside of a particular container object.


Syntax

%ListObjectsIn[key]%

Parameters

key

The key of the object you wish to list the contents of.


The following item functions should be used instead of the above syntax:

Inside %object%.Name is %object%.Contents(Objects).List.



ListObjectsOn

Lists all the objects on the surface of a particular object.


Syntax

%ListObjectsOn[key]%

Parameters

key

The key of the object you wish to list the objects on.


The following item functions should be used instead of the above syntax:

On %object%.Name is %object%.Children(Objects, On).List.



ListWorn

Lists all the objects worn by a particular character.


Syntax

%ListWorn[key]%

Parameters

key

The key of the character you wish to list the worn objects of.


The following item functions should be used instead of the above syntax:

%character%.Worn.List



LocationName

Returns the short description of a particular Location.


Syntax

%LocationName[key]%

Parameters

key

The key of the location you wish to return the short description for.


The following item function should be used instead of the above syntax:

%location%.Name



LocationOf

Returns the key of the location of a particular character.


Syntax

%LocationOf[key]%

Parameters

key

The key of the character you wish to find the location of.


The following item function should be used instead of the above syntax:

%location%.Location



ParentOf

Returns the parent key of an object.  So for example, if an object is inside another object or an object is part of a character, the function will return the key of the container object or character.  If the function returns more than one parent (for example, the key supplied is a multiple object reference), the keys will be listed in a pipe separated list.


Syntax

%ParentOf[key]%

Parameters

key

The key of the object you wish to find the parent of.  This can also be a reference, for example %objects%


The following item function should be used instead of the above syntax:

key.Parent



PropertyValue

Returns the current value of a property of an object, Location or character.


Syntax

%PropertyValue[key, propertykey]%

Parameters

key

The key of the location, object or character you wish to obtain the property value of.

propertykey

The key of the property you wish to obtain the value of.


The following item function should be used instead of the above syntax:

key.propertykey



TheObject/TheObjects

These two functions are identical.  However, they are interchangeable to facilitate clearer readability, depending on your task output.  These functions will display the full name of an object, replacing any indefinite articles with definite ones, i.e. the word “the”.  If the function returns more than one object (for example, the key supplied is a multiple object reference), the objects will be listed in a comma separated list.


Syntax

%TheObject[key]%

Parameters

key

The key of the object you wish to display the name of. This can also be a reference, for example %objects%.


The following item functions should be used instead of the above syntax:

%object%.Name