home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / misc / game40.lbr / SCENE.DZC / SCENE.DOC
Encoding:
Text File  |  1994-08-30  |  107.3 KB  |  2,676 lines

  1.  Overview:
  2.  
  3.  The "GAME4.0" game creation system is composed of two programs:
  4.  SCENE.COM and PLAY.COM.  SCENE is used to compile an ASCII
  5.  source file called name.SRC which you create using any word
  6.  processor program.  PLAY is used to play the generated name.SCN
  7.  data file.  For details on running PLAY.COM, see PLAY.DOC in
  8.  this library.
  9.  
  10.  
  11.                         TABLE OF CONTENTS
  12.                         =================
  13.  
  14.  
  15.  1. INTRODUCTION
  16.  
  17.  2. WRITING THE SCENARIO FILE
  18.       2.1 Basic Grammar
  19.       2.2 Optional Frills
  20.            Starting Text
  21.            Ending Text
  22.            Bad Ending Text
  23.            Assistant
  24.            Guards
  25.            Score
  26.       2.3 Location Records
  27.       2.4 Item Records
  28.       2.5 Movement Tests
  29.       2.6 Phrases
  30.       2.7 Effect Records
  31.            Varieties of "IF" tests
  32.                 Variable tests
  33.                 Location tests
  34.                 Assistant/Guard tests
  35.                 Random chance tests
  36.            Varieties of "THEN" actions
  37.                 Change variables
  38.                 Change items
  39.                 Change locations
  40.                 Move player
  41.                 Change assistant/guard status
  42.                 Change score
  43.                 Print effect strings
  44.                 Perform default action
  45.                 End the game
  46.       2.8 Short Strings
  47.       2.9 Effect Strings
  48.  
  49.  3. TIPS AND TECHNIQUES
  50.       3.1 Make good use of comments
  51.       3.2 Arrange your scenario file logically
  52.            Location Records
  53.            Item Records
  54.            Movement Checks
  55.            Phrases
  56.            Effect Records
  57.            Short Strings
  58.            Effect Strings
  59.       3.3 Draw a map
  60.       3.4 Tackle your game in small chunks
  61.       3.5 Use foresight in assigning location numbers
  62.       3.6 Use foresight in assigning object numbers
  63.       3.7 Keep "Cheat sheets"
  64.            SCENE "grammar" summary
  65.            List of item numbers
  66.            Variables list
  67.            "Point" list
  68.            "Word" list
  69.            "Puzzle" list
  70.            "Time line"
  71.            "Special" lists
  72.       3.8 Include "temporary short-cuts" during the writing
  73.       3.9 Add "descriptions" to non-portables
  74.       3.10 Intercept built-in commands
  75.       3.11 Elaborate on "Search"
  76.       3.12 Change the portability of an item
  77.       3.13 Create a move counter/countdown timer
  78.       3.14 Use the assistant/guard
  79.       3.15 Play fair
  80.  
  81.  4. COMPILING YOUR SCENARIO
  82.       4.1 Running SCENE
  83.       4.2 Splitting your source file
  84.       4.3 SCENE feedback
  85.  
  86.  5. SUMMARY
  87.  
  88.  
  89.                      =======================
  90.                      ||  1. INTRODUCTION  ||
  91.                      =======================
  92.  
  93.  
  94.  It is a hard thing for a CPMer to be a text adventure game
  95.  addict.  Once you have mastered the original Colossal Cave
  96.  Adventure, and Zork and its sister offerings from Infocom, must
  97.  you hang up your sword and lantern?
  98.  
  99.  Never!  The number of possible scenarios is as infinite as the
  100.  universe -- and if software companies will not supply us, why
  101.  then, we will simply grow our own.  "Do It Yourself" is still an
  102.  honored tradition among CPM users.
  103.  
  104.  You aren't a programmer?  That isn't a problem.  David
  105.  Goodenough has greatly simplified your task with this game-
  106.  creation system that handles all the tedious inner workings.
  107.  You don't know how to build a parser?  Or even what one is?  You
  108.  wouldn't know a movement chart if it was labeled in 20 point
  109.  type?  No matter.  That has already been taken care of.  With
  110.  this system you are a playwright, not a programmer.
  111.  
  112.  Your game will be built out of just five types of units, which
  113.  can be put together in any order and in virtually any quantities
  114.  you want.
  115.  
  116.  First, there are "locations", which can be anything you can
  117.  describe, from the control room of a methane processing plant on
  118.  Jupiter to a broom closet in a contemporary home.  Second are
  119.  "items", which are any objects you want your players to interact
  120.  with, such as magic carpets or the traditional gem-encrusted
  121.  idols.  Think of these as the setting and props for your play.
  122.  
  123.  The other three units, "effect records", "phrases", and
  124.  "movement tests" are closely related and combine to form your
  125.  plot.  With the "effect records" you specify what can happen
  126.  during the game.  The other two are the triggers that cause
  127.  these things to happen.  For example, you could write a move
  128.  test that says, if the player rides his elephant across the ice
  129.  bridge then collapse the bridge and kill the elephant.  Or you
  130.  could have the phrase "rub lantern" cause a malevolent genie to
  131.  appear.  Anything.  In the world of your game, you are god.
  132.  
  133.  In addition, there are a handful of optional frills you can add
  134.  to "accessorize" your game.  For example, you can add an
  135.  assistant and a foe to expand the cast of your play.
  136.  
  137.  Since the process is so free-form, you needn't have your entire
  138.  game worked out in advance.  You can tackle it in pieces,
  139.  working on just one area or one puzzle for your player at a
  140.  time.  Then move on to the next, letting your game grow to
  141.  whatever stature you choose, be it a one-puzzle bonzai or a
  142.  sequoia to rival Zork.
  143.  
  144.  Suppose you have the idea that "Twin Peaks" should be
  145.  immortalized in a game.  You might start by deciding that the
  146.  player will be Special Agent Cooper.  Write a few locations, to
  147.  provide a main street for the town.  Create an item, a mini-
  148.  cassette so he can save his thoughts for Diane.  Then give your
  149.  scenario a trial run by walking Cooper through the town. Not
  150.  bad, but shouldn't there be a Double-R diner for him to visit,
  151.  complete with the best damn cherry pie and a cup of joe?  And a
  152.  jukebox to play?  And you've got to add The Great Northern
  153.  Hotel, complete with roving bands of drunken Norwegian
  154.  investors!  And after those have been added, well, how about the
  155.  saw mill?  And the Sheriff's Office?  (Don't forget the
  156.  doughnuts.)  And who will you choose for your assistant, the
  157.  stalwart Sheriff Truman or hapless Deputy Andy?  The villain has
  158.  got to be Bob, naturally!  Of course, Cooper needs a crime to
  159.  solve, so don't forget to supply a body and plant clues for him
  160.  to discover....
  161.  
  162.  Most important, when your game is finished, don't forget to
  163.  distribute it so your fellow gamesters can enjoy it.  And don't
  164.  be surprised if you discover that the challenge of writing your
  165.  own game is just as much fun as solving someone else's.
  166.  
  167.  
  168.                ====================================
  169.                ||  2. WRITING THE SCENARIO FILE  ||
  170.                ====================================
  171.  
  172.  
  173.                         2.1 BASIC GRAMMAR
  174.                         =================
  175.  
  176.  SCENE expects that you will follow certain rules of "grammar":
  177.  
  178.  It needs pure ASCII input so be sure to use that mode (ASCII or
  179.  non-document) of your word processor.
  180.  
  181.  Each module, and each part of a module, must start on a new
  182.  line.
  183.  
  184.  The first letter or character on a line determines how SCENE
  185.  interprets that line.
  186.  
  187.  The semicolon (";" ) is used to designate "comments" -- when
  188.  Scene encounters one it skips the rest of that line or, if it
  189.  was the first character on the line, it skips the entire line.
  190.  You will find many uses for comments during the writing of your
  191.  source file: you can embed "markers" so you can navigate more
  192.  quickly through the file; write "reminders" to yourself of
  193.  additions/changes to make in future; add "labels" to sections to
  194.  remind yourself of why you are doing something; etc.  Since
  195.  these comments are not included in the ".SCN" data file they
  196.  don't make your game any larger, so use them freely.
  197.  
  198.  NOTE: If you are putting a comment on the same line as part of
  199.  the game, ALWAYS put at least one space BEFORE the semicolon.
  200.  If you don't, SCENE might not recognize it as comment marker and
  201.  then try to compile your remarks.
  202.  
  203.  Case matters to SCENE.  All letters that are supposed to be
  204.  interpreted by it should be lower case. This means that upper
  205.  case letters, or mixed upper and lower, should only be used in
  206.  text that is to be stored and displayed to the player.
  207.  Basically, that means WITHIN strings:  text set off by
  208.  quotations marks, braces or brackets.  This includes long and
  209.  short descriptions of locations, long and short descriptions of
  210.  items, Short Strings, Effect Strings, Starting, End and Bad End
  211.  Strings, and assistant and guard strings.  (All of these will be
  212.  described in detail later.)  Upper case can also safely be used
  213.  within comments, since those are not interpreted either.
  214.  
  215.  Sometimes you might want the game to pause when it is printing
  216.  out text for the player.  For example, the text fills more than
  217.  one screen and the player will need time to read it.  Or, you
  218.  have set up a joke, and want a pause before the punch line.  To
  219.  do this, there is a pause command that can be used A) in the
  220.  long descriptions of locations, B) in the text of the Starting,
  221.  Winning, and Bad Ending strings, and C) in "Effect" string
  222.  texts.  (These will be explained later.)
  223.  
  224.  A pause is signaled by putting a "~" in the first column of a
  225.  line within a string.  When the game is played, the text up to
  226.  that point will be displayed followed by a line prompting the
  227.  player to hit any key when he is ready to go on.  The rest of
  228.  the text, or up to the next "~", will then be displayed.  You
  229.  may have multiple pauses in a single string.  (It isn't
  230.  required, but it will look nicer if you leave a blank line
  231.  before the line starting with the "~".)
  232.  
  233.  Other "grammar" rules are specific to each module, and will be
  234.  covered separately.
  235.  
  236.  
  237.                        2.2 OPTIONAL FRILLS
  238.                        ===================
  239.  
  240.  These are the optional embellishments you can add to your game.
  241.  
  242.  Starting text
  243.  =============
  244.  This takes the format of an "s[" starting in the first column of
  245.  a line, followed by any amount of text starting on the next
  246.  line, ending with a "]".  This text will be displayed when the
  247.  game starts, and can be used to "set the scene" or give the
  248.  player a little background information.  The "~" command works
  249.  here.
  250.  
  251.  During the play of the game this introductory text will be
  252.  followed by the description of the location the player is
  253.  starting at.  Example:
  254.  
  255.  s[
  256.  You are fleeing for your life as a pack of wolves draws ever
  257.  nearer . . ..
  258.  
  259.  ~You awake with a start.  It was just a dream.  It was only
  260.  a dream.
  261.  
  262.  ~But then why can you still hear the wolves howling?]
  263.  
  264.  Ending text
  265.  ===========
  266.  This take the form of an "e[" beginning in the first column of a
  267.  line, followed by any amount of text starting on the next line,
  268.  ending with a "]".  (The pause command "~" can be used here,
  269.  too.)  This text will be displayed when the player reaches the
  270.  "good end" of the game, that is, has won.  Since the player has
  271.  probably worked hard to get to this point, it might be nice to
  272.  make a big deal out of it -- congratulate him on the win, tell
  273.  him he has become the master of the universe, whatever.  After
  274.  this text has been printed the game terminates and returns to
  275.  the CP/M prompt.  Example:
  276.  
  277.  e[
  278.  Whoopie!  You win!  You get to marry the princess and live
  279.  happily ever after!  (etc.)]
  280.  
  281.  Bad ending text
  282.  ===============
  283.  This takes the format of a "b[" beginning in the first column of
  284.  a line, followed by any amount of text starting on the next
  285.  line, ending with an "]".  (The pause command "~" can be used
  286.  here, too.) This text is displayed when the player comes to a
  287.  "bad end", that is, had lost.  You should inform the player that
  288.  he has lost (you have died, been thrown in jail, turned into a
  289.  lump of stone, whatever) and perhaps offer sympathy (mock or
  290.  sincere) and maybe a challenge or encouragement.  After the text
  291.  is printed the game will offer him a choice to start over or
  292.  quit.  Example:
  293.  
  294.  b[
  295.  You have died.  Try again -- maybe you'll manage to defeat the
  296.  evil wizard next time!]
  297.  
  298.  Assistant
  299.  =========
  300.  You can give the player an "assistant" who will follow him
  301.  around.  (If you want the assistant to do anything else, you
  302.  will have to write an Effect Record about it.  See Tips &
  303.  Techniques.) This is done by putting an "a" in the first column
  304.  of a line, followed by a description of the assistant up to 39
  305.  characters long.  While the assistant is activated this
  306.  description will be printed out in the format "The <assistant
  307.  description> is with you." after each move.  The game starts up
  308.  with the assistant inactive.  Examples:
  309.  
  310.  a loyal Mr. Spock
  311.  a robot
  312.  a village constable
  313.  
  314.  Guards
  315.  ======
  316.  You can also add some "guards" to the game.  The format for this
  317.  is a "g" in the first space of a line, followed by how many
  318.  guards (total) you want in the game, followed by the probability
  319.  of creating one on any given move, followed by the number of the
  320.  Effect Record (this is explained later) that will be performed
  321.  every turn that one is present, followed by up to 59 characters
  322.  of text that will be printed when the guard is present.  Some
  323.  examples:
  324.  
  325.  g 8 10 12 There is a Klingon guard here!
  326.  g 4 33 18 There is an  evil troll near you!
  327.  g 12 20 5 An enchanted mist surrounds you.
  328.  
  329.  The game starts with the guards inactive.  You must write an
  330.  Effect Record that will activate the guards in reaction to
  331.  something the player does, either moving to a particular area
  332.  (for example, the Sultan's harem) or entering a particular
  333.  command (such as, open safe.)  MOVEMENT TESTS and PHRASES will
  334.  cover this in detail.
  335.  
  336.  Once the guard mechanism is activated, a guard will be created
  337.  in the player's location based on the probability you specified
  338.  with the second number.  If you specified more than one guard,
  339.  the following ones will not be generated until the current one
  340.  has been overcome by the player.
  341.  
  342.  Each move the guard is active the text string you entered will
  343.  be printed to announce his presence.  Until the guard is killed
  344.  or de-activated, and except for the first move after a guard's
  345.  creation, the game will also perform whatever actions you wrote
  346.  in the guard's Effect Record.  For example, the Klingon might
  347.  shoot at the player -- perhaps even killing him!
  348.  
  349.  NOTE: The "guard" need not be evil, or opposed to the player, or
  350.  even a person.  Since you determine what the "guard" does in an
  351.  Effect Record, it could be a leprechaun that shows up and gives
  352.  the player some treasure.  Or the "guard" could be nothing more
  353.  than scene dressing, perhaps some birds that fly by on occasion.
  354.  
  355.  Score
  356.  =====
  357.  This is simply a line that starts with an "x" in the first
  358.  column, followed by a number which is the maximum points a
  359.  player can attain in the game.  Example:
  360.  
  361.  x 500
  362.  
  363.  If the player types "score" he will be told, for example, that
  364.  he has 100 points out of 500 possible.  If you don't enter a
  365.  maximum, the player is simply told how many points he has
  366.  accumulated, but has no way to guess how close to finishing the
  367.  game he may be.
  368.  
  369.  NOTE: The maximum points is not a limit used by the game.  You
  370.  could declare that the maximum number of points is 200 and then
  371.  arrange the game so the player could actually obtain 800 points.
  372.  This would confuse the player, but not the game:  it won't
  373.  terminate and declare him the winner upon obtaining 200 points,
  374.  or anything like that.
  375.  
  376.  
  377.                        2.3 LOCATION RECORDS
  378.                        ====================
  379.  
  380.  A "location" is any place that the player can be during the
  381.  game.  These can also be called "rooms", but a location could be
  382.  just part of what we normally think of as a room (for example,
  383.  the east end of a large ballroom) or not a room at all (perhaps
  384.  a meadow or a perch halfway up a tree.)
  385.  
  386.  A location module starts with a label to show that it IS a
  387.  location and WHICH location.  This label consists of the letter
  388.  "l" in the first column of a line, followed by one space
  389.  followed by a number.  If you want, you can add a comment to
  390.  yourself after that.  Sample location labels:
  391.  
  392.  l 1
  393.  l 57
  394.  l 112 ; the cockpit of the Millenium Falcon
  395.  
  396.  Locations must have a number between 1 and 199.  If you
  397.  accidentally give two locations the same number the details from
  398.  the one later in the file will be written over the details of
  399.  the earlier one, in effect erasing it.
  400.  
  401.  Some locations have special significance:
  402.  Location 1 is where the player will start.
  403.  Locations 2 through 10 are 'hide rooms', in which some items
  404.      will not be described even if they are present.  (See
  405.      "ITEMS" for more on this.)
  406.  Locations 5 through 15 are 'safe rooms', which guards cannot
  407.      enter.  (See "Change Assistant/Guard Status" for more on
  408.      this.)
  409.  Only locations 1 to 119 can be used in the Effects Records.
  410.      (This is covered under "EFFECT RECORDS".)
  411.  
  412.  Next you give the "short description" of the location.  This is
  413.  the text that will be displayed each time the player arrives at
  414.  that location, preceded by the words "You are".  Put a percent
  415.  sign in column one, followed by your description enclosed in
  416.  quotation marks.  Your description can be up to 255 characters
  417.  long, and can extend over multiple lines.  (SCENE will consider
  418.  everything up to the next quotation mark as part of the
  419.  description.)  As an alternative, if a location has the same
  420.  description as another you have already entered, you can just
  421.  put the number of that LOCATION after the percent sign.
  422.  
  423.  NOTE: that location must come earlier in your file.
  424.  
  425.  Sample short descriptions:
  426.  
  427.  %"in the cockpit"
  428.  %"standing at the end of the road.  Before you is a handpainted
  429.  sign:
  430.  
  431.             BEWARE OF RHINOCEROS"
  432.  %112
  433.  
  434.  Next, you can optionally enter a longer description.  It should
  435.  begin with either a "[" or a "{" in the first column of a new
  436.  line, can be of any length and number of lines desired, and is
  437.  ended with a matching "]" or "}".  A long description set off by
  438.  square brackets will be displayed the first time a player enters
  439.  a location and in response to "look" commands.  A long
  440.  description set off in braces is ONLY displayed after "look"s.
  441.  (The start and end must both be brackets or both be braces.)  If
  442.  your description is longer than one screen, or you want to add
  443.  pauses for artistic reasons or suspense, the "~" pause command
  444.  can be used as many times as you like.
  445.  
  446.  Next, you have the option of declaring a location to be "dark"
  447.  by putting a comma (",") in the first column of a new line.  The
  448.  player will not be given the description of a dark location, or
  449.  told of any objects that may be there, unless the lit light
  450.  source is on him or at the same location.  (See OBJECTS for more
  451.  about this.) Also the assistant and guard will not be described
  452.  and the guard effect will not be performed in an un-lit dark
  453.  room.  Each time the player moves without his light source in a
  454.  dark location there is a chance that he will be killed.  (This
  455.  is built-in, and cannot be changed by the scenario.)
  456.  
  457.  Next, you have the option of making the location a "credit" one
  458.  by starting a line with a "c" followed by a number from 1 to
  459.  100.  The first time the player moves to that location his score
  460.  will be increased by that number of points.  Arriving in a room
  461.  by teleport does not award the credit.  (This is usually used to
  462.  "reward" a player for having successfully overcome some obstacle
  463.  or having solved a puzzle.)
  464.  
  465.  Next, you must specify how this location is connected to other
  466.  locations.  This is done by entering a letter for the direction,
  467.  followed by a letter indicating what type of connection,
  468.  followed by the number of the location that connection leads to.
  469.  Each connection description must start in the first column of a
  470.  new line.
  471.  
  472.  SCENE uses six directions (north, east, south, west, up and
  473.  down) which are abbreviated to their first letters (n, e, s, w,
  474.  u and d, respectively.)
  475.  
  476.  SCENE has three built-in connection descriptions:  doors
  477.  (abbreviated to d), stairs (s) and passages (p).  These will be
  478.  used to generate the suitable notice for the player.  (For
  479.  example, "There is a door to the east.")  If your connection
  480.  doesn't fit those categories, you can use an "x" which will not
  481.  generate a notice for the player though he will be able to go
  482.  that direction.  If you want to notify him that he can move in
  483.  that direction, you must include mention of it in the location's
  484.  short description.  For example:
  485.  
  486.  %"the center of a large grassy meadow.
  487.  
  488.  Trails leading north and east have been worn in the grass."
  489.  
  490.  If no connection is described for a given direction, the player
  491.  will be told "You can't go that way" if he tries that direction.
  492.  
  493.  There is a second way to close off a direction.  If you put an
  494.  "n" after the direction, followed by a string number, the player
  495.  will still be unable to go that direction but the game will
  496.  instead print out the string you have assigned to the number
  497.  after the "n".  (See "SHORT STRINGS" for more on this.)  This
  498.  can be used when a passage is only temporarily blocked, perhaps
  499.  by a locked door (how to change a blocked passage to an
  500.  unblocked one is covered in "EFFECTS") or whenever you want to
  501.  add some "color" to the game.  For example, suppose your
  502.  location description had included "There is a large mirror on
  503.  the north wall."  You might want the game to respond, "Do you
  504.  think you're in Wonderland??" if the player tries to go north.
  505.  
  506.  If these were the connections for a location:
  507.  
  508.  nx44
  509.  en5
  510.  sd42
  511.  wp73
  512.  ds15
  513.  
  514.  They would mean:
  515.  an undescribed connection leads north to location 44
  516.  no way east, but print string 5 if the player tries it
  517.  a door leads south to location 42
  518.  a passage leads west to location 73
  519.  stairs lead down to location 15
  520.  and, since nothing was listed for up, trying to go that way
  521.  would get the default "you can't go that way" message.
  522.  
  523.  Finally, the location record is terminated by a period in the
  524.  first column on a line by itself.
  525.  
  526.  NOTE:  A location record must start with a "l 12"-type label and
  527.  must end with a line with just a period.  All the other elements
  528.  can be included in any order or omitted as you please.  However
  529.  if you always include the elements in a set order you are much
  530.  less likely to omit any accidentally.  The same applies to the
  531.  connection descriptions:  they can be in any order, even mixed
  532.  between other elements of the location record, but clustering
  533.  them and always using the same order (perhaps neswud) will
  534.  lessen your chances of accidentally forgetting to include one.
  535.  
  536.  Here is an example of a typical location record:
  537.  
  538.  l 76           ; Location 76, the passage outside your cabin
  539.  %"in the passage outside your cabin"
  540.  [The ground here is rather messy, it shows signs of the heavy
  541.  traffic that is usually passing back and forth]
  542.  ,
  543.  c50
  544.  nx44
  545.  en5
  546.  sd42
  547.  wp73
  548.  ds15
  549.  .
  550.  
  551.  
  552.                          2.4 ITEM RECORDS
  553.                          ================
  554.  
  555.  The second type of modules are "Item Records."  An item is any
  556.  object you want your players to interact with, such as magic
  557.  carpets or the traditional gem-encrusted idols.  In format, item
  558.  records are much like locations records.
  559.  
  560.  An item record starts a label, an "i" in the first column of a
  561.  line, followed by a space and then a number from 1 to 59.
  562.  Again, some numbers have different uses.
  563.  
  564.  Item 1 is special: it is considered the "lamp" item.  It does
  565.  not have to be describe as a "lamp".  It could be any obvious
  566.  light source (lamp, lantern, flashlight, torch, etc.) or any
  567.  object that will be used as a light source within the game (for
  568.  example, a crystal ball that provides magic light.)  If the
  569.  player has item 1 in his inventory, then the command "on" will
  570.  activate it, and "off" will turn it off.  The player will be
  571.  able to see in "dark" locations only if the lamp is "on" and
  572.  either in the player's inventory or at the same location as the
  573.  player.  The game begins with the "lamp" off.
  574.  
  575.  Only items 1 through 44 can be seen and interacted with by the
  576.  player.  Items 45 to 59 have to be "swapped" into a lower number
  577.  before they can be used.  (This will be explained in "EFFECT
  578.  RECORDS.")
  579.  
  580.  Next comes the item's description.  This starts with a "%" in
  581.  the first column, followed by a description of up to 158
  582.  characters enclosed in quotation marks.  Examples:
  583.  
  584.  %"a pair of ruby slippers"
  585.  %"a torn scrap of paper, bearing the numbers:
  586.  
  587.            23 - 12 - 13.5 - 110"
  588.  
  589.  Instead of including the actual description, you could put the
  590.  number of the Short String that holds the description.  (See
  591.  "SHORT STRINGS for more about this.)  This makes it less
  592.  immediately obvious what an item is when reading the source
  593.  file, but will make no difference when playing the game.  The
  594.  only advantage of putting an object's description into a Short
  595.  String is that several items could then easily be given
  596.  identical descriptions by specifying that each use the same
  597.  Short String for its description.  Example:
  598.  
  599.  %31
  600.  
  601.  Next, you can give an optional description that will be printed
  602.  when the player "examine"s the item.  Again, this can be up to
  603.  158 characters and should be enclosed in quotation marks.  For
  604.  example:
  605.  
  606.  x"The slippers seem to be size 7."
  607.  
  608.  NOTE: "Portable" items can only be examined when the player is
  609.  carrying them, but "non-portables"  can be examined if the
  610.  player is in the same location as the item.
  611.  
  612.  Next, you should give a one word name that the player can refer
  613.  to the item by.  If you like, you can also provide a synonym,
  614.  also a single word.  These take the form of a single quote
  615.  followed by the word, each starting its own line.  For example:
  616.  
  617.  'slippers
  618.  'shoes
  619.  
  620.  NOTE:  since SCENE and PLAY only consider the first four letters
  621.  of each word, you must be sure that each item's name, when
  622.  truncated to four letters, is unique.  For example, confusion
  623.  would result if you tried to have both "chalk" and "chalice" in
  624.  the same game.  (Spelling out the words in full in the scenario
  625.  file can make it easier to work on the file and has no effect on
  626.  the game.)
  627.  
  628.  Next, you can add a line with just an "h".  This makes the item
  629.  "hideable", which means that it will not be included in the "You
  630.  see" list when it is in one of the hide locations (locations 2 -
  631.  10).  The player will have to use the "search" command before
  632.  its presence will be revealed.
  633.  
  634.  Next, a line with just an "a" can be added.  This means this
  635.  item would not be included if the player types "take all".  (The
  636.  reason for this option is to force the player to take it by name
  637.  -- probably because you want the act of taking it to trigger
  638.  some effect.  This is covered under "EFFECT RECORDS.")
  639.  
  640.  Next, a line consisting of a "c" followed by a number from 1 to
  641.  100 would mean the player would be credited with that number of
  642.  points the first time the item is picked up.
  643.  
  644.  Next, the starting location of the item must be given.  This can
  645.  be any of the location numbers (1 - 199) or one of three special
  646.  cases:
  647.  
  648.  -1 means the item is being carried, that is, is in the player's
  649.     inventory.
  650.  -2 means the item is "out of the game", that is, in no place the
  651.     player can reach.
  652.  -3 is a synonym for the location the player is at when the
  653.     command is processed.
  654.  
  655.  Next, a line with a "w" followed by a number from 1 to 100 gives
  656.  the object that "weight".  This simply limits what the player
  657.  can pick up, since he has a maximum carrying capacity of 100.
  658.  If you don't want the player to be able to take an item, give it
  659.  a weight of -1.  If you don't specify a weight it will default
  660.  to 0, meaning the player will always be able to take it no
  661.  matter what else he is carrying.
  662.  
  663.  Finally, the record ends with a period in the first column of
  664.  its own line.
  665.  
  666.  Here is a typical item record:
  667.  
  668.  i 15
  669.  %"A diamond ring"
  670.  x"This is a gold ring set with a one-carat diamond."
  671.  'diamond
  672.  'ring
  673.  h
  674.  a
  675.  c 5
  676.  l 2
  677.  w 15
  678.  .
  679.  
  680.  NOTE:  As with location records, the internal elements of an
  681.  item record can be given in any order or omitted.  However,
  682.  omitting some will have strange effects.  For example, if you
  683.  don't give the object a "name", the player not will be able to
  684.  "take" or "drop" it.  If you don't specify a location the item
  685.  will not appear in the game.  Always putting the elements in the
  686.  same order will help avoid accidental oversights.
  687.  
  688.  
  689.                         2.5 MOVEMENT TESTS
  690.                         ==================
  691.  
  692.  This module plus the next, "PHRASES", are used as triggers:
  693.  when a player makes a particular movement, or types in a certain
  694.  phrase, an "effect record" is triggered, causing other things to
  695.  happen.  Together they combine to form the "plot" of your game.
  696.  
  697.  There may be up to 74 movement tests in your game.
  698.  
  699.  A movement test is just one line long.  It begins with an "m" in
  700.  the first column, followed by the number of the location the
  701.  player is moving FROM followed by the number of the location he
  702.  is moving TO, followed by the number of the effect record that
  703.  should happen when he makes that movement.  For example, the
  704.  following line would trigger Effect Record #30 when the player
  705.  moved from location 10 to location 20:
  706.  
  707.  m 10 20 30
  708.  
  709.  For your convenience, you could add a reminder to yourself after
  710.  a comment marker:
  711.  
  712.  m 52 16 110  ; boarding pirate ship
  713.  
  714.  In addition, -1 can be used as a "wild card" location, matching
  715.  any location number.  Therefore "m -1 30 15" would trigger
  716.  effect 15 whenever a player moves to location 30 and "m 10 -1
  717.  16" would trigger effect 16 whenever a player moves from
  718.  location 10.  If both locations are given as -1 (m -1 -1 43),
  719.  that effect will be triggered after each movement.  This can be
  720.  used to build in a "clock" or "countdown timer".  (See "MOVE
  721.  COUNTERS" in the "Tips and Techniques" section.)
  722.  
  723.  After each move (N S E W U or D) the player makes, the game
  724.  scans all the movement records, and performs the actions
  725.  attached to each test that applies.
  726.  
  727.  NOTE: The game processes a "WAIT" command by doing a move FROM
  728.  the present location TO the same location, and thus matching
  729.  movement tests can be triggered by "wait"s.
  730.  
  731.  
  732.                            2.6 PHRASES
  733.                            ===========
  734.  
  735.  Phrases are the other way that Effect Records can be triggered.
  736.  In essence you tell the game, "If the player types in this
  737.  command, go do this effect".  These are defined in a single
  738.  line, with a "p" in the first column followed by either a one or
  739.  two word phrase (each word of the phrase must be preceded by a
  740.  single quote mark with no intervening space), followed by the
  741.  number of the Effect Record to be done.  Examples:
  742.  
  743.  p 'drink 'coffee 54
  744.  p 'scream 27
  745.  
  746.  Only the first four letters of each word are considered, so you
  747.  must be sure not to use two phrases that cannot be distinguished
  748.  on that basis.  For example, if you put both these phrases in
  749.  your scenario file:
  750.  
  751.  p 'eat 'strawberry 35
  752.  p 'eat 'straw 24
  753.  
  754.  they will interfere with each other, and both will trigger the
  755.  same effect.  In this example, Effect 35 would be triggered
  756.  whether the player typed "eat strawberry" or "eat straw" (or
  757.  even "eat strap" or "eat strazzlkdlej".)
  758.  
  759.  The game does distinguish between "verbs" (the first word) and
  760.  "nouns" (the second), so two commands like this would not be
  761.  confused even though they reduce to the same pair of 4-letter
  762.  words:
  763.  
  764.  p 'strangle 'pullet 21
  765.  p 'pull 'strap 78
  766.  
  767.  A phrase such as 'break 'vase will result in destroying the
  768.  OBJECT called "vase" only if you WANT it to and include that
  769.  among the actions of the Effect Record that phrase triggers.
  770.  
  771.  NOTE:  You can use up to 134 phrases in your game.  You are also
  772.  limited to a total of 134 "words" -- this means, unique four
  773.  letter combinations used as item names and parts of phrases
  774.  combined.  The verb/noun/name distinction doesn't count here:
  775.  even if you use "chain" all three ways in your game (an item
  776.  named 'chain  as well as the phrases "break chain" and "chain
  777.  dog"), "chain" would only count as one "word".
  778.  
  779.  
  780.                         2.7 EFFECT RECORDS
  781.                         ==================
  782.  
  783.  This final module determines what actually happens in the game.
  784.  In them you can cause text to be displayed to the player, change
  785.  the items (make them appear, disappear or alter their appearance
  786.  or other attributes), change the locations (adding or removing
  787.  connections to other locations, altering their descriptions,
  788.  etc.), make the assistant or enemies appear or vanish, give the
  789.  players bonus points, teleport him to a different location,
  790.  bring about the good or bad ending -- or any combination of
  791.  those effects.
  792.  
  793.  Effect records are basically a set of "if then" statements.  In
  794.  the "if" you have the game check to see if conditions in the
  795.  game are those you care about, and the "then" specifies what
  796.  should happen if they are.  The optional "else" is performed
  797.  when the "if" tests aren't met.
  798.  
  799.  For example, suppose your game has an elephant (item #4) the
  800.  player can ride and there is an ice bridge connecting a river
  801.  bank (Location #14) with an island (#15).  You, as "god", don't
  802.  think the player should be allowed to ride the elephant over the
  803.  bridge.  Here is how you would prevent it: first, you need a
  804.  movement check (m 14 15 25) so the game will do effect 25 when
  805.  the player crosses the bridge.  Effect 25, then, checks to be
  806.  sure that the player is indeed "breaking" your rule (IF the
  807.  player is riding the elephant) and if he is, it carries out the
  808.  consequences you have decreed (THEN collapse the ice bridge and
  809.  kill the elephant).  If the "IF" conditions are NOT met, the
  810.  "THEN" effects don't happen -- in this example, if the player
  811.  ISN'T riding the elephant, he simply crosses the bridge to the
  812.  island with nothing unusual happening.
  813.  
  814.  An Effect Record begins with a line with an "f" in the first
  815.  column, a space, and then the number of that effect.  To help
  816.  remind you of why this effect should be happening (a big game
  817.  might have over a hundred Effect Records), you could then add a
  818.  comment.  Samples:
  819.  
  820.  f 24
  821.  f 12 ; "eat strawberry"
  822.  f 18 ; boarding pirate ship
  823.  
  824.  The Effect Record ends with a period in the first column of its
  825.  own line.
  826.  
  827.  In between, you can have any number of "if then" statements,
  828.  possibly ending with an "else".  For example, suppose you had
  829.  statements equivalent to this format:
  830.  
  831.  if  some conditions
  832.    then  some actions
  833.  if  other conditions
  834.    then  other actions
  835.  else
  836.    then  last actions
  837.  
  838.  NOTE:  There can only be one "else" in an Effect Record.
  839.  
  840.  When this effect was triggered, the game would check to see if
  841.  the first set of conditions were met.  If yes, it would perform
  842.  the first set of actions.  If not, it would then check to see if
  843.  the second set of conditions applied.  If yes, the second set of
  844.  action would be done.  If neither set of conditions were met, it
  845.  would do the "else" instead, by doing the "last actions".  There
  846.  can be any number of "if then" statements, checking for dozens
  847.  of possible sets of conditions if you want.
  848.  
  849.  NOTE: As soon as one set of "if" conditions are met, the game
  850.  does those actions and does NOT consider any of the following
  851.  statements.  This means you should put more specific tests
  852.  earlier in the effect record than more general ones.  Returning
  853.  to our elephant/ice bridge example, suppose the game also
  854.  included a giant helium balloon, and you have decided that if
  855.  the player is holding the balloon it will offset enough of the
  856.  elephant's weight to allow him to ride across the bridge.
  857.  Consider the effect of these "if then" statements:
  858.  
  859.  if (riding elephant & holding balloon)
  860.     then ( print "the bridge creaks but you cross safely")
  861.  if (riding elephant)
  862.       then (collapse bridge & kill elephant)
  863.  
  864.  (The above lines are intended to be illustrative only -- the
  865.  words inside the parentheses are not correct GAME syntax.)
  866.  
  867.  In this order, the game will behave as you plan.  However, if
  868.  you reversed the statements' order, the bridge will always
  869.  collapse even if the player has the balloon, since the more
  870.  general conditions of the first statement are met and carried
  871.  out before the game could test the more specific condition of
  872.  also holding the balloon.
  873.  
  874.  In each set of conditions, the whole set is considered true only
  875.  if ALL the individual conditions evaluate true.
  876.  
  877.  SCENE does not allow for "OR" constructions: if there was a
  878.  second item that would also allow the elephant to cross the ice
  879.  bridge (perhaps an anti-gravity belt), you will have to include
  880.  a separate "if then" for that possibility (being sure to place
  881.  it, too, earlier than the general 'riding elephant' one):
  882.  
  883.  if (riding elephant & holding anti-gravity belt)
  884.     then ( print "the bridge creaks but you cross safely")
  885.  
  886.  If you want some action to ALWAYS happen when the effect is
  887.  triggered, you can simply use the "else" line:
  888.  
  889.  f 71
  890.  else
  891.   then (some actions)
  892.  .
  893.  
  894.  NOTE:  "if" can be abbreviated to an "i", "then" to a "t", and
  895.  "else" to an "e".  The effect records will be a little harder to
  896.  understand immediately but it will reduce the amount of typing
  897.  you need to do.  Also indentation on the "then" lines is
  898.  optional.  Your choice.
  899.  
  900.  Varieties of "IF" tests
  901.  =======================
  902.  The "if" part of an if/then can be made of any number of any
  903.  combination of the following tests.  The only limit is that the
  904.  entire line must be no more than 198 characters long.
  905.  
  906.  NOTE: There should be NO spaces between the various components
  907.  of one test, and there should be one space between successive
  908.  tests in an "if" statement.
  909.  
  910.  Variable tests
  911.  --------------
  912.  There are 26 variables in a game, labeled "a" to "z", each of
  913.  which can have a value from 0 to 100.  (All variables are set at
  914.  zero at the start of a game.)  These are used to keep track of
  915.  the status of things that can be changed by the player's actions
  916.  in the course of the game.  There are many types of things that
  917.  can be changed, some more obvious than others.  Some examples:
  918.  
  919.  The "status" of something can be changed.  For example, a
  920.  treasure chest could be closed and locked, closed but unlocked,
  921.  or open.  A bottle could be empty or holding wine or holding
  922.  water.  By associating a variable with that item, you can check
  923.  the value of the variable to determine what the current
  924.  condition is.  For example, suppose your game started with a
  925.  bottle of wine.  You could decide that you will use the variable
  926.  "b" to keep track of its state, and thus 0 means full of wine.
  927.  If the player drinks the wine, the effect that allows him to
  928.  drink it will set the value of "b" to 1, meaning empty.  An
  929.  effect that allows the player to fill the bottle with water
  930.  would then set "b" to 2.  Emptying the bottle would change "b"
  931.  back to 1.
  932.  
  933.  A variable can also be used to determine how many times
  934.  something has been done.  Perhaps the action can only be done a
  935.  limited number of times -- say, he only has 3 matches.  Or
  936.  perhaps he has to perform an action a multiple number of times
  937.  before you want something to result -- for example, he must dig
  938.  7 times before the treasure chest turns up.
  939.  
  940.  Note that these reasons could be combined: perhaps a canteen can
  941.  hold 5 drinks of water.  Filling the canteen sets that variable
  942.  to 5.  Each time the player drinks the value of the variable
  943.  drops by one.  When the variable reaches 0 the canteen is empty
  944.  and the player will not be able to drink again until he refills
  945.  it.
  946.  
  947.  A less obvious use of a variable is to determine WHAT a
  948.  particular item currently is.  Since the identity of an item can
  949.  be changed (see CHANGING ITEMS for how this can be done) it
  950.  might be necessary to know which version it currently is.  For
  951.  example, suppose you have a "vase" as item #6 in your game.  It
  952.  may be possible for the player to turn it into "broken pieces of
  953.  glass", perhaps by dropping it.  Now, suppose each version of
  954.  the object has an intended use -- the vase to carry some water,
  955.  the pieces of glass to cut a rope.  If the player types the
  956.  command "cut rope" you have to check not only, does he have item
  957.  #6? but also WHICH VERSION of #6?  This can be done by using
  958.  "v" = 0 to mean it is the vase and "v" = 1 to mean it is the
  959.  pieces of glass.
  960.  
  961.  The tests that can be done on variables are: Is it equal to some
  962.  number?  Is it NOT equal to some number?  Is it less than some
  963.  number?  Is it greater than some number?  Variable tests take
  964.  the form of a "v", followed by the letter of the particular
  965.  variable you are testing, followed by the appropriate "operator"
  966.  ("=" means "equals", "#" means "does not equal", ">" means "is
  967.  greater than" and "<" means "is less than") followed by the
  968.  numerical value (from 0 to 100) that you are testing against.
  969.  Some examples:
  970.  
  971.  vx=5
  972.  vb#37
  973.  vv<12
  974.  vr>66
  975.  
  976.  which test, respectively, if variable x is equal to 5, if
  977.  variable b is not equal to 37, if variable v is less than 12,
  978.  and if variable r is greater than 66.
  979.  
  980.  Location tests
  981.  --------------
  982.  Sometimes certain effects should only happen if the player or
  983.  some object(s) are either at, or not at, certain locations in
  984.  the game.  For example, a player probably shouldn't be able to
  985.  light a match if he is swimming underwater.  Location tests take
  986.  the form of an "l", followed by the number of the item in
  987.  question, followed by an "operator" ("@" means "is at", "!"
  988.  means "is not at"), followed by the location in question.  Some
  989.  examples:
  990.  
  991.  l6@52
  992.  l13!114
  993.  
  994.  test, respectively, that item 6 is at location 52, and that item
  995.  13 is not at location 114.
  996.  
  997.  There are a few special cases that can be used in location
  998.  tests.
  999.  
  1000.  A "-1" used as the object (that is, before the operator) refers
  1001.  to the player.  So, l-1@13 would test if the player is at
  1002.  location 13 and l-1!23  would test if the player is not at
  1003.  location 23.
  1004.  
  1005.  Also, used as locations (that is, after the operator) the
  1006.  following numbers have special meanings:
  1007.  
  1008.            -1 = in the player's inventory
  1009.            -2 = "out of the game"
  1010.            -3 = synonym for the player's location
  1011.  
  1012.  Thus,  l13!-1 is a test that item 13 is not being carried by the
  1013.  player, and l42@-3 tests that item 42 is in the same room as the
  1014.  player.
  1015.  
  1016.  NOTE: only locations 1 to 119 can be used in location tests.  Be
  1017.  sure not to assign a higher number to a location that you will
  1018.  want to use in any Effect Record tests.
  1019.  
  1020.  Assistant/Guard tests
  1021.  ---------------------
  1022.  These are straightforward:
  1023.  
  1024.  a-             Tests if the assistant is not with the player
  1025.  a+             Tests if the assistant is with the player
  1026.  g-             Tests if there is no guard nearby
  1027.  g+             Tests if there is a guard nearby
  1028.  
  1029.  Random chance tests
  1030.  -------------------
  1031.  Sometimes you want things to happen only some of the time.  This
  1032.  can be done with a chance test, which generates a random number
  1033.  from 0 to 99 and compares it with the cut-off value you supply:
  1034.  if the number is less than the cut-off, the condition is met,
  1035.  otherwise it fails.  The format is an "r" followed by a cutoff
  1036.  number between 1 and 100.  For example:
  1037.  
  1038.  r67
  1039.  
  1040.  means the test will be met approximately 67% of the time.
  1041.  
  1042.  Note: you can use a series of random tests if you want to select
  1043.  between multiple effects.  For example, suppose you have a
  1044.  gumball machine for the player to use.  You might want him to
  1045.  get a gumball 60% of the time, a whistle 10% of the time, a
  1046.  rabbit's foot 20% of the time, and nothing at all the remaining
  1047.  10% times.  You would write a series of if/then statements like
  1048.  
  1049.  if r60
  1050.    then (give gumball)
  1051.  if r25
  1052.    then (give whistle)
  1053.  if r67
  1054.    then (give rabbits's foot)
  1055.  else
  1056.    then (give nothing)
  1057.  
  1058.  Note that each "r" is a new random number, so in this example,
  1059.  the first r-test (r60) will be false 40% of the time.  Thus the
  1060.  10% chance of the whistle comes from taking 25% of the times it
  1061.  fails the first test.  Similarly, 30% of the time BOTH the first
  1062.  and second tests will fail -- so the overall 20% chance of the
  1063.  rabbit's foot is 67% of the cases that reach that level.
  1064.  
  1065.  Another likely use for a random test is to determine which room
  1066.  the player is sent to.  For example, suppose you want the player
  1067.  to have an equal chance of exiting an elevator on floors 1, 2
  1068.  and 3.  These tests will accomplish that:
  1069.  
  1070.  if r33
  1071.    then (put on floor one)
  1072.  if r50
  1073.    then (put on floor two)
  1074.  else
  1075.    then (put on floor three)
  1076.  
  1077.  Remember that the various types of tests can be combined in one
  1078.  "if" statement in any numbers desired, up to a maximum line
  1079.  length of 198 characters.  The series of tests is concluded when
  1080.  SCENE encounters a carriage return or a comment marker.  Some
  1081.  examples:
  1082.  
  1083.  if g+ r80   ; most of the time, do this
  1084.  
  1085.  this test would be met 80% of the times that a guard was nearby
  1086.  
  1087.  if l-1@5 l15@-1
  1088.  
  1089.  this would check if the player was at location 5, and carrying
  1090.  item 15
  1091.  
  1092.  if ve=5 a- l12@-1 l11@-1
  1093.  
  1094.  This would test if variable "e" had been set to 5, the player's
  1095.  assistant was not present, and the player was carrying both
  1096.  items 12 and 11.
  1097.  
  1098.  Note that in the case of "if g+ r80" you could follow it with a
  1099.  "if g+" to to catch the remaining 20% of chances when the guard
  1100.  was present.  And an "else" would then handle the times when no
  1101.  guard was present.
  1102.  
  1103.  
  1104.  Varieties of "THEN" Actions
  1105.  ===========================
  1106.  The "then" part of an if/then can be made of any number of any
  1107.  combination of the following possible actions.  (Just as with
  1108.  the "if" tests, there should be no spaces WITHIN action command
  1109.  but there should be one BETWEEN multiple action commands in a
  1110.  then statement.  (The "else" part of an Effect Record is in
  1111.  essence a catch-all "then" statement, so all types and
  1112.  combinations of "then" actions can also be used in "else"
  1113.  statements.)  As with "if"s, a "then" line can be up to 198
  1114.  characters long, and is concluded with a carriage return or
  1115.  comment marker.
  1116.  
  1117.  Change variables
  1118.  ----------------
  1119.  You can add or subtract some number from a variable, or set it
  1120.  to a new value.  (Remember that the value of a variable must
  1121.  stay in the range 0 to 100.)  This is done by a "v" followed by
  1122.  letter of the variable to change, followed by the operator ("+"
  1123.  to add, "-" to subtract or "=" to set value), followed a number.
  1124.  Some examples:
  1125.  
  1126.  ve=12
  1127.  vj+7
  1128.  vx-2
  1129.  
  1130.  These would, respectively, set variable e to 12, add 7 to
  1131.  variable j, and subtract 2 from variable x.
  1132.  
  1133.  Change items
  1134.  ------------
  1135.  You can change an item's description, move it around, alter its
  1136.  weight (or any other feature in its definition) or make it
  1137.  appear or disappear.  This is done by copying the description of
  1138.  one item over the previous description of another.
  1139.  
  1140.  For example, consider these two item records:
  1141.  
  1142.  i 5
  1143.  %"crystal vase"
  1144.  'vase
  1145.  l 1
  1146.  w 10
  1147.  .
  1148.  
  1149.  i 51
  1150.  %"broken shards of glass"
  1151.  'glass
  1152.  'shards
  1153.  l -3
  1154.  w 10
  1155.  .
  1156.  
  1157.  By copying item #51 over #5, you will transform his crystal vase
  1158.  into broken pieces at his current location (because of the -3 as
  1159.  its location), perhaps in response to the phrase "break vase."
  1160.  
  1161.  The format of this type of change is an "i", followed by the
  1162.  number of the item to be changed, followed by an "=", followed
  1163.  by the number of the item with the new description.  For the
  1164.  previous case, the proper action is:
  1165.  
  1166.  i5=51
  1167.  
  1168.  This is how items 45 through 59 come into play.  Since only
  1169.  items 1-44 will be described as being present at a location or
  1170.  in a player's inventory, the higher numbers are invisible for
  1171.  all practical purposes.  When you want one of them to appear you
  1172.  have to copy its description over that of a lower number item.
  1173.  Obviously this will have the effect of making the first item
  1174.  vanish, so you must be careful that that is the effect you want.
  1175.  
  1176.  It is safe to copy a higher object over a lower one in three
  1177.  cases:
  1178.  
  1179.  A) When the first item is being logically transformed into the
  1180.  second one, as was the case with the vase/glass shards, or
  1181.  turning some wood into a pile of ashes, and so forth.
  1182.  
  1183.  B) When the first item was never visible.  If a lower numbered
  1184.  item was never defined, or defined but not given any "%"
  1185.  description it will be "invisible" to the player, and you can
  1186.  copy the item you want to appear over it at the appropriate
  1187.  point in the game without making something else disappear.
  1188.  
  1189.  C) When the first item must have already been "destroyed" prior
  1190.  to that point in the game.  For example, suppose one lower
  1191.  number item is a hand grenade, and the only way the player can
  1192.  enter a locked fortress is by using the grenade to blow open the
  1193.  gate.  And suppose that within the fortress the player can cause
  1194.  a K-Ration to appear by pressing a button.  It would be safe to
  1195.  copy the K-Ration item description onto the grenade item number,
  1196.  since the grenade will have already vanished before that point.
  1197.  
  1198.  The important point is to avoid "vanishing" some item the player
  1199.  has reason to think he still has, and especially one he needs.
  1200.  For example, don't copy a new item over the shovel the player
  1201.  will need to dig up a treasure chest!
  1202.  
  1203.  Change locations
  1204.  ----------------
  1205.  Similarly, you can change the description of a location.  The
  1206.  format of this change is an "l", followed by the number of the
  1207.  location to change, followed by an "=", followed by the number
  1208.  of the new location description.  For example:
  1209.  
  1210.  l4=27
  1211.  
  1212.  would make location 4 a copy of location 27.
  1213.  
  1214.  This can be used to change any aspect of a room description.
  1215.  For example, consider these two location records:
  1216.  
  1217.  l 10
  1218.  %"in a room with a door in the south wall"
  1219.  np15
  1220.  sn42
  1221.  .
  1222.  
  1223.  l 11
  1224.  %10
  1225.  np15
  1226.  sx73
  1227.  .
  1228.  
  1229.  If the player is at location 10 and tries to go south, string 42
  1230.  will be printed (which might say "the door is locked"), but
  1231.  he'll stay at location 10.  However, the phrase 'unlock door'
  1232.  might cause the door to open.  This would be done by:
  1233.  
  1234.         l10=11
  1235.  
  1236.  which causes location 11 to be copied onto location 10. All the
  1237.  entries are the same save for the south movement, which becomes
  1238.  sx73.  This means that location 10 now has a route south to
  1239.  location 73.  Note that the description for location 11 is %10,
  1240.  which causes it to be a duplicate of the description for
  1241.  location 10.
  1242.  
  1243.  Other changes can be made in a room by the same method:  for
  1244.  example, the new room description could reflect the changes some
  1245.  action of the player has caused: perhaps the walls are scorched
  1246.  after a fire, perhaps the mirrors that covered the walls are now
  1247.  broken, perhaps a secret passage to the south is now open, etc.
  1248.  Or perhaps the new description is the same except it no longer
  1249.  has a "," line, and thus is no longer dark.
  1250.  
  1251.  As with location tests, only locations number 1 - 119 can be
  1252.  used in these changes.
  1253.  
  1254.  Move player
  1255.  -----------
  1256.  You can also change the location of the player, and anything he
  1257.  might be carrying, by "teleporting" him to a new location.  This
  1258.  is done by a "t" followed by the number of the location he
  1259.  should be moved to.  Example:
  1260.  
  1261.  t117
  1262.  
  1263.  You can make it obvious to the player or not that something has
  1264.  happened.  If the description of the new location is different
  1265.  than where he used to be he will of course know he has moved,
  1266.  but if the two locations have the same short description he will
  1267.  not realize it unless you give him a hint or until he discovers
  1268.  some related change.
  1269.  
  1270.  NOTE:  You can only teleport the player to a location numbered
  1271.  from 1 to 119.  Also, this bypasses the Movement Tests, so any
  1272.  Effect that was supposed to happen when the player entered that
  1273.  location, or left the current location, will NOT be triggered.
  1274.  
  1275.  Change assistant/guard status
  1276.  -----------------------------
  1277.  Both the assistant and the guard are inactive at the start of
  1278.  the game.  An "a+" makes the assistant appear and an "a-" will
  1279.  make him vanish.
  1280.  
  1281.  The guard status works a little differently.  A "g+" activates
  1282.  the guard mechanism, and makes a guard visible IF one had been
  1283.  previously created.  A "g-" de-activates the guard mechanism and
  1284.  masks the presence of an already created guard.  That guard
  1285.  isn't dead though; he will re-appear when a "g+" is performed.
  1286.  
  1287.  There is also a random element built into guard creation.  A
  1288.  guard will be created only when the guard mechanism is active
  1289.  (via g+), there is currently no guard present, there are still
  1290.  "unused" guards available, and a random number in the assigned
  1291.  range is generated.  (Thus only one guard is ever present at a
  1292.  time.)
  1293.  
  1294.  A "gk" KILLS a guard, assuming one is in the room with the
  1295.  player when the effect is run.  If you chose to have more than
  1296.  one guard, new ones will continue to be created until the player
  1297.  has made the proper number of kills.
  1298.  
  1299.  Also, if a guard is visible and the player enters one of the
  1300.  "safe" locations (#5 - 15), the guard will temporarily vanish.
  1301.  This guard will automatically re-appear when the player leaves
  1302.  the "safe" area.  This can be used to create a haven for the
  1303.  player or if the logic of the game requires that the guards not
  1304.  be allowed in some areas.  For example, vampires should stay out
  1305.  of churches.
  1306.  
  1307.  Change score
  1308.  ------------
  1309.  This is the third way to affect the player's score.  (The other
  1310.  two are awarding points for entering a certain location or
  1311.  taking a certain object.)  The format is a "c" followed by a
  1312.  number between 1 and 100.  (It is impossible to reduce a
  1313.  player's score.)  Example:
  1314.  
  1315.  c40
  1316.  
  1317.  If you want to award more than 100 points in a certain effect
  1318.  (possibly for solving an EXTREMELY tricky puzzle) you can break
  1319.  it down into multiple credit changes.  For example, these
  1320.  commands would give the player 250 points:
  1321.  
  1322.  c100 c100 c50
  1323.  
  1324.  Print Effect Strings
  1325.  --------------------
  1326.  Almost every "then" command will include a "print effect string"
  1327.  command, since that is the main way of notifying the player that
  1328.  things are happening.  The format for the command is a "["
  1329.  followed by the number of the Effect String that should be
  1330.  printed, like this:
  1331.  
  1332.  [213
  1333.  
  1334.  (See "EFFECT STRINGS" for more on this.)
  1335.  
  1336.  Besides the strings you enter, there are four common responses
  1337.  you can cause to be printed just by entering the appropriate
  1338.  letter ("n" or "u" or "h" or "s") in your "then" statement.
  1339.  These result in the following responses:
  1340.  
  1341.  a "n" results in a "Nothing happens"
  1342.  a "u" results in a "I don't understand"
  1343.  a "h" results in a "You have no <object>"
  1344.  a "s" results in a "You see no <object>"
  1345.  
  1346.  (In the last two cases, the game uses the second word from the
  1347.  player's command as the object.)
  1348.  
  1349.  For example, suppose there was a haystack in location 7.  Your
  1350.  scenario might include these lines:
  1351.  
  1352.  p 'search 'haystack 22
  1353.  
  1354.  f 22 ; search haystack
  1355.  if l-1@7  ; player is in right location
  1356.  then [73  ; so tell him what he finds
  1357.  else
  1358.   then s
  1359.  .
  1360.  
  1361.  Now, if the player types "search haystack" anywhere except
  1362.  location 7, the game will respond "You see no haystack."
  1363.  
  1364.  Perform default action
  1365.  ----------------------
  1366.  Sometimes you want the game to do the normal action related to a
  1367.  phrase AS WELL AS something special.  This is done by including
  1368.  an "f" in the "then" statement.  For example, if the player
  1369.  takes the cork out of a cask you might want the game to print a
  1370.  string describing beer pouring out all over the floor, but it
  1371.  should go ahead and "take" the plug, too.  That is, put the plug
  1372.  into the players inventory.  The "then" statement for this might
  1373.  look like this:
  1374.  
  1375.  then [83 f
  1376.  
  1377.  End the game
  1378.  ------------
  1379.  There are two ways of ending the game, good and bad, also known
  1380.  as "winning" and "losing".  Putting an "e" into a "then"
  1381.  statement means that the player has won.  The game will print
  1382.  out the text you entered for the "e" command, and then
  1383.  terminate.
  1384.  
  1385.  Similarly, a "b" causes the game to print the "bad end" text,
  1386.  notifying the player that he has just blown it.  It will then
  1387.  offer him the choice of restarting the game or quitting.
  1388.  
  1389.  NOTE:  There is no set limit for the number of Effect Records
  1390.  you can define but there IS a limited amount of storage space
  1391.  set aside for them.  Obviously, an effect with many "If Then"
  1392.  statements, with many tests and actions, will use more storage
  1393.  space than short, simple ones.  The effect mechanism codes your
  1394.  tests and actions into the same storage space, starting with the
  1395.  high end and working down, so you should start at the low end
  1396.  and work up.  It is ok to skip Effect Record numbers, and you
  1397.  don't have to assign them in any particular order.
  1398.       When you compile your scenario SCENE reports on how much
  1399.  Effect Record space has been used -- this number can go up to
  1400.  2099.  This is plenty for about 100 FX Records of "reasonable"
  1401.  complexity, but if you plan a large game, keep an eye on this
  1402.  number to be sure you don't run out of space.
  1403.  
  1404.  2.8 SHORT STRINGS
  1405.  =================
  1406.  There can be up to 199 Short Strings.  These can be entered
  1407.  anywhere in your source file EXCEPT inside a record module.  For
  1408.  example, if the string is to hold the description of an item, it
  1409.  could be put on the line just after the "." line that closes
  1410.  that module, or just before the "i 23" type label that starts
  1411.  it, or anywhere else you please.  Since Short Strings are used
  1412.  for both blocked-passage "You can't go that way" type messages
  1413.  and item descriptions, you might find it more convenient to
  1414.  cluster them together, perhaps just before the Effect Strings at
  1415.  the end of your source file.
  1416.  
  1417.  The format for a short string consists of a quotation mark in
  1418.  the first column of a line, followed by the number of the
  1419.  string, from 1 to 199.  The next line should start with a
  1420.  quotation mark, followed by your text, ending with another
  1421.  quotation mark.  The text can be up to 158 characters long.
  1422.  (Short Strings are stored internally, so the total space
  1423.  available for them is limited by your computer's memory size.)
  1424.  Example:
  1425.  
  1426.  "23
  1427.  "a golden statue of Buddha"
  1428.  "17
  1429.  "The way south is blocked by a locked door."
  1430.  
  1431.  If you want to include a quotation WITHIN a string, you will
  1432.  have to use single quotes instead.  Example:
  1433.  
  1434.  "103
  1435.  "The conductor says,'Let me see you ticket, please,' and blocks
  1436.  the door."
  1437.  
  1438.  NOTE:  You do not have to use the numbers in any particular
  1439.  order, and it doesn't matter if you skip some numbers.  Just
  1440.  don't assign the same number to two different strings:  the
  1441.  second will overwrite the first, erasing it.
  1442.  
  1443.  Strings you create by putting the text in quotation marks after
  1444.  the "%" in an Item Record (instead of explicitly using a number
  1445.  and then listing the text for that number separately) are
  1446.  assigned a number by SCENE.  It starts at 199 and works down,
  1447.  and will not reassign a number if you have already used it.
  1448.  However, if YOU later assign a string to a number that SCENE had
  1449.  already used, the second string will overwrite and destroy the
  1450.  first one.  To avoid any possibility of this, you should start
  1451.  the string numbers you assign at 1 and work up.  (Since the
  1452.  maximum number of strings that the computer can assign numbers
  1453.  to is 118 -- two for each of the 59 items in your game -- you
  1454.  are completely safe if you keep your strings numbers under 80.)
  1455.  
  1456.  2.9 EFFECT STRINGS
  1457.  ==================
  1458.  There can be up to 219 Effect Strings.  These strings are
  1459.  printed when called for by the "then" part of an Effect Record.
  1460.  The format is a "[" in the first column, followed by the number
  1461.  of the string, from 1 to 219.  Next, put another "[" in the
  1462.  first column of the next line, and type in the text you want
  1463.  displayed, ending with an "]".  The string can be of any length,
  1464.  and the pause command "~" can be used as many times as you want
  1465.  within it.  Everything up to the next "]" will be considered
  1466.  part of that string.  For example,
  1467.  
  1468.  [124
  1469.  [The door swings open on its rusty hinges, revealing a dark
  1470.  passage.
  1471.  
  1472.  A breeze carrying the scent of seaweed blows in your face.]
  1473.  
  1474.  These strings can be entered anywhere within your scenario file
  1475.  that suits you, EXCEPT inside another record module.  For
  1476.  example, you could put the string on the line right after the
  1477.  "." line that concludes the effect record that calls it.  Or
  1478.  before the "f #" line that starts the record.  Or you could
  1479.  cluster all the print strings in one area at the end of your
  1480.  scenario -- this might be less convenient during writing, but
  1481.  would make it less likely that you will assign two strings to
  1482.  the same number.  (That would cause the second string to be
  1483.  written over the first, effectively erasing the first one.)
  1484.  
  1485.  NOTE:  Again, it is not necessary to assign string numbers in
  1486.  any particular order, and it doesn't matter if you omit some
  1487.  numbers.
  1488.  
  1489.  Also note that Effect Strings and Short Strings are stored
  1490.  separately, so it doesn't matter if you reuse numbers between
  1491.  them.  That is, you can have both a "1 and a [1 string in the
  1492.  same game without any problems.
  1493.  
  1494.  
  1495.                   ==============================
  1496.                   ||  3. TIPS and TECHNIQUES  ||
  1497.                   ==============================
  1498.  
  1499.  
  1500.                   3.1 Make good use of comments
  1501.                   =============================
  1502.  
  1503.  This is THE most important tip:  Use lots of comments!
  1504.  
  1505.  Label each function by what calls it:
  1506.  f 13  ; eat sandwich
  1507.  
  1508.  Label each "if" with what you are testing for:
  1509.  if l21@-1 l32@-1 ; does he have both candles and matches?
  1510.  
  1511.  Label each "then" that is more complex than a simple print
  1512.  string:
  1513.  then i12=56 ; swap burning candles for unlit ones
  1514.  
  1515.  Put in "road map" markers:
  1516.  ; ========== start of island locations =====
  1517.  
  1518.  Label alternate versions of locations with their intended use:
  1519.  l 21 ; starting living room
  1520.  
  1521.  l 22 ; living room after secret passage opened
  1522.  
  1523.  
  1524.  And anything else that occurs to you.  Remember, everything you
  1525.  write will seem perfectly clear and obvious to you at the
  1526.  moment, but if your game is a large one that will be written
  1527.  over several weeks labels will save you from having to puzzle
  1528.  out the purpose of something over and over.  And if you ever
  1529.  have to go back to your game months later, to fix some bug that
  1530.  has been discovered, you will be so grateful for those comments.
  1531.  
  1532.  
  1533.              3.2 Arrange your scenario file logically
  1534.              ========================================
  1535.  
  1536.  The SCENE compiler doesn't care what order you use when you
  1537.  create your scenario file, or even if there is any order at all,
  1538.  but it can make a great difference in ease of writing and de-
  1539.  bugging your game.
  1540.  
  1541.  Location Records
  1542.  ================
  1543.  If the locations in your game break up into logical groups (say,
  1544.  island vs. mainland, above ground vs. below ground, earth vs.
  1545.  rocketship vs. moon), keeping the location records arranged that
  1546.  way will lessen the time you spend searching for any particular
  1547.  area.  To make it even easier, put in "road map" dividers:  put
  1548.  a ";" in the first column, followed by something that is eye-
  1549.  catching, unique (so it can be easily searched for by your word-
  1550.  processor) and includes a label of what area the following
  1551.  locations belong to.
  1552.  
  1553.  Item Records
  1554.  ============
  1555.  These could be put either near the location record of the place
  1556.  that they will start in, or grouped together in your file.  If
  1557.  you do the latter, adding a "divider" road mark and keeping the
  1558.  records in numerical order will make it easy to determine which
  1559.  numbers have been used/are still available.
  1560.  
  1561.  Movement checks
  1562.  ===============
  1563.  These can be grouped together for convenience, but it really
  1564.  makes little difference.  This is because ALL movement checks
  1565.  are scanned each move, and duplicate movement checks are allowed
  1566.  and don't interfere with each other.  For example, you might
  1567.  have two "do each move" checks  ( m -1 -1 2  and m -1 -1 3)
  1568.  which are doing different tasks.
  1569.  
  1570.  Phrases
  1571.  =======
  1572.  Phrases DEFINITELY should be grouped together, and I suggest
  1573.  that you keep them in alphabetical order.  This is because if
  1574.  you accidentally duplicate a phrase, the first one in your file
  1575.  will "mask" the second one, and prevent it from working
  1576.  properly.  For example, you might have written the phrase 'open
  1577.  'door early in your game, in connection with player getting
  1578.  something out of a safe.  Days later you could accidentally
  1579.  define the same phrase, this time in the context of opening the
  1580.  door of a spaceship.  If you don't remember that you have
  1581.  already used the phrase, the player might never be able to get
  1582.  into that spaceship.
  1583.  
  1584.  NOTE: It is perfectly ok to use one phrase in several
  1585.  senses/locations.  You must just be sure that all the possible
  1586.  actions are handled in the SAME Effect Record, and that your
  1587.  "if" tests can distinguish between them.  For the safe/spaceship
  1588.  scenario, something like this would work:
  1589.  
  1590.  f 12 ; 'open 'door
  1591.  if l-1@13  ; player in living room?
  1592.    then (print out string about what was in safe, make items
  1593.            appear, etc.)
  1594.  if l-1@76 ; player on spaceship gangplank?
  1595.       then (swap location 76 so can now enter space ship)
  1596.  else
  1597.    then u ; print "don't understand", since not near a door
  1598.  .
  1599.  
  1600.  (If there were other locations with doors, simply keep adding
  1601.  appropriate "if thens" before the "else".)
  1602.  
  1603.  Obviously, having all your phrases alphabetically grouped in one
  1604.  area makes it simple to see whether the phrase you have in mind
  1605.  is a new one, to be given its own new Effect Record, or already
  1606.  in use, in which case you'll need to add one or more new "if
  1607.  thens" to the existing Effect Record.
  1608.  
  1609.  Effect Records
  1610.  ==============
  1611.  The logical place for these is in a group after the "phrases"
  1612.  area.  Keeping them in ascending numerical order will speed up
  1613.  locating the one you want to work on and make it easier to avoid
  1614.  duplicating a number.
  1615.  
  1616.  Short Strings
  1617.  =============
  1618.  You might want to place each "you can't go that way"-type string
  1619.  right after the location record that uses it, and each "item
  1620.  description" string after its object record.  Or you might also
  1621.  group these together in ascending order.  The first system is
  1622.  quicker to write and more easily understood when reading the
  1623.  scenario file, the second system lessens the chances of
  1624.  duplication numbers.
  1625.  
  1626.  Effect Strings
  1627.  ==============
  1628.  Again, these could go either after the Effect that uses them or
  1629.  grouped together after the Effect Records as a whole.  The
  1630.  advantages are the same as with the Short Strings, but since
  1631.  there will probably be many more of these and they tend to be
  1632.  longer, I prefer to put them together at the end of the file.
  1633.  (Also, it may be that the same string could be used by several
  1634.  different Effect Records.)
  1635.  
  1636.  
  1637.                           3.3 Draw a map
  1638.                           ==============
  1639.  
  1640.  Having a map of your game's locations on paper will make it
  1641.  easier when entering the connections between locations.  As you
  1642.  enter the Location Records, be sure to note the number you
  1643.  assigned to that location on your map.  (And if you have
  1644.  alternate versions of the same location, put down all their
  1645.  numbers, and what they are for/how they differ.)  This is very
  1646.  useful when you want to write an "if then" statement checking if
  1647.  the player is in the Sultan's Harem -- and you've forgotten
  1648.  which number that location is.
  1649.  
  1650.  
  1651.                3.4 Tackle your game in small chunks
  1652.                ====================================
  1653.  
  1654.  It is inevitable that you will make some errors, or typos at
  1655.  least, as you write you game.  These problems are much more
  1656.  easily tracked down if you know the flaw MUST be in the
  1657.  relatively small number of lines you just added.
  1658.  
  1659.  The free-form nature of this game system makes this approach
  1660.  easy and natural.  You might concentrate on one physical area
  1661.  (the rooms in a house, the grounds around it, the main street of
  1662.  a town) or the Phrases and Effect Records involved in one small
  1663.  puzzle ("unlock safe" and "open safe" and "read will") at a
  1664.  time.  When you have written them use SCENE to compile your
  1665.  scenario, then test your work by running it with PLAY.  If you
  1666.  added a new area, "walk" through it, reading all the descrip-
  1667.  tions, making sure all the locations connect the way you meant
  1668.  them to, "searching" and "examining" as appropriate.  If you
  1669.  added some phrases or movement checks, try them out: unlock that
  1670.  safe, read the will, etc.  If you discover a problem, or realize
  1671.  that you overlooked something (did you remember to test that the
  1672.  player HAS the will before he can read it?), go back to the
  1673.  scenario file and correct it.
  1674.  
  1675.  Basically, it is much easier in the long run if you don't move
  1676.  on to adding something new until you have the earlier parts
  1677.  working correctly.
  1678.  
  1679.  
  1680.          3.5 Use foresight in assigning location numbers
  1681.          ===============================================
  1682.  
  1683.  Remember that you have a limited number of "safe" and "hiding"
  1684.  rooms, and that only 1-119 can be use in "if then" tests and
  1685.  actions.  That will probably be sufficient for your game, but
  1686.  don't "waste" them by giving an unimportant location one of
  1687.  those special numbers.  One system is to keep a paper list of
  1688.  all the room numbers and check them off as you assign them.  As
  1689.  you create each new location ask yourself, Do you want to hide
  1690.  some object in this room?  Do you want to keep the guards out of
  1691.  this location?   If the answer is yes, assign an appropriate
  1692.  number: 2 - 10 for hiding, 5 - 15 for "safe" rooms, (5-10 if it
  1693.  needs to be both). If no, is there anything else that will
  1694.  happen "here"?  Will I ever need to test if the player or some
  1695.  item is located here?  Will I ever want to "swap" this location
  1696.  for a different version of it?  If yes, assign the next unused
  1697.  number from 16 to 119.  If the answer is no, give it the next
  1698.  available number higher than 119.  With this system, you may end
  1699.  up with long stretches of unassigned location numbers (nothing
  1700.  from 70 to 119, say, but you have used 120-150) but that has no
  1701.  bad effect on the game.
  1702.  
  1703.  If you ever find you need to change a location's number (perhaps
  1704.  you found out you DO need to be able to teleport the player to
  1705.  what you thought was an unimportant location) all you need to do
  1706.  is edit your scenario.  However, remember that you must change
  1707.  ALL the times that location is referred to by number.  Suppose
  1708.  you are changing room 130 to 86.  Not only do you need to change
  1709.  it in the "L 130" record, you also need to change the Location
  1710.  Record of each location that it connects with: if you go east to
  1711.  location 131, be sure to change location 131 so that it goes
  1712.  west to 86 instead of the old 130.
  1713.  
  1714.  If you are changing a location FROM a number 119 or less, you
  1715.  should also check for that location in the effect records, and
  1716.  substitute the new location number there, too.  (Be sure to
  1717.  remember that locations used in Effect Records must be 119 or
  1718.  lower.)
  1719.  
  1720.  
  1721.           3.6 Use foresight in assigning object numbers
  1722.           =============================================
  1723.  
  1724.  Remember that only items from 1 to 44 are "visible" to the
  1725.  player.  Items that should "exist" from the beginning of the
  1726.  game, then, must be given one of those numbers.  (And, of
  1727.  course, if you want to include a light source, it MUST be #1.)
  1728.  
  1729.  Less obviously, if you want something to be "appear" at a
  1730.  location it wasn't in earlier, you will have to give it a number
  1731.  HIGHER than 44.  It will then be "invisible" until you have
  1732.  "swapped" it onto a lower number.
  1733.  
  1734.  You will almost certainly want to "destroy" or "vanish" some
  1735.  item in the course of the game.  To do this, have an invisible
  1736.  item -- one with no description and no "names".  For example:
  1737.  
  1738.  i 10 ; item to "vanish" others
  1739.  l-2
  1740.  .
  1741.  
  1742.  Copying this item onto any other will make that item disappear.
  1743.  Note: this item could equally well be given a number from 45 -
  1744.  59.  It makes no difference so use whichever type of item you
  1745.  can spare most easily. (See "ITEM RECORDS" for more
  1746.  considerations on swapping items into and out of existence.)
  1747.  
  1748.  It is possible that you will HAVE to make another item appear --
  1749.  and you have already used up all the higher number items that
  1750.  would normally be used to do this by copying over a lower
  1751.  number.  There is a way around this, but it is something of a
  1752.  kludge.  Instead of making something appear in a room it was in
  1753.  before, you use an item that was always present and visible in
  1754.  the room -- but it is actually a DIFFERENT room.  This can be
  1755.  done by having two versions of a room with the exact same
  1756.  description and connections, and teleporting the player between
  1757.  them.
  1758.  
  1759.  For example, room 23 and 24 are two versions of a cafeteria,
  1760.  identical except for their location number, and the item in
  1761.  question is a cup of coffee which the player can buy from a
  1762.  vending machine.  Here are the necessary records:
  1763.  
  1764.  i 29
  1765.  %"a cup of coffee"
  1766.  'cup
  1767.  'coffee
  1768.  l 24
  1769.  .
  1770.  
  1771.  l 23 ; cafeteria w/o coffee
  1772.  %"an ordinary cafeteria.  Built into the wall is a vending
  1773.  machine.  Above its slot is a sign, offering a cup of coffee for
  1774.  25 cents."
  1775.  sd30
  1776.  .
  1777.  
  1778.  l 24 ; cafeteria w/coffee
  1779.  %23
  1780.  sd30
  1781.  .
  1782.  
  1783.  l 30
  1784.  %"a hallway outside the cafeteria"
  1785.  nd23
  1786.  .
  1787.  
  1788.  p 'insert 'quarter 30
  1789.  
  1790.  f 30
  1791.  if l-1@23 l20@-1 ; player in first version of cafeteria, with
  1792.                   ;  quarter
  1793.   then t24 i20=59 ; teleport player to version with coffee and
  1794.          ;vanish quarter
  1795.  .
  1796.  
  1797.  From the player's point of view, a cup of coffee has appeared,
  1798.  but in fact the coffee was there all along -- he changed, it
  1799.  didn't.  Since the description of the room is the same, and
  1800.  going out the door will take him to the same location he came in
  1801.  from, he has no reason to suspect what actually happened.  This
  1802.  seems to work as nicely as making something appear by swapping
  1803.  items, but there is one big problem: any items set down in the
  1804.  first version of the cafeteria by the player will not make the
  1805.  trip with him.  From his point of view, they have vanished.
  1806.  
  1807.  Even more peculiar, if he leaves the cafeteria and then re-
  1808.  enters it, those items will now be there!  What's worst, though,
  1809.  is that if the player sets any items down in the second version,
  1810.  and leaves without them, he loses them forever!  (Because the
  1811.  only way to reach location 24 is by inserting the quarter -- and
  1812.  he no longer has it.)  You could treat this flaw as a "feature",
  1813.  by adding to the description a sign saying  that "management
  1814.  takes no responsibility for items lost or stolen", but it's
  1815.  still a kludge, and should be used only as a last resort.
  1816.  
  1817.  
  1818.                      3.7 Keep "Cheat sheets"
  1819.                      =======================
  1820.  
  1821.  Having certain information on paper can save you from a lot of
  1822.  time scrolling through your file looking for it, certainly more
  1823.  than it will take you to make your "cheat sheets."  Two types
  1824.  have already been mention:  your map, and the list of location
  1825.  numbers that shows which have been used/are still available.
  1826.  Here are some other types that may be handy:
  1827.  
  1828.  SCENE "grammar" summary
  1829.  =======================
  1830.  Handy for instant reference when you can't immediately remember
  1831.  how to make a location dark or some other detail.  The last
  1832.  three pages of this doc file are the summary I used.
  1833.  
  1834.  List of item numbers
  1835.  ====================
  1836.  Number lines 1 to 59, and as each Item Record is entered, make a
  1837.  note of what it is, plus maybe what it weights and how many
  1838.  points it is worth and its starting location.
  1839.  
  1840.  Variables list
  1841.  ==============
  1842.  Label lines from "a" to "z", and note what you are using them to
  1843.  keep track of, and what the various values mean.  For example:
  1844.  
  1845.  f - contents of flask. 0 = alcohol, 1 = poison, 2 = empty
  1846.  t - status of trapdoor. 0 = closed, 1 = open.
  1847.  m - how many matches player has.  starts at 6.
  1848.  
  1849.  (Note the use of variables with mnemonic significance.  This
  1850.  won't always be possible, but you might as well do so when you
  1851.  can.)
  1852.  
  1853.  "Point" list
  1854.  ============
  1855.  If your game is oriented towards awarding points, you might want
  1856.  to keep track of them separately, so you can use some
  1857.  consistency in assigning them and make sure the final total is
  1858.  what you are after.   For example, each "treasure" the player
  1859.  picks up might be worth 25 points.  Getting past "blocked"
  1860.  passages might be worth 50 points each.  Solving trickier
  1861.  puzzles might be good for 100 points.  Whatever.
  1862.  
  1863.  "Word" list
  1864.  ===========
  1865.  This is just an alphabetical list of all the words you have used
  1866.  in the game, both item "names" and "verbs" and "nouns" used in
  1867.  phrases.  If you start running tight on words this list can be
  1868.  scanned for the possibility of combining synonyms.  (For
  1869.  example, do you really need both "burn" and "ignite"?)
  1870.  
  1871.  "Puzzle" list
  1872.  =============
  1873.  This is just a list of the obstacles a player has to overcome,
  1874.  or puzzles he must deal with.  It will give you some idea of how
  1875.  hard or easy your game is, perhaps leading you to add
  1876.  complications or simplify things.  Also, if you have "plotted"
  1877.  out your game overall, checking the items off as you work them
  1878.  into your scenario file shows you how your game writing is
  1879.  progressing.
  1880.  
  1881.  "Time Line"
  1882.  ===========
  1883.  If your game is basically linear this can be useful.  By
  1884.  "linear", I mean that the player must pretty much accomplish
  1885.  things in a set order.  For example, maybe the player must
  1886.  explore the starting area and discover a map to a pirate
  1887.  treasure.  Then he has to construct a ship to get to an island.
  1888.  Then he had to explore that island.  Then he has to actually
  1889.  solve the puzzles guarding the treasure.  And so forth.
  1890.  
  1891.  Obviously this is of no use if the player can tackle the puzzles
  1892.  in the game in almost any order, as was true in the "Original
  1893.  Adventure" game.
  1894.  
  1895.  "Special" lists
  1896.  ===============
  1897.  These would be anything called for by the exact game you are
  1898.  working on.  For example, if your game includes the player
  1899.  having to concoct a magic potion, a list of all the ingredients
  1900.  might be useful to have at hand.  (And a list of the order they
  1901.  should be added to the pot, if that matters.)
  1902.  
  1903.  Another example: In the first game I wrote using this system
  1904.  (FAUST), I wanted the names of all the people and places in the
  1905.  game to come from Horror movies.  I kept a list of possibilities
  1906.  so I could cross them off as they were used and add others as
  1907.  they occurred to me.
  1908.  
  1909.  Basically, remember that is is safer to write down any "idea" or
  1910.  "inspiration" that occurs to you so it won't be forgotten when
  1911.  the time comes to add it to your game.
  1912.  
  1913.  
  1914.       3.8 Include "temporary short-cuts" during the writing
  1915.       =====================================================
  1916.  
  1917.  If you are following the "write a piece then test it" method of
  1918.  writing your game, you will eventually get tired of having to do
  1919.  all the early steps in your game before you can reach the
  1920.  position in the game you actually want to test.  By putting in
  1921.  temporary "shortcuts" you can eliminate this.  For example,
  1922.  going back to the pirate treasure idea, if you are working on
  1923.  the puzzles involved in getting the treasure chest out of its
  1924.  cave, you really don't want to spend the time building and
  1925.  sailing the ship to the island.  Instead you can add a
  1926.  "temporary shortcut" to get you to that point.  Just choose one
  1927.  of the unused directions from an early location and add a
  1928.  connection to a location near the puzzle you want to test.  For
  1929.  example, going "up" from the front yard might land you just
  1930.  outside the island cave.  This will save you a LOT of time.
  1931.  
  1932.  NOTE:  Be sure to add some unique "tag" after these shortcuts.
  1933.  For example,
  1934.  
  1935.  ux122 ; $$$$$$$$ SHORT CUT -- REMOVE LATER $$$$$$$$
  1936.  
  1937.  And, of course, make sure you remove all of them before you
  1938.  compile the release version of your game.  (With "tags" of this
  1939.  format, searching for '$$$$$' with your word processor will keep
  1940.  you from overlooking any of them.)
  1941.  
  1942.  
  1943.              3.9 Add "descriptions" to non-portables
  1944.              =======================================
  1945.  
  1946.  This can add color to your game, making it richer and more
  1947.  pleasurable to play.  If your game includes a dungeon, perhaps
  1948.  the phrase "examine dungeon" should elicit a string like this:
  1949.  
  1950.  [23
  1951.  [The floor is covered with blood stains, so many they overlap
  1952.  each other in layer upon layer, and the walls seem to ring yet
  1953.  with the screams of the poor souls who were tortured here.]
  1954.  
  1955.  This isn't necessary to the solution of the game, but think of
  1956.  it as putting chocolate sprinkles on your ice cream cone:  You
  1957.  don't NEED them, but isn't it nicer to have them?
  1958.  
  1959.  Of course, these descriptions COULD reveal information necessary
  1960.  to the solution.  For example, perhaps the only way the player
  1961.  will discover the combination to the safe is by "examine desk",
  1962.  which reveals that the numbers 36 - 24 - 36 have been carved
  1963.  into its top.  (Or does that have more to do with the secretary
  1964.  than the safe?  Hmmmm.)
  1965.  
  1966.  NOTE: You can do the same thing by using an object with a long
  1967.  description instead.  Both of these sets of lines will create
  1968.  the same result to the command "examine desk".  Which you pick
  1969.  depends on whether you have more phrases or objects left to use.
  1970.  
  1971.  i 23 ; desk -- used to reveal combination
  1972.  %"a wooden desk with a scarred top"
  1973.  x"Carved into the top of the desk is the name "Sheila", and the
  1974.  numbers 36 - 24 - 36."
  1975.  'desk
  1976.  l 23
  1977.  w -1   ; so the desk in non-portable
  1978.  .
  1979.  
  1980.      - or -
  1981.  
  1982.  p 'examine 'desk 85
  1983.  
  1984.  f 85 ; examine desk
  1985.  if l-1@23  ; player in office
  1986.  then [118
  1987.  else
  1988.   then s  ; print You see no desk
  1989.  .
  1990.  
  1991.  [118
  1992.  [Carved into the top of the desk is the name "Sheila", and the
  1993.  numbers 36 - 24 - 36.]
  1994.  
  1995.  
  1996.                  3.10 Intercept built-in commands
  1997.                  ================================
  1998.  
  1999.  If the effect of a built-in command doesn't suit your particular
  2000.  scenario, you can prevent it from acting by entering that
  2001.  command as a phrase and building your own Effect Record for it.
  2002.  
  2003.  For example, suppose you are using a 'drop 'something command to
  2004.  trigger an effect -- Perhaps "drop flask" is supposed to lead to
  2005.  a description of the flask shattering and releasing a noxious
  2006.  gas.  If the player, while holding the flask, instead types
  2007.  "drop all" the effect will not be triggered and the player may
  2008.  never realize that the noxious gas is available and is the
  2009.  weapon needed to solve a puzzle.
  2010.  
  2011.  To avoid this, you could include these lines in your source
  2012.  file:
  2013.  
  2014.  p 'drop 'all 23
  2015.  
  2016.  f 23 ; drop all
  2017.  else
  2018.   then  [56
  2019.  .
  2020.  
  2021.  [56
  2022.  ["All" does not work with "Drop".  You must refer to each item
  2023.  separately.]
  2024.  
  2025.  In essence, this "turns off" the built in command "drop all"
  2026.  completely.  You could instead use some check in f 23 to see if
  2027.  the player is holding the troublesome item, and allowing the
  2028.  "drop all" command to work any other time, but that rapidly gets
  2029.  cumbersome.  If you are using more than just one or two "drop"
  2030.  phrases to trigger effects, I'd suggest you simply turn the
  2031.  phrase "drop all" off entirely.  And, if you choose to do this,
  2032.  you might want to turn off "take all" as well, for symmetry.
  2033.  Simply adding the phrase "p 'take 'all 23 " to the above lines,
  2034.  and adding the words 'or "Take"' to string 56 will accomplish
  2035.  that.
  2036.  
  2037.  
  2038.                     3.11 Elaborate on "Search"
  2039.                     ==========================
  2040.  
  2041.  Items with an "h" line are hidden in locations 2 - 10 -- that
  2042.  is, they will not be listed as being present until the player
  2043.  uses "search".  This is fine for locations where things might
  2044.  reasonably be hidden (for example, if the location is described
  2045.  as "full of things" or "leaves cover the ground") but less than
  2046.  realistic under other circumstances.  Is the player really
  2047.  supposed to believe he just didn't notice a $10 bill in the
  2048.  middle of an otherwise empty hallway?  Or an elephant --
  2049.  anywhere??
  2050.  
  2051.  If you want, you can use phrases to make a situation more
  2052.  believable.  Suppose you want the player to have a dime, but you
  2053.  want him to solve a (very minor) puzzle to get it.  You could
  2054.  set up something like this:  Item 18 will be the dime, once you
  2055.  have copied Item 47 onto it.  Location 7 is a hallway with a pay
  2056.  phone.  Your source includes these lines:
  2057.  
  2058.  p 'search 15
  2059.  p 'examine 'telephone 16
  2060.  p 'search 'telephone 16
  2061.  
  2062.  f 15 ; search
  2063.  if l-1@7 then [117   ; if player in room 7, print string 117
  2064.  else
  2065.   then f               ; otherwise do normal "search"
  2066.  .
  2067.  
  2068.  [117
  2069.  [The hallway is empty except for a pay phone on the wall.]
  2070.  
  2071.  f 16 ; examine/search telephone
  2072.  if l-1@7 ; player near telephone
  2073.  then i18=47 [118  ; see "item manipulation" for how to make
  2074.                    ; things appear
  2075.  else
  2076.   then [119
  2077.  .
  2078.  
  2079.  [118
  2080.  [You flip the coin return and a dime rolls out.]
  2081.  [119
  2082.  [What telephone?]
  2083.  
  2084.  Now, a "search" in the hallway just reminds the player that the
  2085.  phone is there -- a nudge in the direction of the proper action.
  2086.  Only if he carries through with a "search telephone" or "examine
  2087.  telephone" will the dime appear.
  2088.  
  2089.  
  2090.               3.12 Change the portability of an item
  2091.               ======================================
  2092.  
  2093.  You can make an item that was non-portable become portable, or
  2094.  the reverse, by copying onto the item one with the same
  2095.  description except for a different weight.  How/why the player
  2096.  does this could be one of the puzzles in your game.  For
  2097.  example, the solution to another puzzle depends on his being
  2098.  able to move a 3 foot cube of lead to a different location --
  2099.  and it is too heavy for him to lift at first.  The swap to the
  2100.  "lighter" version could happen if he:
  2101.    A) exercises to build up massive muscles
  2102.    B) finds a grow pill and becomes a huge, strong giant
  2103.    C) drinks a "strength" potion
  2104.    D) finds an antigravity gizmo
  2105.    E) finds an "element transmuter" and changes the lead into tin
  2106.    F) learns a spell and makes the cube float
  2107.  or anything else that fits the theme of your game.
  2108.  
  2109.  
  2110.             3.13 Create a move counter/countdown timer
  2111.             ==========================================
  2112.  
  2113.  Unfortunately these nifty items weren't built-into the game, so
  2114.  you will have to create a substitute if you need one.  This can
  2115.  be done by using variables and movement checks.  For example,
  2116.  suppose you want to have a bomb that explodes three moves after
  2117.  the player pushes its button.  Including these lines in your
  2118.  game will accomplish that:
  2119.  
  2120.  m -1 -1 13 ; do this effect EVERY move
  2121.  
  2122.  p 'push 'button 12
  2123.  
  2124.  f 12 ; push button (on bomb)
  2125.  if l24!-1  ; player doesn't have bomb
  2126.   then h ; tell him so
  2127.  else
  2128.    then vb=1 [23  ; flag variable b that bomb has been activated
  2129.  .
  2130.  
  2131.  [23
  2132.  [The bomb starts ticking loudly.]
  2133.  
  2134.  f 13 ; any move -- bomb timer
  2135.  if vb=4 l24@-3   ; been three moves, and player near bomb
  2136.    then [24 b   ; blow the idiot up and bad end game
  2137.  if vb=4 l24@100   ; 3 moves, bomb in location we care about
  2138.    then [25 l100=101 i24=59 vb=0   ; change location 100 --
  2139.      ; perhaps now a formerly locked door has been blow open
  2140.      ; make the bomb vanish, reset the variable since bomb no
  2141.      ; longer ticking down
  2142.  if vb=4   ; 3 moves, neither of first two conditions met
  2143.    then [25 i24=59 vb=0   ; the same as the previous, except
  2144.        ; there has been no location change: the player wasted
  2145.        ; the bomb
  2146.  if vb>0   ; bomb has been activated, but not 3 moves ago
  2147.    then vb+1   ; bump the variable by one for this move
  2148.  .
  2149.  
  2150.  [24
  2151.  [The last thing you ever hear is a tremendous explosion, etc.]
  2152.  [25
  2153.  [You hear a loud explosion.]
  2154.  
  2155.  NOTE:  Even though effect 23 will be done EACH move throughout
  2156.  the entire game, most of the time nothing will happen since
  2157.  there is no "then" (or "else") that would apply when vb=0.
  2158.  
  2159.  Remember that variables can only have the values 0 to 100.  If
  2160.  you want to count higher than that, you will have to use two,
  2161.  working together: one keeps track of how many "hundreds" of
  2162.  moves there has been, while the second is clocking the moves of
  2163.  each set of 100.
  2164.  
  2165.  For example, suppose you simply want to set a "time" limit on
  2166.  your game:  if the player hasn't finished in 350 moves, you blow
  2167.  the whistle, everybody out of the pool.  Here is how you could
  2168.  do that:
  2169.  
  2170.  m -1 -1 2  ; every move -- move counter
  2171.  
  2172.  f 2
  2173.  if vb=3 va=50  ; got to the magic number
  2174.    then [2 b ; bad end the game
  2175.  if va=99 ; this move completes the latest "hundred"
  2176.    then vb+1 va=0 ; up "b" by 1, reset "a" to 0
  2177.  else
  2178.    then va+1 ; bump "a" by one for this move
  2179.  .
  2180.  
  2181.  [2
  2182.  [some sort of "out of time", "too slow", etc. remarks]
  2183.  
  2184.  Nesting two variable like this allows you to count up to 100
  2185.  hundreds, or 10,000.  That ought to meet any reasonable need,
  2186.  but added a third level to the count would cover numbers up to a
  2187.  million!
  2188.  
  2189.  
  2190.                    3.14 Use the assistant/guard
  2191.                    ============================
  2192.  
  2193.  The only thing the assistant will automatically do in the game
  2194.  is follow the player around while he/she/it is activated.  This
  2195.  gets old pretty fast, so you might want to:
  2196.    A) add some thing(s) the player can get the assistant to do
  2197.    B) add some way for the player to get rid of the assistant,
  2198.       either temporarily or permanently, when he tires of it
  2199.    C) combine A & B
  2200.    D) skip the assistant entirely.
  2201.  
  2202.  D is simple: just don't include an "a the bumbling Dr. Watson"
  2203.  type line.
  2204.  
  2205.  B is straight forward, too.  Simply add a phrase or two that
  2206.  trigger an effect that turns the assistant off:
  2207.  
  2208.  p 'fire 'Igor 14
  2209.  f 14
  2210.  else
  2211.     then  a- [12
  2212.  .
  2213.  
  2214.  [12
  2215.  [Igor looks at your reproachfully, then turns and plods away.]
  2216.  
  2217.     - or -
  2218.  
  2219.  p 'shoot 'Wesley 85
  2220.  f 85 ; shoot Wesley
  2221.  if l23@-1  ; player has the phaser
  2222.    then a- [73
  2223.  .
  2224.  
  2225.  [73
  2226.  [For a split second Wesley glows in the phaser beam, then he
  2227.  vanishes entirely.]
  2228.  
  2229.  If you want the player to be able to get the assistant back
  2230.  again, provide some "reversible" method of turning it off, such
  2231.  as a room the assistant can be locked in and released from at
  2232.  will.
  2233.  
  2234.  Getting the assistant to do something is simply a matter of
  2235.  building an effect that accomplishes whatever you want done,
  2236.  just as if the player himself was the one doing it.  Naturally
  2237.  the "if" part should include an "a+" to be sure the assistant
  2238.  (for simplicity, call him Igor) is present, and the "then"
  2239.  includes any changes Igor has "caused" plus some string telling
  2240.  the player that Igor is the one who has done whatever.
  2241.  
  2242.  The tricky part is how the player is supposed to get Igor to do
  2243.  it.  There is no provision for him to give Igor orders, so
  2244.  you'll have to improvise.  Basically, any phrase you include in
  2245.  your game, or any movement test, could cause something to be
  2246.  done by Igor. Perhaps all the player has to do is go to some
  2247.  location, or pick up some object when Igor is present, to have
  2248.  the effect trigger automatically.  For example, maybe just going
  2249.  to the "funny face" contest with Igor in tow will result in the
  2250.  player being awarded a silver cup.  Or if the player knocks on a
  2251.  locked door while Igor is around, perhaps Igor, in a fit of
  2252.  helpfulness, batters it down.
  2253.  
  2254.  A guard can be used the same way: perhaps the way through a
  2255.  sealed hatch is to have a Klingon chase you into the room,
  2256.  whereupon he shoots at you and disintegrates the hatch when his
  2257.  shot goes wild.
  2258.  
  2259.  If the "proper" action is rather unobvious (why should the
  2260.  player eat the sandwich while a guard is threatening him?) be
  2261.  sure to hint at it VERY strongly, either in the game or its doc
  2262.  file.
  2263.  
  2264.  
  2265.                           3.15 Play fair
  2266.                           ==============
  2267.  
  2268.  In a sense, a game like this is a challenge from the writer to
  2269.  the player:  are you smart enough to come up with the same
  2270.  solution that I thought of?  Note the phrasing:  the SAME
  2271.  solution, not just A solution, or even THE BEST solution.  It is
  2272.  perfectly possible that the player will think of and try (in
  2273.  vain) some really nifty solution to a problem that you didn't
  2274.  even think of.  (For example, I wanted to take the giant
  2275.  clam/oyster from "Adventure" down to the hot room near the
  2276.  volcano and steam it open.  It was a reasonable possibility, and
  2277.  it COULD have been the proper method -- but it wasn't the one
  2278.  the writers had in mind.)
  2279.  
  2280.  Since you, the writer, have the upper hand, you must be sure you
  2281.  are fair to the player.  Your chosen solutions should be
  2282.  "logical" within the context of the game.  So it would be okay
  2283.  for a player to open a locked door by means of a key, or using a
  2284.  screwdriver to take the hinges off, or using an axe to chop it
  2285.  down -- but not by some nonsensical command like "kiss door".
  2286.  This also means that items and methods should fit the milieu of
  2287.  your game: spells and magic potions are fine and dandy in an
  2288.  "explore the magic land of Zoom" type game, but shouldn't be
  2289.  used in a Thirties Hard-Boiled Detective game.
  2290.  
  2291.  There should be plenty of hints to gently nudge the player along
  2292.  the correct paths -- if he is alert enough to notice them.
  2293.  
  2294.  If solving your game requires the use of some commands that
  2295.  aren't immediately obvious, tell the player about them.  For
  2296.  example, you might give the player a complete list of the
  2297.  "verbs" that the game understands in an associated .doc file.
  2298.  Or let him see the required command somewhere (does "Fee Fie Foe
  2299.  Foo" ring a bell?) or even "overhear" someone else using the
  2300.  command.  (If it worked in Ali Baba and the Forty Thieves, it
  2301.  can work in your game.)
  2302.  
  2303.  Above all, avoid idiotically hard or pointless problems that can
  2304.  only be solved by "brute force."  For example, requiring the
  2305.  player to enter a three digit number with no hint as to what the
  2306.  right number is.  (Do you expect him to punch in each
  2307.  combination from 000 to 999??) Or forcing a player to get a fish
  2308.  by typing "take trout", with no clue to him that the fish is
  2309.  indeed a trout and not a salmon or bass or mackerel or tuna or
  2310.  any of a hundred possibilities.  (Incidentally, these examples
  2311.  come from actual games I have seen.)
  2312.  
  2313.  Remember:  you want people to enjoy your game.  If they don't
  2314.  discover fun things to do and read, if they don't feel they are
  2315.  making progress, they will quickly lose interest and quit.  Make
  2316.  your game a pleasure to play -- or don't waste your time writing
  2317.  it.
  2318.  
  2319.  
  2320.                 ==================================
  2321.                 ||  4. COMPILING YOUR SCENARIO  ||
  2322.                 ==================================
  2323.  
  2324.  
  2325.                         4.1 Running SCENE
  2326.                         =================
  2327.  
  2328.  SCENE is run by typing its name, followed by the name of the
  2329.  scenario it should compile.  So, if your source file was called
  2330.  "TARZAN.SRC", the command is:
  2331.  
  2332.  SCENE TARZAN
  2333.  
  2334.  NOTE:  You can type the entire name, but SCENE automatically
  2335.  truncates the name at the period, and then looks for a file with
  2336.  that name plus the extension ".SRC".
  2337.  
  2338.  When SCENE is running it produces a temporary file (holding most
  2339.  of the string text), with the same name plus the extension
  2340.  ".$$$".  After it has scanned through the entire source file it
  2341.  then produces the ".SCN" file which is the data file your game
  2342.  will be run from.  As a (very rough) rule of thumb, this means
  2343.  you need free space on your disk of around twice the size of
  2344.  your source file.  For example, the included Star Trek game has
  2345.  about of 39K SRC files, and generates a 30K $$$ file and a 49K
  2346.  SCN file.  If your game gets very large -- or if your disks are
  2347.  relatively small -- you may reach the point that one disk will
  2348.  no longer hold SCENE.COM plus the SRC, $$$ and SCN files.
  2349.  
  2350.  To alleviate this problem, SCENE allows you to specify which
  2351.  drive(s) it should place the SCN and $$$ files on.  This is done
  2352.  by putting the drive name(s) after the basic command.  If you
  2353.  don't enter one or both of these, it defaults to placing that
  2354.  file on the same drive as one most recently indicated.  Some
  2355.  examples:
  2356.  
  2357.  A>SCENE TARZAN   ; SCENE, SRC, SCN and $$$ will all be on A
  2358.  
  2359.  A>SCENE B:TARZAN    ; SCENE is on A:, the SRC file is on B, and
  2360.  both the SCN and $$$ files will be on B:
  2361.  
  2362.  A>SCENE TARZAN B:  ; SCENE & SRC on A, SCN and $$$ on B
  2363.  
  2364.  A>SCENE B:TARZAN B: A:  ; SCENE & $$$ on A, SRC and SCN on B.
  2365.  
  2366.  If you need still more space, SOURCE allows you to change the
  2367.  disk that the SCN file will be written on after it has completed
  2368.  the first scan and before it writes the final output.  At this
  2369.  point it prints a prompt,
  2370.  
  2371.  Input floppy changed to receive output?
  2372.  Y = yes  A = abort   else No
  2373.  
  2374.  If you want the SCN file on a different disk, change it at that
  2375.  point and then answer "Y".  If you want the SCN on the same disk
  2376.  already in the specified output drive, hit the return.  The
  2377.  third option, Abort, is a way to bail out if you have made a
  2378.  mistake in specifying which files go where.  Keep in mind that
  2379.  SCENE needs to have the temporary $$$ file available to it while
  2380.  it is writing the SCN file.  If you want the SCN file on a
  2381.  different disk, you must NOT have had the $$$ written on the
  2382.  disk you will be removing!
  2383.  
  2384.  This arrangement of files will usually make the best use of
  2385.  space on smaller disks:  Have just SCENE.COM on the disk in the
  2386.  A: drive, and nothing but your SRC file on the disk in B.  Type
  2387.  this command:
  2388.  
  2389.  A>SCENE B:TARZAN B: A:
  2390.  
  2391.  Since the $$$ file is written on A, you can change the disk in B
  2392.  to receive the SCN file.  Using this arrangement, your SRC file
  2393.  can be almost as large as the full size of your disk.
  2394.  
  2395.  
  2396.                   4.2 Splitting your source file
  2397.                   ==============================
  2398.  
  2399.  Obviously, working on a SRC file of that size can cause problems
  2400.  for your word processor, and also can be slow.  To avoid this,
  2401.  it is possible to split your source into any number of smaller
  2402.  pieces.  This is done by adding a "chain" command at the end of
  2403.  each of the pieces except the last.  (Anything in the file AFTER
  2404.  a chain command will be ignored so make this the LAST line of
  2405.  the piece.)  This command is a "<" followed by the name of the
  2406.  next piece of the source.  Examples:
  2407.  
  2408.  <TARZAN2.SRC
  2409.  <PART-2
  2410.  <ITEMS.REC
  2411.  <STRINGS
  2412.  
  2413.  NOTE: the file names of the second and later pieces can be
  2414.  anything legal under CP/M, however the FIRST piece, the name you
  2415.  will enter on the command line when you compile your game, MUST
  2416.  have the type ".SRC".
  2417.  
  2418.  
  2419.                         4.3 SCENE feedback
  2420.                         ==================
  2421.  
  2422.  While SCENE is running it keeps you apprised of what is
  2423.  happening by printing out the type of each record as it
  2424.  processes it.  This results in a row of letters & characters,
  2425.  like this:
  2426.  
  2427.  llillplmmmmff[[ll"
  2428.  
  2429.  and so forth.  If it runs into something it does not understand
  2430.  it will print a message about it, such as, unknown record type,
  2431.  location expected, and so on.  SCENE will continue to process
  2432.  your file to the end no matter how many errors it finds.
  2433.  
  2434.  Discovering what the problem is can be made easier by comparing
  2435.  the list of records processed with your source file:  if the
  2436.  error message came just after the third location record
  2437.  processed, that it where you should start looking.
  2438.  
  2439.  The most common type of error is failing to pair opening and
  2440.  closing markers properly:  remember, each string must START and
  2441.  END with the appropriate markers (either two "'s, or a set of
  2442.  [], or a set of {} ).  If you fail to include the closing marker
  2443.  scene will continue scanning through your file until it finds
  2444.  one (most likely, one that was supposed to close a different
  2445.  string, meaning that everything between them is turned into one
  2446.  long string instead of whatever you meant it to be) or until it
  2447.  exceeds the "legal" length of a string of that type.
  2448.  
  2449.  Another common slip is to fail to close one record before
  2450.  starting another.  Remember, records that involve more than one
  2451.  line must end with a line with just a "." in the first column --
  2452.  this holds for location, item and effect records.
  2453.  
  2454.  The third most common error is to put spaces where they don't
  2455.  belong, or fail to put them where needed.  The "pieces" of
  2456.  individual "if" tests and "then" actions must NOT have spaces
  2457.  between them. That is, l23!34 is a proper test, NOT l12 ! 34.
  2458.  The main place omitted spaces cause problems is before comment
  2459.  markers.  If the semicolon isn't preceded by at least one space
  2460.  (unless it is the first thing on a line) it can be "discarded"
  2461.  during processing.  If this happens, SCENE will then try to
  2462.  interpret your comments as commands, resulting in at least one
  2463.  "error" message per word in the comment.
  2464.  
  2465.  If SCENE is complaining about the "operator", it generally means
  2466.  you mixed the operators from one type of test into a different
  2467.  one.  (Only @ and ! work for location tests, for example.)  You
  2468.  can check out the proper operators on the Summary pages.
  2469.  
  2470.  After it has compiled your entire source file, SCENE will report
  2471.  the counts of how many of various types of things have been
  2472.  used: how many locations, items, FX records, movement tests,
  2473.  phrases, words, short strings and FX strings.  You might want to
  2474.  keep an eye on these totals in relation to the maximum numbers
  2475.  allowed.  This is especially true for the FX records: unlike all
  2476.  the other categories, you cannot tell from your source file or
  2477.  cheat sheets how many have been used.
  2478.  
  2479.  Compiling a larger game can take a few minutes.  For example,
  2480.  the includes Star Trek game was compiled using the command
  2481.  "A>SCENE STAR A: B:" on a 4 Mhz Z80 CP/M 2.2 computer with two
  2482.  5-1/4 inch floppy drives.  It took 1 minute 18 seconds to finish
  2483.  the initial scan and write the $$$ file, and another 1 minute 22
  2484.  seconds to generate the SCN file.
  2485.  
  2486.  SCENE will beep after it finishes the initial scan and is ready
  2487.  for you to change floppies if necessary, and also after it
  2488.  finishes writing the SCN file.
  2489.  
  2490.  
  2491.                         ==================
  2492.                         ||  5. SUMMARY  ||
  2493.                         ==================
  2494.  
  2495.  LOCATIONS   1 to 199 allowed;
  2496.  =========   1 = start; 2-10 can "hide" items; 5-15 off-limits to
  2497.              guards;  only 1- 119 can be used in tests, swaps and
  2498.              teleportations;
  2499.  
  2500.  l 76    ; optional note for yourself
  2501.  %"short description up to 255 characters, printed each time
  2502.    player in room"
  2503.  %74     ; alternate form for short description, makes room same
  2504.          ; as previously defined room 74.  use only one form
  2505.  [optional long description -- first visit & after "look"
  2506.  command]
  2507.   - or -
  2508.  {optional long description -- only after "look" command}
  2509.  ,     ; makes location "dark": player will need light to see
  2510.  sd42  ; "door" leads south to 42
  2511.  us15  ; "stairs" lead up to 15
  2512.  np44  ; "passage" leads north to 44
  2513.  wx73  ; unspecified connection to 73
  2514.  en76  ; triggers "can't go that way" message #76 if go east
  2515.        ; default "You can't go that way" since no "down" entry
  2516.  c10   ; 10 points given first time move to this location
  2517.  .     ; marks end of location record
  2518.  
  2519.  ITEMS      1-44 can be visible in game, 45-59 must be swapped
  2520.  =====      onto a lower number before they can be seen or used;
  2521.             Item 1 is the light source;
  2522.  
  2523.  i 15
  2524.  %"description of item, printed when item in room or inventory"
  2525.  %6       ; alternate form, use short string #6 for description
  2526.  x"(optional) longer description given when 'examine'd"
  2527.  'name1   ; one word, used to refer to object
  2528.  'name2   ; (optional) one word synonym;
  2529.  h        ; (optional) "hide" object if in locations 2 - 10
  2530.  a        ; (optional) "take all" will not include this item
  2531.  c 5      ; (optional) 5 points first time object taken
  2532.  l 2      ; initial location; -1 = player's inventory
  2533.           ; -2 = non-accessible;
  2534.           ; -3 = wherever player is;
  2535.  w 15     ; (optional) weight of item, -1 means non-portable
  2536.           ; player can carry up to 100 total
  2537.  .        ; marks end of item record
  2538.  
  2539.  MOVEMENT TESTS
  2540.  ==============
  2541.  m 22 8 31   ; if player moves FROM loc. 22 TO loc. 8
  2542.              ;  do Effect Record 31;
  2543.              ; -1 for either location matches all;  -1 for both
  2544.              ; locations means effect will be done each move;
  2545.  
  2546.  PHRASES
  2547.  =======
  2548.  p 'verb 'noun 54  ; if command is "verb noun" do effect 54
  2549.  p 'verb 21        ; if command is "verb" do effect 21
  2550.  
  2551.  EFFECT RECORDS
  2552.  ==============
  2553.  f 23   ; optional reminder to yourself
  2554.  if  conditions     ; any number of if/then lines can be used
  2555.                     ; if none are true then the "else" action
  2556.    then  actions    ; will always be done
  2557.  if  other-conditions
  2558.    then  other-actions
  2559.  else               ; (optional) actions to be done if none of
  2560.    then  last-actions    ; the "if" conditions are met
  2561.  .  ; marks end of record
  2562.  
  2563.  CONDITIONS  can be any combination of the following tests
  2564.  ==========  all tests must be met for the "if" to be true;
  2565.  
  2566.  VARIABLE TESTS   26 variables possible, "a" to "z", 0 to 100
  2567.  --------------
  2568.  vx=5    ; tests if variable x is equal to 5
  2569.  vb#37   ; tests if variable b not equal to 37
  2570.  vg<12   ; tests if variable g is less than 12
  2571.  vr>66   ; tests if variable r is greater than 66
  2572.  
  2573.  LOCATION TESTS  only for locations 1-119 and -1, -2, -3
  2574.  --------------
  2575.  l6@52     ; Tests if item 6 is at location 52
  2576.  l13!114   ; Tests if item 13 is not at location 114
  2577.  
  2578.  Special cases:
  2579.        as item, -1 = player
  2580.        as locations
  2581.            -1 = player's inventory
  2582.            -2 = "out of the game"
  2583.            -3 = synonym for the player's location
  2584.  
  2585.  ASSISTANT/GUARD TESTS
  2586.  ---------------------
  2587.  a-             Tests if the assistant is not with the player
  2588.  a+             Tests if the assistant is with the player
  2589.  g-             Tests if there is no guard nearby
  2590.  g+             Tests if there is a guard nearby
  2591.  
  2592.  
  2593.  RANDOM CHANCE TESTS  0 to 100% chance allowed
  2594.  -------------------
  2595.  r40  ; 40% chance will be true
  2596.  
  2597.  
  2598.  POSSIBLE ACTIONS   can be any combination of the following
  2599.  ================
  2600.  
  2601.  CHANGE VARIABLES  variable value must stay in the range
  2602.  ----------------  of 0 to 100 or undefined result
  2603.  ve=12  ; set variable e to 12
  2604.  vj+7   ; add 7 to variable j
  2605.  vx-2   ; subtract 2 from variable x
  2606.  
  2607.  CHANGE ITEM
  2608.  -----------
  2609.  i21=51 ; make item 21 a copy of item 51
  2610.  
  2611.  CHANGE LOCATION  only for locations 1 to 119
  2612.  ---------------
  2613.  l4=27  ; make location 4 a copy of location 27
  2614.  
  2615.  MOVE PLAYER  only for locations 1 to 119
  2616.  -----------
  2617.  t117 ; teleport player to location 117
  2618.  
  2619.  CHANGE ASSISTANT/GUARD STATUS
  2620.  -----------------------------
  2621.  a-  ; makes the assistant vanish
  2622.  a+  ; makes the assistant appear
  2623.  g-  ; de-activates guard mechanism, masks guard
  2624.  g+  ; activates guard mechanism, makes guard visible
  2625.  gk  ; kills the guard standing beside the player
  2626.  
  2627.  CHANGE SCORE
  2628.  ------------
  2629.  c40 ; add 40 points to the score; must be between 0 and 100
  2630.  
  2631.  PRINT AN EFFECT STRING
  2632.  ----------------------
  2633.  [213 ; prints effect string 213, use "~" for pause for keypress
  2634.  
  2635.  built-in effect strings:
  2636.  n ; print "Nothing happens"
  2637.  u ; print "I don't understand"
  2638.  h ; print "You have no <object>"   (2nd word of current command)
  2639.  s ; print "You see no <object>"
  2640.  
  2641.  PERFORM DEFAULT ACTION  only useful for phrase effects that
  2642.  ----------------------  intercept built-in commands
  2643.  f ; complete the normal action of the command after other
  2644.      actions (if any) were done.
  2645.  
  2646.  END THE GAME
  2647.  ------------
  2648.  e  ; the good game end, meaning the player has won
  2649.  b  ; a bad game end, meaning the player has lost
  2650.  
  2651.  MISCELLANEOUS   all these are optional embellishments to
  2652.  =============   your game
  2653.  
  2654.  s[
  2655.  starting text -- printed when game begun]
  2656.  
  2657.  e[
  2658.  good end text -- congratulate player on winning]
  2659.  
  2660.  b[
  2661.  bad end text -- tell player he lost/died ]
  2662.  
  2663.  a loyal Mr. Spock  ; (optional) description of assistant, up to
  2664.                     ; 39 characters long, printed each move
  2665.                     ; when assistant on
  2666.  
  2667.  g 8 10 12 There is a Klingon guard here!
  2668.               ; first # = how many guards; second # = probability
  2669.               ; of one appearing; third # = number of Effect Rec
  2670.               ; performed when one is present (except 1st time);
  2671.               ; the rest is the text to be printed when guard is
  2672.               ; present, up to 59 characters
  2673.  
  2674.  x 300        ; maximum points possible in game, used by "score"
  2675.               ; command
  2676.