home *** CD-ROM | disk | FTP | other *** search
-
- TRELLIS - The Adventure Interpreter
- (c) copyright 1991-9 Soft Rock Software
-
- Putting It On The Computer
- --------------------------
-
- With the map and initial notes drawn up, you can now start thinking about
- transferring the information onto the computer. Trellis needs this data in the
- form of 5 text files, each of which contains a different part of the data:-
-
- Rooms - contains information about each location
- Words - contains lists of words the player can enter as commands
- Objects - contains information about each object
- Script - contains the main controlling program
- Title - contains the application name for the game - eg !Castle
-
- These files can be created in !Edit or your favourite word processor (provided
- it can save !Edit format files).
-
- Before describing the format of these files, it is necessary to explain how to
- set Trellis up to use them. Create a new dirstory for all these file. As
- you create the five files mentioned above, each must be saved in the
- NewGame directory.
-
- If you are going to include graphics in your game, make a subdirectory in
- 'NewGame' called 'Graphics' this contains the graphics files that your game
- will display when being played. These are dealt with later.
-
- If you are running from floppy disk, you are advised to not use graphics, or if
- you must, use as few as possible. If you want to write a text only game, do not
- create the graphics subdirectory. Trellis will recognise that it isn't there,
- and the game will run quite happily in text only mode.
-
- You should also create a file called !Sprites with suitably named sprites (eg
- !Wanderer and sm!Wanderer). This should also be saved in the NewGame directory.
- (See your computers manuals for details about 'Application' sprites.)
-
- Now we can look at the files named above:-
-
- In the main, the format of each of these files differs from the others.
- However, there are certain similarities which can be explained as a whole
- instead of repeating it with the description of each file.
-
- First of all, what is meant by a line should be clarified: a line is all
- the text/data entered until the return key is pressed - which can be more
- than what you might see as a line on the screen. In practice, a line can
- be up to approximately 240 characters long. In an 80 column mode, such as
- modes 12 or 15, this is three 'screen' lines using the system font. So,
- wherever you see the word 'line' in these instructions, you should
- remember that it can be anything up to roughly 240 characters or three
- screen lines.
-
- If you are using a screen that is wider than 80 characters, using !Edit
- you can set the 'display width' to 80. The lines you type in must then be
- less than three lines in the edit window. Use the !Edit->Display->Work
- Area menu.
-
- Another thing that should be explained is what is meant by a 'blank line'.
- This is a line on which you press the return key at the very start of the
- line without typing in anything else - not even spaces.
-
- All of the Trellis files start off in the same way. You may type in a
- number of lines of text that will be ignored. These initial 'comment'
- lines can be used to put a title and copyright message at the start of
- the files, or whatever information you choose. The end of these comments
- is marked by a blank line. After the blank line comes the data that is
- needed by Trellis.
-
- Note: if you prefer not to put any comments at the start of your data
- files, you must still include the blank line as Trellis seeks this out as
- a marker for the start of the data.
-
- --The Words File--
-
- This file contains lists of words & alternatives that the player can use
- when playing your game. After the initial comment lines and blank line
- (mentioned above) you must put a number; the number of lines of words
- that follow. After this come the actual word lists.
-
- Each line in the file consists of a series of words, separated by commas,
- that mean the same thing and is called a word list. Note: The last word on
- the line must have a comma following it as well. For example:-
-
- FIGHT,ATTACK,KILL,
-
- The first word in each list (the first word on each line) is called a
- keyword - 'FIGHT' in the above example. This is the word you must use in your
- TScript program whenever you want to refer to that list - eg to see if the
- player has entered a word. If the word list represents an object, for example:-
-
- SWORD,WEAPON,
-
- then the keyword must also be used in the objects file as part of the
- definition for that object. This will be explained as part of the Object
- file instructions.
-
- Additionally, there are a number of words and alternatives already defined
- within Trellis that, therefore, DO NOT have to be included in your Words
- file. These are:-
-
- NORTH,
- EAST,
- SOUTH,
- WEST,
- UP,
- DOWN,
- GET,TAKE,GRAB,LIFT,PICK,STEAL,PINCH,
- DROP,LEAVE,ABANDON,
- INV,
- EXAMINE,STUDY,CHECK,DESCRIBE,
- LOOK,SEARCH,
- QUIT,END,FINISH,TERMINATE,STOP,
- HELP,SUPPORT,AID,
-
- Although these words are not part of the Words file, you may treat them as
- if they are. In other words, the first word on each of the above lines is
- a keyword which can be used by you in your TScript files.
-
- --The Objects File--
-
- This file is used to tell the software what objects there are in the game,
- and other information it needs to know about them. After the initial
- comment lines and blank lines the definitions start. The first line after
- the blank line must be a number, this tells Trellis how many objects
- there are.
-
- Following this are the definitions for each object. For each object there
- will be 6 lines, as follows:-
-
- Line 1 - ignored. This can be a comment, or can be left blank, or
- whatever. My own preference is to use a line of asterisks (*), broken up
- in the center by the number of the object. Eg:-
-
- ******************************* 1 *********************************
-
- Note: this number is not used, as such, by the software and is not part of
- the definition. I use it only for my own reference.
-
- Line 2 - the keyword. This is a word that is used to refer to this object
- in the script file, in respect of the player's commands. It is also used,
- if there are alternatives that the player can type in, as the first word
- on a line in the words file. For example, if the object is a sword this
- would appear in the objects file:-
-
- SWORD
-
- (and the line in the words file, therefore, might be SWORD,WEAPON,)
-
- Line 3 - the definition. This is a short description of the object,
- usually two words. For example:-
-
- a sword
-
- When the software tells the player what he/she can see, it is this
- description that is displayed on screen.
-
- Line 4 - the room number. This is a number that tells Trellis what room
- the object is in at the start of the game. If you don't want the object to
- start off in a room (perhaps the object may magically appear at the
- appropriate time) you can set this to -1.
-
- Note: if an object is in room 0 it is being carried by the player.
-
- Line 5 - the weight. This tells Trellis how heavy the object is. The
- player can be given a weight limit, and the total weights of all the
- objects he/she carries can't exceed this. If you don't want to use a
- weight limit simply set all the object weights to zero. If there is
- something in the game that, although the player can't pick up, may be
- usefully treated as an object for the purposes of examining it, etc., then
- give it a weight higher than the weight limit. This technique has been
- employed in the game !Pyramid, wherein a statue and a pedestal are objects
- that the player can't carry.
-
- Line 6 - the description. This line will be displayed by Trellis whenever
- the player wants to examine the object. It enables a more detailed
- description of the object than the one on line 2, and may include clues
- about what the object may be used for. It could even include an
- advertisement for another game!
-
- --The Rooms File--
-
- The rooms file contains descriptions of each location in the game and
- information that tells Trellis how the player can move between them. As
- with the other files, it starts off with the comments and blank line.
- After this comes a number (the number of rooms), then the actual data.
- Each room's definition has four lines:-
-
- Line 1 - ignored. This line can be used for comments, left blank, or
- whatever. Similarly to the objects file, my own preference is to use it
- for numbering the rooms via a line of asterisks and a number. For
- example:-
-
- *************************** 1 *****************************
-
- Line 2 - description. This line contains the text that is displayed for
- the location. For example:-
-
- You are on a high cliff-side path. It is cold here, and the strong wind
- makes it difficult to maintain your balance.
-
- You may find, if you are making your descriptions very detailed, that the
- line limit of 240 characters is not enough. It is possible, however, to add
- more to the description via the script file. This will be explained at the
- appropriate point in these instructions.
-
- Line 3 - the name of the graphics file to be displayed for this room. The
- graphics files are described in more detail later on. If you have elected
- to make your game text only, by excluding the graphics subdirectory, this
- line must still be present, even if there is nothing on it.
-
- Line 4 - Light Flag & Exits. This line tells Trellis if the room is light
- or dark, and what (automatic) exits there are. All the different items on
- this line should be separated by commas.
-
- If the room is light the first character on this line must be L. If it is
- dark the L can be left out. What this actually tells Trellis is the
- conditions under which the location's description can be shown on screen.
- If the L is present (ie. the room is light) the description will always be
- shown. However, if no L is present (the room is dark) the description will
- only be shown if the player is carrying a light source (such as a torch),
- otherwise the software will show the message 'It is too dark to see.'
-
- In order to tell Trellis that the player is carrying a light source the
- contents of a store must be set accordingly. This will be detailed in the
- section on stores.
-
- The exits are detailed by including the first letter of the direction
- followed by the number of the room the direction leads to. This may seem a
- little unclear, so to use an example:-
-
- L,N14,S15,W16
-
- If this is part of the definition for room 13, it says that the room is
- light (L), moving North leads to room 14 (N14), moving South leads to room
- 15 (S15) and moving West to room 16 (W16). There is no E, U, or D so the
- player can't go East, Up or Down - unless you allow him/her to do so via a
- section of the script file. This is dealt with later in the section on
- puzzles.
-
- --The Script File--
-
- This file contains a program (or script) that Trellis must follow in order
- to run your adventure game. Depending on what is needed for your game, the
- script file can be as simple or as complicated as you like.
-
- The basic format of the file starts off as with the others, with the
- comments and blank line. After the blank line are the commands. Each
- command should be on a separate line. Leading spaces are ignored, so you
- can easily indent sections of the script. Blank lines are also ignored.
-
- The language that Trellis recognises is called TScript, and is currently
- in version 2 (though this version number can be ignored if you ensure your
- script follows the instructions for this version of Trellis, since Trellis puts
- an interpreter in the game. Part 4 of these instructions describes the commands
- available with TScript. Before that, however, the subject of stores in Trellis
- needs to be explained. This is dealt with in the next part.
-
- --The Title File--
-
- This line simply contains the name of the game that will appear in filer
- windows - ie the application name. Simply type in a name, such as !Castle,
- and press <Return>. If no Title file is present then !Trellis will use
- the same name as the name of the source directory with a '!' character
- added at the start. For example, if the source files had all been in a
- directory named 'Wanderer' and there was no Title file then Trellis
- would call the completed adventure !Wanderer.
-