You are on page 1of 193

ADRIFT V5 USER MANUAL

ADRIFT v5 Wiki compiled into PDF format By Andy Nicholas Last Updated: 18-Sep-12

CONTENTS
OVERVIEW ........................................................................................................ 12
Major differences between v4 and v5 ..................................................................................12

GENERAL SETUP ................................................................................................ 13


Requirements ..................................................................................................................13 Download .......................................................................................................................14 Install .............................................................................................................................14 Upgrade..........................................................................................................................14 Troubleshooting ...............................................................................................................14 Running Games ...............................................................................................................15

RUNNING GAMES ............................................................................................... 15


Finding games to play ......................................................................................................15 The Runner .....................................................................................................................15

FUNDAMENTALS ................................................................................................ 16
Locations ........................................................................................................................16 Objects ...........................................................................................................................17 Characters ......................................................................................................................17 Commands & Tasks..........................................................................................................17

GETTING STARTED ............................................................................................ 17


The ADRIFT 5 Developer ..................................................................................................17 Your First Room...............................................................................................................19 Introduction & End of Game .............................................................................................20 Saving ............................................................................................................................21 Objects ...........................................................................................................................21 Moving between Locations ...............................................................................................23 Tasks ..............................................................................................................................25

VERBS AND COMMANDS .................................................................................... 27


References ......................................................................................................................27 Player Movement .............................................................................................................28 Picking up and putting down objects .................................................................................28 Sitting and Laying down ...................................................................................................30 Pushing and Pulling .........................................................................................................31 Conversation ...................................................................................................................32 Open and Close ...............................................................................................................32 Look and Examine ...........................................................................................................33

Clothing ..........................................................................................................................34 Food and Drink................................................................................................................34 Attack!............................................................................................................................34

Introductory Tutorials ......................................................................................... 35


Connecting locations using the map ...................................................................................35 Locked Doors ..................................................................................................................38
Describing the Two Sides of the Door Differently ................................................................................. 41 Latched Doors ................................................................................................................................. 43

Drawers and Cupboards ...................................................................................................44


Opening and Closing Containers ........................................................................................................ 46 Locking a Container ......................................................................................................................... 46

Adding Characters ...........................................................................................................47


Creating a Character ........................................................................................................................ 47

Properties ................................................................................................................................... 48
Asking a Character a Question........................................................................................................... 50

Adding Greetings and Farewells ........................................................................................51

Adrift Reference ................................................................................................. 52


Locations ........................................................................................................................52
Description...................................................................................................................................... 52 Directions ....................................................................................................................................... 53 Properties ....................................................................................................................................... 54 Contents ......................................................................................................................................... 56

Objects ...........................................................................................................................56
Description...................................................................................................................................... 57 Properties ....................................................................................................................................... 58

Tasks ..............................................................................................................................58
General Tasks .................................................................................................................................. 59

Advanced Command Construction ................................................................................................. 61 Wildcards ................................................................................................................................... 61 References ................................................................................................................................. 61 Scope......................................................................................................................................... 63 Message to Display on Completion ................................................................................................ 63 Task is Repeatable ...................................................................................................................... 63
Specific Tasks .................................................................................................................................. 64

Overriding .................................................................................................................................. 65 Best Practice ............................................................................................................................... 65 Parent/Child buttons .................................................................................................................... 66


System tasks ................................................................................................................................... 66

Restrictions and Actions.................................................................................................................... 67 Hints .............................................................................................................................................. 67 Advanced ........................................................................................................................................ 67 An Example ..................................................................................................................................... 69

Characters ......................................................................................................................72
Description...................................................................................................................................... 72 Properties ....................................................................................................................................... 73 Movement....................................................................................................................................... 75 Conversation ................................................................................................................................... 79 Character Name Substitutions ........................................................................................................... 81

Name functions ........................................................................................................................... 81 Proper Name or Descriptor? .......................................................................................................... 81 Pronoun Substitution ................................................................................................................... 81 Person Perspective ...................................................................................................................... 82

Events ............................................................................................................................83 Variables .........................................................................................................................84


System Variables ............................................................................................................................. 84 Displaying Variables ......................................................................................................................... 84 Using Text Arrays ............................................................................................................................. 85

Groups and Classes .........................................................................................................86


Location Groups .............................................................................................................................. 86 Object Groups ................................................................................................................................. 87 Character Groups ............................................................................................................................. 88

Properties .......................................................................................................................88
Properties Tab ................................................................................................................................. 89 Defining a new property ................................................................................................................... 90

Text Overrides .................................................................................................................91 Hints ..............................................................................................................................92

User Interface Reference .................................................................................... 93


Simple Mode ...................................................................................................................93 Menus ............................................................................................................................95
Main Menu ...................................................................................................................................... 95 Quick Access Toolbar........................................................................................................................ 95 Main Ribbon .................................................................................................................................... 95

Home Tab .................................................................................................................................. 95 View Tab .................................................................................................................................... 96 Map Tab ..................................................................................................................................... 96

Folders ...........................................................................................................................97

Folder Pane ..................................................................................................................................... 97 Hiding the Folder List ....................................................................................................................... 99 Folder Window Context Menu .......................................................................................................... 100 View............................................................................................................................................. 100 Sort By ......................................................................................................................................... 102

Group by .................................................................................................................................. 104 Cut and Paste ........................................................................................................................... 105 Add New .................................................................................................................................. 106
Item Context Menu ........................................................................................................................ 106

General Task............................................................................................................................. 107 Object ...................................................................................................................................... 107 Character ................................................................................................................................. 108 Location ................................................................................................................................... 108
Creating Your Own Folders.............................................................................................................. 108

The Standard Library ..................................................................................................... 108


Folders ......................................................................................................................................... 109 Tasks - Uncategorised .................................................................................................................... 109 Properties ..................................................................................................................................... 109 Give, Take Drop ............................................................................................................................. 110

Properties: ................................................................................................................................ 111 General Tasks ........................................................................................................................... 111 Specific Tasks ........................................................................................................................... 112
Character Position .......................................................................................................................... 113 Push and Pull ................................................................................................................................ 114 Conversation ................................................................................................................................. 114 Open and Close ............................................................................................................................. 115

Properties: ................................................................................................................................ 115 General Tasks: .......................................................................................................................... 116


Look and Examine ......................................................................................................................... 117

Properties: ................................................................................................................................ 117 General Tasks: .......................................................................................................................... 117


Wear and Remove ......................................................................................................................... 118

Properties: ................................................................................................................................ 118 General Tasks: .......................................................................................................................... 118


Eat and Drink ................................................................................................................................ 118

Properties: ................................................................................................................................ 118 General Tasks: .......................................................................................................................... 119


Player Movement ........................................................................................................................... 119

Properties: ................................................................................................................................ 119 General Tasks: .......................................................................................................................... 120

Attacking ...................................................................................................................................... 120

Text Boxes .................................................................................................................... 121


Drag and Drop .............................................................................................................................. 121 Preview ........................................................................................................................................ 121 Graphics ....................................................................................................................................... 121 Sound .......................................................................................................................................... 121 Special Characters ......................................................................................................................... 122 HTML markup tags......................................................................................................................... 123

Alternate Descriptions .................................................................................................... 124


Creating Alternate Descriptions ....................................................................................................... 124 Displaying a Special Description the First Time Only .......................................................................... 127 Using Restrictions .......................................................................................................................... 127 Append this to previous .................................................................................................................. 128 Start description with ...................................................................................................................... 128 Display this after default ................................................................................................................. 128 Rearranging descriptions ................................................................................................................ 128

Syntax Highlighting ........................................................................................................ 129 Map.............................................................................................................................. 129 Keyboard Shortcuts........................................................................................................ 131


Control Shortcuts ........................................................................................................................... 131 ALT Shortcuts ................................................................................................................................ 132

Dialogs .............................................................................................................133
Introduction & End of Game ........................................................................................... 133 Restrictions ................................................................................................................... 136
Creating a restriction ...................................................................................................................... 136 Location Restrictions ...................................................................................................................... 137 Object Restrictions ......................................................................................................................... 137 Task Restrictions ............................................................................................................................ 137 Character Restrictions .................................................................................................................... 137 Variable Restrictions ....................................................................................................................... 137 Property Restrictions ...................................................................................................................... 138

Restrictions list .............................................................................................................. 138 Actions ......................................................................................................................... 140


The Actions List ............................................................................................................................. 140 Move Objects ................................................................................................................................ 141 Move Characters ............................................................................................................................ 142 Locations ...................................................................................................................................... 142 Tasks ............................................................................................................................................ 143 Variables....................................................................................................................................... 143

Conversation ................................................................................................................................. 144 Set Properties................................................................................................................................ 144 End Game ..................................................................................................................................... 145

Settings ........................................................................................................................ 145


General Settings ............................................................................................................................ 146 Library Settings ............................................................................................................................. 147

Options......................................................................................................................... 148
General Tab .................................................................................................................................. 148 Bibliography Tab ............................................................................................................................ 150 Advanced Tab ................................................................................................................................ 151

Runner Menus and Toolbars ........................................................................................... 151


The File Menu And Main Toolbar ...................................................................................................... 151 Edit Menu ..................................................................................................................................... 152 View Menu .................................................................................................................................... 152 Macros Menu................................................................................................................................. 152 Window Menu ............................................................................................................................... 152 Help Menu .................................................................................................................................... 153

Importing and Exporting....................................................................................154


Modules ........................................................................................................................ 154 IFiction Record .............................................................................................................. 154 Windows Executables..................................................................................................... 154

Functions and Expressions Reference .................................................................154


Expressions ................................................................................................................... 154
Integer Expressions ....................................................................................................................... 155 String Expressions ......................................................................................................................... 156 Complex Expressions...................................................................................................................... 156

Keys ............................................................................................................................. 157


Using Keys .................................................................................................................................... 158

%Functions%................................................................................................................ 160
AloneWithChar Function ................................................................................................................. 160

Syntax ..................................................................................................................................... 160 Parameters ............................................................................................................................... 160


CharacterDescriptor Function .......................................................................................................... 162

Syntax ..................................................................................................................................... 162 Parameters ............................................................................................................................... 162


CharacterName Function ................................................................................................................ 162

Syntax ..................................................................................................................................... 162 Parameters ............................................................................................................................... 163

CharacterProper Function ............................................................................................................... 164

Syntax ..................................................................................................................................... 164 Parameters ............................................................................................................................... 164


ConvCharacter Function .................................................................................................................. 164

Syntax ..................................................................................................................................... 164 Parameters ............................................................................................................................... 164


DisplayCharacter Function .............................................................................................................. 164

Syntax ..................................................................................................................................... 164 Parameters ............................................................................................................................... 165


DisplayLocation Function ................................................................................................................ 166

Syntax ..................................................................................................................................... 166 Parameters ............................................................................................................................... 166


DisplayObject Function ................................................................................................................... 166

Syntax ..................................................................................................................................... 166 Parameters ............................................................................................................................... 167


LCase Function .............................................................................................................................. 168

Syntax ..................................................................................................................................... 168 Parameters ............................................................................................................................... 168


ListCharactersIn ............................................................................................................................ 168

Syntax ..................................................................................................................................... 168 Parameters ............................................................................................................................... 168


ListCharactersOn ........................................................................................................................... 168

Syntax ..................................................................................................................................... 168 Parameters ............................................................................................................................... 168


ListCharactersOnAndIn ................................................................................................................... 168

Syntax ..................................................................................................................................... 169 Parameters ............................................................................................................................... 169


ListHeld Function ........................................................................................................................... 169

Syntax ..................................................................................................................................... 169 Parameters ............................................................................................................................... 169


ListExits Function ........................................................................................................................... 169

Syntax ..................................................................................................................................... 169 Parameters ............................................................................................................................... 169


ListObjectsAtLocation Function ........................................................................................................ 169

Syntax ..................................................................................................................................... 170 Parameters ............................................................................................................................... 170


ListWorn Function .......................................................................................................................... 170

Syntax ..................................................................................................................................... 170 Parameters ............................................................................................................................... 170


ListObjectsIn Function .................................................................................................................... 170

Syntax ..................................................................................................................................... 170 Parameters ............................................................................................................................... 170


ListObjectsOn Function ................................................................................................................... 170

Syntax ..................................................................................................................................... 171 Parameters ............................................................................................................................... 171


ListObjectsOnAndIn Function .......................................................................................................... 171

Syntax ..................................................................................................................................... 171 Parameters ............................................................................................................................... 171


LocationName Function .................................................................................................................. 171

Syntax ..................................................................................................................................... 171 Parameters ............................................................................................................................... 171


LocationOf Function ....................................................................................................................... 171

Syntax ..................................................................................................................................... 172 Parameters ............................................................................................................................... 172


NumberAsText Function .................................................................................................................. 172

Syntax ..................................................................................................................................... 172 Parameters ............................................................................................................................... 172


ParentOf Function .......................................................................................................................... 172

Syntax ..................................................................................................................................... 172 Parameters ............................................................................................................................... 172


PCase Function .............................................................................................................................. 173

Syntax ..................................................................................................................................... 173 Parameters ............................................................................................................................... 173


Player Function .............................................................................................................................. 173

Syntax ..................................................................................................................................... 173 Parameters ............................................................................................................................... 173


PopUpChoice ................................................................................................................................. 173

Syntax ..................................................................................................................................... 173 Parameters ............................................................................................................................... 174


PopUpInput................................................................................................................................... 174

Syntax ..................................................................................................................................... 174 Parameters ............................................................................................................................... 174


PropertyValue Function ................................................................................................................... 175

Syntax ..................................................................................................................................... 175 Parameters ............................................................................................................................... 175


Rand Function ............................................................................................................................... 175

Syntax ..................................................................................................................................... 175 Parameters ............................................................................................................................... 175


TheObject/TheObjects Function ...................................................................................................... 175

Syntax ..................................................................................................................................... 176

Parameters ............................................................................................................................... 176


UCase Function ............................................................................................................................. 176

Syntax ..................................................................................................................................... 176 Parameters ............................................................................................................................... 176

Object-oriented Functions .............................................................................................. 176


Location properties .................................................................................................................... 177 Character properties .................................................................................................................. 177 Text properties.......................................................................................................................... 177 Integer properties ..................................................................................................................... 177 Group properties ....................................................................................................................... 177 Object properties....................................................................................................................... 178 Item properties ......................................................................................................................... 178

Character Functions ....................................................................................................... 178


Location properties .................................................................................................................... 179 Character properties .................................................................................................................. 179 Text properties.......................................................................................................................... 179 Integer properties ..................................................................................................................... 180 Group properties ....................................................................................................................... 180 Object properties....................................................................................................................... 180 Item properties ......................................................................................................................... 180

Object Functions ........................................................................................................... 180


Location properties .................................................................................................................... 181 Character properties .................................................................................................................. 181 Text properties.......................................................................................................................... 181 Integer properties ..................................................................................................................... 182 Group properties ....................................................................................................................... 182 Object properties....................................................................................................................... 183

Location Functions ......................................................................................................... 183


Group properties ....................................................................................................................... 183 Text properties.......................................................................................................................... 183 Object properties....................................................................................................................... 184

Intermediate Tutorials .......................................................................................184


Adventure Creation Tips For Newcomers ......................................................................... 184
1. 2. 3. 4. 5. 6. Create a map. ....................................................................................................................... 184 Describe your location, don't just tell it. ................................................................................... 185 Always put descriptions for things you describe in your room. .................................................... 185 Use aliases to help catch the player's input. .............................................................................. 186 Make the player's input obvious. ............................................................................................. 187 Puzzles should have a reason. ................................................................................................. 187

10

7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30.

Test Your Game Before It's Uploaded. ...................................................................................... 187 Listen To What People Tell You. ............................................................................................... 188 Make Your Game Sound Interesting. ........................................................................................ 188 Don't Upload Your Test Game.............................................................................................. 188 Audio in Adventures. .......................................................................................................... 188 Make sure changes to the environment are reflected in your descriptions. ............................... 189 Objects have more than one use. ........................................................................................ 190 Not to be killed without warning .......................................................................................... 190 Not to be given horribly unclear hints .................................................................................. 190 To be able to win without experience of past lives ................................................................. 190 To be able to win without knowledge of future events ............................................................... 190 Not to have the game closed off without warning .................................................................. 191 Not to need to do unlikely things ......................................................................................... 191 Not to need to do boring things for the sake of it .................................................................. 191 Not to have to type exactly the right verb............................................................................. 191 To be allowed reasonable synonyms .................................................................................... 192 To have a decent parser ..................................................................................................... 192 To have reasonable freedom of action .................................................................................. 192 Not to depend much on luck ............................................................................................... 192 To be able to understand a problem once it is solved ............................................................. 192 Not to be given too many red herrings ..................................................................................... 192 To have a good reason why something is impossible ............................................................. 193 Not to need to be American to understand hints ................................................................... 193 To know how the game is getting on ................................................................................... 193

11

OVERVIEW
ADRIFT is a set of Windows applications for creating and playing text adventures, also known as Interactive Fiction. It comes in two parts; theres the Developer the adventure creator, and the Runner the part which plays the games. ADRIFT Developer has a graphical user interface (GUI) which allows you to create adventures quickly and easily by filling in text boxes, selecting check boxes, and choosing items from drop down lists. It is unique in that no programming is required, yet it is very powerful allowing the creation of complex adventures. ADRIFT is very simple to understand and learn.

Major differences between v4 and v5


ADRIFT 5 is a complete re-write of ADRIFT 4. The reason for this is due to the flawed design of ADRIFT 4. Fiction created using ADRIFT 4 have constantly been criticized for guess the verb problems, issues where overriding tasks only works some of the time, and problems with the parser. This is mainly due to the design whereby the Runner has a built in set of standard tasks, and players can choose to override these. The overriding in ADRIFT 4 works by creating task commands which syntactically match the in-built commands. If there is not full coverage of the in-built commands, problems can arise with the default task executing rather than the overriding one. ADRIFT 5 gets around this problem by having all the in-built commands defined in libraries. These tasks can then be explicitly overridden, removing the possibility that the wrong task will execute.

12

Here is a side-by-side comparison: ADRIFT V4 Technology System Tasks Restrictions Between Locations Editing ALRs Hints Location Properties Object Properties Character Properties Resizable Windows Multiple Windows Reference per Task Command Parser Drag & Drop Support Customizable List / Folders Sub Events Spell Checking Source Text Highlighting Alternate Text Output Full Screen mode Graphics Object Classes Treaty of Babel support Visual Basic 4.0 6.0 Hardcoded into Runner Task or Object status External text editor One per task N/A Hardcoded list N/A No No 2 max Poor No No 2 Basic No Rooms only No File only No No VB.Net Customisable in Standard library Unlimited restrictions of any type Within application ADRIFT V5

TBC
Dynamically assigned Dynamically assigned Dynamically assigned Most can be resized Yes Many Improved Yes Yes Unlimited Advanced Yes Any text Yes File or internet Yes Yes

---oOo---

GENERAL SETUP
Requirements
ADRIFT 5 makes use of Version 2.0 of the .Net Framework. If you don't already have this, it can be downloaded through Windows Update.

13

Download
The latest version of ADRIFT can be found at the ADRIFT Download Page. http://www.adrift.co/cgi/adrift.cgi?page=download Here you will find a full install for new users using Windows, an update to upgrade an older version of ADRIFT 5 to the latest release, and a Linux version of Runner. If you are new to ADRIFT 5 then download the full install and unzip the zip file to your hard disk. The zip file contains 2 files, setup.exe and ADRIFT5Setup.msi ADRIFT 5 is being actively developed with new enhancements and bug fixes being added at a rapid rate. Please check back here every month or two to see if a new version has been released.

Install
Run the Setup.exe file that you extracted from ADRIFT5Setup.zip Select the location where you want ADRIFT 5 to be installed (or just use the default) and ADRIFT will be installed. Note that the Libraries and Samples folders will always be installed to C:\Program Files\Common Files\ADRIFT\. After installing ADRIFT, running the setup program again will give you the options to REPAIR or REMOVE ADRIFT.

Upgrade
If you have previously installed an older version of Adrift 5, and wish to upgrade to the newest version, first download and unzip the Adrift5.zip upgrade file, which will create a new folder called 5.0.rr (where rr is the new release number). This folder will contain the files that need updating, and may also contain new Libraries and Samples folders. Copy the files to the folder in which you originally installed Adrift 5, overwriting the existing files. Copy the Libraries and Samples folders to C:\Program Files\Common Files\ADRIFT\

Troubleshooting
You do not appear to have any libraries loaded

If, when you start the ADRIFT developer, you get a messagebox that says "You do not appear to have any libraries loaded", then you will need to setup the libraries manually. To do this, click the round button in the top-left corner of the ADRIFT generator to open the main menu and select "Settings". Switch to the "Libraries" tab and check that "StandardLibrary" is listed. If it is NOT listed, then press the "Add New Library" button, and find the StandardLibrary.amf file (usually in C:\Program Files\Common Files\ADRIFT\Libraries, or the equivalent on your system) Ensure that the box to the left of the file path has a tick in it (if not then click on it with the mouse) Error accessing user dictionary

If, when you enter text into a text box, you get the error message "Error accessing user dictionary at C:\program Files\ADRIFT 5.0\userdictionary.dict. Please go to Settings and set the

14

dictionarypath to a path you have write permissions for", then you need to select the settings dialog from the main menu (press the circular button in the top-left corner of the Adrift developer window) and change "the user dictionary location" (of file userdictionary.dict) to a folder that windows allows you to write to. Windows 7 doesn't allow users to modify files in the "Program Files" folder without elevated permissions. Hence the user dictionary needs to be in your "My Documents" folder.

Running Games
Runner should be able to load and run games made with ADRIFT versions 3.9, 4.0 and 5.0

---oOo---

RUNNING GAMES
Finding games to play
The best place to find ADRIFT games is the ADRIFT web site Adventures page: http://www.adrift.co/cgi/adrift.cgi?page=adventures Sort by Ratings Desc to show highly regarded games. You can download these games, play them online, and read their reviews. Because ADRIFT 5 is still very new, most of these games were written with ADRIFT 4.

ADRIFT games will either be .TAF files or .BLORB files. A .TAF file could also have image and sound files associated with it, in which case it will probably be provided as a zip file that you need to unzip before playing.

The Runner
Right click on the .TAF file and select 'Play' to start the runner. Alternately, you could also start the ADRIFT Runner from the start menu and use the 'open adventure' icon to locate the .TAF or .BLORB file that you wish to play. ADRIFT Runner is the application, which takes the adventure files created with Generator, and interprets them as an adventure. Runner attempts to recreate the traditional adventure environment as introduced to computers when adventures first came out, but it also improves on this by supplying extra functionality such as a realtime map, optional control panel (to use the mouse instead of keys), general point-and-click, colour customisation, automatic text completion, and a high-score table.

15

When the game starts, the game's introduction is printed in the main window, usually followed by a description of the players initial location, and then a prompt at the bottom of the screen waits for the players first command. The short description of the current location is also shown on the status bar at the bottom of the window. To the right is a map that shows the locations that the player has visited so far, and below that is a window where the game can display images if it chooses to do so. In addition to the commands for the actual game, the runner supports the following special commands: Save - The current state of the game is saved to a .TAS file. You can also enter 'Save as' to show the save-as dialog and save to a different file than previously, or 'Save "Filename"' to directly specify the name of the file to save to. Restore - Load a saved .TAS file Undo - The state of the game goes back to how it was before the previous command Restart - Start the game from the beginning Quit - Exit the game ---oOo---

FUNDAMENTALS
Locations
Adventure games are usually based around a series of locations that the player can move between and explore. These locations can be rooms of a house, chambers and tunnels in a cave system, or outdoor locations such as streets and fields. In ADRIFT each of these locations has both a short name and a long description that describes in detail what the player can see (and possibly hear, smell and feel) at that location, when they enter it. Different locations are then linked together in such a way that the player can move between them

