home *** CD-ROM | disk | FTP | other *** search
-
- TRELLIS - The Adventure Interpreter
- (c) copyright 1991-4 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:-
-
- Titles - contains the game title and some brief instructions
- 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
-
- 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.
-
- Make a copy of your !Trellis application on another disk. Rename this copy
- as appropriate to the name of your game (eg !Wanderer). Open this
- application directory, and you will see the following:-
-
- files: !Boot
- !Run
- Licence
- directories: DataFiles
- Program
-
- The files !Boot and !Run, and the directory Program should not be touched.
-
- The directory DataFiles contains the files that you need to change/create
- in order to write your game. It contains the files described below, and a
- file called !Sprites.
-
- The !Sprites file contains a sprite called !Trellis, and is displayed by
- RISC OS when the !Trellis application is seen in a filer window. Since you
- have renamed your copy of the application, it will no longer use this.
-
- Load the !Sprites file into !Paint and rename the sprite !Trellis so that
- it has the same name as your application directory, and redesign it to
- suit your game. Do the same with sm!Trellis - renaming it as appropriate.
-
- Now we can look at the other files:-
-
- 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.
-
- To confuse matters slightly, there is a case where a line must not be
- longer than 40 characters in length. This will be referred to in these
- instructions as a 'short line'.
-
- 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 Titles File--
-
- This is the simplest file needed by Trellis. It contains some basic
- information about the game that is displayed on the title screen. After
- the comment lines and blank line (as mentioned above), the file must
- contain the following, each on a separate short line:-
-
- The title of the game, eg Dark Mountain
- The name of the author, eg Vince M Hudd
- The year the game was written, eg 1994
- The name of the company that owns the copyright, eg Soft Rock Software
-
- The next six short lines should contain brief instructions about the game,
- or some other comment that you wish to make. If you do not want to include
- anything on any or all of these lines you must include blank lines instead
- since Trellis expects all six lines to be present.
-
- --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. 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 three 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 - 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 dark.'
-
- 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 - it is the
- Trellis version number that is important This is found on the loading
- screen). 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.
-