home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 8 / amigaformatcd08.iso / screenplay / utilities / graal / editor.text < prev    next >
Text File  |  1996-10-15  |  19KB  |  512 lines

  1.  
  2.  
  3.  
  4.  
  5.                          The GRAAL Script Editor
  6.                          =======================
  7.  
  8.                             Version 2.0 beta
  9.  
  10.  
  11.  
  12.  
  13. Introduction
  14. ------------
  15.  
  16. This is a neat little (well, not that small, actually) editor, making life
  17. in the GRAAL script-writing lane much easier than it otherwise would be.
  18.  
  19. At first, you may find the concept behind it all slightly confusing. While
  20. other "user-friendly" games development systems opt for point-and-click
  21. control of everything, GRAAL is still only made up of ASCII scripts that
  22. can be created using any text editor. The GRAAL editor is just a helping
  23. hand, making entry of the statements a lot easier. The end result is the
  24. same as you would get with any other editor, though - ASCII script files
  25. with lists of GRAAL statements and commands.
  26.  
  27. Why, then, should you use the GRAAL editor, and not any other editor?
  28.  
  29. * It handles multiple scripts in multiple windows with easy switching, 
  30.   copying and pasting between them.
  31.  
  32. * It is connected to the on-line reference, giving help on statements
  33.   and commands.
  34.  
  35. * It performs basic syntax checking. It doesn't mean you won't get some
  36.   run-time errors in GRAAL, but not the really stupid ones caused by
  37.   obvious typing errors.
  38.  
  39. * It simplifies coding and editing of everything that has to do with the
  40.   graphical aspects of the system - areas, object positions, colours, etc.
  41.  
  42. * Although many features are GRAAL-related, it is perfectly possible to use
  43.   this editor to edit any kind of ASCII text file. You will probably find
  44.   it a good alternative. Enjoy!
  45.  
  46. * It handles files up to 5000 lines long. (If you have GRAAL scripts that
  47.   long, you are probably in need of professional help :-)
  48.  
  49.  
  50.  
  51.  
  52. System Requirements
  53. -------------------
  54.  
  55. This editor needs Workbench 2.0 or better to work.
  56.  
  57. On AGA machines, it "clones" your Workbench setting, so if you have a
  58. hi-res Workbench, it uses a hi-res screen; with a Productivity Workbench, it
  59. opens in Productivity mode... you get the picture. Just make sure that your
  60. Workbench is at least 640 pixels wide, and everything should operate
  61. smoothly. On non-AGA machines, a normal hi-res, non-interlaced screen is
  62. used.
  63.  
  64. Also note that the editor must be placed in your game development library
  65. on your hard disk for all file fetching routines to operate without problems.
  66.  
  67. The GRAAL.guide file should also be placed in the same directory.
  68.  
  69.  
  70.  
  71. Known bugs
  72. ----------
  73.  
  74. * Sometimes when you re-size a window other than the currently active, the
  75.   display in that window becomes corrupted. Put the window in front and
  76.   activate before re-sizing, this should help you avoid any problems. In
  77.   most cases, you are better off using the "Select Window" functions to
  78.   switch between windows, anyway.
  79.  
  80. * A block marked for editing and contained in a single screen line is
  81.   sometimes not properly highlighted on screen. However, the copy/cut/delete
  82.   functions still work.
  83.  
  84. * The ASL file requester which so conveniently filters out files you do not
  85.   want to see only works on AGA machines - non-AGA machines use the Blitz2
  86.   standard file requester. (This is because I couldn't get the ASL requester
  87.   to open on the GRAAL Editor screen on WB 2.05 - it kept popping up on the
  88.   Workbench screen no matter what, which was very irritating to say the
  89.   least.)
  90.  
  91.  
  92.  
  93.  
  94.                          WORKING WITH THE EDITOR
  95.                          =======================
  96.  
  97.  
  98.  
  99. Creating a New Script
  100. ---------------------
  101.  
  102. Since the editor expects to be placed in your GRAAL development directory, 
  103. it checks for a graal.main file in the current directory at start-up -
  104. without such a file, you don't really have much of a development environment!
  105.  
  106. If there is no graal.main file, the editor asks if one should be created.
  107. If you answer "yes", a template for such a script will be created in the
  108. editing window (which makes up the main part of the editor display).
  109.  
  110. You can also use the "New" option in the "Project" menu to create a new
  111. file. The "New" option has six suboptions. The first one, "empty", just
  112. opens a new, empty editing window on top of the first one. The editor
  113. handles up to ten script windows simultaneously, and you can switch
  114. between them quite easily with the "Select Window" option in the "Edit" menu
  115. (or <Amiga>+<W>).
  116.  
  117. The next three suboptions, "graal.main", ".room", and ".section" opens a
  118. new window and places a template for the selected script type there. The
  119. last two suboptions are for ".section" and ".ptrn" scripts respectively, and
  120. do not have templates.
  121.  
  122. Note the file name stated in the top border of the window - for all script
  123. types, the file name is (partly) created when you select "New". However, 
  124. .room, .section, .scene, and .ptrn files are not numbered, so you need
  125. to supply the correct number before the type suffix. This means the first
  126. time you save the file, use the "Save As" option in the "Project" menu.
  127. Once the file name is correct, you can use the "Save" option instead.
  128.  
  129.  
  130.  
  131. Loading Existing Scripts
  132. ------------------------
  133.  
  134. Just like the "New" option, the "Load" option (also in the "Project" menu)
  135. has a number of suboptions. The only thing they do is make the file
  136. requester show only the correctly named files. For example, the ".room"
  137. suboption only brings up a list of all ".room" files, making the search
  138. for the correct script quicker and easier. The "general" suboption shows
  139. all the files in the directory.
  140.  
  141. Most of the time, you probably want to open a script in a new window, which
  142. is why you should use the "Open & Load" option instead. In this case, the
  143. suboptions have keyboard shortcuts (<amiga>+<3-8>). Learn to use them, as
  144. this is the quickest way to open scripts.
  145.  
  146.  
  147.  
  148. The Templates and the Syntax Checker
  149. ------------------------------------
  150.  
  151. Some statements in the templates have some suggested parameters already
  152. filled in. In most cases there is no point in giving a suggestion, though, 
  153. because the correct parameters are very much up to yourself. You can see
  154. this quite easily: Create a new graal.main script, making the editor give
  155. you a graal.main template. Now press the button marked "Syntax". This will
  156. make the editor check the script in the current window for syntax errors, 
  157. and it will not be very long before it comes upon a statement with no
  158. parameter filled in. It then displays an error message telling you about
  159. the problem, and it also marks the statement where the error occurs.
  160.  
  161. The syntax checker is a great help, but it does not find every possible
  162. error. This is what it does:
  163.  
  164. * The names of all statements are checked.
  165.  
  166. * It checks that all mandatory statements are in place. However, note that
  167.   some statements may depend on others to work, and this is not checked by
  168.   this function. Be particularly careful with graphics, and make sure the
  169.   correct CLPART: statement is in effect in every situation requiring
  170.   CLPART pictures!
  171.  
  172. * The number of parameters for all statements are checked (except for
  173.   statements with a variable number of parameters).
  174.  
  175. * For all parameters that may consist of conditions, commands, or both, 
  176.   the name of each condition and command is checked.
  177.  
  178. If any error is found, the offending statement / command is highlighted, 
  179. and the nature of the error is shown in a requester as described above.
  180.  
  181. Note: The syntax checker uses the file name suffix to determine what
  182. statements and commands are allowed - so it can only be used in files
  183. following the GRAAL naming conventions.
  184.  
  185. All this should make development a little less frustrating. However, GRAAL
  186. itself checks a lot of other stuff too, and will still throw runtime errors
  187. at you from time to time. Further improvements will probably appear over
  188. time.
  189.  
  190.  
  191.  
  192. Amigaguide Help
  193. ---------------
  194.  
  195. If you place the cursor on a statement or command word and press the HELP
  196. key, the amigaguide reference file is opened with the relevant topic
  197. displayed. (The small "?" button does the same thing.)
  198.  
  199. Note that just like the syntax checker, the help function uses the file
  200. name suffix to determine what statements and commands are allowed - so it
  201. can only be used in files following the GRAAL naming conventions.
  202.  
  203.  
  204.  
  205. Normal Editing Functions
  206. ------------------------
  207.  
  208. I will not bother you too much about the functions that you are likely
  209. to encounter in any text editor. You should find the find & replace options, 
  210. and the other options of the "Edit" menu, quite adequate for the job at hand.
  211.  
  212. Just a few words about useful keyboard keys:
  213.  
  214. <shift>+<down arrow>
  215. <shift>+<up arrow>      These keys scrolls the script one page at a time.
  216.  
  217. <shift>+<right arrow>   Moves the cursor past the last character of the line.
  218.  
  219. <shift>+<left arrow>    Moves the cursor to the beginning of the line.
  220.  
  221. <control>+<right arrow> Moves to the next semi-colon of the line; that is, 
  222.                         to the next GRAAL statement parameter.
  223.  
  224. <esc>                   Close the current window.
  225.  
  226. <enter>                 Exit a string gadget (for example, in the Find
  227.                         window), or carry out a function (for example, 
  228.                         "Find" in the find window, once the cursor is not
  229.                         in a string gadget anymore).
  230.  
  231. Other available shortcut keys are all listed in the menus.
  232.  
  233.  
  234.  
  235. Marking Text Using the Mouse
  236. ----------------------------
  237.  
  238. Apart from marking text blocks with <amiga>+<1> and <amiga>+<2>, you can use
  239. the mouse:
  240.  
  241. 1   Click the first character of the block.
  242.  
  243. 2   Hold down a <shift> key and click the character immediately to the right
  244.     of the last character of the block. (Clicking the first character of a
  245.     line will mark the entire previous line.)
  246.  
  247.  
  248.  
  249. The Status Bar
  250. --------------
  251.  
  252. Some useful bits of information are shown in the "status bar" immediately
  253. above the editing windows:
  254.  
  255. 1   Cursor row (r) and column (c) position.
  256.  
  257. 2   Insert (I) or overstrike (O) write mode.
  258.  
  259. 3   Number of changes made since the last save. Note that some "big"
  260.     operations, like inserting a block of text, only count as one change
  261.     each!
  262.  
  263. 4   Time. The clock is only updated when you do something in the editor, 
  264.     like moving the cursor.
  265.  
  266.  
  267.  
  268. "Quick Positioning" Keys
  269. ------------------------
  270.  
  271. To help you quickly locate those parts of a script file which are most
  272. often edited, four buttons have been provided. For example, clicking
  273. "-> ACTION:" takes you to the first occurence of "ACTION:" in the file.
  274.  
  275.  
  276.  
  277. Switching between Windows
  278. -------------------------
  279.  
  280. When writing GRAAL scripts, you very often need to make changes to two or
  281. more script files almost simultaneously. Fortunately, the GRAAL editor
  282. really excels at this.
  283.  
  284. Use <amiga>+<w> to open a window containing a list of all currently open
  285. editing windows and their contents. In addition, all windows where unsaved
  286. changes exist are marked with an asterisk ( * ) before the window number.
  287.  
  288. Click on any name in the list, and that window will become active and placed
  289. on top of the other windows. You can also use the cursor keys and select
  290. a window with the <enter> key. In fact, the GRAAL text editing functions
  291. have been designed to make as little use of the mouse as possible - the
  292. keyboard is much faster once you get accustomed to using all shortcut keys.
  293.  
  294. If you need to view more than one script at the same time, just resize the
  295. editing windows and place them next to each other - nothing could be simpler.
  296. (Though I must confess I don't use this much myself - window switching is
  297. so much easier!)
  298.  
  299.  
  300.  
  301.  
  302.  
  303.                           THE PARAMETER EDITOR
  304.                           ====================
  305.  
  306.  
  307. Would you believe me if I told you there's an editor in the editor? Well, 
  308. it's true. Instead of typing in the parameters of statements and commands, 
  309. separating them with ";" or "," characters, you can edit the parameters
  310. in a window instead, with each parameter neatly contained in its own
  311. string gadget. This is how to do it:
  312.  
  313. Place the cursor on a statement or command - the actual NAME, mind you, 
  314. not on one of the parameters.
  315.  
  316. Press right Amiga + E or click the <Edit Parameters> button.
  317.  
  318. A window opens, with all parameters neatly laid out in string gadgets.
  319. The number of string gadgets available equals the number of parameters.
  320. Repetitive parameters (surrounded by brackets {} in the syntax description)
  321. only get one string gadget. You could type the parameters there, but it's
  322. often easier to do these in the normal editor "typewriter" mode.
  323.  
  324. The lead text for each gadget is taken from the syntax help - if it's
  325. longer than 15 characters, the leftmost characters will not be visible, 
  326. which may look a little funny at times. Oh well...
  327.  
  328. When you press the Enter key, any changes you have made will be inserted
  329. into the script file. Press the Esc key if you want to forget about the
  330. changes you've started to make.
  331.  
  332.  
  333.  
  334. Optional Parameters
  335. ------------------
  336.  
  337. Optional parameters are shown in blue. Consult the on-line reference if
  338. you do not know what they are used for.
  339.  
  340.  
  341.  
  342. Cycle Buttons
  343. -------------
  344.  
  345. If the button to the right of a string gadget is available, you can press
  346. this to cycle through the valid alternatives for the parameter. The
  347. contents of the gadget will change as you click the button repeatedly.
  348.  
  349. UPPERCASE text entered by the cycle button should be kept as is.
  350. Occasionally, a text in lowercase may appear, which you should change to
  351. a proper value.
  352.  
  353. For example, if the text "obj" is shown as one of the cycle alternatives, 
  354. GRAAL expects you to replace this with an object number.
  355.  
  356.  
  357.  
  358. amigaguide help
  359. ---------------
  360.  
  361. You can open the amigaguide reference for the statement or command being
  362. edited by pressing the HELP key or clicking the small "?" button.
  363.  
  364.  
  365.  
  366. Graphical editing
  367. -----------------
  368.  
  369. A lot of parameters have to do with specifying co-ordinates, positions
  370. and other stuff related to a backdrop picture.
  371.  
  372. If there are parameters which can be edited in this way, one or more
  373. of the five buttons beneath the string gadgets will become available.
  374.  
  375. Usually, the editor finds the relevant backdrop picture and room file
  376. to use automatically, but may occasionally ask you for a file name when
  377. it cannot decide which part of the adventure you are actually affecting.
  378.  
  379. Sometimes, the editor asks "Reload the object and image data?". If you
  380. haven't altered any images, or switched rooms or anything since the last
  381. time you used the graphical editing functions, you can answer "no" to
  382. speed up the process.
  383.  
  384. The details of all the "graphical editing" operations  are explained
  385. below. Once you are done, press "Enter" to save the changes, or "Esc"
  386. to cancel. If the backdrop picture is larger than the screen, use the
  387. left and right cursor keys to scroll it.
  388.  
  389.  
  390.  
  391. Background Graphics
  392. -------------------
  393.  
  394. If the backdrop picture is one of the rooms in your game, all previously
  395. defined objects placed in that room is also shown for reference. If you
  396. edit a floor or an exit, previously defined floors and exits are shown.
  397.  
  398. Note: While you move the object you're editing around the screen, you
  399. will sometimes erase these other, pasted-on objects. To restore them, 
  400. just press the left or right cursor key. Also, if objects overlap, the
  401. editor does not bother to sort them in the proper order. Kepping the left
  402. or right cursor key down for a while should allow you to see all the
  403. objects revealed (although flashing wildly) even if they overlap.
  404.  
  405. Two points to remember: Make sure all statements and commands specifying
  406. picture file names, which help the editor choose the right file, are
  407. entered as early as possible. Also, remember that the editor loads such
  408. data from the files SAVED TO DISK, not from unsaved files in the editor
  409. itself. Therefore, save before using the parameter editor.
  410.  
  411. Now, a closer look at the five "graphical editing" buttons:
  412.  
  413.  
  414.  
  415. <Area>
  416. ------
  417.  
  418. An area is a rectangle that can be moved around the screen and re-sized.
  419. To re-size, click and drag the bottom left corner (the little square) of
  420. the rectangle.
  421.  
  422. To move the rectangle, click and drag anywhere else on the screen.
  423.  
  424. If you use this option to edit the cut-out frames for BOB images, you will
  425. get a number of rectangles on screen corresponding to the number of
  426. images cut out by the ...BOBS: statement. Use the leftmost rectangle
  427. to re-size: all duplicate frames will also be re-sized automatically.
  428. To alter the spacing between the frames, use the up and down cursor keys.
  429.  
  430. If you use <Area> to edit floors or exits, all floors or exits except the
  431. one being edited are also shown on the screen, and the system tries to
  432. print the number of each floor or exit near the middle of the corresponding
  433. area.
  434.  
  435. Note: In this version, you cannot edit the PATH: parameters graphically.
  436. However, when you edit FLOOR:s, any PATH:s defined in the script show up
  437. as lines in the picture.
  438.  
  439.  
  440.  
  441. <Position>
  442. ----------
  443.  
  444. This edits the position of an image, and possibly also the image number.
  445.  
  446. If the previous position and image used are known, the object or image
  447. will start out in its old position.
  448.  
  449. Click and hold the mouse button. The image being edited will start
  450. flashing in weird colours. Drag the mouse to the desired location and
  451. release.
  452.  
  453. To alter the image, use the up and down cursor keys.
  454.  
  455. To flip the image left/right, press the "x" key. (However, this will not
  456. be automatically registered in the "image" parameter).
  457.  
  458. When you save the changes with the "Enter" key, the image last used
  459. will normally be placed in the "image" parameter. However, if the
  460. "image" parameter previously contained an animation sequence or a PTRN
  461. specification, it will NOT be affected. This is to prevent a lot of
  462. hard work being undone by an over-smart editor...
  463.  
  464.  
  465.  
  466. <Pastepos>
  467. ----------
  468.  
  469. This is exactly the same as editing an image position, except the
  470. parameters specify the upper left corner of the image, not the hotspot
  471. position. (You don't have to choose the correct button yourself - only
  472. the relevant one will be available.)
  473.  
  474.  
  475.  
  476. <Char.pos>
  477. ----------
  478.  
  479. Very similar to the previous two, but only available when editing an
  480. object. This sets the main character's position relative to the object
  481. when using the MOBJ command. The image used for the main character can
  482. also be altered. The same rules as for the object positioning apply.
  483.  
  484.  
  485.  
  486. <Point>
  487. -------
  488.  
  489. This is, eh, not used for anything right now!. It would allow you to
  490. specify a single point by dragging a cross-hair to the proper position, 
  491. should the need arise. But there isn't. Any need. For that. In any.
  492. Statement or command. In this release. (Perhaps in the next one?)
  493.  
  494.  
  495.  
  496. <Ink>
  497. -----
  498.  
  499. This one's a little different. Many commands require colour numbers to
  500. be specified, and this helps to pick the correct palette index number
  501. directly from the palette of the relevant backdrop picture.
  502.  
  503. When the picture is shown, a palette overlays the upper left corner of
  504. the picture. The text above the screen tells you to click on a colour
  505. - the "normal ink" colour for things like text displays, and the
  506. "background ink", which is the colour most functions use to erase or
  507. clean up unwanted parts of the picture.
  508.  
  509. The "highlight ink" colour is only used in the sentence display area.
  510. It is the colour used when a completed sentence is highlighted during
  511. command execution.
  512.