16

by asking to move in a particular direction. Eight compass directions (north, northeast, east etc.) are provided as well as up/down and in/out to allow moving in any direction. Both the Developer and Runner display a map of the locations, with the connections between them shown as a connecting line. Movement between locations can be restricted until the player has performed certain tasks, for example by a locked door that requires them to find the key before they can go through.

Objects
Into these locations you can place both large objects such as cupboards, tables and refrigerators that the player can examine and interact with, and small objects that can also be picked up and carried around by the player. ADRIFT refers to fixed objects as "Static" and portable objects as "Dynamic". Portable objects can also be placed on a table or locked in a cupboard. Each object has properties that control what the player can do with it. Books have a readable property that allows them to be read, food has an edible property and clothing has a wearable property.

Characters
A game also needs other characters for the player to interact with, people for them to talk to and fire breathing dragons for them to avoid. These other characters can do anything the player can do. They can move around the world, pick up objects, sit on a chair, wear a hat or attack the player.

Commands & Tasks


When the player plays the game they type in command's to tell the game what they want to do. These are often in the form " <verb> <noun>" such as "Eat peach", "Get bat", "Throw ball" or "Read diary", but ADRIFT does allow more complex commands such as "Put the red ball in the cardboard box". Several commands can also be abbreviated by just entering the noun. "inventory" or just "i" will list all of the objects the player is carrying. "north" or "n" will cause the player to walk north from their current location. The ADRIFT standard library provides a large number of commands and default responses for them. To change the response in specific circumstances, ADRIFT 5 allows you to create a "Specific Task". A specific task can be limited to the case of a specific noun, or restrictions can be added so that the default response is only overridden in specific circumstances. ADRIFT 5 allows new commands to be added using a "General Task". ---oOo---

GETTING STARTED
You've installed Adrift, played a few games, and now youre ready to write your first adrift game. So where do you start?

The ADRIFT 5 Developer


When you open the Adrift developer (dev500.exe for version 5.0) you are greeted with the following screen:

17

There are 4 main areas on the screen, toolbars & menu's at the top, a hierarchical list of Folders down the left side, a blank window titled 'Map' in the middle, and five small list boxes (Locations, Objects, Tasks, Characters & Events) along the bottom that show the contents of open folders. Only one of these has anything in it, the Characters folder contains the entry 'Player'. This represents the player character in the game.

We will need to create any other characters needed in the game, all of the rooms that your Adventure will be set in, and all of the objects that the player can interact with. In the Folders window you will notice a small triangle to the left of 'Standard Library'.

When you click on it the folders contained within this folder will be shown or hidden. Double-clicking the name 'Standard Library' does the same. Leave it closed for the rest of this tutorial. Close the 5 list-box windows using the red X in their top-right corner. Now double-click on the 'Locations' folder. The locations folder list-box has opened again. A folder can contain other folders,

18

like the Standard Library folder, or it contains Adrift items, in which case it opens as a list box at the bottom of the screen.

Your First Room


Near the top of the screen is the main toolbar ribbon:

Click the "Location" button in the "Add Items" section, with the picture of a house on it. This will open the New Location editing window (shown below) where you describe a room or outdoor location for your interactive story. In the short Description field give the room a name, and in the Long Description describe what the room looks like, including any furniture or decorations that the player wont be able to pick up or move. Make sure you include something with a surface like a table, and something to sit on, as we will be using them in this tutorial. I use a simple desk & chair in the example:

When you click the "OK" button, you will see a yellow rectangle marked "Study" appear in the centre of the map, and in the "Location" folder there will now be an entry with a smaller version of the house icon next to the name of the room.

19

Introduction & End of Game


Click on the circular button at the very top left corner of the screen to open the main menu, and then select "Introduction & End of Game".

The following dialog will open:

This is where you enter the introduction to your game. It is the first thing that the player will read. You should indicate the goal of the game here, and any special information they need to play the game. We want the player to start in the Study, so select this room in the drop-down list labeled "Start the adventure at location" Also tick the "Display first room description" box, so that the description of the study is given immediately after the introduction. Did you notice the squiggly red line under the word "tommorrow"? This is Adrifts' automatic spell-checker telling us that we have made a spelling mistake. Right-click on the offending word and

20

select the correct spelling from the list provided. If you select the "End of Game" tab you can also enter a message to be displayed after the game finishes.

Saving
Choose "Save As" from the main menu to create a new .taf file and save your work so far. You should save your game whenever you add more to it than you would like to lose if there is an unexpected power failure. As well as "Save" on the main menu there is a small save button next to the main menu button, and you can also save by pressing Ctrl+S on the keyboard.

Objects
The person playing your game will expect to be able to examine every object that you mentioned in your room description, so we need to create objects for the desk, and chair. Click on the "Object" button on the toolbar with the picture of a treasure chest on it. This will open the "New Object" editing window. Create a new object to represent the desk:

The "Article" field usually contains "a" or "an" for common objects, and "the" for a unique object. The "Prefix/Adjective" field contains descriptive words about the object, such as its color, weight, size, or the material it is made out of. The "Name/Noun(s)" field should contain a single word that identifies what the object is (desk, chair, telephone, cat, mat etc.) When the player refers to the object in the game they must use the noun, but the adjectives are optional unless there is more than one object of the same type at the players location. Hence the desk may be referred to as "desk", "wooden desk", "small desk" or "small wooden desk".

The "Description" field is the message that is shown when the player types "examine desk". Click on the properties tab:

21

This is where you specify characteristics of the object, including its location. The first entry lets you select the Object Type, Static or Dynamic. Static objects are objects that remain part of a room (such as furniture) or are parts of other objects or characters. Dynamic objects are things that can be picked up by the player, such as books, swords, food, bats, balls and bags. Our desk will not be picked up by the player so we leave it as static. The "Location of object" is given as "Hidden", but we want it to be in our study, so select "Single Location" from the drop-down list. Selecting or altering properties can make other properties available, in this case an "At Location" property.

Select "Study" from the drop-down list to put the desk into our room. A desk has a flat surface that we can put things on. This is done by selecting the "Object is a supporter" property. When you click the "OK" button "a small wooden desk" will appear in the "Objects" folder, with the palm-tree icon next to it to indicate that it is a "static" object. A quicker way to add an object to a location is to right click on the location in the "Locations" folder and select the "Add object to location" option. Do this and create a static object to represent the chair, filling in adjectives and a description for whatever type of chair you want it to be. On the properties tab you will notice that the "At Location" property has already been set to "study" by using this method to create the object. Select the "Object is a supporter" property as we did for the table.

22

This makes the "Characters can sit on this object" property available. Select it as well (as that's what chairs are for) and click "OK". But the object appears in the "Locations" folder instead of the "Objects" folder? Adrift actually lets you organise objects into folders any way you want to, so you can either put all the objects in the Objects folder or put them directly under the room that they are located in. Drag one of the objects to the other folder.

Moving between Locations


You can create a new location simply by double clicking on the map. This has the advantage that you can position it in the correct location relative to your other locations. Like all maps, north is at the top and west is to the left. We want our new room to be west of the study, so double click on the map directly left of the study.

A location called "New Location" will appear on the map and also in the "Locations" folder. Drag the location on the map with the mouse to adjust its position so that it is square with the study, and with a gap between them, then double-click on it to open the location editor. Change its short description to "Bedroom" and enter a long description that describes a room with a bed in it. Above and to the right of the long description you will see an icon like a small palm tree. This is a button that you can use to create new objects in this room. When you click on it the 'New Object' window will open. Type "Bed" in the name/noun field, and enter a Description for it. Select the properties tab. An object created by pressing the button on the location window will already have its location property set, so we only need to set the properties that control how the player can interact with it. Select these properties: Object is a Characters Characters Characters supporter can lie on this object can sit on this object can stand on this object

Press OK and return to the Location editor. Press the new object button again to create another object. This time make a book.

23

Unlike our previous objects, a book is something that the player can pick up and carry around, so on the properties page select "Dynamic". We want to leave the book on the bed, so set "Location of the object" to "On Object" and "On What?" to "a bed". Because its a book we want to be able to read it, so scroll down until you find the "This object is readable" property and select it. Below this also select "and description when read" and enter the contents of your book into the text box. Press OK and back in the Location editor select the Directions tab:

The study is east of this room, so on the "Move east to" line select "Study" from the drop-down list. Press the OK button. Adrift will ask you if you want to also connect west from the study to the bedroom. Choose Yes. On the map there will now be a line shown linking the two rooms:

24

Save the game and press the "Run Adventure" button (either the one at the right of the "Home" toolbar or the green triangle next to the save button at the top of the screen). Try moving between the rooms, getting the book from the bed and putting it on the desk, reading it, laying on the bed and sitting on the chair.

Tasks
We still dont have any way to win the game, so we will override the standard library "Read" task to end the game if certain conditions are met. Click the Task button with the big red tick on the home toolbar. This will open the new task dialog:

Give the task a name (eg. "Read Book") and click on "Specific" to change it from a general task to a specific task. This will change the section below the button to:

25

We want to keep the existing behaviour which reads the book, and then run our new task to end the game, so change the 'run before' drop-down to 'run after' and select the 'Read objects' task from the next drop-down. This is a long list, but if you press the 'R' key it will jump to tasks starting with 'R'

'Read object' appears on the next line with the word 'object' highlighted. Click on it and select 'a book' from the list.

The line will now show: 'read a book'. In the 'Message to display on completion' text box enter "You have successfully studied algebra." Click on the Restrictions tab. This is where we will specify the conditions that must be met before this specific task will be executed. Press the 'Add' button to open the Restriction editing dialog. Select the 'Character' tab. Using the drop-down lists, enter the following restriction:

The general 'Read object' task in the standard library already checks that the book is visible to the

26

player and is readable. If the player is not sitting on the chair when they try to read the book then they can still read it but they wont win the game. If they are on the chair then the action we are about to create will be executed. Press OK Select the 'Actions' tab of the task and press the 'Add' button to create a new action. Select the 'End Game' tab and choose 'in Victory' from the drop-down list

Press OK, then OK on the Task dialog Save and run the game

Now when you play the game you can still read the book anywhere, but you will only win the game if you take the book from the bed and sit on the desk chair to read it. ---oOo---

VERBS AND COMMANDS


The ADRIFT 5 standard library provides a large number of pre-defined commands to perform many of the common actions that are required in an adventure game. Most commands consist of a verb (action) followed by one or two nouns (objects) which are used to perform the action with, however a few allow just the noun to be specified, and the verb to use is implied. This is a summary of the standard commands. For more detailed information, command abbreviations and alternate wording, go to the standard library page.

References
The words between % symbols in the left column are called references, and are replaced by the name of an actual item (object, character etc) in the game. %object% is the name of any static or dynamic object, eg. 'pen' or 'large red ball'. If it is in the plural form %objects%, then you can also list multiple objects or use "All" to perform this command on all relevant objects. %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.

27

Player Movement
go %direction% walk %direction% move %direction% run %direction% %direction%

If the direction tab of the players current location specifies a destination location (or location group) for the given %direction%, and that direction is not being blocked by a restriction, then the player moves to that location. -- move into %object% go inside %object% get in %object% enter %object%

The player goes inside %object%, if it is open and has the "Characters can go inside this object" property. -- stand out of %object% get out %object% move out of %object% go out %object% exit %object% leave %object%

If the player character is inside of %object%, then they get out of it, provided it is not closed. -- climb %object% clamber up %object% go on %object% move on %object% walk on %object%

By default the player can't climb an object, you must override this with a specific task to allow the player to climb an object.

Picking up and putting down objects


Only objects which have their "Object Type" property set to "Dynamic" can be picked up. Other characters in the game can also carry objects, not just the player. Where %objects% is shown, rather than %object%, it is possible to list several dynamic objects to be picked up or dropped at once, or use the word "all" to take everything at the location or drop everything in your inventory.

28

inventory i Lists what the player is currently wearing & holding. Every character has an inventory of objects that they are carrying or wearing, but the player can only inspect their own inventory. get %objects% pick up %objects% pick %objects% up take %objects%

Pick up a dynamic object from the players current location. -- drop %objects% put down %objects% put %objects% down The named object, which must be in the players inventory, is put on the ground. -- get %objects% from %object% pick up %objects% from %object% pick %objects% up from %object% remove %objects% from %object% take %objects% from %object%

Take an object that is inside or on top of another object. -- give %objects% to %character% give %character% %objects% offer %objects% to %character% offer %character% %objects%

Object in players inventory goes to another characters inventory. -- put %objects% in %object% Object in players inventory is put into a container. -- put %objects% on %object% Object in players inventory is put onto an object with a surface.

29

Sitting and Laying down


The player can sit down on chairs or lay on beds. They can also lie down or sit on the floor or ground. An object must have the property "Characters can sit on this object" for the player to be able to sit on it. An object must have the property "Characters can lie on this object" to lay on it. Objects with the property "Characters can stand on this object" can also be stood upon. get on %object% sit in %object% sit on %object% sit up in %object% sit down on %object%

The player sits on the indicated object. If they are already laying on the object, they sit up. NOTE: The command "get on %object%" will only cause you to sit on an object that you can't stand on. -- sit up sit down The player sits down on the floor or ground. If they are already standing or laying on an object, they sit on that object. -- get on %object% lie on %object% lie in %object% lie down on %object% lie down in %object% lay on %object% lay in %object% lay down on %object% lay down in %object%

The player lays on the indicated object. If they are already laying on the object, they sit up. NOTE: The command "get on %object%" will only cause you to lay on an object that you cant stand or sit on. -- lie down lay down The player lays down on the floor or ground. If they are already standing or sitting on an object, they lay down on that object.

30

stand out of %object% stand off of %object% get out %object% get off %object% move out %object% move off %object% exit %object% leave %object%

The player gets off of the indicated object. -- stand up get up move up exit get off leave

The player gets off of the object that they are currently on top of and stand up. -- get on %object% stand on %object% stand in %object% The player stands on top of the indicated object. -- stand stand up The player stands up if they are sitting or laying down. If they are already laying or sitting on an object, they stand on that object.

Pushing and Pulling


push %object% shove %object% press %object% By default this just gives a "nothing happens" message, but you can override this to push something along like a trolly, or to press a button. tug %object% pull %object% By default this just gives a "nothing happens" message, but you can override this to pull something along, or to pull a lever.

31

Conversation
ask about %text% If the player is already in a conversation with another character, or is alone with a single character, it will execute any 'ask' topic that matches the subject %text%. -- ask %character% about %text% %character% will execute any 'ask' topic that matches the subject %text%. -- tell %character% about %text% %character% will execute any 'tell' topic that matches the subject %text%. -- say %text% If the player is already in a conversation with another character, or is alone with a single character, it will execute any general command topic that matches the subject %text%. -- say %text% to %character% %character% will execute its general command topic that matches the subject %text%.

Open and Close


Containers and doors can be open (giving access to the container contents or to another location) or closed. The property "Object can be opened and closed" must be selected for the object to be openable. If they have the "Object can be locked" property then they must be unlocked, using the object specified in the "Key for lock" property, before they can be opened. open %object% If the %object% is an openable object, and is not locked, then it is opened. -- open %object1% with %object2% open %object1% using %object2% By default this gives message "%CharacterName% can't open %TheObject[%object1%]% with %TheObject[%object2%]%.". Override this with a specific task to allow an object to open another object. -- close %object%

32

If the %object% is an openable object, it is closed. -- lock %object1% with %object2% lock %object1% using %object2% If %object2% is the correct key for %Object1%, then %Object1% is locked. -- lock %object1% If the player character is holding the key for %Object1%, then %Object1% is locked. -- unlock %object1% with %object2% unlock %object1% using %object2% If %object2% is the correct key for %Object1%, then %Object1% is unlocked. -- unlock %object1% If the player character is holding the key for %Object1%, then %Object1% is unlocked.

Look and Examine


look Gives the long description of the players current location. -- examine %object% x %object% look %object% Gives the description of the object, including its open/closed status if applicable, and lists any objects and characters on top of or visible inside the object. -- examine %character% x %character% look %character% Gives the description of the character, including what they are wearing, any objects being carried, and whether they are sitting on an object. -- read %object%

33

If the object is readable and has a "Description when read" property, then that text is shown. Otherwise the description of the object is given.

Clothing
wear %objects% put on %objects% don %objects% put %objects% on

If a dynamic object has the "wearable" property and the player is carrying it, then they put it on. -- remove %objects% take off %objects% take %objects% off If the player character is wearing the %objects%, then they take them off. The objects become "held by the player character".

Food and Drink


eat %object% If object is edible, the default is just to say you are not hungry right now. You need to override this with a specific task to actually eat an object. -- drink %object% If object is drinkable, the default is just to say you are not thirsty right now. You need to override this with a specific task to actually drink an object.

Attack!
attack %character% hit %character% kick %character% kill %character%

By default, just gives a "I don't think %character% would appreciate that very much." message. You must override this with a specific task to allow the player to attack another character. -- attack %character% with %object% attack %character% using %object% hit %character% with %object% hit %character% using %object% kick %character% with %object% kick %character% using %object% kill %character% with %object%

34

kill %character% using %object% By default, just gives a "I don't think %character% would appreciate that very much." message. You must override this with a specific task to allow the player to attack another character with an object. ---oOo---

INTRODUCTORY TUTORIALS
Connecting locations using the map
If you click the mouse in the middle of a location on the map, then it selects it, changing its color to yellow. The location can now be dragged to a different position on the map, or deleted with the Delete key on the keyboard. The eight anchor points that appear as small orange boxes around the edge are used to resize the location rectangle. If you move the mouse over one of the anchors, it will change to a double-headed resize arrow, and you can hold down the left mouse button to drag that edge or corner, changing the size of the location rectangle.

Click on the map background to de-select the location. If you move the mouse to the position of one of the anchors, then that one box becomes visible.

You can't use it to resize the rectangle for a location thats not selected, but you can double-click on it to create a new link. Each anchor corresponds to one of the compass directions listed on the directions tab of the location, with north at the top. If you click the right-hand anchor then it creates a link heading east from that location. This is shown as an arrow pointing away from the location:

35

Notice that when you move the mouse that the end of the link follows it:

Move the end of the link to the wanted direction on the location you want to link to. Here we have moved the mouse over the left side of the location until the anchor appears (so we are joining to its west direction).

Clicking in the anchor joins the link to it and the line color will change from orange to grey. This creates the appropriate entries on the direction tabs of both locations:

The player will now be able to walk east from the TV room into the Lounge and west from the Lounge to the TV room. If we drag either location, the link says attached at both ends and will stretch and bend as required.

It is not necessary to always connect west to east, you can create a curved link that goes north from one location and enters the second location from the west:

36

If you move the mouse over either end of a link then the anchor's at both ends will become visible. Right-click on an anchor to display the context menu: Edit Link - Not functional in current version. Double click Location & go to Directions tab to edit link. One-way Link - Makes link one-way. The player will only be able to move in the direction in which the link was originally drawn. Add Restrictions - Not functional in current version. Go to Direction tab of Location to add restrictions. Links with restrictions are shown as a dotted line. Delete Link - Completely removes the link from both locations. Add Anchor - Allows the path of the link to be altered to go around obstacles.

A one-way link will be shown on the map as an arrow indicating the direction of possible travel:

Extra anchors are used when you have links that cross-over other locations or are hard to follow:

If you select "Add Anchor" from the context menu, then an anchor will be added halfway along the link. By dragging this anchor with the mouse, the curve of the link can be altered to go around the obstruction:

You can add as many anchors as you want, so quite complex paths are possible:

37

You can only right-click on one of the end anchors, not one of the new anchors. Anchors are added along the link in the reverse direction to which the link was drawn, so start at the end that was attached last, create an anchor, move it into position, then do the next anchor working back towards the start.

Locked Doors
Many adventure games use locked doors to keep the player out of certain area's until they have completed earlier parts of the game and obtained the key from where it was hidden, or were given it by another character as a reward for completing a quest. A locked door blocks the path between two locations, so it must exist as a static object in both of them. You could place a separate door object at each location, but then it would be difficult to synchronize them so they are both open, closed or locked at the same time. Fortunately ADRIFT provides a better way. You can place a single static object in several locations by using a location group. Open the "Groups" folder, right-click on it and select "Add Group" to open the New Group dialog. In this example I am creating a doorway between a hallway and a study, so I enter an appropriate description, ensure the group type is set to "Locations", and click on the boxes next to those two rooms to tick them:

38

Select two adjacent rooms in your own game that you want to have a doorway between, and press "OK" to save the group. Next, add a new object to your "Objects" folder. This will be the key that unlocks the door. Give it a name and a description then switch to the properties tab and make it a dynamic object so that the player can pick it up and carry it around.

Put the key somewhere the player can find it by setting its "Location of Object" and "At Location" properties. Create another new object. This will be our actual door object, so give it a name (eg. wooden door, red door, study door) and a description.

Select the Properties tab: Set the "Location of Object" to "Location Group" using the dropdown list. Set the "At Location Group" property to the location group you created above. Select the following properties for your door: o "Object can be opened and closed" (Selecting this allows you to select the next two

39

dependant properties). o "Object can be locked" (This adds Locked to the Open Status selections, and the Key for lock property). Change Open status to locked. Select your key object from the "Key for lock" dropdown.

Edit one of your door's locations and select the Directions tab. Add the link to the second location to the direction that leads to the other side of the door, if its not already set. Click the new restriction button and create the following object restriction:

In the text box of the description is written a message to be displayed if someone tries to go through the door when it is closed. This restriction requires the player to first unlock the door and then open it before they can move through it. If the restriction was [the study door][must not][be in state][Locked] then they could go through the unlocked door without having to explicitly open it as well.

40

After clicking OK you will see the restriction listed next to the destination for the direction:

Depending on your settings, this restriction may be copied to the second location automatically, or you may be asked if you want to. If not, then duplicate the restriction in the second location for the opposite direction. The door will now block movement in both directions, until it is unlocked using the key. If there are multiple directions leading through the door, such as "north" and "in", then you need to add the same restriction to all of them.

DESCRIBING THE TWO SIDES OF THE DOOR DIFFERENTLY If you want the two sides of a door to have different descriptions then you can create alternate descriptions using restrictions on which of the two locations the player is in. Right-click the description text box of the door object and select "Add Alternate Description" In the new text box tab, type the extra details that only apply to one side of the door. (This will be displayed following the Default Description)

41

Click on the

button to add the following restriction:

This will cause the description of the brass knocker to only be appended to the description of the door when the player is in the front yard. You can also add an extra description to the other side of the door by creating another alternate description and giving it the restriction that the player must be in the other room. If the two sides of the door are completely different, then just change the compositing option of the alternate description from "append this to previous" to "start description with:" using the drop-down list to the right of the restriction. Then write the description for the other side of the door on the "Default Description" tab.

42

LATCHED DOORS When a game requires the player to periodically return to a home base it will often provide a short-cut to a later area that only becomes available after the player has completed that area. One way to do this is to have a door that can only be opened from one side. Create a location group for the doorway and select the locations for the two sides of the door. Create the static door object and set its location to the above location group. (Called "The side door" in the examples) Select the "Object can be opened and closed" property and set "Open status" to "Closed". To stop the player from moving through the closed door, add an object restriction "The side door must be in state Open" to the correct line of the Directions tab of both locations.

These restrictions can be given appropriate descriptions such as "You need to open the door first" and "You can't go through the door because it is latched from the other side" The Lock/Unlock commands always use an object as a key, but a latch is part of the door so we dont want to use the lock/unlock mechanism. The door can be opened, but only from one side, so we need a restriction that prevents the "open door" command from working when the player is on the wrong side. Create a specific task for "Open %object%", then make it specific to this door. Enter a message saying that the door can't be opened from this side. Ensure task is repeatable.

Add a restriction that the Player Character must be at the location that we DONT want them to be able to open the door.

43

You could add a similar specific task, for the location on the other side of the door, to display a more informative message like "You lift the latch and slide the door open". This would be set to "Run Before" and "Execute parent actions" so the door opens. "Display parent message" can be selected if you want to display something like "(First lifting the latch)" followed by the default message. You may want to create a static "Latch" object in the room, in case the player tries to "examine latch" or "open latch". The description would just say that the door can be opened easily from this side, but not the other side. "Open Latch" can be overridden to open the door, but remember to add the restriction so it only works from the correct side. The player may also try "unlatch door", so you may want to add a general task for an "unlatch %object%" command and a specific "unlatch door" task which also opens the door. "Unlock Door" could also be overridden so that it opens this door instead of giving an "It is not locked!" message.

Drawers and Cupboards


In the "getting started" tutorial you created objects that you could put other objects on top of, but ADRIFT also allows you to put objects INSIDE of other objects, called containers, such as a drawer or a cupboard. The main difference to gameplay is that a container can be opened and closed, and even locked, making it necessary for the player to open them before they can see or take what is inside. If the container is locked then they will also need to find the key for it before they can open it. A container can be either a static object, like a chest of drawers, or a dynamic object like a box or a bag that the player can carry around with them. Create a new object, give it a name and description that indicates it is a container with a lockable door, and place it in an appropriate location. To make the object a container, just select the "Object is a container" property at the bottom of the properties page:

44

This then makes two extra properties available:

We can now put any dynamic object inside of this container, but if we want any character to be able to go inside of the object then we must also select the "Characters can go inside this object" property. The "...and the container can hold" property lets us put a limit on the number of objects that can be put inside the container.

We can select an object size (Tiny, small, normal large or huge) and the number of objects of that size that will fit. A small object takes the same space as 3 tiny objects A normal object takes the same space as 3 small objects or 9 tiny objects A Large object takes the same space as 3 normal objects, 9 small objects, or 27 tiny objects. A Huge object takes the same space as 3 large objects, 9 normal objects, 27 small objects or 81 tiny objects.

You can change these ratios by editing the Object size value list library property.

45

OPENING AND CLOSING CONTAINERS So far we have just made an open container we can put things in. To give it a door or lid that we can close, we need to select the "Object can be opened and closed" property. The property "Open status" becomes available, which we use to set the initial state to either "Open" or "Closed". The player will now need to open the object before they can see inside it, take something out, or put something in. LOCKING A CONTAINER Before you can make an object lockable you must first make a key for it. This must be a dynamic object. The player will need to have this object with them and type "unlock drawer with key" to unlock a drawer object. This does not need to be a traditional key; it could be a key card, a magnet, a stick that you poke in a hole, or a magical object. The "Object can be locked" property does however require a key object - You cannot use this method for a combination lock. Selecting the "Object can be locked" property does two things: It changes the "Open status" property from Open/Closed radio buttons to a drop-down list with three options, Open, Closed and Locked. It makes the "Key for lock" property available.

46

Set "Open status" to "Locked". Select the appropriate key object from the "Key for lock" drop down list. This is required, once "Object can be locked" is selected, you will not be able to click OK until you select a key.

Adding Characters
Characters can be other people in the game, but also any animals, monsters or even robots. Anything which can move or perform actions on its own is usually a character. 1. 2. 3. 4. 5. The main differences between a character and an object in ADRIFT are: The player can have a conversation with a character, to obtain information or be given a quest to go on. Characters can move themselves to different locations, and can be given a pre-defined path to follow such as a guards patrol route. Characters can wear and carry dynamic objects. They can sit, stand or lay down.

CREATING A CHARACTER To create a new character in the Characters folder: or Press the "Character" button on the Home toolbar. Right click inside the Characters folder and select "New Character"

47

This will open the New Character dialog:

Characters have an "is this character known to the player" property. If this is NOT selected then the character is described using the article, prefix and descriptor fields, and cannot be referred to by their proper name. If this property is set then the character is described using their proper name, and can be referred to by either their name or their descriptor. Often a character will start as not known to the player, but when the player meets them and finds out their name, this property will be set. The contents of the description text box will be displayed if the player examines this character. Give your new character whatever name you like, an article-adjective-noun that describes what they are, and a detailed description in the text box.

Properties The properties tab of a character initially looks like this:

48

"Location of the Character" can be set to: Hidden - The character cannot be seen or interacted with. At Location - The "At which Location" property becomes visible and you can put the character in any room or location. This is the most common way of adding a character to the game. On Object - The "On which object" property becomes visible, and you can choose an object with a surface. In Object - The "Inside which object" property becomes visible, and you can choose a container object. On Character - The "On which character" property becomes visible. (eg. for a parrot sitting on a pirates shoulder)

Select At Location and then the location that you wish your new character to be found by the player. Set the "Gender" for your character (Male, Female or Unknown). "Character position" is normally standing, but they can be sitting or lying on an object or on the ground. The remaining properties are optional and allow you to change the default "A tall man is here"

49

message, add a description for a character that enters or leaves the room, or limit how much the character is able to carry. ASKING A CHARACTER A QUESTION The conversation tab is initially blank except for an "Add Topic" button. Pressing this will open the "New conversation topic" dialog.

This has 5 options: Introduction, ask, tell, General command, and Farewell. Some of these options can be used together, and selecting one will disable the options that cant be combined with it. The simplest type of conversation is for the player to ask the character questions to discover facts that they need to know. In this example a character named Alice is wearing an engagement ring, so select "Ask" as the type of topic, then in the keywords section enter all of the ways that the player might refer to this object. A comma is used to separate each possible keyword, here I have added both "ring" and "engagement ring" as keywords" Enter the response that the character should give to the question in the Conversation text box.

50

Note that the "Summary" field is just the name that this topic will be listed as on the conversation tab, so you can put anything you like here. The player can now type "ask alice about ring" and Alice will give the appropriate reply. If Alice is the only character at the same location as the player, then they can just type "ask about ring".

Adding Greetings and Farewells


Add another topic, this time selecting the "Introduction" topic type. This is an automatic greeting that the character will say when the player first starts to speak to them. Add a simple message such as "Hello there!" Create a third topic and add a "Farewell" message. The Conversation tab will now look like this:

51

When the player asks the character their first question, the introduction message will be displayed before the answer to the question. The Farewell message will be displayed when the player leaves the location. ---oOo---

ADRIFT REFERENCE
Locations
Locations were previously named 'Rooms' in version 4.0. Locations can be added by clicking on the Locations icon on the Home tab of the ribbon, by double-clicking on the map, or by right-clicking in an item list and selecting Add Location or Add New > Location, depending on the list. DESCRIPTION Creating a new location brings up a dialog box as follows:

At a very basic level, locations need two things; a Short description and a Long description.

52

Short descriptions are essentially a label for the location. These will be displayed on the map, and at the bottom of the screen when playing the game, to show which location you are currently at. Under most circumstances, the short description of a room will stay the same throughout the game. However, there may be times when you need this to change during play. To do this, click on the down arrow to the right of the short description. This will drop down a source text box, where you can add alternate descriptions depending on different circumstances. The long description is the text that will be displayed when the player moves into a room, and when they 'look' in the room. Again, you can add alternate descriptions so the text will change depending on what happens during play. DIRECTIONS The Directions tab contains a list of each of the 12 possible directions you can move in ADRIFT. By default, each direction displays a dropdown with a list of locations. Picking a location from this list will create one-way link from the current location to the selected location.

When you click OK you will be asked if you want to make the link reciprocal, i.e. you want it to be a 2-way link so that moving in the opposite direction from the selected location will bring you back to the current location. If you check the Remember this setting checkbox and select Yes, the 2-way

53

link will be created every time you link 2 locations. You can change this setting at any time by going to Settings and changing the value for Copy reciprocal links. Rather than simply move from one location to another, you may want the player to move to a random location when they exit a particular location in a particular direction. To do this, click on the little icon of a house to the left of the location dropdown. This will change the list type from Locations to Groups. Then, instead of selecting a location, you select a location group. During play, the player will be moved to a random location within this group. Simply click on the group icon to toggle the list back to locations. Once a location or group has been selected, the restrictions dropdown will become enabled. There will be many circumstances where you want to restrict the player from moving in a direction. This might be, for example, a door is closed, the player isn't carrying something, or a task hasn't been completed. To create a restriction, click on the 'new' icon to the right of the restrictions summary. This will bring up the Restrictions form where you can specify whatever restrictions you wish on the movement in that direction. By default, this will add a single restriction. If you wish to add more restrictions, or edit the restriction you just created, click on the 'edit' icon to the right of the restrictions summary. This will bring up the restrictions list form where you can modify your restrictions. Again, as with the location links themselves, if the link is 2 way (i.e. the location you are linking to also links back to the location you are editing) you will be prompted whether you wish to copy the restriction onto the other location. This is useful if, for example, the restriction is a door. If the door was closed you would not want to be able to move back without it being open! Again, this setting can be remembered, and can be changed in Settings.

PROPERTIES The ADRIFT developer must be in advanced mode for the properties tab to be available.

The Properties tab allows you to assign properties to the location. For example, you may want to say a location is a dark room (in which case you might need to have a light source handy to be able to view the location), or you might want to mark the location as being outside (in which case the location might be affected by time of day).

54

To add a new property, click the Add New Property button at the bottom of the form. This will bring up the New Property dialog box and default it to type Location. Once the property has been applied, it should appear in the list. Selecting a property will assign it to the current location. Depending on the property type, this may just be a selection only property, or you may need to assign it a value.

55

CONTENTS

The contents tab shows all of the objects and characters that start the game at this location. Dynamic objects are shown with a treasure-chest palm tree icon, and characters as . icon, while static objects are shown with a

A button is provided at the bottom to add new static objects to the location. The "remove items" button does not delete items, it will remove the currently selected character or object from this location and place it in the "Hidden" location. TIP - To move several existing objects into a location quickly: 1. 2. 3. Open the location and switch to the "Contents" tab. Open the folder containing the objects. To select more than one object, click on the first one then hold down the control key while you click on each of the other objects. 4. Position the cursor over one of the selected objects then hold down the mouse button to drag it onto the contents page of the location. This will move all of the selected objects to that location (changing their "Location of the object" and "At location" properties). If the Location window disappears behind the main window just drag the object down to the button for the location window on the windows taskbar, wait until the window reappears, then move the cursor onto the location window before releasing the mouse button. You can only drag objects from one folder at a time. ---oOo---

Objects
Objects in ADRIFT are anything that can be seen, touched or referred to, and that are not characters. They are normally categorised as one of two types; dynamic objects, that can be picked up and moved about, and static, which cannot.

56

DESCRIPTION The Description tab allows you to set the name of the object, and give it a description.

Article is a mandatory field. ADRIFT expects an indefinite article here. This is normally used when a noun is being referred to for the very first time, and is typically a or an in English. ADRIFT will automatically accept the definite article ("the") when matching object names, and will replace the indefinite article with the definite article in prose when using the %TheObject[key]% function. Prefix/Adjective is an optional field, but is used to distinguish objects with the same name, or to qualify the noun, giving more information about the object signified. Multiple adjectives can be added, separated by a space. However, all adjectives will be listed when the object is listed during play. So for example, you might set this to "large green", "wooden", "fragile old" etc. Name/Noun(s) is a mandatory field. It is the main name of the object, and can typically be referred to uniquely during play to identify the object. Multiple object nouns can be provided by typing the name and pressing <Enter>. This will add a new entry to the drop down list. To edit an existing entry from the drop down, simply select it and make any changes. Similarly, to remove the entry, select it, then clear the value. Only the first noun in the list will be used when listing objects during play. However, all other nouns will be used to identify the object.

57

Description is what will be displayed during play when the player examines the object. Being a standard text box then alternate descriptions can be displayed depending on different circumstances. PROPERTIES Properties allow you to customise everything about the object, specifying where it is, what it is, and any other attributes.

The Properties tab allows you to assign properties to the object. Some of these are mandatory, such as object type. Others can optionally be selected. Depending on the type of property, you may need to assign a value. For example, the Object Type property is a state list type with two possible values by default. When a state list has two options it is displayed as radio buttons. Some properties may become available depending on the value set on other properties. For example, if object type is set to Dynamic (i.e. you can pick it up) then the Object is Wearable property will become available. To add a new property, click the Add New Property button at the bottom of the form. This will bring up the New Property dialog box and default it to type Object. Once the property has been applied, it should appear in the list. Selecting a property will assign it to the current object. Depending on the property type, this may just be a selection only property, or you may need to assign it a value. ---oOo---

Tasks
Everything that happens within an ADRIFT adventure is the result of a task. Tasks do things. All tasks have a set of restrictions (conditions that must be met in order for the task to run) and a set of actions (things that will be carried out if the task runs).

58

There are three types of task in ADRIFT 51. The main differences between the types of task are how they are called. The task types are "General", "Specific" and "System". Whenever you type something at the cursor in Runner, that command is "parsed". The way ADRIFT does this is by pattern matching the command against a set of known phrases. The way you define this command is to use a General task. Specific tasks allow you to run special cases for General tasks, for example, if you wanted something different to happen when you used a particular object in a task. System tasks are simply ones that are not triggered directly by what the user types on the command line. Lets look at these in detail. GENERAL TASKS To create a new General task (General Tasks are the equivalent of normal tasks in ADRIFT 4), click on the Task button at the top of the screen, or right-click in a folder and select Add New > Task. This brings up the New Task form. This defaults to Specific tasks (more on these later) because that is the most common task type, so click on the General button to change the task type. This should bring up a screen like so:

Here, you must specify the command that the player must type in order to match this command. A

59

really simple case might just be something like: dig

Then, whenever anyone types the command "dig" into Runner, this task will match. If a task matches the command, its restrictions will be checked, and if all restrictions are met, the task will run. So General Tasks essentially enable you to create new verbs that the parser understands. More often than not, you might want to refer to an object or character in your task. So you might want to create a command such as: drop the vase

General tasks should not refer to individual objects unless absolutely necessary. See Best Practice section.) There are several problems with this. The first is that the player might type something slightly differently in the game, but mean the same thing. This is commonly known as "guess the verb". For example, the player might be holding the vase, and type "put the vase down". Obviously this wouldnt match the command you specified. To get around this there are three things you can do. Firstly, you can enter multiple commands. So, you could set the task up with the commands: drop the vase put down the vase put the vase down

