Difference between revisions of "The Standard Library"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
(Character Position)
(Give, Take and Drop)
Line 46: Line 46:
  
 
=== Give, Take and Drop ===
 
=== 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.  
+
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:
 +
{| class="wikitable"
 +
|-
 +
! Name
 +
! For
 +
! Type
 +
|-
 +
| Object is a container
 +
| Objects
 +
| Selection Only
 +
|-
 +
| Object is a supporter
 +
| Objects
 +
| Selection Only
 +
|-
 +
| ... and the container can hold
 +
| Objects
 +
| Integer (Object size)
 +
|-
 +
| ... and the surface can hold
 +
| Objects
 +
| Integer
 +
|-
 +
| Object weight
 +
| Objects
 +
| Value List
 +
|-
 +
| Maximum weight of held items
 +
| Characters
 +
| Integer (Object Weight)
 +
|-
 +
| Maximum size of held items
 +
| Characters
 +
| Integer (Object Size)
 +
|-
 +
| Object Size
 +
| Objects
 +
| Value List
 +
|}
 +
 
 +
General Tasks:
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 119: Line 161:
 
| Ok, %CharacterName% take[//s] %TheObjects[%objects%]% from %TheObject[%object2%]%.
 
| Ok, %CharacterName% take[//s] %TheObjects[%objects%]% from %TheObject[%object2%]%.
 
|}
 
|}
 +
 +
Specific Tasks:
  
 
=== Character Position ===
 
=== Character Position ===

Revision as of 05:29, 20 April 2012

Most adventure game's typically uses 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.

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 left 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'.
%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 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"

Construction.gif UNDER CONSTRUCTION - THIS INFORMATION IS INCOMPLETE.

Tasks - Uncategorised

There is currently only one task in this folder.

Name Command Description Default Text
inventory [inventory/inv/i] Lists what the player is currently wearing & holding  %CharacterName% [am/are/is] wearing %ListWorn[%Player%]%, and [am/are/is] carrying %ListHeld[%Player%]%.

Properties

This folder contains general properties pertaining to where objects and characters are located, whether the player knows a character, and character gender .

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
Object is a container Objects Selection Only
Object is a supporter Objects Selection Only
... and the container can hold Objects Integer (Object size)
... and the surface can hold Objects Integer
Object weight Objects Value List
Maximum weight of held items Characters Integer (Object Weight)
Maximum size of held items Characters Integer (Object Size)
Object Size Objects Value List

General Tasks:

Name Command Description Default Text
drop %objects% object in inventory is put on the ground Ok, %CharacterName% put[5] down %TheObjects[%objects%]%.
get %objects% pick up a dynamic object from current location Ok, %CharacterName% pick[6] up %TheObjects[%objects%]%.
get %objects% from %object% Take an object that is inside or on top of another object Ok, %CharacterName% take[7] %TheObjects[%objects%]% from %TheObject[%object2%]%.
give %objects% to %character%
give %character% %objects%
object in inventory goes to another characters inventory  %CharacterName% hand[8] %CharacterName[%character%, target]% %TheObject[%objects%]%.
offer %objects% to %character%
offer %character% %objects%
object in inventory goes to another characters inventory  %CharacterName% hand[9] %CharacterName[%character%, target]% %TheObject[%objects%]%.
pick up %objects%
pick %objects% up
pick up a dynamic object from current location Ok, %CharacterName% pick[10] up %TheObjects[%objects%]%.
pick up %objects% from %object%
pick %objects% up from %object%
Take an object that is inside or on top of another object Ok, %CharacterName% take[11] %TheObjects[%objects%]% from %TheObject[%object2%]%.
put down %objects%
put %objects% down
object in inventory is put on the ground Ok, %CharacterName% put[12] down %TheObjects[%objects%]%.
put %objects% in %object% object in inventory is put into a container  %CharacterName% put[13] %TheObjects[%objects%]% inside %TheObject[%object2%]%.
put %objects% on %object% object in inventory is put onto a surface Ok, %CharacterName% put[14] %TheObjects[%objects%]% on top of %TheObject[%object2%]%.
remove %objects% from %object% Take an object that is inside or on top of another object Ok, %CharacterName% take[15] %TheObjects[%objects%]% from %TheObject[%object2%]%.
take %objects% pick up a dynamic object from current location Ok, %CharacterName% pick[16] up %TheObjects[%objects%]%.
take %objects% from %object% Take an object that is inside or on top of another object Ok, %CharacterName% take[17] %TheObjects[%objects%]% from %TheObject[%object2%]%.

Specific Tasks:

Character Position

This folder controls whether the player is standing up, sitting, or laying down.

It contains 3 object properties:

  • Characters can sit on this object
  • Characters can stand on this object
  • Characters can lay on this object

One character state-list property:

  • Character Position

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[18] down
%CharacterName% sit[19] up.
Sit On Objects sit {up/down} [in/on] %object%
get on %object%
Sit on an object  %CharacterName% sit[20] 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[21] up.
Stand On Objects stand {up/down} [in/on] %object%
get on %object%
Stand on top of the object  %CharacterName% stand[22] 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[23] 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[24] on %TheObject[%object%]%.
Leave Object [stand/get/move] [out/off] {of} %object%
exit %object%
leave %object%
Get off of an object  %CharacterName% get[25] 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

Conversation

Talking to another character.

Command Action Default Text

Open and Close

Open and close a container or a door into another room.

Command Action Default Text

Look and Examine

Display the long description of a location or object, or the "description when read" property.

Command Action Default Text

Wear and Remove

Put on an item of clothing, or take it off.

Command Action Default Text

Eat and Drink

Properties determine if an object can be eaten or drunk.

Command Action Default Text

Library Messages

Not implimented yet - will allow special messages controlled internally by adrift to be customised or changed to a different language.

Player Movement

Normal player movement, plus getting inside of, or climbing on top of objects.

Command Action Default Text

Attacking

Basic fighting, note that the Battle System from ADRIFT 4 is not implimented in ADRIFT 5 and probably wont be for some time.

Command Action Default Text