home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / games2 / trellis / Instructs / Part2 < prev    next >
Encoding:
Text File  |  1995-10-18  |  12.1 KB  |  283 lines

  1.  
  2.                         TRELLIS - The Adventure Interpreter
  3.                       (c) copyright 1991-4 Soft Rock Software
  4.  
  5.                             Putting It On The Computer
  6.                             --------------------------
  7.  
  8. With the map and initial notes drawn up, you can now start thinking about 
  9. transferring the information onto the computer. Trellis needs this data in
  10. the form of 5 text files, each of which contains a different part of the
  11. data:-
  12.  
  13.     Titles  - contains the game title and some brief instructions
  14.     Rooms   - contains information about each location
  15.     Words   - contains lists of words the player can enter as commands
  16.     Objects - contains information about each object
  17.     Script  - contains the main controlling program
  18.  
  19. These files can be created in !Edit or your favourite word processor 
  20. (provided it can save !Edit format files).
  21.  
  22. Before describing the format of these files, it is necessary to explain
  23. how to set Trellis up to use them.
  24.  
  25. Make a copy of your !Trellis application on another disk. Rename this copy
  26. as appropriate to the name of your game (eg !Wanderer). Open this
  27. application directory, and you will see the following:-
  28.  
  29.      files:       !Boot
  30.                   !Run
  31.                   Licence
  32.      directories: DataFiles
  33.                   Program
  34.  
  35. The files !Boot and !Run, and the directory Program should not be touched.
  36.  
  37. The directory DataFiles contains the files that you need to change/create
  38. in order to write your game. It contains the files described below, and a
  39. file called !Sprites.
  40.  
  41. The !Sprites file contains a sprite called !Trellis, and is displayed by
  42. RISC OS when the !Trellis application is seen in a filer window. Since you
  43. have renamed your copy of the application, it will no longer use this.
  44.  
  45. Load the !Sprites file into !Paint and rename the sprite !Trellis so that
  46. it has the same name as your application directory, and redesign it to 
  47. suit your game. Do the same with sm!Trellis - renaming it as appropriate.
  48.  
  49. Now we can look at the other files:-
  50.  
  51. In the main, the format of each of these files differs from the others. 
  52. However, there are certain similarities which can be explained as a whole 
  53. instead of repeating it with the description of each file.
  54.  
  55. First of all, what is meant by a line should be clarified: a line is all
  56. the text/data entered until the return key is pressed - which can be more
  57. than what you might see as a line on the screen. In practice, a line can
  58. be up to approximately 240 characters long. In an 80 column mode, such as
  59. modes 12 or  15, this is three 'screen' lines using the system font. So,
  60. wherever you see the word 'line' in  these instructions, you should
  61. remember that it can be anything up to roughly  240 characters or three
  62. screen lines.
  63.  
  64. If you are using a screen that is wider than 80 characters, using !Edit
  65. you can set the 'display width' to 80. The lines you type in must then be
  66. less than three lines in the edit window.
  67.  
  68. To confuse matters slightly, there is a case where a line must not be
  69. longer  than 40 characters in length. This will be referred to in these
  70. instructions  as a 'short line'.
  71.  
  72. Another thing that should be explained is what is meant by a 'blank line'. 
  73. This is a line on which you press the return key at the very start of the 
  74. line without typing in anything else - not even spaces.
  75.  
  76. All of the Trellis files start off in the same way. You may type in a
  77. number of lines of text that will be ignored. These initial 'comment'
  78. lines can be  used to put a title and copyright message at the start of
  79. the files, or  whatever information you choose. The end of these comments
  80. is marked by a  blank line. After the blank line comes the data that is
  81. needed by Trellis.
  82.  
  83. Note: if you prefer not to put any comments at the start of your data
  84. files, you must still include the blank line as Trellis seeks this out as
  85. a marker for the start of the data.
  86.  
  87. --The Titles File--
  88.  
  89. This is the simplest file needed by Trellis. It contains some basic
  90. information about the game that is displayed on the title screen. After
  91. the  comment lines and blank line (as mentioned above), the file must
  92. contain the  following, each on a separate short line:-
  93.  
  94. The title of the game, eg Dark Mountain
  95. The name of the author, eg Vince M Hudd
  96. The year the game was written, eg 1994
  97. The name of the company that owns the copyright, eg Soft Rock Software
  98.  
  99. The next six short lines should contain brief instructions about the game,
  100. or some other comment that you wish to make. If you do not want to include
  101. anything on any or all of these lines you must include blank lines instead
  102. since Trellis expects all six lines to be present.
  103.  
  104. --The Words File--
  105.  
  106. This file contains lists of words & alternatives that the player can use
  107. when playing your game. After the initial comment lines and blank line
  108. (mentioned  above) you must put a number; the number of lines of words
  109. that follow. After this come the actual word lists.
  110.  
  111. Each line in the file consists of a series of words, separated by commas,
  112. that mean the same thing and is called a word list. Note: The last word on
  113. the line must have a comma following it as well. For example:-
  114.  
  115. FIGHT,ATTACK,KILL,
  116.  
  117. The first word in each list (the first word on each line) is called a
  118. keyword. This is the word you must use in your TScript program whenever
  119. you  want to refer to that list - eg to see if the player has entered a
  120. word. If the word list represents an object, for example:-
  121.  
  122. SWORD,WEAPON,
  123.  
  124. then the keyword must also be used in the objects file as part of the
  125. definition for that object. This will be explained as part of the Object
  126. file  instructions.
  127.  
  128. Additionally, there are a number of words and alternatives already defined 
  129. within Trellis that, therefore, DO NOT have to be included in your Words
  130. file.  These are:-
  131.  
  132. NORTH,
  133. EAST,
  134. SOUTH,
  135. WEST,
  136. UP,
  137. DOWN,
  138. GET,TAKE,GRAB,LIFT,PICK,STEAL,PINCH,
  139. DROP,LEAVE,ABANDON,
  140. INV,
  141. EXAMINE,STUDY,CHECK,DESCRIBE,
  142. LOOK,SEARCH,
  143. QUIT,END,FINISH,TERMINATE,STOP,
  144. HELP,SUPPORT,AID,
  145.  
  146. Although these words are not part of the Words file, you may treat them as
  147. if they are. In other words, the first word on each of the above lines is
  148. a keyword which can be used by you in your TScript files.
  149.  
  150. --The Objects File--
  151.  
  152. This file is used to tell the software what objects there are in the game, 
  153. and other information it needs to know about them. After the initial
  154. comment lines and blank lines the definitions start. The first line after
  155. the blank  line must be a number, this tells Trellis how many objects
  156. there are.
  157.  
  158. Following this are the definitions for each object. For each object there 
  159. will be 6 lines, as follows:-
  160.  
  161. Line 1 - ignored. This can be a comment, or can be left blank, or
  162. whatever. My own preference is to use a line of asterisks (*), broken up
  163. in the center by the number of the object. Eg:-
  164.  
  165. ******************************* 1 *********************************
  166.  
  167. Note: this number is not used, as such, by the software and is not part of 
  168. the definition. I use it only for my own reference.
  169.  
  170. Line 2 - the keyword. This is a word that is used to refer to this object
  171. in the script file, in respect of the player's commands. It is also used,
  172. if there are alternatives that the player can type in, as the first word
  173. on a line in the words file. For example, if the object is a sword this
  174. would appear in the objects file:-
  175.  
  176. SWORD
  177.  
  178. (and the line in the words file, therefore, might be SWORD,WEAPON,)
  179.  
  180. Line 3 - the definition. This is a short description of the object,
  181. usually  two words. For example:-
  182.  
  183. a sword
  184.  
  185. When the software tells the player what he/she can see, it is this
  186. description that is displayed on screen.
  187.  
  188. Line 4 - the room number. This is a number that tells Trellis what room
  189. the object is in at the start of the game. If you don't want the object to
  190. start off in a room (perhaps the object may magically appear at the
  191. appropriate time) you can set this to -1.
  192.  
  193. Note: if an object is in room 0 it is being carried by the player.
  194.  
  195. Line 5 - the weight. This tells Trellis how heavy the object is. The
  196. player can be given a weight limit, and the total weights of all the
  197. objects he/she carries can't exceed this. If you don't want to use a
  198. weight limit simply set all the object weights to zero. If there is
  199. something in the game that, although the player can't pick up, may be
  200. usefully treated as an object for the purposes of examining it, etc., then
  201. give it a weight higher than the weight limit. This technique has been
  202. employed in the game !Pyramid, wherein a statue and a pedestal are objects
  203. that the player can't carry. 
  204.  
  205. Line 6 - the description. This line will be displayed by Trellis whenever
  206. the player wants to examine the object. It enables a more detailed
  207. description of the object than the one on line 2, and may include clues
  208. about what the object may be used for. It could even include an
  209. advertisement for another game!
  210.  
  211. --The Rooms File--
  212.  
  213. The rooms file contains descriptions of each location in the game and 
  214. information that tells Trellis how the player can move between them. As
  215. with the other files, it starts off with the comments and blank line.
  216. After this comes a number (the number of rooms), then the actual data.
  217. Each room's definition has three lines:-
  218.  
  219. Line 1 - ignored. This line can be used for comments, left blank, or 
  220. whatever. Similarly to the objects file, my own preference is to use it
  221. for  numbering the rooms via a line of asterisks and a number. For
  222. example:-
  223.  
  224. *************************** 1 *****************************
  225.  
  226. Line 2 - description. This line contains the text that is displayed for
  227. the location. For example:-
  228.  
  229. You are on a high cliff-side path. It is cold here, and the strong wind
  230. makes it difficult to maintain your balance.
  231.  
  232. You may find, if you are making your descriptions very detailed, that the 
  233. line limit of 240 characters is not enough. It is possible, however, to add
  234. more to the description via the script file. This will be explained at the
  235. appropriate point in these instructions.
  236.  
  237. Line 3 - Light Flag & Exits. This line tells Trellis if the room is light
  238. or dark, and what (automatic) exits there are. All the different items on
  239. this line should be separated by commas.
  240.  
  241. If the room is light the first character on this line must be L. If it is 
  242. dark the L can be left out. What this actually tells Trellis is the 
  243. conditions under which the location's description can be shown on screen.
  244. If the L is present (ie. the room is light) the description will always be
  245. shown. However, if no L is present (the room is dark) the description will
  246. only be  shown if the player is carrying a light source (such as a torch),
  247. otherwise the software will show the message 'It is dark.'
  248.  
  249. In order to tell Trellis that the player is carrying a light source the 
  250. contents of a store must be set accordingly. This will be detailed in the 
  251. section on stores.
  252.  
  253. The exits are detailed by including the first letter of the direction 
  254. followed by the number of the room the direction leads to. This may seem a 
  255. little unclear, so to use an example:-
  256.  
  257. L,N14,S15,W16
  258.  
  259. If this is part of the definition for room 13, it says that the room is 
  260. light (L), moving North leads to room 14 (N14), moving South leads to room
  261. 15 (S15) and moving West to room 16 (W16). There is no E, U, or D so the
  262. player can't go East, Up or Down - unless you allow him/her to do so via a
  263. section of the script file. This is dealt with later in the section on
  264. puzzles. 
  265.  
  266. --The Script File--
  267.  
  268. This file contains a program (or script) that Trellis must follow in order
  269. to run your adventure game. Depending on what is needed for your game, the 
  270. script file can be as simple or as complicated as you like.
  271.  
  272. The basic format of the file starts off as with the others, with the
  273. comments and blank line. After the blank line are the commands. Each
  274. command should be on a separate line. Leading spaces are ignored, so you
  275. can easily indent sections of the script. Blank lines are also ignored.
  276.  
  277. The language that Trellis recognises is called TScript, and is currently
  278. in version 2 (though this version number can be ignored - it is the
  279. Trellis version number that is important This is found on the loading
  280. screen). Part 4 of these instructions describes the commands available
  281. with TScript. Before that, however, the subject of stores in Trellis needs
  282. to be explained. This is dealt with in the next part.
  283.