So now, we instantly have three ways we can match this command. In this example, having three commands isnt too bad, but consider a slightly more complicated example of putting something inside something else. You could have: put the flower in the vase drop the flower in the vase put the flower inside vase drop the flower inside the vase put flower into the vase

Etc etc. As you can see, the number of possibilities can rapidly increase the more complex the statement becomes. To get around this problem, ADRIFT understands "advanced command construction". This allows you to create multiple ways to define the command on a single line.

60

Advanced Command Construction Advanced Command Construction, commonly abbreviated to ACC, allows you to define words within the command as being mandatory or optional, and to also give a choice between different words. You can create a choice between words by separating them with a forward slash "/". Words inside square brackets are mandatory, and words inside curly brackets are optional. So going back to our earlier example, you could reduce this from three commands to two: [drop/put down] {the} vase put {the} vase down

ADRIFT now understands a total of six different ways of saying the same thing. Similarly, the second example could be reduced from dozens of (36 in fact) individual command to the following: [put/drop] {a/the} flower in{to/side} {the} vase Wildcards A third way of matching commands in ADRIFT is to make use of wildcards. This allows you to match anything a user types against part of your command. For example, you could create a command: drop * in*

(note the lack of space between in and *) This would now match anything such as "drop the ball in the box", or "drop match into the large can of petrol". A word of warning though; wildcards really are just that. They could end up matching on things that you really haven't considered when designing the game. For example, it would also match on "drop everything except the match into the petrol". This may end up being the exact opposite of what you intended. Therefore, it is recommended you use wildcards only when absolutely necessary. References In the examples above, we refer to an object "the vase". This object may have been defined as [a] [large fragile] [vase]

Because of the articles "large" and "fragile", which may or may not be used when referring to the vase, we need each command to understand both the articles being there and also not being there. The object could also have been set up with alternative nouns (a cup could be a mug, a lamp a light, a box a carton etc), and we would have to cater for all of these.

61

For those of you familiar with ADRIFT 4, this was one of the problems with the parser, because the task command may not cover all the possibilities of the built-in parser.

To make things easier, ADRIFT has the concept of References. There are several types of references. These are Objects, Characters, Directions, Number and Text. References are essentially placeholders within the task command that can match on any object, character etc. References are simply entered as a keyword between two percent symbols. So to recreate the earlier example, we would have: [drop/put down] %object% put %object% down

This greatly simplifies how you define the task commands, as you do not have to consider all the ways of writing object/character names. Also, if you later change the object name, you don't have to go back and change all your tasks. Simply put, General Tasks should never refer to object/character names unless absolutely necessary. You can also have multiple references within the same command, for example: put %object1% in{side/to} %object2%

If you have multiple commands within the same task, each command must contain the same references. So in the first references example, both commands contain %object%. You couldnt create another command that missed the reference out. Also, each reference must be unique within a command. So for example, if you wish to refer to more than one object, you must use %object1% and %object2%, rather than %object% and %object%. A full list of references that ADRIFT understands is as follows: %object1%, %object2%, %object3%, %object4%, %object5%, %objects%, %character1%, %character2%, %character3%, %character4%, %character5%, % characters%,%direction%, %number%, %text%

You will notice the references %objects and %characters above. These references are even more powerful than the other references, because they can match on multiple objects. So you could refer to, for example, "the red ball and the green ball", "all except the pink ball" or "all small balls". As soon as you create a reference in your task, all the Restriction and Action dropdowns have extra options in them to allow you to test and manipulate whatever object or character the player refers to. So in our "drop" command above we can add a restriction that the referenced object must be held by the player. If so, our task will match and we run its actions, which we could define as moving

62

the referenced object to the same location as the player. Scope Scope refers to where ADRIFT will look when you refer to an item. ADRIFT 5 has three levels of scope. These are Applicable, Visible, and Seen. Visible and Seen should be pretty obvious. Applicable means it must match any task restrictions on the task creating the reference. When you create a task that references an object or character, ADRIFT will check the scope to see which one you are referring to. So, say you create a task eat %object%

You may add a restriction that the referenced object must have a property 'edible'. So, say you create two objects, "a chocolate button" and "a large red button", and give the former the property "edible". If you then type "eat button", ADRIFT will first check to find all objects that match the applicable scope. There are two buttons, but only one of them is in applicable scope because the Eat Object task has a restriction that objects must have the "edible" property), and so ADRIFT will automatically assume you mean the chocolate button. If the chocolate button didnt have the edible property, neither buttons will match applicable scope, and so ADRIFT will look to see which ones are visible. If only one is visible, ADRIFT will assume thats the button you are referring to. If neither are visible, ADRIFT will check to see which ones you have seen before. So if you have come across the red button in the game but not the chocolate button ADRIFT will assume you are referring to the red button. If, after all three levels of scope have been checked and there are still multiple possibilities, ADRIFT will prompt for disambiguation. Message to Display on Completion In the bottom half of the Description page is a text box that contains the message to be displayed if this task is matched to the user input and passes all of its restrictions. As well as displaying text (which can include functions) a text box can also control the display of images and the playing of sounds at the same time as the text is output. A text box can also use Alternate Descriptions to change the text that is output in different circumstances. Task is Repeatable At the bottom left corner of the task is a tickbox called "Task is Repeatable". This almost always needs to be ticked, but unfortunately the default is for it to not be ticked, so you will need to remember to click it for every task that you write. The only time you would not tick it is if you have a task which is part of the story and which must only be able to execute its actions once. If this box is not ticked then once this task has executed the first time it will no longer take part in the matching of any future command. It will be as if this task no longer exists. Note that you DON'T need to do this to prevent the players score being incremented more than once by the same task, as ADRIFT contains special logic that prevents any task from changing the %score% variable more than once.

63

SPECIFIC TASKS So say you want to create a task "drop the vase", and instead of the default action of moving the vase from being held by the player to being in the same location as the player, you wanted something specific to happen such as the vase breaking. The general drop command we defined above will run the same on any object we refer to in the game unless restrictions are put on the task. A simple way of creating this special case is to create a Specific Task. Specific Tasks allow you to override the default behaviour of any General Task. You should find that most tasks you create using ADRIFT are Specific Tasks. That's because most things that happen throughout the game are special cases of default responses. In the following screenshot we can see an example of overriding the drop command.

To override a General command, select it from the dropdown list. This will change the displayed command on the line underneath the dropdown. This is a 'sample' command that could be typed. In fact, as we have discussed earlier, the drop task has been defined with several different ways of saying the same thing. Ensure that every general and specific task has a unique Task Name, otherwise the drop-down list will show two identical entries and you wont be able to tell which one is the one that you want.

64

Any references defined in the General Task are displayed in the command bar with a hyperlink. By clicking on the hyperlink, you can pick the specific object you want to create the special case for. In the case above, I didn't want the tape to just move back to the room, and instead it burns up and disappears. In the actions for this task I move the tape to 'Hidden'. Because Specific Tasks only override General tasks that run, you don't need to repeat the restrictions of the General task. i.e. because the General drop task already checks that the player is holding the object to begin with, you don't need to add that check to the specific task. You would add additional restrictions if you only wanted the Specific task to run under special circumstances. You can also make a specific task which is specific to a particular room or circumstances, but which is not specific to a particular object. Just leave the command bar hyperlink set to object, character or direction instead of changing it to a specific object, then use the Restrictions of the specific task to determine when it should override the general task. Overriding There are three different ways that a Specific task can override a General task. These are: Run before This means the Specific task will run before the general task. If you select this option you can select whether the parent/general task message is displayed, and also whether the parent/general actions are run. Override This means the Specific task completely overrides the General task. Neither the General message will be displayed, nor the actions run. Run after This means the Specific task will run after the General task completes. The General message will be output and actions run, then the Specific actions will be run and message output (if either are defined).

In the example above, the specific case for dropping the tape runs after General drop command. So when the player types "drop tape", the default message for dropping the tape will be displayed, e.g. "You drop the tape." and the tape will move from the players hands to the room the player is in. Then the above message will be output and the tape will disappear. Note that the restrictions on the general task must all pass before any of the specific tasks can override it. If a general task in the standard library contains a restriction that prevents your specific task from running when it should, then you will need to create a new general task that overrides it. The commands for this task must be identical to the original. You can make an exact copy of it by right clicking and selecting "copy", then right click on the folder you want it in and select "paste". Open the new task and rename it to something appropriate, then go to the advanced tab and ensure it has a higher priority (lower number) than the original. Remove the unwanted restriction and add new restrictions so that this task only overrides the original when it should. Best Practice So do you really need to create a General Task plus a Specific Task every time you want to do something new with a specific object? Well, yes. The reason for doing this is so if a verb is understood in one part of the adventure, it will be understood throughout.

65

