home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Tools / GRAC / Docs / reference.doc < prev    next >
Text File  |  1977-12-31  |  24KB  |  621 lines

  1.  
  2.                              GRAC Reference
  3.                              --------------
  4.  
  5. This file is a guide to using the GRAC editor. The information is arranged
  6. by menus and kept brief. For more in-depth explanations see 
  7. 'Introduction to GRAC'.
  8.  
  9. Starting up
  10. -----------
  11.  
  12.    Run the program by double-clicking on the icon. Multi-tasking with
  13. other programs is possible; flip to workbench by pressing Left Amiga-G. Of
  14. course, you can multi-task with this file as an alternative to printing it
  15. out.
  16.  
  17. The Main Menu
  18. -------------
  19.  
  20. Characters
  21. ----------
  22.  
  23.    Create and edit characters with this section of the program. If you 
  24. have not previously created characters you will be prompted for a name, then
  25. a device. Otherwise you can select a character from a requester. Then the 
  26. character editing screen appears.
  27.  
  28.    EXIT and SAVE are self-explanatory. NAME is for changing the 
  29. characters name, and PATH changes the path of the saved file. COLOUR is for
  30. setting the colour of the text that appears when the character speaks.
  31. DELETE removes the character file.
  32.  
  33.    Below the top menu is a slider for moving through the animation 
  34. frames; there are 100 of them. You will note that the first 48 are used for
  35. preset actions such as walking, reaching or talking. For details on 
  36. producing these animation frames see 'Introduction to GRAC'.
  37.  
  38.    All graphics are grabbed from Iff files. To grab an image, first
  39. load a picture using LOAD PIC, then click on GRAB. Draw a box around the
  40. image; be sure not to grab a box any larger than you need because this
  41. wastes memory. A mouse click is then required to set the hot-spot, which is
  42. like the handle in Dpaint; it is the point GRAC uses to position the
  43. character. This should usually be below the character's feet. A right click
  44. sets the hot spot to roughly the bottom centre.
  45.  
  46.    The arrows scroll the image around the window. HOT-SPOT allows the
  47. hot-spot to be repositioned.
  48.  
  49.    LOAD is a little needed but useful function used to load characters from
  50. other games, which saves grabbing every frame again.
  51.  
  52. Objects
  53. -------
  54.  
  55.    In most respects this is identical to the character editor. There is now
  56. a button labelled CHARACTERS which operates as follows:
  57.  
  58.    Each object bank can have five associated characters. When a room loads
  59. an object bank it also loads these characters. Choosing these characters
  60. uses TWO requesters which could be a little confusing so read the
  61. explanation carefully.
  62.  
  63.    The 'Choose a character' requester is for choosing from the list of
  64. characters already associated with the objects. You may choose to replace a
  65. character or add a new one.
  66.  
  67.    The 'Choose new character' requester is a choice from all available
  68. characters for addition to the list. If you don't want to add a character,
  69. select 'no character'.
  70.  
  71.    The titles 'mouse' and 'mouse wait' are only relevant if this object bank
  72. is to be used for the control panel, in which case these objects will be
  73. used as the mouse. The mouse pointer is drawn using colours 17, 18 and 19 in
  74. the room palette, and should be grabbed from a 4 colour screen. It can be no
  75. more than 16 pixels across. How do you have colours 17, 18 and 19 in a four
  76. colour palette? Well, colour 1 on the four colour screen will become colour
  77. 17 when the mouse is displayed over a 32 colour screen, colour 2 becomes 18
  78. and so on. (nb. colours are labelled 0 to 31. In Dpaint 3, colour 17 is in
  79. the third column, second colour down.)
  80.  
  81. Rooms
  82. -----
  83.  
  84.    It is necessary to design the room and create a picture, objects and a
  85. control panel before using this section, so if necessary skip this part and
  86. return when you are ready.
  87.  
  88.    If you are creating a new room, you will be prompted for a name, picture,
  89. objects and path. Otherwise everything is loaded automatically.
  90.  
  91.    I think that the functions of the top row of buttons are entirely
  92. obvious, so I will begin with WALK.
  93.    I should mention here that the menus can be dragged using the mouse, and
  94. the main screen is scrolled using the arrow keys.
  95.  
  96. WALK (Submenu):
  97.  
  98.    Clicking on WALK brings up a submenu. This is for editing walk zones
  99. which define the areas on the screen where characters can walk. Use ADD to
  100. create a new zone. The zone is drawn as a rectangle using the mouse. You
  101. should cover the entire floor area in this way. Any zones which are
  102. touching should normally be JOINED, which lets GRAC know that characters can
  103. walk from one zone into the other. Join two zones by clicking on JOIN, then
  104. the two zones.
  105.    GRAC uses an automatic route finder to direct characters between zones,
  106. but you should give it as much help as you can by:
  107.  
  108.    1. Using the smallest number of zones possible. The more zones, the
  109.       slower the route finding will be.
  110.  
  111.    2. If there is more than one route from on zone to another, make sure
  112.       that the shortest one goes through the least number of zones. GRAC's
  113.       definition of the shortest route is to go through the fewest number of
  114.       zones. For example, don't have zones like this:
  115.  
  116.             ------------------------------
  117.             |            1            *  |
  118.             ------------------------------
  119.             | 2  |                 | 3   |
  120.             |    |                 |     |
  121.             ------------------------------
  122.             |            4            #  |
  123.             ------------------------------
  124.  
  125.       If a character had to go from * to #, they would walk all the way
  126.       around, through zone 2, which would look very odd. Instead, use:
  127.  
  128.             ------------------------------
  129.             |     1        |      2      |
  130.             ------------------------------
  131.             | 3  |                 | 4   |
  132.             |    |                 |     |
  133.             ------------------------------
  134.             |     5        |      6      |
  135.             ------------------------------
  136.  
  137.       This way, a path from 2 to 6 will go through zone 4.
  138.  
  139.    You may want an event to occur when the player's character steps into a
  140. zone, such as a new screen loading. This is achieved by assigning a script
  141. to the walk zone. Click on SCRIPT, then on the zone. For details on using
  142. scripts see the section at the end of this file.
  143.  
  144.    FLAG assigns a flag to a zone in a similar way to SCRIPT. Flags are also
  145. detailed at the end of the file. The walk zone will be deactivated if the
  146. flag is FALSE.
  147.  
  148.    DELETE removes a zone.
  149.  
  150.    HEIGHT is for creating walkways, bridges and staircases which are not
  151. flat on the floor but are three dimensional. The operation is as follows:
  152.  
  153.    Click on HEIGHT, then on each of the zones that make up the bridge,
  154. walkway or whatever. When selected the zones are highlighted. Click the
  155. right mouse button to end selection. Set the height with two click and drag
  156. actions.
  157.  
  158. (technical note: HEIGHT is all about object priority. This is normally
  159. dependent on Y position, but HEIGHT allows the character to appear
  160. sometimes in front of and sometimes behind an object, depending on which
  161. zone the character is in. The click and drag actions should be from the
  162. lowest point of the selected zones to the point on the floor directly
  163. underneath, then from the highest point to the point on the floor underneath
  164. that. Height also affects character scaling.)
  165.  
  166. Startup:
  167.  
  168.    This is for editing the script which runs every time the room is loaded.
  169. The script is executed before the screen fades in.
  170.  
  171. Background (Submenu):
  172.  
  173.    Background objects (as opposed to foreground objects) are used whenever
  174.  
  175.    i) The  object will never need to appear in front of a character,
  176.  
  177.    ii) the object does not need to move or perform cyclic animations, and
  178.  
  179.    iii) the object cannot be picked up.
  180.  
  181.    You should use background objects whenever you can because they consume
  182. less memory and processor time than foreground objects, although they are
  183. less versatile.
  184.  
  185.    You can create a new background object by selecting ADD. Draw the object
  186. as a rectangle using the mouse. At this stage the object will not appear
  187. during the game as it has no name. You can give the object a name using the
  188. NAME button. Click on the object then type in a name.
  189.  
  190.    Actions is used for assigning scripts to the object. Every verb can have
  191. a separate script, which is executed whenever the player selects that verb
  192. and the object. Objects are selected by name, so give a name to the object
  193. first.
  194.  
  195.    FLAG assigns a flag to the object. The object will be deactivated if the
  196. flag is FALSE.
  197.  
  198.    DELETE removes the object.
  199.  
  200.    POSITION sets a point which is used when an image is pasted onto the
  201. object. You are given the option to select an image to act as a reference.
  202. However, the image is not actually pasted until specified in a script.
  203.  
  204.    BASE sets another point. Do not confuse this with POSITION; BASE sets the
  205. point on the ground which the character walks to when using the object. The
  206. first mouse click sets the point, and the second which zone the point is in.
  207. (Important if two or more zones are overlapping.) Then choose the direction
  208. which the character should face, and the objects height, which is used when
  209. a character reaches for the object.
  210.  
  211.    Use STRING to edit a string which is used when the object is examined.
  212.  
  213.    ZONE allows you to change the rectangle surrounding an object.
  214.  
  215. Foreground objects (Submenu):
  216.  
  217.    Most of the buttons in this menu are identical in function to their
  218. equivalents in the background menu, so refer to that where necessary.
  219.    If objects cannot be selected by name, the requester operates using two
  220. buttons, NEXT and PREVIOUS. The selected object flashes on an off. Because
  221. of this it is not a good idea to have an object identical to the picture
  222. underneath it, as the flashing will not be visible.
  223.  
  224.    ADD is used to create a new object. Choose an image, then position it.
  225.  
  226.    IMAGE changes the image used by an object.
  227.  
  228.    HIDE removes all objects from view, so that you can see behind them.
  229. Select HIDE again to make them visible.
  230.  
  231.    TAKE is used to choose an item from the inventory which the object will
  232. become when it is picked up.
  233.  
  234. Points (Sub menu):
  235.  
  236.    A point is a position on screen, combined with a zone and direction.
  237. Some script commands refer to points as positions  for characters to walk to
  238. or stand.
  239.  
  240.    Create a new point with ADD. You need to set the position with the mouse,
  241. the walk zone that the position is in, then the direction.
  242.  
  243.    IDENTIFY tells you the number of a point. This is needed because if a
  244. script uses the LOADROOM command, it refers to a point in a different room,
  245. so it is impossible to select it with the mouse.
  246.  
  247.    DELETE removes a point.
  248.  
  249. Picture:
  250.  
  251.    This option changes the picture used by the room.
  252.  
  253. Returning to the main menu,
  254.  
  255. Picture
  256. -------
  257.  
  258.    All backgrounds, the control panel, and palettes originate from iff
  259. files. They are then compressed and saved by GRAC as picture files.
  260.    First select a picture from the requester, or choose 'new picture'. If
  261. this is a new picture, select an iff file, then the path for the saved
  262. picture.
  263.  
  264.    A menu then appears from which you can save or delete the picture,
  265. rename it, change the path or load a new picture. The SIZE button allows you
  266. to change the height of the picture. The portion of the screen below the
  267. point where you click is deleted. This is only needed because of the way
  268. Dpaint saves pictures.
  269.  
  270. Sound
  271. -----
  272.  
  273.    Sound includes music and samples. If you have not previously loaded a
  274. music file, a requester will appear asking you to choose a soundtracker or
  275. med module. Select one, or cancel, then choose the path. Because you are
  276. only allowed one module, it is best to make it a multimodule, containing
  277. several tunes. Music is played within GRAC via script commands.
  278.  
  279.    The buttons' functions are straightforward. SAMPLES allows you to load a
  280. raw sample from disk, or choose one which has already been loaded.
  281.  
  282. samples (submenu): A row of buttons which you should be able to work out.
  283.  
  284. Start
  285. -----
  286.  
  287.    When the game begins, the player's character will be standing at a certain 
  288. point in a certain room. Use this button to set the room, character and 
  289. point.
  290.  
  291. Fonts
  292. -----
  293.  
  294.    This button is used to set the fonts to be used by the game. You need to
  295. enter the name and size of the fonts for text and speech.
  296.  
  297. Animation
  298. ---------
  299.  
  300.    This is for loading iff animations (the type used by Dpaint). The 
  301. functions are easy enough to work out. Animations are played from within
  302. scripts, using the 'play anim' command.
  303.  
  304. Text
  305. ----
  306.  
  307.    This is for editing the text strings which are used in the adventure.
  308. Select a string, or choose 'new string', then enter the text.
  309.    The '@' character is used to indicate a new line when the text is
  310. printed. Word-wrapping is automatic, also the text is split up into
  311. sentences when spoken.
  312.  
  313.    In GRAC version 1, these were the only text strings there were. Now there
  314. are the 'main' strings which can be used anywhere in the game, and the
  315. 'room' strings which can only be used in one room. Using this button you
  316. can edit the 'main' strings. When editing strings from within a room, 
  317. the text selector will have a MAIN button which allows you to access the
  318. 'main strings'. Usually there will be no need to.
  319.  
  320. Controls
  321. --------
  322.  
  323.    The basic control panel is just a picture. It will need to be smaller
  324. than a full screen so if you are using Dpaint, save it as a brush.
  325.    The graphics for depressed buttons, and also the mouse pointer come from
  326. an object bank, which you need to create first.
  327.  
  328.    When creating the control panel you will need to choose a picture, object
  329. bank and path. The edit controls menu then appears.
  330.  
  331.    In the top row of buttons the only one which may need explaining is SIZE.
  332. This is used to set the size of the graphics screen, first the width, then
  333. the height, both in pixels. The default is 320*170.
  334.  
  335. Verbs (Submenu):
  336.  
  337.    Verbs are needed to allow the player to interact with the game world. A
  338. typical verb is examine, which, if selected, would print a text string
  339. describing an object. A GRAC game can have up to ten verbs.
  340.  
  341.    To add a new verb, select ADD. Type in the name, draw the button as a
  342. rectangle, select images for 'down' and 'up' and finally position the image.
  343.  
  344.    NAME allows you to change the name of a verb.
  345.  
  346.    SCRIPT is for editing the script which is executed whenever the verb is
  347. used. Typical scripts are as follows:
  348.  
  349.    For 'examine':
  350.  
  351.    go             pc                      walk up to the object. -1
  352.                                           indicates the player's character.
  353.  
  354.    wait stop      0                       wait for the player's character to
  355.                                           stop.
  356.  
  357.    print          string                  print the text string assigned to
  358.                                           the object.
  359.  
  360.    For 'take':
  361.  
  362.    go             pc
  363.  
  364.    wait stop      0
  365.  
  366.    take           pc,object               take the object if possible.
  367.  
  368.  
  369.    Most other verbs:
  370.  
  371.    go             pc
  372.  
  373.    wait stop      0
  374.  
  375.    execute                                execute the appropriate script.
  376.  
  377.  
  378.    BUTTON is for changing a button. the procedure is the same as when adding
  379. a verb.
  380.  
  381.    TYPE sets the kind of objects that can be used with the verb.
  382.  
  383.       ANY means that the verb can be used on anything (eg. examine)
  384.       INV means that the verb can only be used on the inventory (eg. use)
  385.       ROOM means that the verb can only be used on items not in the
  386.       inventory (eg. take)
  387.  
  388.       The next three types are for verbs involving two objects. The
  389.       first object must be from the inventory. These types also need a
  390.       connecting word, such as 'with'.
  391.  
  392.       Finally, type QUICK means that no object is required, the verb will
  393.       take effect as soon as the player clicks on the button.
  394.  
  395.    The remaining button, STRING is for editing the default string which is
  396. printed if the verb fails, such as trying to take an object which is too
  397. heavy.
  398.  
  399. Message:
  400.  
  401.    A single mouse click is required to set the position at which messages
  402. are printed. Messages are generated by GRAC and are usually the current
  403. verb and the object under the mouse pointer.
  404.  
  405. Window:
  406.  
  407.    The window is the area where text is printed, and the inventory is
  408. listed. Draw the window as a rectangle using the mouse.
  409.  
  410. Pen and Paper:
  411.  
  412.    These buttons set the colours used to print text.
  413.  
  414. Position:
  415.  
  416.    The graphics screen and control panel can be positioned as you wish. Move
  417. the screens with the mouse and click the left button when ready.
  418.  
  419. Paths
  420. -----
  421.  
  422.    Paths tell GRAC where to find all of the files needed by a game. They
  423. will usually be something like 'Disk1:' or on a hard disk, 'Work:GRAC/'.
  424.    Every file used by a game will have a path. If GRAC doesn't find it there, 
  425. the game will not run, so it is important that you don't move any files 
  426. around except within the editor itself. GRAC files all begin with the letters
  427. GRAC except for the main file (accessed with the SAVE GAME and LOAD GAME 
  428. functions) which you can name to whatever you like. Just for the record, 
  429. these are the files needed by a game:
  430.  
  431.    gracplayer              required to be in the same drawer as the main file
  432.    fonts               the required fonts in the FONT: drawer
  433.    GRAC.cont               the control panel
  434.    GRAC.inv                the inventory
  435.    GRAC.song               soundtracker or med module (optional)
  436.    GRAC #.room             one file for each room
  437.    GRAC #.picture          one file for each picture (AMOS packed picture)
  438.    GRAC #.character        character images (AMOS bob bank)
  439.    GRAC #.object           object images (AMOS bob bank)
  440.    GRAC #.sample           raw samples
  441.    GRAC #.closeup          one file for each close up
  442.    GRAC #.anim             iff animations
  443.    
  444.  
  445. Inventory
  446. ---------
  447.  
  448.    If you have not edited the inventory before, it is first necessary to set
  449. a path for the saved file. Then the inventory menu appears.
  450.  
  451.    ADD creates a new item. It is necessary to give it a name.
  452.  
  453.    Skipping the obvious buttons, ACTIONS is used to attach scripts to each
  454. verb acting on the item. First select an item, then a verb, then edit the
  455. script.
  456.  
  457.    STRING is for editing the text description of the item.
  458.  
  459. Character actions
  460. ----------------
  461.  
  462.    This operates in the same way as ACTIONS in the inventory menu, except
  463. that now you choose a character instead of an item.
  464.  
  465. Character strings
  466. -----------------
  467.  
  468.    Edit the text descriptions of characters.
  469.  
  470. Close-up
  471. --------
  472.  
  473.    A close-up is similar to a room, but characters will not appear on it,
  474. and clicking on a zone creates an immediate effect. The control panel is
  475. not visible.
  476.    This could be used if the player 'examines' a console; the screen would
  477. then show a close-up of the controls, and the player could click on the 
  478. buttons using the mouse. Alternatively, it could be a map screen, and
  479. clicking anywhere on it takes the player to that location.
  480.  
  481.    The top row of buttons work in the same way as in the room editor. The
  482. others are:
  483.  
  484. Add zone:
  485.  
  486.    Draw the zone as a rectangle, choose images for the button in 'up' and
  487. 'down' positions, then place the image using the mouse.
  488.  
  489. Set zone:
  490.  
  491.    As with ADD ZONE, but you have to choose an existing zone first.
  492.  
  493. Del zone:
  494.  
  495.    Deletes a zone.
  496.  
  497. Script:
  498.  
  499.    Assigns a script to the selected zone. The script will be executed when
  500. the player clicks on the zone.
  501.  
  502. Startup:
  503.  
  504.    The script that is executed when the close-up is run.
  505.  
  506. Save path
  507. ---------
  508.  
  509.    Games will be saved to this path.
  510.  
  511. New
  512. ---
  513.  
  514.    If confirmed, this option clears everything.
  515.  
  516. Load game
  517. ---------
  518.  
  519.    Load a previously saved GRAC game. (filename ends in .grac) These files
  520. contain all of the paths for every other file, plus a few other things. 
  521. They do not contain any graphics, sound or rooms, these are saved
  522. separately.
  523.  
  524. Save game
  525. ---------
  526.  
  527.    You should always save before quitting, if you have made any changes to
  528. any part of the adventure, otherwise you may lose them. Saved games have 
  529. icons, and clicking on the icon will run the game. Make sure that the file
  530. 'gracplayer' is in the same drawer as the game. This file does not have an 
  531. icon. To copy it, either use 'show all files' in the workbench menu, or use
  532. the CLI. 
  533.  
  534. Text colour
  535. ----------
  536.  
  537.    Choose white or black text to maximise legibility.
  538.  
  539. Quit
  540. ----
  541.  
  542.    Requires confirmation, so make sure that you have saved first.
  543.  
  544. Scripts
  545. -------
  546.  
  547.    Scripts are what give GRAC its power and versatility, and they are also
  548. the most complex part of the program.
  549.  
  550.    Basically, a script is a mini program. It contains a sequence of
  551. instructions with up to two parameters, which are executed when the script
  552. is called by any of a number of events. In structure they are probably
  553. closer to machine code than anything else, although the commands themselves 
  554. have similarities to Basic.
  555.  
  556.    The full instruction set is listed in another file, but take as an
  557. example, 'print'. As you would expect, this prints a string of text. Only
  558. the first parameter is used, and this holds the number of the string to be
  559. printed.
  560.    Unlike the Basic instruction, the GRAC version of 'print' also selects the
  561. text window, avoids splitting up words by moving them onto the next line
  562. and then waits for a mouse click to say that the player has finished
  563. reading.
  564.  
  565.    Scripts are edited as in a text editor, using the arrow keys or the mouse
  566. to move the cursor around.
  567.  
  568.    In the top right corner is the script number. You can move between
  569. scripts using the arrows or clicking on GO TO. Rooms use scripts 0 to
  570. 49, verbs 50 to 59, the inventory 60 to 149 and characters 150 to 200.
  571.  
  572.    CLEAR removes all instructions from the script, and frees it for further
  573. use.
  574.  
  575.    Click on OK when you have finished to leave the script editor. Usually
  576. the script that you end on will be assigned to the command printed at the
  577. top. The exception is startup scripts which are always script 0.
  578.  
  579.    There are also some key commands. F2 moves to the next script and F1
  580. moves to the previous script. DEL deletes the current line. Shift-up to 
  581. move up one page, shift-down to move down a page.
  582.  
  583.    A very useful key is HELP. It lets you select the parameters of the
  584. current instruction from whatever selector is appropriate. For example,
  585. 'print' (return) then HELP brings up a text selector.
  586.  
  587. Flags
  588. -----
  589.  
  590.    Flags are the equivalent of variables in Basic. They hold integers,
  591. positive or negative, and are referred to by a number. The main use for flags
  592. is so that GRAC can remember what has already happened in an adventure.
  593. There are several script commands for dealing with flags.
  594.    
  595.    There are 1000 flags. Flags 1-999 can be changed as you wish in a script.
  596. Flag 0 is a special flag which does not hold a value. All flags (except
  597. flag 0) start the game with the value zero.
  598.  
  599.    You can use flags to control whether or not objects or walk zones appear.
  600. Every object has a flag assigned to it. It will only appear if the flag
  601. has the logical value TRUE. Change the value to FALSE and the object will
  602. vanish. The logical value of a flag is defined as follows:
  603.  
  604.    flag         |  value       |  logical value
  605.                 |              |
  606.    -------------+--------------+-------------
  607.                 |              |
  608.    0            |  -           |  TRUE
  609.                 |              |
  610.    1 to 999     |  zero        |  FALSE
  611.                 |              |
  612.    1 to 999     |  not zero    |  TRUE
  613.                 |              |
  614.  
  615.    Note that flag zero does not hold a value, its purpose is to allow an
  616. object or zone to appear at all times (this is the default). 
  617.  
  618.    You can reverse the logical value of a flag by putting a minus sign in
  619. front of it. Hence flag -1 will be FALSE if flag 1 is TRUE and vice versa.
  620.  
  621.