Difference between revisions of "The Standard Library"
m (Link) |
(→Properties:) |
||
Line 350: | Line 350: | ||
| How large can the objects this character can carry | | How large can the objects this character can carry | ||
|- | |- | ||
− | | [[Object | + | | [[Object size]] |
| Objects (Dynamic) | | Objects (Dynamic) | ||
| Value | | Value |
Latest revision as of 08:28, 19 September 2013
Most adventure game's typically use many of the same commands such as Get, Drop, Inventory, Look, Eat, Read, and the movement directions. Unlike older versions of ADRIFT, ADRIFT 5 does not contain any pre-defined commands in the program itself, but instead loads a large number of these common commands from an extenal file called the standard library. The ADRIFT 5 standard library is stored in a module file called StandardLibrary.amf which is usually located at C:\Program Files\Common Files\ADRIFT\Libraries\
When a new game is started, or an ADRIFT 4 game is upgraded to version 5, the contents of this file is loaded and will be saved to the .TAF file when the game is saved. If a new version of StandardLibrary.amf is installed and a game is loaded from a .TAF file that contains an older version of the library, you will be given the option of loading the new library into the game or not.
Although it is possible to edit the standard library folders, it is much better practice to override tasks in the standard library with specific tasks, or create a new general task for the same command with a higher priority and which prevents the original task from running.
Contents
Folders
In the Developer "Folders" window, this library is loaded into a folder called "Standard Library" which has several other folders inside it. The contents of each of these folders is explained in the following sections.
The words between % symbols in the command colomb are called references, and are replaced by the name of an actual object in the game.
- %object% is the name of any static or dynamic object, eg. 'pen' or 'large red ball'. If plural then you can also use "All".
- %character% is either the proper name or descriptor of a character, eg. 'john doe' or 'tall man'.
- %location% is the short description of a location.
- %item% can be any object, character or location.
- %direction% can only be a compass direction, up, down, in or out.
- %number% can be any number.
- %text% can be anything.
The other words between % symbols in the right colomb are General Functions which print the names of the objects and characters being referenced.
Square brackets containing two slashes, such as "[am/are/is]" or "[1]" are alternate versions of the text. The text which is actually shown to the player is controlled by the "Player Perspective" setting on the general tab of the game "Options" (Opened by pressing the spanner icon on the Home ribbon).
- First Person (I) - Prints the first option, so "%CharacterName% [am/are/is]" becomes "I am" and "%CharacterName% pick[2] up" becomes "I pick up"
- Second Person (You) - Prints the middle option, so "%CharacterName% [am/are/is]" becomes "You are" and "%CharacterName% pick[3] up" becomes "You pick up"
- Third Person (Characters name, eg. "John") - Prints the last option, so "%CharacterName% [am/are/is]" becomes "John is" and "%CharacterName% pick[4] up" becomes "John picks up"
Tasks - Uncategorised
This folder mostly contains tasks for verbs that don't do anything by default, but also contains the inventory command to list what the player is wearing and holding, the command to check the players score, and the ON/OFF commands.
Properties:
Name | For | Type | Item function | Description |
---|---|---|---|---|
Object can be turned off and on | Objects | State | CanBeTurnOffAndOn | On or Off |
General Tasks:
Name | Command | Description | Default Text |
---|---|---|---|
inventory | [inventory/inv/i] | Lists what the player is currently wearing & holding | %CharacterName% [am/are/is] wearing %Player%.Worn(False).List(Indefinite, False), and [am/are/is] carrying %Player%.Held(False).List(Indefinite, False). |
blow object | blow %object% | Override this with a specific task to allow the player to blow a whistle. | %CharacterName% blow[5] %object%.Name, but nothing happens. |
burn object | burn %object% | Override to allow the player to burn an object. | Burning %object%.Name would not achieve very much. |
switch object off | [switch/turn/flick] %object% off [switch/turn/flick] off %object% |
Changes the on/off status of objects that have this property. | %CharacterName% switch[6] off %object%.Name. |
switch object on | [switch/turn/flick] %object% on [switch/turn/flick] on %object% |
Changes the on/off status of objects that have this property. | %CharacterName% switch[7] on %object%.Name. |
switch object (on) | [switch/turn/flick] %object% | Turns on an object which is currently OFF. (executes task "switch object off") | |
switch object (off) | [switch/turn/flick] %object% | Turns off an object which is currently ON. (executes task "switch object on") | |
buy object | buy %object% | Override this for objects that can be purchased, ie. in a shop. | I don't think %object%.Name is for sale. |
cut object | cut %object% | Override for objects you want the player to be able to cut. | %CharacterName% can't cut %object%.Name. |
jump | jump | Override this in locations where the player could jump, ie. off a jetty into the water. | %CharacterName% jump[8] on the spot. |
kiss character | kiss %character% | Override this when it is appropriate for the player to kiss another character. | I'm not sure %character%.Name(Force) would appreciate that! |
listen | listen | Override this when the player is near something that makes a noise. | %CharacterName% hear nothing out of the ordinary. |
yes/no | [yes/no] | Normally you would use a conversation if the player needs to respond to a question, so you should not need to override this task. | That's interesting, but it doesn't mean much. |
rub object | rub %object% | Override this to make a genie appear if the player rubs a magic lamp. | %CharacterName% rub[9] %object%.Name but nothing appears to happen. |
score | score | This task lists the players current score, the maximum possible score, and the percentage attained. You would only need to change this if you are not using the standard scoring system. | Your score is %score% out of a maximum of %maxscore%. (<#%score%/%maxscore%#>%) |
search object | search %object% | Override this to allow the player to search objects. | %CharacterName% search[10] %object%.Name but find[11] nothing of interest. |
set object to something | set %object% to %text% | You would need to override this for each possible setting, or use a set %object% to %number% task. | %CharacterName% can't set %object%.Name to anything. |
show object to character | show %object% to %character% | Override this if a specific character should react to seeing a specific object. | %character%.Name seems suitably unimpressed. |
sing | sing | You might override this to cause a monster to fall asleep when you sing to it. | %CharacterName% sing[12] a little song. |
whistle | whistle | You could override this so that whistling opens a secret door. | %CharacterName% whistle[13] a little tune. |
sleep | sleep | Override this if player needs to rest or wait until morning. | %CharacterName% [am not/aren't/isn't] feeling tired at the moment. |
smell object | smell %object% | You could give objects a property that describes what they smell like. | %object%.Name smells normal. |
squeeze object | squeeze %object% | Override this if something should happen when you squeeze a specific object. | %CharacterName% squeeze[14] %object%.Name but nothing happens. |
think | think | %CharacterName% ponder[15] for a while. | |
touch object | touch %object% | Override to describe what the object feels like, or to make something happen when touched. | %CharacterName% feel nothing unexpected. |
turn object | [turn/flip] %object% {over/upside{-/ }down} | Override to make turning the object do something. | %CharacterName% turn[16] %object%.Name but nothing appears to happen. |
wake up | {a}wake{n} {up} | If the player character can sleep over multiple turns then we need to be able to wake them up. | %CharacterName% [am/are/is] not asleep! |
wave | wave | Override to make waving your hand open a secret door or attract someones attension. | %CharacterName% wave[17] cheerily. |
wave object | wave %object% | Override this if you want the player to perform a spell by waving a magic wand. | %CharacterName% wave[18] %object%.Name about, cheerily. |
Properties
This folder contains general properties pertaining to where objects are located, whether the player knows a character, and character gender.
Name | For | Type | Item function | Description |
---|---|---|---|---|
On what? | Objects | Object (Supporters) | OnWhat | Which object this one is sitting on top of |
At location | Objects (Static) | Location | AtLocation | Location of a static object |
Location of the object | Objects (Static) | State | StaticLocation | Is a static object at a single location, part of somebody or something, or in a location group |
Is this character known to the Player | Characters | Selection Only | Known | Controls whether Adrift uses the characters name or their description |
Object type | Objects | State | StaticOrDynamic | Static (fixed in place) or Dynamic (can be picked up) |
Specifically exclude object from location descriptions | Objects (Dynamic) | Selection Only | ExplicitlyExclude | The object name is not to be given in the "also here is a.." list after a location description |
When the dynamic object is listed in location, display this | Objects | Text | ListDescription | Instead of just giving the object name, use this description |
Part of what | Objects (Static) | Object | PartOfWhat | The object is a part of another object, such as a handle on a door |
In location | Objects (Dynamic) | Location | InLocation | If "Location of the object" is "In location", this gives the location |
Part of who | Objects (Static) | Character | PartOfWho | A part of a character, such as nose, eyes, mouth, hand etc. |
Held by who | Objects (Dynamic) | Character | HeldByWho | The dynamic object is being held by this character |
Gender | Characters | State | Gender | Male, female, or Unknown |
At location group | Objects (Static) | Location Group | AtLocationGroup | If a large static object exists in several locations at once, this is the group that lists them |
Location of the object | Objects (Dynamic) | State | DynamicLocation | Is a dynamic object in a location, held by somebody, sitting in or on something, or hidden from view |
Give, Take and Drop
This group of commands allows the player to pick up objects, put them on or in other objects, or give them to another character.
Properties:
Name | For | Type | Item function | Description |
---|---|---|---|---|
Object is a container | Objects | Selection Only | Container | Dynamic objects can be put inside this object |
Object is a supporter | Objects | Selection Only | Surface | Dynamic objects can be put on top of this object |
... and the container can hold | Objects (Containers) | Integer (Object size) | Capacity | How much room is inside this container |
... and the surface can hold | Objects (Supporters) | Integer | SurfaceHold | How many objects can sit on top of this one |
Object weight | Objects (Dynamic) | Value | Weight | How heavy is this object |
Maximum weight of held items | Characters | Integer (Object Weight) | MaxWeight | How much weight can this character carry |
Maximum size of held items | Characters | Integer (Object Size) | MaxBulk | How large can the objects this character can carry |
Object size | Objects (Dynamic) | Value | Size | How large is this object |
General Tasks:
Name | Command | Description | Default Text |
---|---|---|---|
Take Objects (Parent Task) | [get/take/pick up] %objects% pick %objects% up |
This task is overridden by the specific tasks in the next table | |
Take Objects From Object | [get/take/pick up/remove] %objects% from %object2% pick %objects% up from %object2% |
Take an object that is inside or on top of another object | Ok, %CharacterName% take[19] %objects%.List from %object2%.Name. |
Drop objects | [drop/put down] %objects% put %objects% down |
put the objects (from players inventory) onto the ground | Ok, %CharacterName% put[20] down %objects%.List. |
Remove before put | put %objects% on{to} {{the} top of} %object2% put %objects% in{side/to} %object2% |
An object that is inside or on top of another object in players inventory, or is worn by the player, is put on or in another object. Note that the advanced option "Continue executing matching lower priority tasks" allows the apropriate task "Put objects in others" or "Put objects on others" to execute after this one. |
<c>(removing %objects%.List from %objects%.Parent.Name first)</c> |
Give object to character | [give/offer] %objects% to %character% [give/offer] %character% %objects% |
object in inventory goes to another characters inventory | %CharacterName% hand[21] %CharacterName[target]% %objects%.List. |
Remove before drop | [drop/put down] %objects% put %objects% down |
object on or in an inventory object is put on the ground If in or on another object print: If worn print: |
<c>(removing %objects%.List from %objects%.Parent.Name first)</c> <c>(removing %objects%.List first)</c> |
Put objects in others | put %objects% in{side/to} %object2% | object in inventory is put into a container | %CharacterName% put[22] %objects%.List inside %object2%.Name. |
Put objects on others | put %objects% on{to} {{the} top of} %object2% | object in inventory is put onto a supporter object | Ok, %CharacterName% put[23] %objects%.List on top of %object2%.Name. |
Specific Tasks:
Name | General Task | Description | Default Text |
---|---|---|---|
Take Objects From Object (Lazy) | Take Objects (Parent Task) | Takes the named object(s) from inside or on top of any other object. Cant be used with "All" |
<c>(from %objects%.Parent.Name)</c> |
Take Objects From Location | Take Objects (Parent Task) | Take the named object(s) or "All" objects from the current location | Ok, %CharacterName% pick[24] up %objects%.List. |
Character Position
This folder controls whether the player is standing up, sitting, or laying down.
It contains 3 object properties and one character state-list property:
Name | For | Type | Item function | Description |
---|---|---|---|---|
Characters can sit on this object | Objects (Supporters) | Selection Only | Sittable | Used for chairs, beds, large logs etc. |
Characters can stand on this object | Objects (Supporters) | Selection Only | Standable | Step ladders, platforms and anything else they can get on |
Characters can lay on this object | Objects (Supporters) | Selection Only | Lieable | Mostly for beds |
Character position | Characters | State | CharacterPosition | Is the character Standing, Sitting or Laying down |
And general tasks for sitting, laying down and standing up:
Name | Command(s) | Description | Default Text |
---|---|---|---|
Sit On Floor | sit {up/down} | Sit on the floor: If currently laying down then: |
%CharacterName% sit[25] down %CharacterName% sit[26] up. |
Sit On Objects | sit {up/down} [in/on] %object% get on %object% |
Sit on an object | %CharacterName% sit[27] on %TheObject[%object%]%. |
Sit On Current Object | sit {up/down} | Sit on the object you are currently standing or laying on | <c>(on %TheObject[%ParentOf[%Player%]%]%)</c> ---Executes task "Sit On Objects" |
Stand On Floor | stand {up/down} | Stand up if currently sitting or laying down | %CharacterName% stand[28] up. |
Stand On Objects | stand {up/down} [in/on] %object% get on %object% |
Stand on top of the object | %CharacterName% stand[29] on %TheObject[%object%]%. |
Stand On Current Object | stand {up/down} | If sitting or laying on object, stand on it | <c>(on %TheObject[%ParentOf[%Player%]%]%)</c> ---Executes task "Stand On Objects" |
Lie On Floor | lie {up/down} lay {up/down} |
Lay down on the floor | %CharacterName% lie[30] down. |
Lie On Current Object | lie {up/down} lay {up/down} |
If sitting or standing on object, lay on it | <c>(on %TheObject[%ParentOf[%Player%]%]%)</c> ---Executes task "Lie On Object" |
Lie On Object | [lie/lay] {up/down} [in/on] %object% get on %object% |
Lay down on the object | %CharacterName% lie[31] on %TheObject[%object%]%. |
Leave Object | [stand/get/move] [out/off] {of} %object% exit %object% leave %object% |
Get off of an object | %CharacterName% get[32] off of %TheObject[%object%]%. |
Leave Current Object | [stand/get/move] up {on {the} floor/ground} exit get off leave |
Get off of the object currently on, and stand up | <c>(%TheObject[%ParentOf[%Player%]%]%)</c> ---Executes task "Leave Object" |
Push and Pull
Just some defaults that need to be overidden with specific commands to do anything.
Name | Command | Description | Default Text |
---|---|---|---|
Pull object | [pull/tug] {on} %object% | Override with a specific task for objects that can be pulled, such as levers | %CharacterName% pull[33] %TheObject[%object%]%, but nothing happens. |
Push object | [push/shove/press] %object% | Override with a specific task for objects that can be pushed, such as buttons | %CharacterName% push[34] %TheObject[%object%]%, but nothing happens. |
Conversation
Talking to another character.
Most of these tasks do not output any text because they activate the conversation system which outputs text from one of the topic's on a characters conversation tab.
Name | Command | Description | Default Text |
---|---|---|---|
Ask about subject | ask about %text% | If already in a conversation, ask that character about a topic | |
Ask character about subject | ask %character% about %text% | Looks for a matching ASK topic on the characters conversation tab | |
Tell character about subject | tell %character% about %text% | Similar to ASK, but looks for matching TELL topic | |
Say something | say %text% | If already in a conversation, say something to that character | |
Say something (Lazy) | say %text% | If one other character at same location, say something to that character | <c>(to %CharacterName[%AloneWithChar%]%)</c> |
Say something to character | say %text% to %character% | Looks for a matching "General Command" topic on the characters conversation tab | |
Ask about (Lazy) | ask about %text% | If one other character at same location, ask that character about a topic | <c>(%CharacterName[%AloneWithChar%]%)</c> |
Open and Close
Open and close a container or a door into another room.
Properties:
Name | For | Type | Item function | Description |
---|---|---|---|---|
Open status | Objects (openable) | State | OpenStatus | Indicates whether object is open or closed |
Key for lock | Objects (Lockable) | Object (dynamic) | LockKey | Which object is the key for this object |
Inside what? | Objects (Dynamic) | Object (containers) | InsideWhat | What is this object inside of |
Object can be opened and closed | Objects | Selection Only | Openable | |
Object can be locked | Objects (openable) | Selection Only | Lockable | Does this object need a key to unlock it Do not use this for combination locks or latches |
Locked status | Objects (Lockable) | Selection only | LockStatus | This appends "Locked" as a 3rd option to Open status |
General Tasks:
Name | Command | Description | Default Text |
---|---|---|---|
close objects | close %object% | An open object is closed | %CharacterName% close[35] %TheObject[%object%]%. |
Unlock objects key check | # Unlock %object1% with %object2% | Called by "Unlock objects (lazy)" to check for key | <c>(using %TheObject[%object2%]%)</c> Inside %TheObject[%object%]% is %ListObjectsIn[%object%]%. |
Unlock objects with key | unlock %object1% with %object2% | Try to unlock a locked object | %CharacterName% unlock[36] %TheObject[%object1%]% with %TheObject[%object2%]%. Inside %TheObject[%object%]% is %ListObjectsIn[%object%]%. |
Unlock objects (lazy) | unlock %object% | Try to unlock an object using its "key for lock" | |
Open objects | open %object% | Opens a closed (but not locked) object | %CharacterName% open[37] %TheObject[%object%]%. Inside %TheObject[%object%]% is %ListObjectsIn[%object%]%. |
Open objects with others | open %object1% [with/using] %object2% | Override with a specific task to open an object using another object | %CharacterName% can't open %TheObject[%object1%]% with %TheObject[%object2%]%. |
Lock objects key check | # Lock %object1% [with/using] %object2% | Called by "Lock objects (lazy)" to check for key | <c>(using %object2%.Name)</c> |
Lock objects with key | lock %object1% [with/using] %object2% | Use the "key for lock" object to lock first object | %CharacterName% lock[38] %object1%.Name with %object2%.Name. |
Lock objects (lazy) | lock %object% | Try to lock an object using its "key for lock" |
Look and Examine
Display the long description of a location or object, or the "description when read" property.
Properties:
Name | For | Type | Item function | Description |
---|---|---|---|---|
Object is readable | Objects | Selection only | Readable | You can use the "read" command with this object |
... and description when read | Objects (readable) | Text | ReadText | Display this instead of object description when read |
When the static object is listed in location, display this | Objects (static) | Text | ListDescription | How to describe a static object when specifically listed after the location description |
Specifically list object in location descriptions | Objects (Static) | Selection Only | ExplicitlyList | Causes static object to be listed after location description |
Long Location Description | Locations | Text | Description (of Location) | The detailed description of the location |
Short Location Description | Locations | Text | Name (of location) | The name of the location |
General Tasks:
Name | Command | Description | Default Text |
---|---|---|---|
Examine characters | [examine/exam/ex/x/look {at}] %character% | Print the full description of a character | %DisplayCharacter[%character%]% |
Examine objects | [examine/exam/ex/x/look {at/in{side}/under}] %object% | Print the full description of an object | %DisplayObject[%object%]% |
Look | [look/l] | Display the full description of the current location | %DisplayLocation[%LocationOf[%Player%]%]% |
Read objects | read %object% | If object is readable, display its description when read or full description | %DisplayObject[%object%]% |
Wear and Remove
Put on an item of clothing, or take it off. Can also be used for armor and jewelry.
Properties:
Property Name | For | Type | Description |
---|---|---|---|
Object is wearable | Objects (Dynamic) | Selection only | Allows an object to be worn by a character |
Worn by who | Objects (Wearable) | Character List | Which character is wearing the object |
General Tasks:
Task Name | Command | Description | Default Text |
---|---|---|---|
Remove objects | [remove/take off] %objects% take %objects% off |
Move an object being worn by character to being held by same character | Ok, %CharacterName% remove[39] %TheObjects[%objects%]%. |
Wear objects | [wear/put on/don] %objects% put %objects% on |
Move an object being held by character to being worn by same character | Ok, %CharacterName% put[40] on %TheObjects[%objects%]%. |
Eat and Drink
Properties determine if an object can be eaten or drunk.
Properties:
Name | For | Type | Item function | Description |
---|---|---|---|---|
Object is edible | Objects (Dynamic) | Selection Only | Edible | Indicates that object is edible food |
Object is drinkable | Objects (Dynamic) | Selection Only | Drinkable | Indicates that object is (or contains) a drinkable fluid |
General Tasks:
Name | Command | Description | Default Text |
---|---|---|---|
Eat objects | [eat] %object% | Override this with a specific task to allow an object to be eaten | As tasty as %TheObject[%object%]% looks, %CharacterName% [am/are/is] not hungry right now. |
Drink object | drink %object% | Override this with a specific task to allow an object to be drunk | As delicious as %TheObject[%object%]% looks, %CharacterName% [am/are/is] not thirsty right now. |
Player Movement
Normal player movement, plus getting inside of, or climbing on top of objects.
Properties:
Name | For | Type | Item function | Description |
---|---|---|---|---|
What to show when character is at the location | Characters | Text | CharHereDesc | Replaces the default "John is here" message |
Show character entering/exiting the location | Characters | Selection Only | ShowEnterExit | Tells the player if another character moves in or out of the location |
Description when enters the location | Characters | Text | CharEnters | What to print if this character moves into location containing the player |
Description when exits the location | Characters | Text | CharExits | What to print if this character moves into location containing the player |
Location of the character | Characters | State | CharacterLocation | Is this character hidden, at a location, in or on something |
At which location | Characters | Location | CharacterAtLocation | Which location is the character currently at |
On which object? | Characters | Object (supporters) | CharOnWhat | Which object is this character on top of |
Inside which object? | Characters | Object (containers) | CharInsideWhat | Which object is this character inside of |
On which character? | Characters | Character | CharOnWho | Which character this character on top of |
Characters can go inside this object | Objects (containers) | Selection Only | CharactersCanGoInOb | Objects characters can get into |
General Tasks:
Name | Command | Description | Default Text |
---|---|---|---|
Player Movement | {[go/walk/move/run] {to {the}}} %direction% | Controls the north, south, up, down, in, out commands | %CharacterName% move[41] %LCase[%direction%]%. |
Go Inside Object | [move/go/get] [in{to/side}] %object% enter %object% |
Enter object that has "characters can go inside this object" property | %CharacterName% step[42] inside %TheObject[%object%]%. |
Get Out of Object | [stand/get/move/go] out {of} %object% exit %object% leave %object% |
If character is inside an object, get out | %CharacterName% get[43] out of %TheObject[%object%]%. |
Climb objects | [climb/clamber/go] {up/down/on} %object% [move/walk] [up/down/on] %object% |
Try to climb up something | %CharacterName% can't climb %TheObject[%object%]%. |
Get off objects before moving | {[go/walk/move/run] {to {the}}} %direction% | Try to walk somewhere when on any object | <c>(getting off %Player%.Parent.Name first)</c> |
Stand before moving | {[go/walk/move/run] {to {the}}} %direction% | Try to walk somewhere when sitting or laying down | <c>(standing up first)</c> |
Attacking
Basic fighting, note that the Battle System from ADRIFT 4 is not implimented in ADRIFT 5 and probably wont be for some time.
Name | Command | Description | Default Text |
---|---|---|---|
Attack character | [attack/hit/kick/kill] %character% | Override with a specific task to make a character attackable | I don't think %CharacterName[%character%]% would appreciate that very much. |
Attack character with object | [attack/hit/kick/kill] %character% [with/using] %object% | Override with a specific tasks to make a character attackable with specific objects | I don't think %CharacterName[%character%]% would appreciate that very much. |
<<< Folders | Main Page | Text Boxes >>> |