Consider a trampoline. You might think to add a general task "jump on {the} trampoline". Then when the player types "jump on trampoline" your task runs. But what if they came across a box in the game. They might try "jump on box". And because the jump verb worked earlier, they would expect it to work here. But because you only created the general verb for the trampoline, Runner would respond with a "do not understand" message. So the verb should be set up with a general task "jump on %object%". You can then create a Specific task for the trampoline. The general task (if not overridden by a specific task) could then give a default response for jumping on objects you don't want jumped on, for example "Jumping on %TheObject[%object%]%" isn't a very good idea. Parent/Child buttons To the right hand side of the task name are two buttons. These are the Parent and Child buttons. Every Specific task is the child of either a General task, or another Specific task. Clicking on the first button (Edit Parent task) will open up the task the current task is overriding. Clicking on the second button (Edit Child task) will display a list of all tasks that override the current General (or Specific) task. Selecting one of these will open up the child task. If the buttons are greyed out, this means the task does not override or is not overridden by another task. SYSTEM TASKS System Tasks are just the same as any other tasks except they are not triggered directly by what the player types at the command line. In most cases, they are just called by other task actions, or by events. However, there are other ways of triggering them also. The options for triggering a System task are: Only if called by event/task - This task will never run unless explicitly called. Immediately - This task will run at the start of the game. Player enters location - This task will run when the player enters a particular location.

The first option here is the default. Basically this means that the task is never triggered automatically. If you select one of the other options, you can still call the task from an event or other task. The second option is useful for initialising things at the start of the game. For example, you may want to set variables to random values, place characters randomly within a location group, or ask the player to enter their name, gender and age. The third option is useful, because it triggers whenever the player enters a particular location. You could override the 'Player Movement' task, but if the location had several entrances then you would need to override each entrance. This task ignores which entrance you came in, and will trigger as soon as you arrive at the specified location. System tasks don't use references. If you want to call a task and pass references to it as parameters, then create a general task but use "#" as the first character of the command. Then just list the references it needs to use for its restrictions or actions.

66

RESTRICTIONS AND ACTIONS The restrictions page of a task contains a Restrictions list which determines whether a task will be executed. When the command template on a general task matches the user input, or an attempt is made to execute a system task, Adrift checks these restrictions before deciding to execute the task. If the boolean relation of the Restrictions in this list evaluates to true, then the task executes: The "Message to display on completion" is shown. The Actions listed on the Actions page are executed.

If the boolean relation evaluates to false then the first restriction test that failed will display its failure message to the player. HINTS Hints are not yet functional in ADRIFT 5. ADVANCED On the Advanced tab are a series of settings that allow you to tweak how the task behaves and how it interacts with other tasks that also match the player input.

The ADRIFT developer must be in advanced mode for this tab-page to be available.

The task priority determines which task Adrift should execute if more than one matches the players'

67

input. The one with the lowest number in this field has the highest priority and will be executed first. The tasks in the Standard Library always have very large priority numbers, while the tasks that you create will initially be numbered in order of creation starting at 1. This means that any task you create will execute before any Standard Library task by default. You will only need to alter this field if you have two tasks which are both able to match the same player input and pass their restrictions at the same time, and you wish to change the order in which they are executed. The "Auto-fill priority" is only available on General Tasks and is responsible for the auto-completion feature whereby the player only has to type part of a command or object name and the rest of the word will be filled in automatically. Normally a player will expect common commands such as "north" or "examine" to be chosen by this feature, but if you create a new command such as "exit" or "nobble" then you may need to change the value in this field to stop them being selected. Setting the auto-fill priority to zero will prevent this general task's commands from ever being displayed by the auto-fill. If "Prevent this task from being inherited" is selected on a general task then it will not be possible to create a specific task for it. The default behaviour is for tasks that pass restrictions to override higher priority tasks that do not, even when the failing higher priority task has output. To change this behaviour, you need to check the "This task can be overridden by other task restriction failures" checkbox on the lower priority task. Next is a drop-down list of 4 options that controls what happens after a high priority task executes and there are lower priority tasks that also match.

Do not continue matching if this one matches o No lower priority task will be executed. Continue to execute matching tasks with lower priority if this task matches but doesn't pass o If the Restrictions list for this task failed then execute next task in priority order. o If this task passed restrictions then dont try any other tasks Continue to execute matching tasks with lower priority if there is no text output from this task. o If task passed but its text box was blank then execute next task. o If task failed restrictions but the restriction that failed did not contain any text, then execute next task. o If either the main text box or a restriction output some text then dont continue. Always continue to execute matching tasks with lower priority. o The next task in priority order is executed following this one, regardless of whether it passed or failed.

The drop-down list "Display completion message before/after executing actions" controls the order

68

in which the task executes. Before: The contents of the tasks' text box is displayed first, then the Actions of the Actions tab are executed. After: The actions are executed first and then the text is displayed.

This is only important if: An action alters a variable which is then displayed as part of the text output. An action alters something which is used to determine if a restriction passes on an alternate description in the text box.

Finally, the text box at the bottom allows a special message to be displayed, instead of the usual restriction failure message, if the player entered "All" instead of a specific object in the command. AN EXAMPLE In Jacaranda Jim, I needed to create a "chop" verb. So, as with any new verb, this needs to be set up as a General Task. The task is defined with a very simple command:

The default response for chopping an object with another object is simply an error, saying you cant chop the first object with the second one. Because, for example, if the player tries to chop a door with a torch, I need to tell them that's not a good idea, but they still need to know that chop is a valid

69

action. For an explanation of the functions used in this response, see the Functions section. I added a few restrictions to the task as follows:

Most General tasks will have restrictions that any objects referred to must exist, that they have been seen by the player (because if they haven't, they may as well not exist as far as the player is concerned), and that the object doing the chopping (Referenced Object 2) must be held. I also need to ensure that the object the player is trying to chop is visible; otherwise I give an error saying "You can't see that." There are no actions for the default 'chop' command, because it is generic and I don't want anything to happen when the user tries it on an incorrect object. Now, if the player tries to chop something with an axe, I don't want a generic "You can't do that" sort of response. So I can create a Specific task for the axe by selecting the axe from the second object hyperlink, like so:

70

I can then give a sensible response to this action when the player tries chopping random objects with the axe. This task is a sort of cross between a General task and a Specific one, because one reference has been left general, and one has been specified. Clearly, many objects could be changed drastically with an action such as this, so the real purpose of this task is to prevent us having to create a response for every single object the player tries to chop. There are no restrictions (because it obviously passed all the General task restrictions) and no actions (because it is again a generic response) on this task. There will be certain objects that when chopped, you want to give a specific response to, or do actions. In my case, I want something specific to happen when the player tries to chop through a door. So I create a new Specific task which overrides the General/Specific task defined above, like so:

71

In the actions for this task, I increase the score. I also have a restriction on the movement from one of the rooms that depends on this task being completed. ---oOo---

Characters
DESCRIPTION When you create a new character, or edit an existing one, you will see this window:

72

The Proper Name is the actual name of the character. This name is displayed to the player when the character is in the same location, and is entered by the player when they want to refer to the character. This is only used if this character has the "Known to player" property. If not, then the Article, Prefix/Adjective and Descriptor/Noun are used to describe what the character looks like, and can be entered by the player to refer to the character. More than one noun can be entered, on different lines, and the player can use any of them to refer to the character. The adjectives are optional, except where two characters in the same location use the same noun and it is necessary to distinguish between them. If the character is described as "a tall thin chinese man" then the player can enter any combination of adjectives, such as "tall chinese man", "thin man", "tall thin man" etc. A character can start out as unknown to the player but later learn their name. In this case you would use a task to set the "Known to player" property when they learn their name. The "Description" text box is what is displayed when the player examines the character. For more information on how to use character names, see Character Name substitution. PROPERTIES This is the default properties page of a character.

73

Here you can select various properties of this character. Location of the character. o Hidden - A hidden character is not at any location and cannot be found by the player. o At Location - When this is selected the "At which location" property becomes available and you can select which location you want the character to start at. o On object - The character can be sitting on a chair or laying on a bed. Only objects with the "supporter" property can be selected. o In object - You can select from objects that have the "Object is a container" and "characters can go inside this object" properties. o On character - This character is on another character, ie. a parrot on a pirates shoulder, someone sitting on a horse, or just someone getting a piggyback ride. Gender - Select male, female or unknown. Character position - Usually standing, but characters can be sitting or laying on something. Is this character known to the player - Select this if you want this character referred to by the "Proper Name" field at the start of the game. What to show when character is at the location - Normally Adrift just says something

74

like "John smith is here". If you want a more detailed description then put it in this text box. Show character entering/exiting location - If the character has a walk set and enters or leaves the players location then this will tell the player. o Selecting this will show two text boxes that allow you to provide your own description. Maximum size of held items - Puts a limit on the size of objects the character can carry (normally only used for the player character). Maximum weight of held items - How much weight this character can carry.

If you create new character properties then they will be added to this page for all characters. To create a new character property, click the "Add new property" button. MOVEMENT The movement page allows you to program one or more routes that this character will follow, and actions they will perform at certain times. Each of these independent routes and its associated actions is called a "Walk".

A character can have several walks, but will follow one walk at a time. Clicking "Add Walk" will open the new walk dialog which allows you to specify when the character will start a particular walk, the path they will follow, and activities they will perform along the way.

75

This dialog box has three tabbed pages: Control, Steps and Activities. On the control page you can give the walk a description and select whether the character should start following this walk when the game starts by making it "Active". Each time the "Add Control" button is pressed it adds one Walk Control. In the following image we have added 4 of them.

76

A walk control can start, suspend, resume or stop the character from following this walk. Each control is triggered by the completion of a specific task (or by an Action unsetting a task). The button can be used to create a new task.

The box at the bottom left can be ticked to have the walk repeated continuously, otherwise is will run once and then stop. On the "Steps" page you can create the individual stages of the walk:

A step consists of a destination and a length of time to stop at that destination before moving on to the next step. Press the "Add Step" button to create a new step and open the "Step of Walk" dialog box. Note that the house icon is a button that selects between 3 types of destination. - You can select a location (or "Hidden") for the character to go to. - Select a Character. This character will move to the same location as the selected character. You could use this to have a henchman follow the player character wherever they go. - Select a Location Group. This character will move to an adjacent location in the group, or if there isn't one, to a random location in that group.

77

You must also specify how long the character should stay at that location before moving on to the next step of the walk. For a fast moving character, this might just be 1. By pressing the "+" button you can enter a minimum and maximum period to stay at that location. The character will randomly choose a number between the two values to determine how long to stay. The two buttons at the bottom are cutoff by a bug. They are "OK" on the left and "Cancel" on the right. The Activity page looks like this:

Pressing the "Add Activity" button adds an activity panel, similar to the one shown, to this page. These operate in a similar way to Events. You can specify a certain number of turns from the Start of the walk, from the last sub-walk, or before the end of the walk, to wait before starting this activity. Using the "+" button you can specify a minimum and maximum number of turns to wait. Alternatively, you can select "Character comes across" and specify another character or an object that will trigger this activity if this character moves into the location that contains them. If the next drop-down list has "Display message" selected, then triggering this activity will cause the contents of the following text-box to be shown. At the bottom of the activity pane you can also specify a restriction that the text box will only be displayed if the player is at a specific location. The text box can use Alternate Descriptions to modify the output, depending on other restrictions. If you also need an activity to perform Actions, then change "Display message" to "Execute task"

78

and select a task from the drop-down list (or create a new one with the

button).

An activity can also unset a task (So a non-repeatable task can be executed again). CONVERSATION The conversation page initially looks like this:

When you press the "Add Topic" button on the "Conversation" tab of a character, the conversation topic dialog opens:

79

The summary field is just a description to remind you what this conversation is about. The "Type of topic" checkboxes determine what commands this conversation responds to, and whether the next field is disabled (simple Introduction or farewell), A keyword list (Ask or Tell), or a general command. At the bottom is the Conversation text box which is the output of the conversation. Ask is the equivalent of conversations in v4. Keywords can be specified, and are triggered on ask character about subject tasks. The keywords are listed using comma's to separate them as shown in the image above. Note that a keyword can actually be a short phrase rather than a single word. Tell works the same as Ask, obviously with a tell character about subject task. General Command allows you to set a statement of what can be said, using Advanced Command Construction or Wildcards, much like task command matching. These are triggered with a say <whatever> to character task. The player is either in conversation with a character, or is not. General Commands can be flagged as Introductions or Farewells. These become explicit introductions/farewells. That means the command will either enter you into conversation with a character, or leave the conversation with that character. So for example, you could create a general command "[hello/hi]". So if you then typed the command "say hello to campbell" it would enter the player into conversation with Campbell. Introductions/Farewells can also be set without a general command. These become implicit introductions/farewells. If the player starts talking to a character without using an explicit intro, the implicit intro (if it exists) will kick in automatically before the particular command. So for example, if the player isn't currently in conversation with Campbell and just types "ask campbell about adrift", and you have an implicit introduction defined, you might get the following: Campbell looks up from his computer as you start to speak. <- implicit intro "Hey Campbell, how're you getting on with ADRIFT?", you ask. Campbell smiles. "I'm getting there. Thanks for asking."

If, for example, you don't type an explicit farewell, such as "bye", and the conversation is ended (for example, you start conversation with another character, or you leave the room), any implicit farewells will be triggered. So for example, in the case about you might have: Campbell turns back to his computer and resumes coding furiously. <- implicit farewell You move south.

Nodes are just each entry within the conversation tree. You might want to stay at a particular node within the tree until a specific choice is made, hence the checkbox. You can use restrictions on the conversation nodes to prevent them from being asked a second time. Or if it's simply a matter of changing the displayed output, you can use the alternative descriptions within that node.

80

CHARACTER NAME SUBSTITUTIONS Name functions There are a few functions that can be used to refer to a particular character. The main one is %CharacterName%. This function has two parameters, both of which are optional. The first is the key of the character you want to get the name of. If this parameter is omitted, then the output will depend where the function is called. If it is called from within the edit character form, the character is assumed to be that character. If it is called from anywhere else, the character is assumed to be the player. A second parameter is the type of pronoun that could be used to replace this name. If this parameter is omitted it is assumed to be subjective. Proper Name or Descriptor? Characters in ADRIFT can have either a Proper Name (the actual name of the character) and/or a descriptor (short description of what the character is). Generally when you encounter someone for the first time you would not refer to them by name until you had been introduced in some way. So if we create a character with Proper Name "Hamish", and give him a descriptor "a" "short stocky" "man", then when we first encounter Hamish in the game it would be more realistic to introduce him with his descriptor, e.g. "A short stocky man is here", rather than "Hamish is here." The way ADRIFT deals with this is by the use of a property "Is this character known to the Player". If a character has this property selected, the %CharacterName% function will return the Proper Name of the character. If the character does not have this property and they also have a descriptor, the %CharacterName% function will return the descriptor. During the game, once the Player has been introduced to a character, setting this property will then change how the character is referred to in the game. Pronoun Substitution Pronouns are words that can be substituted for a noun. In the case of characters, the nouns are the character's name or descriptor. ADRIFT will replace any functions for character's names with pronouns if the name is referenced more than once unambiguously. It does this to create more natural prose. When you create text output in ADRIFT, you may add different bits of text in different places. Say, for example, you have the description for character Hamish as simply "Hamish stands nearby." Say you also have an event that runs every few turns and outputs "Hamish kicks a stone about idly." If you happened to examine the character at the same time as the event runs, the output would be: Hamish stands nearby. Hamish kicks a stone about idly.

Clearly this doesn't sound very natural. So if both of these character names are replaced with the CharacterName function, ADRIFT will automatically substitute the second name with the pronoun, producing: Hamish stands nearby. He kicks a stone about idly.

81

Notice that the name Hamish has been substituted with the word 'he'. This is the third person objective pronoun. So how did ADRIFT know to substitute that and not some other pronoun? Well, you have to tell it which sort of pronoun should be used. If you don't say which should be used, it assumes you want to use a subjective pronoun. In most cases, the character being referenced is the subject of the sentence, and so this assumption is correct. Subjective pronouns are I, you, he, she etc. If you can replace one of these words in your sentence, the pronoun will be subjective. So what if you had an event that output the text "A gust of wind comes out of nowhere, almost blowing Hamish over." We could not replace "Hamish" with "he" in this scenario. This is because Hamish is not the subject of the sentence, the wind is. Hamish is the object of this sentence; therefore we need to tell ADRIFT that this pronoun should be the objective pronoun. Objective pronouns are me, you, him, her etc. To define the name as an objective pronoun, we must give the CharacterName function an additional parameter, 'object'. So the function becomes %CharacterName[CharacterKey, object]%. We could also explicitly define the earlier function as %CharacterName[CharacterKey, subject]%, but the pronoun is assumed to be subjective when the parameter is omitted. If the same character is both the subject and the object of the sentence (for example, "%CharacterName[subject]% throws a ball to %CharacterName[object]%), then this would normally be replaced with "he throws a ball to him" (in the third person perspective, see below). ADRIFT will automatically realise that the subject and the object are the same, and therefore switch automatically to the reflective pronoun (myself, yourself, himself, herself). So this example would become "he throws a ball to himself". Person Perspective Games in ADRIFT can be told in the first (I, me, my etc), second (you, your etc) or third (he, him, his etc) person perpective. When replacing a noun with a pronoun, ADRIFT will pick the relevant pronoun taking the perspective into account. The standard library is set up so that all messages output correctly regardless of the perspective, as any names are substituted with the selected perspective pronouns. Building perspective awareness into the tasks themselves also allows us to reuse the same task output for different characters. Different perspectives affects more than just the pronouns. There may be supporting words that are only relevant for a particular perspective. ADRIFT provides a way of dealing with this by allowing you to specify values for each perspective. The syntax for this is similar to the Advanced Command Construction in tasks, where three options must be supplied within square brackets, separated by a forward slash, i.e. [first perspective output/second perspective output/third perspective output]

The perpective used to work out which entry to use from the list is the previous one referred to by the %CharacterName% function.

82

For example, we could define the following: "%CharacterName[%character%] [am/are/is] sitting on a stool. %CharacterName[%character%]% look[//s] at %CharacterName[%character%, object]% watch."

In first person perspective this becomes: "I am sitting on a stool. I look at my watch."

In second person perspective this becomes: "You are sitting on a stool. You look at your watch."

And in third person perspective this becomes (assuming the character is male): "He is sitting on a stool. He looks at his watch."

Notice that [//s] defines that nothing is output for first and second person perspectives, and only outputs in third person perspective. ---oOo---

Events
Events are basically triggers for making things happen at particular times, independently of what the Player is doing. For example, you may want a day-night cycle to occur at regular times, or a random event such as weather. <more information to follow ...> ---oOo---

83

Variables
There are two types of variables in ADRIFT. These are Numeric (Integer) and Text. Both variable types can also be created as arrays (a set of variable values which can be accessed by a unique index starting from 1). Variables can be compared with other values in Restrictions, and altered using Actions. Properties and references can also be used in a similar way to variables. SYSTEM VARIABLES Certain variable names have been reserved for System variables. These can be used in any text box to display the indicated value. Of these only 'Score' and 'MaxScore' can be written to, the others are read-only. %Score% - This variable is where you keep track of the players score in the game. It can be altered using Actions or used in Restrictions. It has a hidden 'run once' functionality built in to it which prevents a particular task from incrementing its value more than once. %MaxScore% - If this is not zero, then when the game finishes ADRIFT will display the message "In that game you scored %Score% out of a possible %MaxScore%, in %Turns% turns." %Turns% - The number of turns elapsed for the game. %Version% - Returns the version of the current Runner executable.

Note: It is currently not possible to test Turns or Version in a restriction.(version 5.00.21) DISPLAYING VARIABLES Variables can be displayed in any output text with the following syntax. Your text here %variable% more text here.

For example, let's say you have a variable that tracks the number of some visible object. If it can change throughout the game, you can use a variable in the description of a room or whatever else to reflect that number. You see %numberOfDucks% ducks. You see 4 ducks.

You can also specify for integer values to be displayed as words: You see %NumberAsText[%numberOfDucks%]% ducks. You see four ducks.

84

USING TEXT ARRAYS A text array can be used in an expression or directly in a text box to vary the text that is displayed to the player. Examples: %my_text_array[RAND(1,10)]% ==> Randomly outputs one of 10 different text strings. %my_text_array[3]% ==> Outputs the third text string in the array. %my_text_array[%my_variable%]% ==> Uses an integer variable to select which text string to display. Each array element ends where the Enter key was pressed, however multiple-line text can be output from a text array by using the html "br" line break markup code where you want a new line to start.

The array element shown above will be displayed as: You don't say? That is a neat trick. Tossing the sharp blades into the air once more.

A text array can contain a maximum of 32,767 characters total. The 32,767 characters can all be in one element or divided amongst several. Each additional element counts as 2 extra characters in addition to the visible characters, so a maximum of 10,923 array elements can be created if each contains one character.

85

Groups and Classes


A group is a collection of similar items. There are 3 types of group in ADRIFT, Location groups, Object groups and Character groups. Groups can be used as a simple way to determine if two items are related to each other, but can also be used to set a particular property of all of its members to the same value. LOCATION GROUPS Locations are placed into a group by selecting "Locations" for the group type and then ticking the box next to each location that you wish to be a member of this group.

During the game, locations can be added to or removed from the group using actions. There are three main uses of location groups, one is to signify that two locations are directly connected by a doorway. Objects can be placed in a location group, so by placing a door object into the doorway location group we make it accessible from both locations. The second use is to allow a very large static object such as a river to be present in multiple locations. Just create a group for every location that the river passes through and then place the river object into the group. The third use is to collect together locations with similar characteristics, For example outdoor or indoor locations, or all dark locations which need a portable light source to be able to see anything.

86

The properties page of a group contains all of the properties which can be set for the group type. Properties that are NOT selected on this page will use the settings defined on the property pages of the individual locations. If the property is selected then the value it is given here will override the values of the property for every member of this group. In the case of a text property, as shown above, we are actually entering an alternate description for the text box. If the restrictions pass then the text given will replace or be added to the text normally output for the location, if they fail then each location will output its own text. OBJECT GROUPS Object classes are simply groups of objects, where you can pre-define particular properties. When an object is added to this group, it automatically inherits all of these properties. So, for example, you could create an object property is a liquid. If you then create a group Liquids, you can select the is a liquid property. Then, any objects you add to this group will automatically inherit the is a liquid property. You can then set up tasks where, instead of checking for specific objects, you can specify that they should be a member of the group. So in this example, you could create a task take %object%, and have a restriction that the task should not be a member of group Liquids, else output a message saying you cannot pick that up with your hands. Objects can also be moved in and out of groups by actions. For example, you could have a class of object that produces light and so allows the player to see when they are in a dark location. But if a lamp is switched off or the battery goes flat then you don't want them to be able to see anymore. This can easily be done by moving the lamp into the "Produces light" group when it is on, and removing it from the group when it is off.

87

CHARACTER GROUPS Characters can also be placed into groups, so a class of school students could be placed together into a group so that the game can have them all react to the player the same way without having to add an individual restriction for each one. In a role playing game with different "factions", the members of each faction can be placed in a group so that each individual knows how they should react to a member of a particular faction. ---oOo---

Properties
Properties in v5 are now dynamic. Rather than the pre-defined list that you get in v4 objects, you can define your own. These can be applied to Locations, Objects and Characters. There are several types of properties. These are: Character List the property value must be a character Integer the property value must be an integer value Location Group List the property value must be a location group Location List the property value must be a location Object List the property value must be an object Selection Only the property is either True or False State List the property value must be one of a pre-defined list Value List - Similar to a state list, except each state has a specific integer value associated with it Text the property value can be any text

Each property will by default always appear. If you want to restrict when a property will appear (for example, you wouldnt want a Static object to have a wearable property), you can select a property and value that must be true for this property to be available. So, in the wearable example, you can select that the property will only be available if property Object type is set to value Dynamic. You may want to make a property mandatory. This means, that if the property is available, it must be selected. So, object type is mandatory, as all objects are either Static or Dynamic. Similarly, you may want to make a property mandatory dependant on another property, or even another property value. Examples of this are the Held by who property, which is a character list type. This property is mandatory when the Location of the object property is set to Held by Character, as you would always want the Held by who property to appear. If you create a property of type Object List, you can restrict the list of objects displayed to ones having particular properties. So, for example, the Inside what? property which is displayed when the location of an object is set to inside object, is restricted to container objects. This prevents you from being able to put objects inside other objects that are not containers.

88

PROPERTIES TAB Characters, Locations and Objects all have a property tab which lists all of the properties that can be specified for the item.

Characters, Locations and Objects use completely different sets of properties from each other. Not all of the available properties are displayed all the time. Many properties require another property to be selected or set to a particular value before they themselves are displayed.

Down the left side you will notice that every property has a tick-box next to it. This is how a property is "selected" for use with a particular item. If a property has a tick which is greyed-out, then that property is mandatory for the item and cannot be de-selected. The first property shown above, "Object Type", is a state list that has two states. It is shown with two radio buttons so you can easily select the wanted state. A state list with more than two states will instead display them in a drop-down list from which you can select the one you want, as shown in the "Location of the object" property. A value list looks exactly the same as a state list. The value given to each state is not visible on the properties tab. The remaining properties shown above are of the "Selection only" type, and dont contain data. Character list, Location list and Objects list properties also have drop-down lists, but the list will contain all (or a defined subset) of the characters, locations or objects in the game, as appropriate. A location group list property contains a drop-down list of location groups. Character groups and Object groups are not available as properties.

89

A text property actually contains a text box, so it can not only contain multi-line text, it can have multiple alternate descriptions controlled by restrictions and composition options. Integer properties are of two types, the "<normal integer>" type is simply displayed as a number which you can set, and a value-list multiple type. This property type contains both a number that can be set, and a drop-down list of the state names listed in one of the value lists. The entered number is multiplied by the value of the selected state to produce the actual value of the property. For example, characters have a property called "maximum weight of held items" which has a drop-down list of type "Object weight". Object weight is a value-list property which gives the state "Heavy" the value 27, so if you set "maximum weight of held items" to "10 Heavy" then the property gets the value 10*27=270, so the maximum weight that your character can lift (the sum of the weight of all held objects) is 270. DEFINING A NEW PROPERTY You can create a new property by clicking the "Add new property" button at the bottom of the Properties tab of a Character, Location, or Object. You can also right-click the open "Properties" folder and select "Add Property or right- click any other open folder and select "Add new/Property". If you use the second method, make sure you change the "Property of" field to "Characters" or "Objects" if you dont want the default of a "Location" property.

90

The "Restrict by property" field refers to another property of characters (or locations or objects), and "Restrict by value" is the value that that property must have for a particular character / location/ object) to be listed in the drop-down list of THIS property. In the pictured example we are restricting by "Gender = Female", so only female characters will be listed in the drop-down list and hence this property cannot be set to a male character. In the "This property will only appear if the following are true" section we similarly choose a property and (optionally) a value. The new property will only be displayed in a property list if the chosen property is "selected". If a value is also given then the new property will only be displayed when the chosen property is set to this value. The section at the bottom of the form, that is greyed-out in the picture, is only enabled for properties of type "state list" or "value list". On each line of this text box you can type the name of one of the states that this property can be set to. Each one must be a single word with no spaces in it. At the bottom is a drop-down list of other state lists or value lists that allows you to include the states from another list into this list. ---oOo---

Text Overrides
Text Overrides are the new name for the v4 ADRIFT Language Resource (ALR). Rather than being edited externally and imported as in v4, v5 Text Overrides are edited within the application. Text Overrides simply replace the final text before it is displayed to the end user. This provides a convenient way of globally changing particular output without having to modify each individual item. It is also useful for changing any "fixed" text, i.e. anything output by the application that is not stored as part of the library. (NB. I am working to reduce this all the time, and hope to eventually store all text within the library.) Text Overrides can also be a useful tool to use for the ALR's original purpose; a language resource to convert any English output to other languages. This shouldn't be such an issue with v5 as different libraries can be created for each language. Text Overrides are applied in order of length. This ensures an override that is a subset of a longer one does not prevent the longer one from overriding. For example, if you had the following overrides: You take => You pick up pick => select

If the shorter override applied first, "You take the ball." would be output as "You select the ball."

91

rather than "You pick up the ball." The Text Override editing window looks like this:

The original text is typed at the top and the text you want to replace it with at the bottom. Note that you can use an alternate description in the lower text box to alter the Replacement text using restrictions. It is also possible to have a sound play, or show an image, when the replacement text is shown. ---oOo---

Hints
Although you can create hints in Developer, they have not yet been implemented in Runner. The hint editing window looks like this:

92

You can enter a question at the top which is matched to a question asked by the player when they want a hint. The subtle hint is shown first, and then if the player asks for another hint for the same question then they will be shown the really obvious hint. Restrictions can be used to limit when the hint can be shown, and Alternate Descriptions can be used with either the subtle or obvious text box to vary the hint given to the player depending on other restrictions. ---oOo---

USER INTERFACE REFERENCE


Simple Mode
When ADRIFT 5 is first installed it will be in simple mode. This mode is designed to show only the main features of ADRIFT so that you can learn how to create locations for your game, add objects, create tasks to control what happens when the player types something, and add characters for them to interact with. When the ADRIFT developer is in simple mode, much of the more advanced ADRIFT functionality is hidden from view, including:

93

The Advanced tab-page of Tasks The properties tab-page of Locations The Advanced tab-page of Options The add Variable, Group, Property, Text override and Hint buttons on the main toolbar.

The HOME tab of the toolbar ribbon looks like this in simple mode:

and like this in advanced mode:

To switch to Advanced mode, select "Settings..." from the main menu to open the Settings page, then click on to remove the tick.

94

Menus
MAIN MENU At the top-left of the screen is a large round button. If you click this it will open the main menu. NEW - Create a new ADRIFT game OPEN - Open a .taf file SAVE - Save the current game SAVE AS - Save the current game with a different name IMPORT - Read the contents of a .AMF file into the current game EXPORT - Write the entire game to a .AMF file in XML format PROTECT ADVENTURE - Lets you enter a password that prevents anyone else from opening your game in the developer INTRODUCTION AND END OF GAME - Game introduction and ending text, plus game settings such as which room to start in SETTINGS - Setup ADRIFT dictionary, Libraries to add to a new game, and some GUI settings PROPERTIES - Statistics for the currently open game

To the right of this menu will be a list of recently opened games that you can click on to open.

QUICK ACCESS TOOLBAR To the right of the main menu button you will see a small disk (save) and triangle (run) icon.

This is the quick-access toolbar. It lets you quickly save and run a game without having to open the main menu or select the view tab on the ribbon. MAIN RIBBON Below this is the main control ribbon, which has 3 tabs containing buttons. Home Tab The HOME tab of the ribbon looks like this in simple mode:

95

and like this in Advanced mode:

It contains buttons to quickly create any of the 10 ADRIFT items and add them to their default folder. This folder must be open, and one of the 10 default folders must be the currently selected folder, or the newly created item will instead be written to the currently selected folder. The Options button lets you setup the player perspective for the game, the default font, and write a bibliography that is stored in the game file. There is also a duplicate (but much larger) RUN button so you can quickly test your alterations (It will ask if you want to save the changes - normally you would select YES) View Tab The VIEW tab lets you rearrange the layout of your open folders, and also has buttons to quickly hide or show the folders window and the map. Map Tab The MAP tab is only available if the map itself is currently visible. It looks like this:

ADD LOCATION - Creates a new location, but you can also just double-click the map to do this. PLAN VIEW - If you use the left-button drag to tilt the map in 3D, you will need to click this to get it back to normal. CENTRALISE MAP - Centers all of your locations on the map, but does not adjust the zoom. ZOOM IN - If you dont have a wheel-mouse then use this to zoom into the map.

96

ZOOM OUT - Lets you see more of the locations at once. For those without a wheel-mouse. SHOW GRID LINES - A regular grid to help you align your locations neatly. SHOW AXES - 3D axis that lets you see how much you have rotated or tilted the map. ---oOo---

Folders
FOLDER PANE On the left side of the ADRIFT developer window is the folder list display pane:

The "Standard Library" folder contains 12 sub-folders which contain all of the built-in commands and functions that you can use in your game. You can display the folders in it by double-clicking the name or clicking on the + box next to it. Clicking the - box or double-clicking again will collapse the folder list again.

97

The other 10 top-level folders are for you to store the Locations, Objects, Tasks etc. that you create for this particular game. When you first open ADRIFT developer, the first 5 of these folders (Locations, Objects, Tasks, Characters and Events) will be open at the bottom of the window, all of them empty except the Characters folder which contains the "Player" character.

To open another folder, just double-click on its name in the folder list.

98

Double-click the "Properties" folder at the bottom. It will open on top of the other folder windows and can be seen to contain 3 properties. Click on the "Characters" folder in the folder list. Note that it's window comes in front of the properties window and its caption becomes boldface to indicate that it is the currently selected folder. This is a good way to find a folder that has become hidden behind other windows. The folder windows can be closed by clicking the red X, then re-opened by double clicking them in the folder list. If a folder contains other folders, such as the standard library, then you can't open it by double-clicking. If it only contains other folders then there is no need to open it, but if you ever put both items and folders into the same folder then the only way to open it is to right-click on it to open the context menu.

"Collapse" or "Expand" will do the same as double-clicking the folder. "Open in new window" is the option to use to access items in a folder that contains both subfolders and items. "Copy" can be used to duplicate an entire folder. "Delete" will delete the folder and everything in it! "Rename" lets you call the folder something else (only do this to folders you created, not the standard ones) "New" opens a menu of items that you can create in the folder. This is mostly used to create new sub-folders inside a folder, but this does allow you to create any of the 10 Adrift item types in a folder without opening it first.

HIDING THE FOLDER LIST If you want to make more room on your screen for a large map or to have lots of windows open, then you can either close the folder list or set it to slide off of the left side of the window whenever you are not using it. At the top of the folder list are 2 buttons, one that looks like a pin and one that looks like a small close button. The close button does indeed close the folders list, and to open it again you will need to go to the view tab on the main ribbon and click the "Folder List" button.

99

The pin button activates the auto-hide mode. The map and workspace area will be extended behind the folder list, and a "Folders" tab will appear on the left side of the window.

Moving the mouse off of the folder list will cause it to slide off of the screen out of the way. Positioning the mouse over the "Folders" tab will bring it back when you want to use it. If you expand or collapse a folder tree, you need to click on another folder, or an open folder window, to hide the folder list again. To turn off the auto-hide and keep the folder list on the screen, just press the pin button again. The map can also be closed or hidden in the same way as the folders. FOLDER WINDOW CONTEXT MENU If you right click on an empty part of a folder window (or a column heading in detail view) then you will get a context menu with options to change the way the items are displayed, to copy and paste items, or to add a new item:

VIEW When you click "View" on the menu you are given 3 choices that control the way the items are displayed in the window: Icons - displays each item as a large icon:

100

List - Items are listed in multiple columns:

Details - Allows you to display more information about each item:

101

Adjacent to the red X that closes the window, an icon that looks like a funnel is displayed when in Details view. If you click on this icon it will display a list of columns that can be added to the window.

With all of the columns enabled, the window will look like this:

You can now see at a glance when you created each item, when you last modified it, what type of item it is, its key and its priority. (priority is only used for tasks) SORT BY The Sort-by menu allows you to change the order in which items will be displayed:

Name - List the items in alphabetical order Creation date - List the items in the order they were created Modified date - Put the items you have been working on recently together Type - Groups the same types of item together (see also "Group By" below)

102

Task priority - Tasks are listed in order of priority

Here is one of the standard library folders sorted by name:

If you right-click and select the "sort by" menu again, the selected order will be indicated by a tick and an extra option will now be available: (None) - Turn off sorting for this folder window

103

In all cases the items are initially sorted in ascending order, but you can reverse the order by selecting "Descending" from the menu. When in Detail view you can also sort by clicking on one of the column headers, and reverse the order by clicking the same header again. Group by The group-by menu currently has only one option, group by type:

If the View is set to "Details" then the window will look like this when grouped by type:

104

Bug #18506 New items added to the folder while grouped by type, are not visible until group-by mode is turned off (version 5.0.23) The group menu will now have an option to group by (None), and to change the order of the groups to descending:

If the View is set to "Icons" then the window will look like this when grouped by type:

Group by has no effect if the View is set to "List".

Cut and Paste This Paste option is only available if an item has previously been cut or copied from a folder window. Clicking Paste will create a new item in this folder which is identical to the one that was most recently cut or copied.

105

The cut, copy and delete options are only available if an item has been selected in the window. Cut - The selected item will be shown dimmed. Pasting it into another folder window will move it to that folder. Copy - A copy of the selected item may now be pasted into a folder window. Delete - The selected item will be completely destroyed and cannot be recovered.

Add New This menu allows you to create a new folder inside of this folder, or create any of the 10 types of ADRIFT item and add it to this folder window.

ITEM CONTEXT MENU If you right-click on one of the items instead of on a blank area of the window or a column heading, then you will see a different context menu:

106

Edit - Open item for editing (You can also double-click the item to edit it) Cut - The clicked item will be shown dimmed. Pasting it into another folder window will move it to that folder. Copy - A copy of the clicked item may now be pasted into a folder window. Delete - The clicked item will be completely destroyed and cannot be recovered. Rename - Change the name of the clicked item without opening the full edit window.

For any of the 10 standard item folders you will also get the option to add its default item: Locations folder - Add Location Objects folder - Add Object Tasks folder - Add Tasks Characters folder - Add Character Events folder - Add Event Groups folder - Add group Variables folder - Add Variable Text overrides folder - Add Text Override Hints folder - Add Hint Properties folder - Add Property

Depending on what type of item you click on you will also have these options: General Task Add Specific Task - Add a new specific task that overrides the selected general task. Object Add Sub-Object - A new object is created which is "part of" the selected object. Add Specific Task - This will display a list of all of the general tasks which contain an %object% reference. Selecting one will create a specific task that overrides that general task for the selected object.

107

Character Add Sub-Object - A new object is created which is "part of" the selected character. Add Specific Task - This will display a list of all of the general tasks which contain an %character% reference. Selecting one will create a specific task that overrides that general task for the selected character. Location Add object to location - A new static object is created, with its "At Location" property already set to the selected location. CREATING YOUR OWN FOLDERS With a very large game there may be dozens or hundreds of items in each of your folders, especially the tasks folder. You may wish to organise the game into smaller sections (such as by area or quest) so that you can work on that section without having to continuously search through large numbers of items to find the one's you want. This can be done by creating your own folders in which you create your locations, objects, tasks etc., instead of using the standard folders. To add a new folder inside of an existing folder, right-click on either an empty area of a folder window or on a folder in the folder list, and select "Add New" then "Folder". If you put both items and folders inside the same folder then you cannot open it by double clicking it on the folder list. You must right-click then select "Open in new window". To add a new top-level folder, right-click on the "Desktop" folder at the top of the folder list, and select "New" then "Folder". ---oOo---

The Standard Library


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 external 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.

108

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 column 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 column are Functions which print the names of the objects and characters being referenced. Square brackets containing two slashes, such as "[am/are/is]" or "[//s]" 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[//s] up" becomes "I pick up" Second Person (You) - Prints the middle option, so "%CharacterName% [am/are/is]" becomes "You are" and "%CharacterName% pick[//s] 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[//s] up" becomes "John picks up"

TASKS - UNCATEGORISED There is currently only one task in this folder. Name inventory Command [inventory/inv/i] Description Lists what the player is currently wearing & holding Default Text %CharacterName% [am/are/is] wearing %ListWorn[%Player%]%, and [am/are/is] carrying %ListHeld[%Player%]%.

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

109

Name On what? At Location Location of Object Is this character known to the Player Object type Specifically excluded object from location descriptions When the object is listed in location, display this Part of what In location Part of who Held by who Gender At Location Group Location of object

For Objects Objects (Static) Objects (Static) Characters Objects Objects (Dynamic) Objects Objects (Static) Objects (Dynamic) Objects (Static) Objects (Dynamic) Characters Objects (Static) Objects (Dynamic)

Type Object List (Supporters) Location List State List Selection Only State List Selection Only Text Object List Location List Character List Character List State List Location Group list State List

Description Which object this one is sitting on top of Location of static object Is a static object at a single location, part of somebody or something, or in a location group Controls whether Adrift uses the characters name or their description Static (fixed in place) or Dynamic (can be picked up) The object name is not to be given in the also here is a list after location description Instead of just giving the object name, use this description The object is a part of another object, such as a handle on a door If "Location of the object" is "In location", this gives the location A part of a character, such as nose, eyes, mouth, hand etc. The dynamic object is being held by this character Male, female, or Unknown If a large static object exists in several locations at once, this is the group that lists them Is a dynamic object in a location, held by somebody, sitting in or on something, or hidden from view

GIVE, TAKE 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.

110

Properties:

Name
Object is a container

For
Objects

Type
Selection Only

Description
Dynamic objects can be put inside this object Dynamic objects can be put on top of this object How much room is inside this container How many objects can sit on top of this one How heavy is this object How much weight can this character carry How large can the objects this character can carry How large is this object

Object is a supporter ... and the container can hold

Objects Objects (Containers)

Selection Only Integer (Object size) Integer

... and the surface can Objects hold (Supporters) Object weight Maximum weight of held items Objects (Dynamic) Characters

Value List Integer (Object Weight) Integer (Object Size) Value List

Maximum size of held Characters items Object Size Objects (Dynamic)

General Tasks Name Take Objects (Parent Task) Take Objects From Object Command [get/take/pick up] %objects% pick %objects% up [get/take/pick up/remove] %objects % from %object2% pick %objects% up from %object2% [drop/put down] %objects% put %objects% down Description This task is overridden by the specific tasks in the next table Default Text

Take an object that is inside or on top of another object

Ok, %CharacterName% take[//s] %objects%.List from %object2%.Name.

Drop objects

put the objects (from players inventory) onto the ground

Ok, %CharacterName% put[//s] down %objects%.List.

Remove

put %objects% on{to} An object that is inside or <c>(removing %objects%.List {{the} top on top of another object from %objects%.Parent.Name

111

before put of} %object2% in players inventory, or is first)</c> put %objects% worn by the player, is put in{side/to} %object2% 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. [give/offer] %objects Give object object in inventory goes %CharacterName% % to %character% to to another characters hand[//s] %CharacterName[targe [give/offer] %characte character inventory t]% %objects%.List. r% %objects% object on or in an inventory object is put on the ground If in or on another object print: If worn print:

[drop/put Remove down] %objects% before drop put %objects% down

<c>(removing %objects%.List from %objects%.Parent.Name first)</c> <c>(removing %objects%.List first)</c>

%CharacterName% Put objects put %objects% object in inventory is put put[//s] %objects%.List in others in{side/to} %object2% into a container inside %object2%.Name. put %objects% on{to} Ok, %CharacterName% Put objects object in inventory is put {{the} top put[//s] %objects%.List on top on others onto a supporter object of} %object2% of %object2%.Name. Specific Tasks

Name

General Task

Description

Default Text

Take Take Objects Objects From Object (Parent (Lazy) Task) Take Take Objects Objects From (Parent Location Task)

Takes the named object(s) from inside or on top of any other <c>(from %objects%.Parent.Name)</c> object. Cant be used with "All" Take the named object(s) or "All" Ok, %CharacterName% pick[//s] objects from the up %objects%.List. current location

112

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 Selection Only Selection Only Selection Only State List Description Used for chairs, beds, large logs etc. Step ladders, platforms and anything else they can get on Mostly for beds Is the character Standing, Sitting or Laying down

Characters can sit on this Objects object (Supporters) Characters can stand on Objects this object (Supporters) Characters can lay on this Objects object (Supporters) Character Position Characters

And general tasks for sitting, laying down and standing up: Name Sit On Floor Command(s) Description Sit on the floor: If currently laying down then: Default Text %CharacterName% sit[//s] down %CharacterName% sit[//s] up.

sit {up/down}

Sit On Objects Sit On Current Object

sit {up/down} [in/on] %object% Sit on an object get on %object% Sit on the object you are currently standing or laying on

%CharacterName% sit[//s] on %TheObject[%object%]%. <c>(on %TheObject[%ParentOf[%Pla yer%]%]%)</c>

sit {up/down}

---Executes task "Sit On Objects"

Stand On stand {up/down} Floor

Stand up if currently sitting %CharacterName% stand[//s] up. or laying down

stand {up/down} Stand On %CharacterName% stand[//s] [in/on] %object% Stand on top of the object Objects on %TheObject[%object%]%. get on %object% Stand On Current stand {up/down} Object If sitting or laying on object, stand on it <c>(on %TheObject[%ParentOf[%Pla yer%]%]%)</c>

---Executes task "Stand On Objects"

113

Lie On Floor Lie On Current Object

lie {up/down} lay {up/down} lie {up/down} lay {up/down}

Lay down on the floor

%CharacterName% lie[//s] down. <c>(on %TheObject[%ParentOf[%Pla yer%]%]%)</c>

If sitting or standing on object, lay on it

---Executes task "Lie On Object"

Lie On Object

[lie/lay] {up/down} Lay down on the object [in/on] %object% get on %object% [stand/get/move] [out/off] {of} %object% Get off of an object exit %object% leave %object%

%CharacterName% lie[//s] on %TheObject[%object%]%.

Leave Object

%CharacterName% get[//s] off of %TheObject[%object%]%.

Leave Current Object

[stand/get/move] up {on {the} <c>(%TheObject[%ParentOf[%Player floor/ground} Get off of the object %]%]%)</c> exit currently on, and stand up ---Executes task "Leave Object" get off leave

PUSH AND PULL Just some defaults that need to be overridden with specific commands to do anything. Name Command Description Default Text

Pull [pull/tug] object {on} %object%

Override with a specific task %CharacterName% for objects that can be pulled, pull[//s] %TheObject[%object%]%, such as levers but nothing happens. %CharacterName% push[//es] %TheObject[%object%]%, but nothing happens.

Override with a specific task Push [push/shove/press] for objects that can be object %object% pushed, such as buttons 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.

114

Name Ask about subject Ask character about subject Tell character about subject

Command ask about %text%

Description If already in a conversation, ask that character about a topic

Default Text

ask %character Looks for a matching ASK topic on % about %text% the characters conversation tab

tell %character% Similar to ASK, but looks for about %text% matching TELL topic

Say say %text% something Say something say %text% (Lazy)

If already in a conversation, say something to that character If one other character at same location, say something to that character <c>(to %CharacterName [%AloneWithChar%]%)</c>

Say Looks for a matching "General say %text% something Command" topic on the characters to %character% to character conversation tab Ask about (Lazy) ask about %text% If one other character at same <c>(%CharacterName[%Alo location, ask that character about a neWithChar%]%)</c> topic

OPEN AND CLOSE Open and close a container or a door into another room. Properties: Name Open status For Objects (openable) Objects (Lockable) Objects (Dynamic) Type State List Object List (dynamic) Object List (containers) Selection Only Description Indicates whether object is open or closed Which object is the key for this object

Key for lock

Inside what?

What is this object inside of

Object can be opened Objects

115

and closed Does this object need a key to unlock it Do not use this for combination locks or latches This appends "Locked" as a 3rd option to Open status

Object can be locked

Objects (openable)

Selection Only

Locked status

Objects (Lockable)

Selection only

General Tasks: Name Command Description Default Text

close close %object% objects Unlock objects # Unlock %object1% key with %object2% check

An open object %CharacterName% is closed close[//s] %TheObject[%object%]%. Called by "Unlock <c>(using %TheObject[%object2%]%)</c> objects (lazy)" Inside %TheObject[%object%]% to check for is %ListObjectsIn[%object%]%. key %CharacterName% unlock[//s] %TheObject[%object1%]% Try to unlock a with %TheObject[%object2%]%. locked object Inside %TheObject[%object%]% is %ListObjectsIn[%object%]%. Try to unlock an object using its "key for lock" %CharacterName% Opens a closed open[//s] %TheObject[%object%]%. (but not Inside %TheObject[%object%]% locked) object is %ListObjectsIn[%object%]%.

Unlock objects unlock %object1% with with %object2% key

Unlock objects unlock %object% (lazy)

Open open %object% objects

Override with Open a specific task %CharacterName% can't objects open %object1% to open an open %TheObject[%object1%]% with [with/using] %object2% object using with %TheObject[%object2%]%. others another object Lock Called by # Lock %object1% objects [with/using] %object2% "Lock objects key (lazy)" to <c>(using %object2%.Name)</c>

116

check Lock objects lock %object1% with [with/using] %object2% key Lock objects lock %object% (lazy)

check for key Use the "key %CharacterName% for lock" object lock[//s] %object1%.Name to lock first with %object2%.Name. 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 Object is readable For Objects Objects (readable) Objects Objects (Static) Type Selection only Text Description You can use the "read" command with this object Display this instead of object description when read How to describe object when listed after location description Causes static object to be listed after location description

... and description when read When the object is listed in location, display this Specifically list object in location descriptions General Tasks: Name Command

Text Selection Only

Description

Default Text

Examine characters

[examine/exam/ex /x/look Print the full description of a %DisplayCharacter[%character%] {at}] %character character % % [examine/exam/ex /x/look Print the full description of {at/in{side}/under an object }] %object% [look/l]

Examine objects

%DisplayObject[%object%]%

Look

Display the full description of %DisplayLocation[%LocationOf[% the current location Player%]%]%

117

Read objects

read %object%

If object is readable, display its description when read or %DisplayObject[%object%]% full description

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 General Tasks: Task Name Command Description Move an object being worn by character to being held by same character Default Text Objects (Wearable) Character List Which character is wearing the object

[remove/take Remove off] %objects% objects take %objects% off

Ok, %CharacterName% remove[//s] %TheObjects[%objects%]%.

Wear objects

Move an object [wear/put being held by on/don] %objects% character to being put %objects% on worn by same character

Ok, %CharacterName% put[//s] on %TheObjects[%objects%]%.

EAT AND DRINK Properties determine if an object can be eaten or drunk. Properties: Name Object is edible Object is drinkable For Objects (Dynamic) Objects (Dynamic) Type Selection Only Selection Only Description Indicates that object is edible food Indicates that object is (or contains) a drinkable fluid

118

General Tasks: Name Command Description Default Text

Override this with a As tasty as %TheObject[%object%]% Eat [eat] %object% specific task to allow an looks, %CharacterName% [am/are/is] not objects object to be eaten hungry right now. Drink object Override this with a As delicious as %TheObject[%object%]% drink %object% specific task to allow an looks, %CharacterName% [am/are/is] not object to be drunk thirsty right now.

PLAYER MOVEMENT Normal player movement, plus getting inside of, or climbing on top of objects. Properties: Name For Text Type Description Replaces the default "John is here" message Tells the player if another character moves in or out of the location What to print if this character moves into location containing the player What to print if this character moves into location containing the player Is this character hidden, at a location, in or on something Which location is the character currently at Which object is this character on top of Which object is this character inside of Which character this character on top of

What to show when Characters character is at the location Show character Characters entering/exiting the location Description when enters the Characters location

Selection Only

Text

Description when exits the Characters location

Text

Location of the character

Characters

State List

At which Location

Characters

Location List Object List (supporters) Object List (containers) Character List

On which object?

Characters

Inside which object?

Characters

On which character?

Characters

119

Characters can go inside this object General Tasks: Name

Objects (containers)

Selection Only

Objects characters can get into

Command

Description

Default Text

Player {[go/walk/move/run] {to Movement {the}}} %direction%

Controls the north, south, up, %CharacterName% down, in, out move[//s] %LCase[%direction%]%. commands Enter object that has "characters %CharacterName% step[//s] can go inside this inside %TheObject[%object%]%. object" property If character is %CharacterName% get[//s] out inside an object, of %TheObject[%object%]%. get out

Go Inside Object

[move/go/get] [in{to/side}] %object% enter %object%

[stand/get/move/go] out Get Out of {of} %object% Object exit %object% leave %object% [climb/clamber/go] {up/down/on} %object% [move/walk] [up/down/on] %object%

Climb objects

Try to climb up something

%CharacterName% can't climb %TheObject[%object%]%.

ATTACKING Basic fighting, note that the Battle System from ADRIFT 4 is not implemented in ADRIFT 5 and probably wont be for some time. Name Command Description Default Text

Attack [attack/hit/kick/kill] character %character% Attack character with object [attack/hit/kick/kill] %character% [with/using] %object %

Override with a specific I don't think %CharacterName task to make a character [%character%]% would appreciate attackable that very much. Override with a specific tasks to make a character attackable with specific objects I don't think %CharacterName[%character %]% would appreciate that very much.

120

Text Boxes
All multi-line text boxes within ADRIFT are completely flexible as to how and what they display. They are designed to look simple at first glance, with the user typing in basic descriptions. They all support Syntax Highlighting to show functions, references, keys, comments and variables. Alternate Descriptions can be used to append extra text, or completely change the displayed message, based on Restrictions. DRAG AND DROP As well as being able to drag and drop pieces of text into the text boxes, you can also drag items from the main ADRIFT window into the boxes too. This provides a quick way of creating functions. So for example, if you drag a character from a list into a text window it will pop up a menu asking what you wish to display from: Character Name Character Description List objects held by List objects worn by Location of

By selecting one of these entries, the corresponding function for your selection will be inserted into the textbox. Similar menus are offered for the other item types. PREVIEW This section has still to be completed. I am hoping that it will provide a preview of the text as it would be displayed in Runner. It may also be possible to apply formatting directly to the text. GRAPHICS You can insert graphics into a piece of text by selecting the Graphics tab on the right hand side. This provides a handy preview and URL. You can enter a filename, or a URL from the Internet here. Internet images will be downloaded on the fly, which can minimize the size of your adventure. By default, this will display the graphic at the start of the section of text. It is also possible to insert multiple images in any piece of text by using <img> tags. The format is <img src="filename or url">. Using the <img> tags also allows you to customise exactly where in the text it will appear. This is useful if, for example, you have <waitkey> or <wait X> tags in your text. Also, you may want different images to appear for different alternate descriptions. SOUND As with Graphics, you can insert an audio clip by selecting the Audio tab on the right hand side. This provides three main buttons, a channel selector, and a loop checkbox. To play a sound, click the Play button. This will bring up the file dialog box, where you can select a WAV, MP3 or MID file. There are plans to allow OGG files in a later release. Once selected, you can preview the sound by right-clicking on the Play button. You can have the audio loop indefinitely by selecting the Loop checkbox.

121

ADRIFT has 8 sound channels. This means you can have background music on a particular channel, and overlay different audio clips on other channels. By default, everything will be on channel 1. To pause a sound file (for example, you might want to pause a piece of music when a particular piece of text is displayed), select the Pause button. This will pause any piece of audio on the selected channel. When you next select to play sound on this channel, assuming it is the same audio clip then it will resume where it left off. To stop a sound file, select the Stop button. If this piece of music is played again, it will start from the beginning. As with the Play button, you can right-click on the pause/stop buttons to stop a piece of audio from being previewed. As with graphics, you can control exactly when the sound will be played using tags. This is useful in case you want to play multiple sound effects in the same text box, or wish to play the sound after a wait command. The syntax is: <audio [play src="filename or url"|pause|stop] {channel=X} {loop=[Y/N]}>

So for example: <audio play src="myfile.mp3" channel=2 loop=Y> or <audio pause channel=2> SPECIAL CHARACTERS The following symbol characters are used for special purposes so cant be used freely in text. This is used for HTML markup tags and to insert comments in the text. The tag finishes at the next > character. To include a < character in text, use the code &LT; and for > use &GT; Comments are placed between less-than/exclamation/minus/minus and minus/minus/greater-than, as shown below: < Less than <!-- This is a comment -->
<# and #> mark the beginning and end of embedded expressions. This allows you to

add logic within text windows. For example: You have <# IF(Player.Held.Count > 1, "more than one", "zero or one") #> items. Two of these are used as delimiters around variable names, functions and references that are embedded in the text and evaluated immediately prior to the text being output. % Percent Note that nested % symbols may be placed inside the brackets of a function. The equation finishes and normal text resumes at the next % symbol that is not enclosed by brackets.

122

The following special symbols are used inside embedded functions delimited by % symbols:

( ) Parentheses

Used to delimit the parameter lists of math and string functions that can be used to calculate parameters for the % function.

When used after a function name these are used to delimit the parameters [ ] Square brackets for the function, [ ] is also used to indicate the index value when used with an array variable. , comma Separates parameters in a parameter list. Must be used in pairs inside of other brackets as Adrift does not currently nest different types of delimiter correctly. To include a < character in text, use the code &LT; and for > use &GT;

< Less than, > greater than

HTML MARKUP TAGS Many standard HTML markup tags, and some unique Adrift tags, can be inserted into the text to control the formatting of the output. <br> <img src="filename or url"> <cls> <b>boldface</b> <u>underline</u> <i>italics</i> <centre>Centralise text</centre> or <center>Centralise text</center> <right>right justify text</right> &LT; &GT; <font colour="#RRGGBB">text</font> (Note: "colour" can also be spelt "color") or <font size=N>text</font> or <font face="fontname">text</font> or in any combination, eg: Displays the < character Displays the > character Allows the text color, font or point size to be changed. The color is specified as three 2-digit hexadecimal numbers in the order red-green-blue. <font color="#000000"> is black <font colour="#FF0000"> is bright red <font color="#00FF00"> is bright green <font colour="#0000FF"> is bright blue (break) Start a new line. Insert an image into the text (see also the graphics section above). Clear the screen. Write in boldface. underline the text. Write in italics.

Centralise text

right justify text

123

<font colour="#RRGGBB" size=N face="fontname">text</font>

<font color="#C0C000"> is GOLD The size N can either be specified as an absolute font size, or relative to the current font size. <font size=10>text</font> creates text slightly smaller than the default. <font size=+10>text</font> creates text 10 points larger than the default. <font face="times new roman">text</font> changes the current font to "times new roman". </font> Reverts back to the previous font size, color and face. (Where N is a number) Wait for N seconds before continuing. ie. <wait 5> pauses the text output to the screen for 5 seconds. Pauses the text output until player presses a key. Note that you need to provide your own "Press a key to continue" message BEFORE the <waitkey> tag.

<wait N>

Press any key<waitkey>

---oOo---

Alternate Descriptions
Alternate Descriptions allow you to add to or change the description of a location, object or character, or alter the text that is displayed by a task or restriction failure. CREATING ALTERNATE DESCRIPTIONS Any text box in ADRIFT can be enhanced with alternate descriptions by right-clicking inside of it and selecting "Add Alternate Description" from the popup menu.

124

Two tabs will now appear at the bottom of the text box, the "Default Description" tab page contains the original description and "Alternate Description 1" is where you can type a new description. You can right-click on an alternate description tab to change its name or delete it.

125

Alternate Descriptions can also be added to a restriction:

and to a short description by first clicking on the

126

DISPLAYING A SPECIAL DESCRIPTION THE FIRST TIME ONLY In the context menu for text boxes, there is another option called "Only Display Once".

The "Only Display Once" option is a selectable tick-box that can be set independently for each alternate description. If you select this for the Default Description then the first time this description is displayed it will show the Default Description, while on all following occasions it will display the Alternate Description instead. This allows you to have a very long detailed description the first time the player enters a location or examines an object, and a more concise description with just the important details subsequently. USING RESTRICTIONS At the top of the alternate description page you will see

Here we can add restrictions that control whether this alternate description will be displayed, and how it interacts with the default and any other alternate descriptions. Clicking on the add new restriction icon will create a new restriction and open it for editing. This allows you to specify a condition that must be true for this Alternate Description to be considered for display.

Note that the restrictions text box will be blanked out preventing you from entering text to be

127

displayed if the restriction failed. If you do want to display a message in this case, just create another Alternate Description and give it the opposite restriction. Once one restriction has been added, the button icon changes to (edit restrictions). Pressing it will open the restrictions list and more restrictions may be added (using nested AND/OR relationships) or the existing ones can be edited. A small downward pointing arrow will appear next to the restriction to indicate that there is more than one restriction:

Clicking it will show them in a drop-down list.

APPEND THIS TO PREVIOUS Assuming that "Only Display Once" is NOT checked on the Default Description, the drop-down list to the right of the restriction is used to control which of the alternate description pages (that passed their restrictions) will be displayed, and in what order.

The default option is "append this to previous". This description will simply be added to the end of any other descriptions that are being displayed. If multiple "append this to previous" pages pass their restrictions, then they are displayed in left-to-right order after the Default Description (or after a "start description with" page, see below) START DESCRIPTION WITH This is similar to an override for tasks, if this page passes restrictions then none of the tab pages on its left (including the Default Description) will be displayed. This will be the first description displayed, followed by any "append this to previous" pages to its right. If more than one "start description with" pages pass restrictions, the rightmost one will override all of the others. DISPLAY THIS AFTER DEFAULT This description will be displayed immediately after the display of the Default Description. It will override all Alternate Descriptions to its left, preventing them from being displayed. Any "append this to previous" pages on its right, which pass restrictions, will then be added. REARRANGING DESCRIPTIONS Because the ordering of the descriptions is important (i.e. the "start description with" option overrides all previous descriptions), it is important to be able to insert or rearrange the descriptions. To do this, simply drag the tab for the description forwards or backwards. You can order the tabs in any way, other than the default tab. This must always be the first description.

128

Syntax Highlighting
Syntax within text areas of ADRIFT 5 are highlighted when certain things are typed. This makes it clear that you are calling a function, or referencing a key. This helps to highlight if you have typed an invalid entry.
Functions are highlighted in blue, for example %ListExits[%Player%]%.

References are highlighted in green, for example %direction%.

Keys are highlighted in red, for example Task12.

Comments are highlighted in grey, for example <!-- This is a comment -->.

Variables are highlighted in purple, for example %Score%.

---oOo---

Map
The map in v5 has been improved significantly over the v4 map. Rather than attempt to calculate the layout each time the player moves, sometimes providing a different layout each time, the v5 map is predefined within Developer. This allows a much greater amount of flexibility of the layout. For a video demonstration of the ADRIFT map visit: http://www.youtube.com/watch?v=F3rite9QHSA

129

Within Developer, locations can be dragged around to give whatever layout is desired. The map controls within Developer are as follows: When the mouse is not over anything: Right-click and drag will move the entire map around Left-click and drag will rotate the map Left-click and release will de-select any selected nodes Shift + Left-click and drag will lasso select nodes Double-click will add a new node. The new node automatically starts in edit mode, so typing at this point will change the location name.

When the mouse is over a node/location: Left-click and release will select and activate the node Left-click and drag will move the node (or nodes) around on its current Z a xis Right-click and release will select and activate the node, and display the node menu Ctrl + Left-click will toggle the selection of the node Double-click will edit the location

When the mouse is over an anchor: Left-click and drag will move the anchor. o If the anchor belongs to a node, it will resize the node o If the anchor is a mid-point of a link, it will re-shape the link Double-click will create a new link, or edit a current link o Clicking on another anchor will complete the link o Pressing Escape will cancel the link

130

Right-click and release will select and activate the link, and display the link menu

Keyboard shortcuts Ctrl-U will move any selected nodes up Ctrl-D will move any selected nodes down

You can completely rebuild the map from the location exits by selecting the map and pressing Ctrl-Shift-R. Only do this if the map has become corrupt or you wish to start over again, as the operation is irreversible other than by restoring the adventure. If you create a new location in your adventure, and do not link it to any other locations, ADRIFT will create a new page on the map, and create the location on this page. You can move locations from one page to another by right-clicking on them, and selecting Move to page. You can also rename each page by right-clicking on the tab and selecting Rename Page. ---oOo---

Keyboard Shortcuts
There are several shortcuts that can make using the interface much easier, giving you more control over your project. The following is provided by contributions from users of the ADRIFT community. (Thanks!) CONTROL SHORTCUTS CTRL+A = Saves .taf file CTRL+E = Adds New Event CTRL+R = Search & Replace CTRL+T = Add New Task CTRL+O = Add New Object CTRL+P = Add New Property CTRL+F = Search & Repleace (Duplicate) CTRL+G = Add New Group CTRL+H = Add New Hint CTRL+L = Add New Location CTRL+C = Add New Character(With no window focus) CTRL+C = Copy (If item within window has focus) CTRL+X = Add Text Overide (No Window focus) CTRL+X = Cut (If item in window has focus) CTRL+V = Paste

131

ALT SHORTCUTS Alt+ZN = New game Alt+ZO = Open Alt+ZS = Save Alt+1 = Save Alt+ZA = Save As Alt+ZIM = Import module Alt+ZIB = Import Blorb Alt+ZEM = Export module Alt+ZEI = Export iFiction record Alt+ZEW = Export windows executable Alt+ZEB = Export Blorb Alt+ZP = Protect Alt+ZI = Introduction & end of game Alt+ZG1 = Settings Alt+ZX = Exit developer Alt+OC1 = Cut Alt+OC2 = Copy Alt+OP = Paste Alt+OD = Delete Alt+OL = Create new page on map and add new location Alt+MA = Add new location to current page Alt+OO = Add new object to 'Objects' folder Alt+OT = Add new task to 'Tasks' folder Alt+OH = Add new character to 'Character' folder Alt+OE = Add new event to 'Events' folder Alt+OV = Add new variable to 'Variables' folder Alt+OG = Add newe group to 'Groups' folder

132

Alt+OR = Add new property to 'Properties' folder Alt+OX = Add new text override to 'Text Overrides' folder Alt+OI = Add new hint to 'Hints' folder Alt+OF = Find Alt+ON = Find Next Alt+OA = Find and replace Alt+OS = Set game Options Alt+OU = Run game Alt+2 = Run game Alt+IF = Show folders window Alt+IM = Show map window Alt+IC = Cascade windows Alt+IT = Tile windows horizontally Alt+II = Tile windows vertically Alt+IL = Tile windows Alt+IO = Close all windows Alt+MC = Map Centralise Alt+MP = Plan view Alt+MZ = Map zoom in Alt+MO = Map zoom out Alt+MS = Show grid lines Alt+MH = Show Axes You can also drag items up and down a list as long as the sorting options are set to 'None'. This is accessible via the right click menu. ---oOo---

DIALOGS
Introduction & End of Game
This is where you setup the initial location of the player, the introductory text to display before the game starts, and a final message to show after the game finishes.

133

Press the round button at the top-left of ADRIFT Developer to open the main menu:

Selecting "Introduction and End of Game" will open the following dialog:

134

The text that you type in the text box will be displayed when your game first starts. It should tell the player what the game is about, what character they will be playing as and what they need to achieve to win the game. If your game uses any unusual verbs as commands, then this should also be explained. Under the text box is a drop-down menu where you select the location where the player will start the game. If you tick "Display first room description" above the text box, then the description of this starting room will be displayed immediately after the introductory text. If you dont tick the box then you can enter an alternative description of their start location as part of the introduction. Now select the "End of Game" tab:

The text that you type into this text box will be displayed when the game finishes. You can display different text depending upon whether the player won or lost, and what other events occurred during the game, by right-clicking the text box and selecting "Add Alternate Description". See Alternate Descriptions for details. Here is an example of the messages displayed when the game ends:

135

*** You have lost *** You ended up with 16 lollies. In that game you scored 42 out of a possible 120, in 9 turns Would you like to restart, restore a saved game, quit or undo the last command? The first line comes from the "In Defeat" option of the "End Game" action. If "Without a fuss" is chosen instead, then no message is shown here. The second line is the message from the "End of Game" dialog box. The third line is only shown if the MaxScore variable has been set to a value other than zero. It displays the values of the %Score%, %MaxScore% and %Turns% variables. The last line is always shown. ---

Restrictions
Restrictions are the basis of most of the if-then-else logic in an ADRIFT game. Tasks use restrictions to determine if their Actions are performed and their completion message shown. Locations use restrictions to prevent the player travelling in a certain direction until certain conditions are met. Characters can have restrictions on conversation topics and Text Boxes use restrictions to control the compositing of Alternate Descriptions. CREATING A RESTRICTION Restrictions can be created by pressing an 'Add a new restriction' button on an Alternate Descriptions page or the Directions page of a location, or by pressing the 'Add' button on a restrictions list. The Restriction form looks like this:

At the top is a series of restriction categories: Location, Object, Task, Character, Variable and Property. When one of these is selected it reconfigures the available options that can be selected for the restriction. The example is for the restriction "[Referenced Object][must][be held by][The Player Character]". This restriction is commonly used by General Tasks for commands that allow the player to do something with an object that they are carrying, such as "Drop %object%". If the

136

player is in fact carrying the object that they try to drop, then the Actions of the task are executed, in this case moving the object from the player to the players current location. Some restrictions can be specified either way around, for example the above restriction could also have been the Character restriction "[The Player Character][must][be holding][Referenced Object]", BUT this is not always the case, so if the restriction you want does not seem to exist, try it the other way around.

Below these is a text box where you can enter a message to be displayed if this restriction FAILS. This text box is disabled for restrictions on Alternate Descriptions. You can create Alternate Descriptions for this text box to vary the failure message for different circumstances.

LOCATION RESTRICTIONS For the players current location, or any specific location, you can check if: The location is a member of a specific Location Group The location has been seen by the Player, a specific character, or any character The location has a particular property

OBJECT RESTRICTIONS For the referenced object, a particular object, or any object, you can check if: Its at a particular location Its being held by a particular character Its in a particular state (eg. Open/Closed for containers) Its inside of a particular container object, any object, or a referenced object The referenced object is a particular object Its sitting on top of an object with a surface Its a part of a character (nose, mouth, leg etc.) Its part of another object Its visible to a particular character (or any character) Its a member of an object group (eg. the "Light sources" group) Its currently being worn by a particular character The referenced object is an object that exists in this game It has been seen by a particular character It has a particular property defined for it

TASK RESTRICTIONS This simply checks if a particular task has been completed or not. CHARACTER RESTRICTIONS The character restrictions include a whole host of options pertaining to where a particular character is located, what they are doing, who they are with, what they are wearing, their personal characteristics, and what objects, locations and characters they have previously encountered. VARIABLE RESTRICTIONS This lets you select a variable and compare its value with the value of another variable, with a constant, or with the result of a mathematical expression.

137

Bug #18325 - Expressions are currently not being evaluated correctly when used in a restriction (version 5.0.21) PROPERTY RESTRICTIONS This allows you to select a specific property of a location, object or character and check if its value is equal to a particular state or to the result of an expression. Expressions can only be used with integer and text properties. Bug #18325 - Expressions are currently not being evaluated correctly when used in a restriction (version 5.0.21) ---

Restrictions list
This is a sequence of Restrictions combined with AND and OR boolean operations and optional nesting with parentheses to create a complex condition that is used to determine if a Task should execute or an Alternate Description be displayed in a text box. The restrictions tab of a task looks like this:

While the restrictions for an Alternate Description or a movement direction are displayed on a separate form:

138

Individual Restrictions can be moved up and down by selecting them and using the arrow buttons on the right, and can be edited by double clicking on them, or pressing the "Edit" button when selected. New Restrictions are added with the "Add" button, and deleted by selecting them and pressing "Delete". The boolean AND/OR relation between two restrictions (or groups of restrictions) is toggled by clicking on it. Likewise the parentheses to the left and right of the restrictions can be toggled on and off by clicking them, with double parentheses accessible by holding down the CTRL key as you click. ---

139

Actions
THE ACTIONS LIST The "Actions" tab of a task contains a list of actions which are performed in order when a task is executed and passes all of its restrictions.

140

The order of execution can be changed by selecting an action and moving it up or down with the arrow buttons at the right of the window. Pressing the "Add" button opens the action editing window (below), creating a new action which is added to the end of the list. Select one of the actions and press the "Edit" button to open the action editing window and alter it. Select an action and press "Delete" to remove it.

The action editing window contains 8 tab pages, one for each category of action that can be performed:

MOVE OBJECTS This has 3 main options: move an object, add object to group, and remove object from group. The object can be: A specific object The object "Referenced" by the general task, ie. for "Eat %object%" if the player enters "eat fruit" then fruit becomes the referenced object. Every object at a given location Everything held by a particular character Everything in a given object group The contents of a particular container Everything sitting on a particular object that has a surface All objects with a particular property, or a property with a particular value Everything currently being worn by a particular character

The character holding or wearing the object can also be a referenced character, and the object its on or in can be a referenced object. As well as adding or removing the selected object from a group, the object can be moved to: Inside a container object Onto an object with a surface Can become a non-removable 'part' of another object Held by a character

141

Worn by a character Can become a 'part' of a character, such as his feet or nose Moved to a particular location, or to the same location as a referenced/particular object or character A random location in a location group The special location "Hidden" for objects that have been destroyed or taken away to where the player cant find them

Any of these characters and objects can also be a referenced character/object. MOVE CHARACTERS Characters can be moved to a new location, or added to (or removed from) a character group. One or more characters can be selected from: The player character A Referenced character A particular character Everyone at a particular location Everyone in a character group Everyone inside a particular container object (such as an elevator or car) Everyone on a particular object with a surface Everyone who has a particular property set to a particular value

The selected character(s) can be moved to: A specific location (but NOT to a referenced location) The special 'Hidden' location that removes the character from the game world A random location chosen from a particular location group Laying, sitting or standing on or in an appropriate object or character such as a bed, chair, car, elevator, horse or the floor (can be a referenced object) The parent location (to get out of or off of an object) The same location as a specific object or character Switch places with another character A specific direction from the current location

This action can also be used to change the "point of view" of the player, allowing them to play as different characters in the game world. Use [move][character][the player character][to switch places with] the character they are to play as. LOCATIONS This option adds and removes locations from location groups. The location can be:

142

A specific location The current location of a specific or referenced character or object Every location that has a specific property with a given value All of the locations in another group Every location in the same group (if used with remove this will leave the group completely empty)

TASKS The task actions allow you to either execute or unset another task. This task can be of any type, general, specific or system. Unsetting a task simply clears the flag that indicates that the task has been run at least once. This allows a non-repeatable task to be run again. When an action executes a task, this new task acts like a subroutine, checking its restrictions are valid, displaying its own text box and running its own actions before returning to complete the remaining actions in the first task. If the task to be executed uses references such as %character%, %object%, %number% etc., then a button marked "params" appears. Pressing this button will open a dialog box for each parameter. This can pass on the referenced item from the first task, specify a particular item to use, or use a formula to calculate the value to be passed to the sub-task. VARIABLES A variable is selected using the drop-down list and then an expression can be entered which calculates the value to be written to the variable. This equation can use Variables, Properties, References and Functions in the calculation, surrounding them with % symbols ie. %object%. There are two types of variable, 'number' and 'text', either of which can be an array. For a number variable the equation must calculate an integer value. eg. if the counter variable is set equal to %counter%+1 then it will be incremented each time the action is executed. For a text variable the equation can also produce a string of text. A future version of Adrift will include an "expression builder" that will assist with creating more complex equations. If the variable is an array then an extra field will be provided in which a specific array index may be given or a number variable used to index the element of the array to be written to. An extra option "I need a loop" is also made available. If this is selected then you can specify a range of index values to write to several elements of the array. This functions like a for loop in a programming language, recalculating the expression for each array index in the sequence. The counter variable %loop% contains the index being written to and can be used in the expression as a value or to index into another array. eg. "Set [MyArray][Loop]=[%MyArray[%Loop%]+1]" will increment each element

143

of MyArray. CONVERSATION This set of actions controls the conversations that are defined on the conversation tab of each character. You can "Ask", "Tell" or "Say" anything to a specific character or to the referenced character. These actions contain a text entry field which is checked against the conversation items of the selected character. Ask - If any words in the text field match the comma separated list of keywords defined in an "Ask" conversation topic, then the conversation text is shown. Tell - Matches keywords in a "Tell" conversation topic. (The same topic can be both an "Ask" and "Tell" topic simultaneously) Say - Conversation topics with "General command" selected will be matched with the text in the same way that commands in a general task are matched. ie. you can use {} for optional words and [/] for alternate choices. The final two actions, "Enter conversation" and "Leave conversation" are used to select which character key will be returned by the %convcharacter% function. This character therefore becomes the default character for any ask, tell or say commands entered by the player. When the player has entered conversation with a character, the restriction [The player character][must][be in conversation with] will return true for that character, until they leave the conversation. Using any of the Ask, Tell or Say actions will also enter conversation mode with the character. The "Enter conversation" action is provided so that the character can start a conversation with the player when they enter the location or type a particular command. When the player enters into conversation with a character, the implicit introduction will be shown. (If it is defined and they have not entered an explicit introduction) Leaving the location will also leave the conversation. SET PROPERTIES It is important to note that the icon at the left of the entry fields is actually a button that

toggles between 3 states and determines what is listed in the first drop-down menu. = Objects

144

= Characters

= Locations Objects and characters can be either specific or referenced. Once the object, character or location is chosen, a list of applicable properties can be selected from the next drop-down list. Finally the value to be assigned to that property can either be chosen from a drop-down list, or an expression entered to calculate it (depending on the type of the property). Bug #18325 - Text properties cannot be set using expressions yet. As a workaround, use an action to write the result of the expression to a variable, then add a second action to write the contents of the variable to the property. NOTE: This requires Adrift version 5.0.22 or higher. END GAME This is the simplest tab and only has 3 options, all of which end the game: in Victory - (Displays "*** You have won ***") in Defeat - (Displays "*** You have lost ***") without a fuss - (no extra message displayed)

The "End of Game" message is then displayed (see Introduction & End of Game), followed by the line: "Would you like to restart, restore a saved game, quit or undo the last command?" ---

Settings
To change the major settings of the ADRIFT developer, open the main menu by clicking the round button in the top-left corner of the screen and click the last button, which is labeled "Settings...". This will open the "settings" dialog box, which currently contains two pages, one for general settings and one for listing all of the library files that will used in new ADRIFT games that you create.

145

GENERAL SETTINGS

The "Forms theme" allows you to customise how adrift developer will look.

146

Each item (object, character, task etc) has a unique identifier within ADRIFT, known as a key. Certain functions use these keys to reference the item unambiguously. "Show keys on edit forms" displays this key in the title bar of the form when editing the item. You only need this if you are making extensive use of functions which require keys as parameters. "Show all open windows in taskbar" should normally be selected as it prevents confusion from losing dialog windows behind other windows. Simple mode hides many of the more complex features of ADRIFT. Next are the settings for the dictionary that ADRIFT uses for automatic spelling correction. Copy reciprocal links/restrictions indicates whether, when you add a link to another location on the Directions page of a location, ADRIFT should automatically create a link back in the opposite direction from that location. If you always use simple bidirectional links between locations then set these to "Always". If you often use one-way links or twisty passages then set this to "Never". LIBRARY SETTINGS

This page lists all of the library files that you wish to use with your game, and where they are located on your hard disk. The ADRIFT installer should have automatically placed the location of StandardLibrary.amf on this list. As of Sep 2011 this is the only library file that exists, but in the future there may be special libraries that can be added to extend the capabilities of ADRIFT for

147

particular types of games. You can also select that only specific libraries are to be used with the next game created, using the checkbox next to each entry. The "Hide Library Items" checkbox removes the Standard Library from the "Folders" list in the main window.

Options
The ADRIFT "Options" page contains information about the game, and options used to control how the runner will behave when playing this game.

Press the GENERAL TAB

button on the main toolbar ribbon to open the game options dialog:

Default font - The type, style and size of the font that ADRIFT runner will use. Player Perspective - Controls how the runner will refer to the player character. o o o First person - I am eating the apple Second person - You are eating the apple Third person - John smith is eating the apple

Custom statusbar - What will be displayed on the runner status bar. Use text or integer variables for parts that should change. Show exits from locations along with descriptions - If this is selected then the runner will display a message like "Exits are north, east and South" after the location description.

148

Enable context sensitive menu in games - Clicking on any word in the text output will popup a menu of commands associated with that word. Enable debugger - You can turn this off to prevent players using debugger to cheat in the final released game.

149

BIBLIOGRAPHY TAB

This is where you enter information about your game such as what it is called, who wrote it, and what type of game it is. You can also supply an image that is used as the splash screen when the game is run. This information can be extracted from the game file by any tool that is compliant with the treaty of babel.

150

ADVANCED TAB

This tab is not available in Simple mode Task execution logic - ADRIFT 4 uses slightly different logic than ADRIFT 5 when choosing which tasks to execute. This option will be automatically set depending on whether this game is a converted ADRIFT 4 game or a new ADRIFT 5 game. Do not change this for ADRIFT 5 games as the standard library will not work properly. Key prefix - This is only set when creating a module instead of a game. It adds the specified prefix to the beginning of the key of every new task, object, character etc. that is created from then on. This allows these items to be imported into a different game as a module without causing a conflict with its existing keys. ---

Runner Menus and Toolbars


The Runner is an essential part of the ADRIFT 5 Suite, because it's in the Runner that you can test your games and the players use it to run your game. So, let us explain a bit about it. THE FILE MENU AND MAIN TOOLBAR The file menu hosts all of the Runner's main options, the options you'll use the most.

151

Open Adventure or Yellow Folder: Prompts you to select a .TAF file(adventure) to open and play in the Runner. Open Game or Blue Folder: The Open Game option allows you to open a previously saved game and continue the adventure from where you left off. Restart Game: Restarts the Adventure game being played at the moment, means that you start from the beginning. Save Game or Floppy disk: Used with Open Game, the Save Game option basically saves your progress up to the point where the option is activated (clicked). It asks you for a name for the save file, type the name then click Save. Save Game As: If you saved the game previously and want to make a backup of your save, use this option. Type the name and click Save. Start Transcript: Records and exports the text in the game to a .TXT file. Recent Adventures: Point here and a submenu will open showing all your recently played adventures. Click on one to load and run it. Exit: Closes the Runner application. EDIT MENU Auto-Complete: This auto-completes the commands, you type the first letter and it completes for you. VIEW MENU Full Screen: Places the Runner in Full Screen mode, allows you to play the games without the taskbar. Debugger: Opens the ADRIFT 5 debugger, this is only for developers. You can see which tasks are running at the time or objects in place. Options: Runner options such as text color, enable graphics, enable sound and such. MACROS MENU Edit Macro: Allows you to set up macros, so you can press a button and execute a bunch of tasks, move objects or characters around and such. Be careful, because it can annoy you a lot if used the wrong way. WINDOW MENU Show Map: Shows the map for the game in a window on the right side of the main runner window.

152

Show Graphics: Shows all game graphics in a window below the map. HELP MENU About ADRIFT: Shows the ADRIFT logo and Runner version. About Adventure: Shows the adventure name, author name, version and release date. ---oOo---

153

IMPORTING AND EXPORTING


Modules
ADRIFT 5 Modules are simply the same data that is stored in a TAF, but in an uncompressed text format. The data format used to encode modules is XML, so modules can be viewed or edited with an appropriate XML editor or viewer such as Notepad or Internet Explorer. Modules can also be used as Libraries, by simply selecting them in the Libraries list in Settings. However, before doing so it is necessary to remove a few sections, otherwise they will interfere with your adventure. These are the Title, Author and ShowExits tags at the start of the file, and the Map section at the end. At present, when you export a module it will save the entire game, you cannot select individual items or folders for export into other games files. Campbell is developing the facility to select individual folders for export and this will be implemented at a future date. ---

IFiction Record
Every adventure created with ADRIFT 5 is given an iFiction record. The iFiction record is primarily intended for bibliographic purposes: that is, purposes such as identification, classification, automated downloading, librarianship. The iFiction record is standard across different IF systems. The advantage this gives is that third party software and websites are able to read the record directly from an ADRIFT adventure and be able to display information such as the title, author, description, version and cover art. For further information, see the Treaty of Babel website. http://babel.ifarchive.org/index.html ---

Windows Executables
Advantages - ties to a particular version of Runner that has been thoroughly tested by the author. Disadvantages - restricts the game to being Windows only, so Linux/Mac OS users cannot play. ---oOo---

FUNCTIONS AND EXPRESSIONS REFERENCE


Expressions
Expressions are used to calculate integer values or produce strings of text that can then be stored

154

in Variables or Properties using Actions, or used in comparison operations in Restrictions. In the current version of Adrift (5.0.21) it is usually not possible to mix the % Functions with math/string functions in the same expression. If you do need a mixed expression then create extra Variables to hold temporary values and separate the different function types into separate actions. The final action then uses these temporary values to calculate the result. The same temporary variables can then be reused in the next equation.

INTEGER EXPRESSIONS

In an action a value can be calculated by an integer expression and the result stored in a 'number' variable, an element of an array variable, or an integer property of a character, object or location. The basic mathematical functions +,-,*,/ can be used to calculate a value, using integer constants, properties, variables, and the reference %number%. An integer expression can also be compared with an integer variable or property in a restriction, to determine if they are equal or one is greater than or less than the other value. x mod y Returns the modulus of x and y, i.e. the remainder when x is divided by y. i.e. 11 mod 4 = 3 NOTE: The divide operator '/' performs a round-to-nearest-integer integer divide. If you need the truncated integer part of the division then first subtract 0.5 times the number being divided by, eg. (%IntVar%-50)/100 Parentheses can be used to control the order of evaluation, eg. (17+4)*(9-6) Variable names must be delimited with '%' symbols, eg. %Score% Array variables use square brackets to enclose the index value, eg. %ArrayVar1[3]% Integer properties are accessed using the PropertyValue function. This function is delimited with '%'s and currently requires the key of the character/object/location as its first parameter and the key of the property as its second. eg. %PropertyValue[Object16,Property2]% A number of mathematical functions can also be used, including: min(x,y) Returns the minimum of value x and y max(x,y) Returns the maximum of value x and y either(x,y) Randomly returns either x or y rand(x,y) Selects a random value between x and y abs(x) Returns the absolute value of x( the magnitude regardless of sign), i.e. abs(-4) = 4 If(test,x,y) If "test" evaluates true, returns x, else returns y Where "test" is a=b, a==b, a<b,

155

a<=b, a>b, a>=b, a<>b, a!=b. Conditions can be ANDed using "and", "&" or "&&" or ORed using "or", "|", "||", eg. IF(%variable1%=1,%variable2%+1,RAND(5,7)) STRING EXPRESSIONS In an action a line of text can be calculated using a string expression and the result stored in a 'text' variable, an element of an array variable, or a text property of a character, object or location. A string expression can also be compared with a text variable or property in a restriction, to determine if they contain exactly the same text or not. String constants are delimited with the single quote character, eg. 'Some text'. The '&' operator concatenates two strings together, eg. 'Some text'&'ures' becomes 'Some textures'. Any text based property, variable, element of array variable, or the reference %text% can be used in a string expression. The following string functions are available:

UCase(text) Converts <text> to all upper case LCase(text) Converts <text> to all lower case PCase(text) Converts <text> to proper case, i.e. a capitalises the first letter of each word, with the rest in lower case Left(text, length) Returns the <length> leftmost characters of <text> Right(text, length) Returns the <length> rightmost characters of <text> Mid(text, start, length) returns <length> characters of <text>, starting at <start>

COMPLEX EXPRESSIONS An expression can be partly an integer expression and partly a string expression. For example an integer expression can be used to calculate the index of a text variable, and the result of that used in a string expression. The following functions can be used in mixed expressions: Len(text) Returns the length of <text> Val(text) Converts <text> to a number (or zero if it can't match) Str(x) Converts an integer value x to text form. Negative numbers are preceded with "-" and positive numbers with a space. instr(text, search) Returns the position of <search> within <text> eg. instr(hello,e) = 2 ---

156

Keys
Every location, object, task, character, event, variable, group, property, text override, hint and folder in ADRIFT has a unique KEY. A key is just a name that can consist of letters, numbers, and the underline character "_", but it cannot contain any spaces. ADRIFT uses the key to identify each item so that, when you change the name of an item, every reference to it from other parts of the game will still point to the same item. When you choose the name of an item from one of the drop-down lists, ADRIFT actually stores the key instead of the name. If you change the name of the item and then look at a restriction or action that uses it, you will see the new name of the item because ADRIFT used the stored key to find the item and then displayed its current name. To display the key of every item on its title bar, open the Settings dialog box (from the main menu) and tick the box marked "Show keys on edit forms". You can see the keys of every item in a folder by clicking on the funnel icon next to the close button at the top of the folder window:

The funnel icon will not be there if you have changed the "View" of the window - you will need to change it back to "Details" view first.

Select the "Key" option to display the item keys in a separate column. Here is a folder window with all 5 of the optional columns selected:

157

The keys shown here are the name of the item with the spaces removed, which is typical of the standard library, but items you create yourself will normally consist of the type of item followed by a number, eg. Character2, Object4, Location426 etc. If you have set a Key Prefix in the advanced options then it will be prepended to the key of any items created from then on. --USING KEYS

Keys are most often used with Functions, either in a text box or an expression. If you use the object-oriented functions then ADRIFT will popup a list with the names of all of the relevant properties to choose from, but note that it is the KEY of the selected property that is then written into the text box. If you need to use the %Functions% then you can either lookup the keys yourself and type them in, or use the following technique: 1. Open the edit form you wish to place a function on. 2. Move the mouse to the folder window containing the item you wish to use in the function. 3. Position the mouse over the item and hold down the left button and "Drag" it to the text box. 4. If the edit window disappears (which it usually does if its on top of the ADRIFT main window) then just: a. Drag the item down to the button on the windows taskbar that represents the edit window. i. If the edit window does NOT have a taskbar button, then open the Settings form and tick the "Show all open windows in taskbar" option. b. Wait a moment until the edit window appears again (keeping the mouse button held down). c. Continue dragging the item to the edit window. 5. Drag the item to the position in the text that you want to insert the function. 6. Release the mouse button.

158

If we drag a character to a text box, five choices will be shown in a menu:

Character Name - inserts: %CharacterName[Character1]% Character description - inserts: %DisplayCharacter[Character1]% List objects held by - inserts: %ListHeld[Character1] ]% List objects worn by - inserts: %ListWorn[Character1] ]% Location of - inserts: %LocationOf[Character1] ]%

If we drag an object to a text box, six choices will be shown in the menu:

Object name - inserts: %TheObject[Object1]% Object Description - inserts: %DisplayObject[Object1]% List objects on - inserts: %ListObjectsOn[Object1]% List objects in - inserts: %ListObjectsIn[Object1]% List objects on and in - inserts: %ListObjectsOnAndIn[Object1]% Parent of object - inserts: %ParentOf[Object1]%

If we drag a location to a text box, four choices will be shown in the menu:

159

Location name - inserts: %LocationName[Location1]% Display Location - inserts: %DisplayLocation[Location1]% Exits from Location - inserts: %ListExits[Location1]% Objects at Location - inserts: %ListObjectsAtLocation[Location1]% ---oOo---

%Functions%
There are quite a few functions that can be added to any text within ADRIFT 5. Functions must always be within percent (%) symbols. Any arguments must be provided in square brackets. If multiple arguments are required, these should be comma separated. Many of these functions can automatically be generated by dragging the appropriate item the text area you wish the function to appear in. --ALONEWITHCHAR FUNCTION Returns the key of the character in the same location as the player. Always use the restriction "The player character must be alone with any character" to check if this function will return a valid result, before using the result of this function in any equation. This function can be used as the %character% parameter for an Execute-Task action. The executed task will then be applied to the character that is currently in the same location as the player. Syntax %AloneWithChar%

Parameters

none

160

---

161

CHARACTERDESCRIPTOR FUNCTION 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". NB. Available from version 5.0.17. Syntax %CharacterDescriptor[key]%

Parameters

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

CHARACTERNAME FUNCTION If the character is known (this will depend on the Known property, if it exists), or the character descripter field is blank, this function returns the proper name of a particular character. If the proper name field is blank this function will return "Anonymous". However, if the character is not known and the character descripter field is NOT blank, it will return the character descriptor instead. For the player character this function will return "I" in first-person mode, "you" in second-person mode, and the proper name in third-person mode (which defaults to "Anonymous" for the default player character). For other characters it will return 'he', 'she' or 'it' depending on the characters gender. If the word 'object' is added as a second parameter then it will return 'him' or 'her' instead. For full details of this complex function, see Character Name substitution. Syntax %CharacterName% %CharacterName[key]% %CharacterName[key, object]%

162

Parameters

key - The key of the character you wish to display the name of. object - Adding the word 'object' as a second parameter indicates that an objective pronoun
such as 'me', 'you', 'him' or 'her' should be used instead of a subjective pronoun.

163

CHARACTERPROPER FUNCTION 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 name of.
---

CONVCHARACTER FUNCTION Returns the key of the character the player is currently in conversation with. Always use the restriction "The player character must be in conversation with any character" to check if this function will return a valid result, before using the result of this function in any equation. This function can be used as the %character% parameter for an Execute-Task action. The executed task will then be applied to the character that the player is currently in conversation with. Syntax %ConvCharacter%

Parameters

none
---

DISPLAYCHARACTER FUNCTION Displays the description of a particular character Syntax %DisplayCharacter[key]%

164

Parameters key - The key of the character you wish to display the description for. ---

165

DISPLAYLOCATION FUNCTION Displays the description of a particular location. If "Display the short location name when viewing descriptions" is selected in the 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 (5.0.22 and later). Characters at the location are then listed, those with specific "What to show when the character is at location" descriptions after the list of other characters. This function does not currently show characters or objects that are sitting or laying on another object. Syntax %DisplayLocation[key]%

Parameters

key - The key of the location you wish to display the description for.
---

DISPLAYOBJECT FUNCTION Displays the description of a particular object. Syntax %DisplayObject[key]%

166

Parameters

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

167

LCASE FUNCTION Returns a string that has been converted to lower case. Syntax %LCase[string]%

Parameters

string - The text string you wish to convert to lower case.


---

LISTCHARACTERSIN Function 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.
---

LISTCHARACTERSON Function 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.
---

LISTCHARACTERSONANDIN Function Lists all the characters on and inside a particular object. This is basically the same as

168

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.
---

LISTHELD FUNCTION 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.
---

LISTEXITS FUNCTION 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.
---

LISTOBJECTSATLOCATION FUNCTION 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

169

explicitly list. Syntax %ListObjectsAtLocation[key]%

Parameters

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

LISTWORN FUNCTION 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.
---

LISTOBJECTSIN FUNCTION 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 objects that are in.
---

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

170

Syntax %ListObjectsOn[key]%

Parameters

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

LISTOBJECTSONANDIN FUNCTION Lists all the objects on and inside a particular object. This is basically the same as ListObjectsOn and ListObjectsIn, but it gives the response in a nicer syntax when there are objects both on and in the object. Syntax %ListObjectsOnAndIn[key]%

Parameters

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

LOCATIONNAME FUNCTION 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.
---

LOCATIONOF FUNCTION Returns the key of the location of a particular character.

171

Syntax %LocationOf[key]%

Parameters

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

NUMBERASTEXT FUNCTION Returns a number written out as text. Syntax %NumberAsText[number]%

Parameters

number - Any non-negative integer value.


---

PARENTOF FUNCTION 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%. ---

172

PCASE FUNCTION Returns a string that has been converted to proper case (i.e. the first letter will be capitalised, and all other letters will be converted to lower case). Syntax %PCase[string]%

Parameters

string - The text string you wish to convert to proper case.


---

PLAYER FUNCTION This function returns the key of the player character. This will normally always be known at design time, but if you switch characters during the game, it may be necessary. Syntax %Player%

Parameters

none
---

POPUPCHOICE Causes an input box to popup on the screen, displaying a short message prompt and two choices. The player chooses one of the two options and this becomes the value returned by the function. This is used in the expression field of a set variable action to allow the player to choose which of two text strings is written to the variable. Do NOT use directly in a restriction. If you need to do this then call PopupChoice in an action which stores result in a variable and then execute a system task (with another action) which checks the variable with a restriction. Syntax

173

%PopUpChoice[prompt, choice1, choice2]%

Parameters

prompt - An expression (typically a quoted string) to display as a message in the inputbox. choice1 - An expression returned in the function if the user selects this option. choice2 - An expression returned in the function if the user selects this option.
---

POPUPINPUT Causes an input box to popup on the screen, displaying a short message prompt and a single-line text entry field. The player can accept the default text or enter a new line of text, then press OK. This could be used to allow the player to enter their own name, which is then used in the game. If the player presses cancel then this function will return a zero-length string. This function should be used in the expression field of either a "Variables" action or a "Set Properties" action. Do NOT use directly in a restriction. If you need to do this then call PopUpInput in an action which stores the result in a variable, and then execute a system task (with another action) which checks the variable with a restriction. Syntax %PopUpInput[prompt, default]%

Parameters

prompt - An expression (typically a quoted string) to display as a message in the inputbox. default - Optional. An expression (typically a quoted string) to display in the text field of the
inputbox.

Example To ask the player for their name at the start of the game we would create a system task set to run "Immediately", and add the following action to use the PopupInput function to ask them to enter it, then write the name they entered to the "Name" property of the player character.

174

--PROPERTYVALUE FUNCTION 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.
---

RAND FUNCTION The Rand function returns a random value between two integers. Syntax RAND(value1, value2)

Parameters

value1 - The lowest possible value you wish the function to return. value2 - The highest possible value you wish the function to return.
---

THEOBJECT/THEOBJECTS FUNCTION 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.

175

Syntax %TheObject[key]%

Parameters

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

UCASE FUNCTION Returns a string that has been converted to upper case Syntax %UCase[string]%

Parameters

string - The text string you wish to convert to upper case.


---

Object-oriented Functions
The object-oriented function syntax uses a dot character ("." the Full-Stop) between an item key and one or more property keys, to allow direct access to the value of a property in text or an expression without having to use the more cumbersome %PropertyValue[]% function to access each one. Adrift recognises an object-oriented function by the presence of a dot joining two words with no space between them. Therefore you dont need to use the % or <# delimiters to separate them from normal text. "Object2.Name" is a property, "Object2." is just the full-stop at the end of a sentance, and "42.56" is a number. The first word must be a recognised key with the first letter capitalised to activate the list of properties and functions when you press the "." Typing "Player." will activate the list, but "player." will not.

176

These are quite powerfull because you can keep adding property names to the end of the function to get more complex information. For example: "Character2.CharacterAtLocation.Exits.Count" can be used to display the number of accessible exits from the current location of character 2. The item key can come from a function (eg. %Player%.ProperName) or a reference (eg. %character%.ProperName)

Location properties These properties return the key of a location. These would not normally be displayed to the player, but can be used to access properties of the location by adding another dot followed by the name of a property that locations can have.

Character properties These properties return the key of a character. Text properties Returns text that can be displayed or stored in a text variable Integer properties Returns a number that can be displayed, stored in an integer variable, or used in an expression. Group properties These are basically a list of key names which are displayed with a pipe symbol "|" between each one. eg. %Player%.CharacterAtLocation.Exits is displayed as "North|East|South"

Group properties themselves have two properties, ".List" to list the members of the group, and ".Count" to return the number of group members as an integer value, and some may also have container properties. Some group properties can also be used as functions which use parameters to filter the results. For example the "Children" group can contain both Objects and Characters, and these can be either on or inside the parent object. The function .Children(Objects,On) will filter the contents of the group to return only those which

177

are objects and which are on top of the parent object. Object properties Returns the key of an object

Item properties Returns the key of an item (can be either a Character, an Object, or a Location) ---

Character Functions
The object-oriented functions for characters can be listed by typing a dot (full-stop ".") immediately after the character reference "%character%", a character key, or the player-character function %Player%, in either a text box or an expression. These names are CASE SENSITIVE. "%Character%." won't work, you must type "%character%." This allows direct access to the property values of any character, location or object without having to use the %PropertyValue[]% function Scroll down to the wanted property and click on it to insert the property key into the function. Note that properties that are not relevant to a particular character will be omitted from the list. Properties that you create and add to the characters will be added to this list. If you type part of the name of the property then the list will be reduced to show only those that match. Instead of clicking with the mouse you can type enough of the properties name to bring it to the top of the list and press enter or tab.

178

Location properties At which location (CharacterAtLocation) - Displays the KEY of the characters current location. Entering another dot after this will access the properties of that location Character properties On which character? - Key of character that this character is sitting on

Text properties Character Position - Standing, sitting or lying Character Proper name Description Description when enters the location Description when exits the location Descriptor Gender - Male, female or unknown Location of the character - Name of the current location Proper Name What to show when the character is at the location

179

Integer properties Maximum size of held items - Where a tiny object has size 1, small is 3 etc. Maximum weight of held items - Where a tiny object has weight 1, small is 3 etc.

Group properties Held - A list of all objects held by the character Worn - A list of all objects worn by the character

Object properties Inside which object? - The key of the container object that the character is inside of On which object? - The key of the supporter object that the character is on top of

Item properties Parent - The key of the location or object that immediately contains the character ---

Object Functions
The object-oriented functions for objects can be listed by typing a dot (full-stop ".") immediately after either the object reference "%object%", or an object key, in a text box or expression. This allows direct access to the property values of any object without having to use the %PropertyValue[]% function. Scroll down to the wanted property and click on it to insert the property key into the function. Note that properties that are not relevant to a particular object will be omitted from the list. Properties that you create and add to objects will be added to this list. If you type part of the name of the property then the list will be reduced to show only those that match. Instead of clicking with the mouse you can type enough of the properties name to bring it to the top of the list and press enter or tab.

180

Location properties In location (InLocation) - Displays the KEY of the objects location. Entering another dot after this will access the properties of that location

Character properties Held by who (HeldByWho) - Key of character that this object is being held by (Dynamic objects only) Part of who (PartOfWho) - Key of character that this object is a part of (Face, hands, nose etc.) Worn by who (WornByWho) - Key of character that this object is being worn by (Wearable objects only) Text properties ...and description when read (ReadText) - Used for books and signs that we want to be readable Description (Description) - The text box that describes the object

181

Location of the object (DynamicLocation) - The name of the current location of a dynamic object Location of the object (StaticLocation) - The name of the location of a static object Locked status (LockStatus) - Can the object be locked Open status (OpenStatus) - Open, Closed or Locked Object name (Name) - The name of the object ObjectType (StaticOrDynamic) - Static or Dynamic When the object is listed in location, display this (ListDescriptionDynamic) - Text to describe dynamic object in a location When the object is listed in location, display this (ListDescription) - Text used to describe static object in a location description

Integer properties ...and the container can hold (Capacity) - How many tiny objects can fit in this object (Containers only) ...and the surface can hold (SurfaceHold) - How many tiny objects can fit on top of this object (Supporters only) Object size (Size) - How big is this object Object weight (Weight) - How heavy is this object

Group properties At Location group (AtLocationGroup) - ???????????????? Children (Children) - List keys of objects and characters on top of this supporter object o o o o o o %object%.Children.Count - Number of items on and in this object %object%.Children.List - List items on and in this object %object%.Children(Objects,In) - Keys of objects inside this object, add .Count for quantity, .List to list object names. %object%.Children(Objects,On) - Keys of objects on top of this object, add .Count for quantity, .List to list object names. %object%.Children(Characters,In) - Keys of Characters inside this object, add .Count for quantity, .List to list Character names. %object%.Children(Characters,On) - Keys of Characters on this object, add .Count for quantity, .List to list Character names. Contents (Contents) - Keys of objects and characters inside this container object o o o o %object%.Contents.List - List of objects and characters inside this container object %object%.Contents.Count - Number of items inside this object %object%.Contents(Objects) - Keys of Objects inside this object %object%.Contents(Objects).List - List of Objects inside this object

182

o o o o

%object%.Contents(Objects).Count - Number of objects in this object %object%.Contents(Characters) - Keys of Characters inside this object %object%.Contents(Characters).List - List of Characters inside this object %object%.Contents(Characters).Count - Number of Characters in this object

Object properties o o o o o Inside what? (InsideWhat) - The key of the container object that the character is inside of Key for lock (LockKey) - The key of the object that is used as a key to unlock this object On what? (OnWhat) - The object that this object is sitting on top of Parent (Parent) - The location, character or object that is directly holding this object Part of what? (PartOfWhat) - The object or character that this object is a part of

Location Functions
The properties of locations can be listed by typing a dot (full-stop ".") immediately after a location key, or a function that returns a key, in a text box or expression. Scroll down to the wanted property and click on it to insert the property key into the function. Note that properties that are not relevant to a particular location will be omitted from the list. Properties that you create for locations will be added to this list. If you type part of the name of the property then the list will be reduced to show only those that match. Instead of clicking with the mouse you can type enough of the properties name to bring it to the top of the list and press enter or tab.

Group properties exits - Exits from this location o o exits.list - List available exits from this location (those not blocked by a restriction) exits.count - The number of available exits from this location

Text properties Long location description (LongLocationDescription) - The full description of the location

183

Short location description - The name of the location

Object properties Objects - Lists the dynamic objects at this location ---oOo---

INTERMEDIATE TUTORIALS

Adventure Creation Tips For Newcomers


Thinking about creating a game? Think you can throw some rooms together and create an adventure? Think again. In order to create a playable adventure you need to think how to set out your adventure. While what you do and how you do it is entirely up to you, here are some tips that other adventurers have found invaluable: 1. CREATE A MAP. You'll save yourself a lot of headache if you create a map of your adventure before you begin, that way you can see what locations fit, where they lead too and you can draw objects / traps/ puzzles ... so you have something to refer to. For example:

184

2. DESCRIBE YOUR LOCATION, DON'T JUST TELL IT. When creating locations for your adventure, try to imagine you're describing your room to someone on the phone who's never seen it, sure, you can describe the Drawing Room as having a red carpet, a wooden table and some chairs but that doesn't fire the imagination, it doesn't describe the room, it just tells you what's in it. So instead of this:

You are in the Drawing Room, it's lined with red wallpaper and there is a large fire with two chairs in front. Exits are east, west, north and south.

try something like this:

The drawing room is magnificently decorated, something you would not expect from the outside. Plush red wallpaper lines every wall and the carpet is deep and lush. A large roaring fire dances in an exquisitely carved fireplace in front of which two comfortable looking chairs have been placed. A large crystal chandelier dangles from the center of the room throwing light on the many finely crafted portraits that adorn the walls. The portraits are varied but three in particular catch your eye. A middle-aged portly gentleman wearing half-moon glasses, a beautiful young woman wearing a tiara or an elderly woman with grey hair and a stern expression. A large drinks cabinet stands in the northeast corner stacked with many glasses and decanters of various coloured liquids. You notice there are doors leading off to the north, south east and west.

Describe your location; don't just say what's in there. --3. ALWAYS PUT DESCRIPTIONS FOR THINGS YOU DESCRIBE IN YOUR ROOM. When describing a location, remember to put descriptions of objects / things in that location, even if they're purely decorative. Take the following location:

185

It seems like this porch has been in disrepair for some time, rotten planks, boards missing, moss everywhere, whoever lives here obviously doesn't expect visitors or doesn't have the time for repairs. Eyeing the door in front of you to the north, you notice it is large and foreboding, made of solid oak with intricate carvings, a bit different from the unrepaired porch. A large brass knocker in the shape of a dragon's head holding a ring stares at you, daring you to grasp it. What looks like a frayed bell-pull dangles to one side.

Things you could put descriptions for here would be: Porch planks moss front door carvings brass knocker bell pull

There's nothing worse than typing: "examine <whatever>" only to be greeted with "You see no such thing." when it's clearly described in the description. Having said that, there's no need to try to describe everything in detail, you could easily say something like:

Although interesting, it's of no importance to you.

--4. USE ALIASES TO HELP CATCH THE PLAYER'S INPUT. In the above example, you would put aliases on some of the objects so the player doesn't have to try and find the exact wording. This is often known as 'Guess The Verb' or GTV for short. Here are those objects again, this time with aliases so the player has more of a chance to get the correct input: planks / boards /wooden floor brass knocker / knocker / dragon's head / ring / brass ring

186

frayed bell-pull / bell-pull / bell pull

So if the player inputs any of the following ...

>examine >examine >examine >examine >examine

brass knocker knocker dragon's head ring brass ring

...

he will receive a description about the door knocker. ---

5. MAKE THE PLAYER'S INPUT OBVIOUS. When the player has to do something, make what the player has to type in fairly obvious. For example, if the player needs to use the toilet have the input "use toilet" or "use lavatory". Don't have it so obscure that the player would never guess it, like "make a pitstop" or "take a leak". Again, this will eliminate most of the GTV and make your adventure more user friendly. --6. PUZZLES SHOULD HAVE A REASON. When creating a puzzle, ask yourself why it should be there and is the solution at all plausible? Your puzzles don't have to be set in reality but shouldn't make the player think "what the hell!?" It is plausible that a shaped amulet placed inside a shaped hole in a wall could open a secret passage. It is plausible that uttering magic words next to an old tree might bring it to life. It isn't plausible that the player should have to dance around on one leg with a wet fish in his ear just to unlock a door! "What the hell!?"

7. TEST YOUR GAME BEFORE IT'S UPLOADED. By David Whyld Make sure it can be finished. Make sure the player doesn't need to be psychic to figure out which command to use. (Yes, I'm thinking of the MAKE PITSTOP command here.) Make sure the player knows what the aim of the game is (unless, of course, it's an amnesia victim game).

187

8. LISTEN TO WHAT PEOPLE TELL YOU. By David Whyld If it's your first game, then listen to other people if they tell you something about your game is wrong. They might be wrong themselves, but maybe not. Do not take it personal, we'd all love to see you create a good game. --9. MAKE YOUR GAME SOUND INTERESTING. By David Whyld One recent game had an intro which went

WOW. I feel stupid. Dont download this its unbeatable. Ill fix it. Im such a retard. Sorry.
I took one look at that and decided to avoid the game afterwards. --10. DON'T UPLOAD YOUR TEST GAME. By David Whyld If you've just written a game to learn Adrift, only release it if it's a good game in its own right. The main site is getting overloaded with half-finished bugfests and there's no need to add to the problem. --11. AUDIO IN ADVENTURES. Pick your favourite game, any type of game, of any genre (Doom3? Warctaft III? Grand Theft Auto? Half-Life?), not justadventures, now turn down the sound and play it... it just doesn't play the same does it? So why should it be different withtext adventure games?

Eh? Aren't text adventures by their very nature just text?


Ordinarily yes, but ADRIFT allows you to add images and sound to your adventure, lifting it from a simple text adventure editor into a multimedia text adventure so why should your adventure be just text and not give something more to the player? The use of sound in an ADRIFT game is divided; on one hand it spoils your imagination when reading descriptions, you don't want some cheesy tune spoiling the atmosphere by constantly droning on plus it can lengthen the file size considerably which is not good news for those on dial-up; on the other, sound enhances the adventure by providing an atmospheric tune that plays on your

188

imagination, spot effects can also provide extra atmosphere. So what side am I on? The side of audio in adventures, spot effects but not tunes. Having a continuous tune throughout the adventure will spoil everything in my opinion, there's no sense of environment change; village, forest, mountain, caves, catacombs, all will have the same tune playing throughout and what type of tune should it be? happy?, spooky?, majestic?, climactic?, action, scifi? Creating spot effects, on the other hand, can really bring it to life, take the following location description:

You shelter from the torrential rain in the porch. It seems like this porch has been in disrepair for some time, rotten planks, boards missing, moss everywhere, whoever lives here obviously doesn't expect visitors or doesn't have the time for repairs. Eyeing the door in front of you the north, you notice it is large and foreboding, made of solid oak with intricate carvings, a bit different from the unrepaired porch. A large brass knocker in the shape of a dragon's head holding a ring stares at you, daring you to grasp it. What looks like a frayed bell-pull dangles to one side.

What spot effects do you think would fit here? Let's have a look: "You shelter from the torrential rain", the constant drone of rain with the occasional distant thunder; "A large brass knocker in the shape of a dragon's head holding a ring stares at you.." perhaps when the player uses the knocker you could have a few heavy, echoed thumps; "What looks like a frayed bell-pull dangles to one side.", the tinkly-clang if the bell-pull is pulled. As you can see, spot effects certainly do enhance a player's experience if used correctly and I would recommend them at least in one adventure just to see the difference. --12. MAKE SURE CHANGES TO THE ENVIRONMENT ARE REFLECTED IN YOUR DESCRIPTIONS. By phkb So, if you chop down a tree, make sure there is a stump and a fallen tree in the room description.

189

13. OBJECTS HAVE MORE THAN ONE USE. If you have an axe as a weapon... why can't it be used to chop down trees? If you have a bucket to hold water... why can't it be used as a makeshift helmet? Objects can have more than one use in an adventure game, be creative and people will enjoy your adventure more. --In 1993 Graham Nelson wrote the Player's Bill of Rights which is an excellent guideline for developers. The following (14-30) are from that guide. Thanks to Dejaduo for supplying. 14. NOT TO BE KILLED WITHOUT WARNING At its most basic level, this means that a room with three exits, two of which lead to instant death and the third to treasure, is unreasonable without some hint. Mention of which brings us to: --15. NOT TO BE GIVEN HORRIBLY UNCLEAR HINTS Many years ago, I played a game in which going north from a cave led to a lethal pit. The hint was: there was a pride of lions carved above the doorway. Good hints can be skilfully hidden, or very brief (I think, for example, the hint in the moving-rocks plain problem in "Spellbreaker" is a masterpiece) but should not need explaining even after the event. A more sophisticated version of (1) leads us to: --16. TO BE ABLE TO WIN WITHOUT EXPERIENCE OF PAST LIVES Suppose, for instance, there is a nuclear bomb buried under some anonymous floor somewhere, which must be disarmed. It is unreasonable to expect a player to dig up this floor purely because in previous games, the bomb blew up there. To take a more concrete example, in "The Lurking Horror" there is something which needs cooking for the right length of time. As far as I can tell, the only way to find out the right time is by trial and error. But you only get one trial per game. In principle a good player should be able to play the entire game out without doing anything illogical. In similar vein: --17. TO BE ABLE TO WIN WITHOUT KNOWLEDGE OF FUTURE EVENTS For example, the game opens near a shop. You have one coin and can buy a lamp, a magic carpet or a periscope. Five minutes later you are transported away without warning to a submarine, whereupon you need a periscope. If you bought the carpet, bad luck. ---

190

18. NOT TO HAVE THE GAME CLOSED OFF WITHOUT WARNING Closed off meaning that it would become impossible to proceed at some later date. If there is a papier-mache wall which you can walk through at the very beginning of the game, it is extremely annoying to find that a puzzle at the very end requires it to still be intact, because every one of your saved games will be useless. Similarly it is quite common to have a room which can only be visited once per game. If there are two different things to be accomplished there, this should be hinted at. --19. NOT TO NEED TO DO UNLIKELY THINGS For example, a game which depends on asking a policeman about something he could not reasonably know about. (Less extremely, the problem of the hacker's keys in "The Lurking Horror".) Another unlikely thing is waiting in uninteresting places. If you have a junction such that after five turns an elf turns up and gives you a magic ring, a player may well never spend five turns there and never solve what you intended to be straightforward. On the other hand, if you were to put something which demanded investigation in the junction, it might be fair enough. ("Zork III" is especially poor in this respect.) --20. NOT TO NEED TO DO BORING THINGS FOR THE SAKE OF IT In the bad old days many games would make life difficult by putting objects needed to solve a problem miles away from where the problem was, despite all logic - say, putting a boat in the middle of a desert. Or, for example, it might be fun to have a four-discs tower of Hanoi puzzle in a game. But not an eight-discs one. --21. NOT TO HAVE TO TYPE EXACTLY THE RIGHT VERB For instance, looking inside a box finds nothing, but searching it does. Or consider the following dialogue (amazingly, from "Sorcerer"):

>unlock journal (with the small key) No spell would help with that! >open journal (with the small key) The journal springs open.

191

This is so misleading as to constitute a bug. But it's an easy design fault to fall into. (Similarly, the wording needed to use the brick in Zork II strikes me as quite unfair. Or perhaps I missed something obvious.) --22. TO BE ALLOWED REASONABLE SYNONYMS In the same room in "Sorcerer" is a "woven wall hanging" which can instead be called "tapestry" (though not "curtain"). This is not a luxury, it's an essential. --23. TO HAVE A DECENT PARSER This goes without saying. At the very least it should provide for taking and dropping multiple objects. --24. TO HAVE REASONABLE FREEDOM OF ACTION Being locked up in a long sequence of prisons, with only brief escapes between them, is not all that entertaining. After a while the player begins to feel that the designer has tied him to a chair in order to shout the plot at him. --25. NOT TO DEPEND MUCH ON LUCK Small chance variations add to the fun, but only small ones. The thief in "Zork I" seems to me to be just about right in this respect, and similarly the spinning room in "Zork II". But a ten-ton weight which fell down and killed you at a certain point in half of all games is just annoying. --26. TO BE ABLE TO UNDERSTAND A PROBLEM ONCE IT IS SOLVED This may sound odd, but many problems are solved by accident or trial and error. A guard-post which can be passed only if you are carrying a spear, for instance, ought to have some indication that this is why you're allowed past. (The most extreme example must be the notorious Bank of Zork.) --27. NOT TO BE GIVEN TOO MANY RED HERRINGS A few red herrings make a game more interesting. A very nice feature of "Zork I", "II" and "III" is that they each contain red herrings explained in the others (in one case, explained in "Sorcerer").

192

But difficult puzzles tend to be solved last, and the main technique players use is to look at their maps and see what's left that they don't understand. This is frustrated when there are many insoluble puzzles and useless objects. So you can expect players to lose interest if you aren't careful. My personal view is that red herrings ought to have some clue provided (even only much later): for instance, if there is a useless coconut near the beginning, then perhaps much later an absent-minded botanist could be found who wandered about dropping them. The coconut should at least have some rationale. The very worst game I've played for red herrings is "Sorcerer", which by my reckoning has 10. --28. TO HAVE A GOOD REASON WHY SOMETHING IS IMPOSSIBLE Unless it's also funny, a very contrived reason why something is impossible just irritates. (The reason one can't walk on the grass in "Trinity" is only just funny enough, I think.) --29. NOT TO NEED TO BE AMERICAN TO UNDERSTAND HINTS The diamond maze in "Zork II" being a case in point. Similarly, it's polite to allow the player to type English or American spellings or idiom. For instance "Trinity" endears itself to English players in that the soccer ball can be called "football" - soccer is a word almost never used in England. --30. TO KNOW HOW THE GAME IS GETTING ON In other words, when the end is approaching, or how the plot is developing. Once upon a time, score was the only measure of this, but hopefully not any more.

193

You might also like