home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / private / figment.zip / FIGMENT.DOC < prev    next >
Text File  |  1992-06-10  |  312KB  |  7,799 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                        Figment
  10.  
  11.                               The Imagination Processor
  12.  
  13.  
  14.                                      User's Guide
  15.  
  16.                                          and
  17.  
  18.                                   Command Reference
  19.  
  20.  
  21.                                     Revision 2.57
  22.  
  23.  
  24.                                       June, 1992
  25.  
  26.                        Copyright 1988-1992, Patch Panel Software
  27.                                  11590 Seminole Blvd.
  28.                                   Seminole, FL 34648
  29.                                      813-397-3530
  30.  
  31.                                  All Rights Reserved.
  32.  
  33.  
  34.                     Figment is a trademark of Patch Panel Software
  35.  
  36.  
  37.  
  38.           Information in this document is subject to change without notice
  39.           and does not represent a commitment on the part of Patch Panel
  40.           Software.  The software described in this document is furnished
  41.           as shareware.  The software package, a self-extracting library,
  42.           may be re-distributed only in its entirety as the program
  43.           "Figpkg.exe".  Other forms, e.g. "Figpkg.zip", are not from Patch
  44.           Panel and are not authorized for distribution.
  45.  
  46.           Users are requested to register their copies.  A more
  47.           comprehensive, fully typeset and perfect-bound (paperback)
  48.           version of this book is available to registered users along with
  49.           upgrades.  Additional graphics and music utilities are also
  50.           available to registered customers.  Consult the file "Order.frm"
  51.           for details.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.           Figment User's Guide                            Table of Contents
  60.  
  61.                                   Table of Contents
  62.  
  63.  
  64.           Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   1
  65.                A.   Overview of Features  . . . . . . . . . . . . . . .   1
  66.                B.   How to Read This Document . . . . . . . . . . . . .   2
  67.  
  68.           Part I.   The Presentation Environment  . . . . . . . . . . .   4
  69.                A.   Getting Started . . . . . . . . . . . . . . . . . .   4
  70.                B.   The Presentation Display  . . . . . . . . . . . . .   5
  71.                C.   The Object of the Story . . . . . . . . . . . . . .   6
  72.                D.   Command Lines . . . . . . . . . . . . . . . . . . .   7
  73.                E.   Synonyms  . . . . . . . . . . . . . . . . . . . . .   9
  74.                F.   The Actor . . . . . . . . . . . . . . . . . . . . .   9
  75.                G.   Command Logs  . . . . . . . . . . . . . . . . . . .  10
  76.                H.   Command Reference . . . . . . . . . . . . . . . . .  12
  77.  
  78.           Part II.  The Story Editor  . . . . . . . . . . . . . . . . .  21
  79.                A.   Introduction to the Editor  . . . . . . . . . . . .  21
  80.                B.   Theory of Operation . . . . . . . . . . . . . . . .  21
  81.                C.   How to Make an Interactive Story  . . . . . . . . .  22
  82.                D.   Method of Editing . . . . . . . . . . . . . . . . .  23
  83.                E.   Cut, Paste, and Insert Functions  . . . . . . . . .  26
  84.                F.   The Top Level Editor  . . . . . . . . . . . . . . .  27
  85.                G.   Summary of Editing Operations . . . . . . . . . . .  29
  86.                H.   Stuff Editor  . . . . . . . . . . . . . . . . . . .  31
  87.                I.   Scene Editor  . . . . . . . . . . . . . . . . . . .  43
  88.                J.   Story Maps  . . . . . . . . . . . . . . . . . . . .  44
  89.                K.   Story Rules (Logic Programming) . . . . . . . . . .  48
  90.                L.   Editing Rule Bases  . . . . . . . . . . . . . . . .  56
  91.                M.   Pre-Command Rules . . . . . . . . . . . . . . . . .  67
  92.                N.   Conditional Function Reference  . . . . . . . . . .  70
  93.                O.   Executional Function Reference  . . . . . . . . . .  76
  94.                P.   Player Maps . . . . . . . . . . . . . . . . . . . .  84
  95.                Q.   Synonym Editing . . . . . . . . . . . . . . . . . .  85
  96.                R.   Parameter Editing Screen  . . . . . . . . . . . . .  86
  97.                S.   Help Messages and User Type Editing . . . . . . . .  89
  98.                T.   Link and Attribute Type Definitions . . . . . . . .  90
  99.                U.   Profiles  . . . . . . . . . . . . . . . . . . . . .  90
  100.                V.   Standard Messages and Text Variables  . . . . . . .  91
  101.                W.   Full-Screen Text Editor . . . . . . . . . . . . . .  94
  102.                X.   File Management . . . . . . . . . . . . . . . . . .  95
  103.                Y.   Deleting Objects  . . . . . . . . . . . . . . . . .  98
  104.                Z.   Debugging Tips  . . . . . . . . . . . . . . . . . .  99
  105.  
  106.           Part III. Story Design  . . . . . . . . . . . . . . . . . . . 101
  107.                A.   Skill Level . . . . . . . . . . . . . . . . . . . . 101
  108.                B.   Examine Strings . . . . . . . . . . . . . . . . . . 101
  109.                C.   Health Points . . . . . . . . . . . . . . . . . . . 102
  110.                D.   Strength  . . . . . . . . . . . . . . . . . . . . . 102
  111.  
  112.                                                                           i
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.           Table of Contents                            Figment User's Guide
  121.  
  122.                E.   Conflicts . . . . . . . . . . . . . . . . . . . . . 103
  123.                F.   Links . . . . . . . . . . . . . . . . . . . . . . . 105
  124.                G.   Controlling the Random Number Generator . . . . . . 106
  125.                H.   Potions and the Drink Function  . . . . . . . . . . 107
  126.                I.   Weighty Matters . . . . . . . . . . . . . . . . . . 108
  127.                J.   Size and Containers . . . . . . . . . . . . . . . . 108
  128.                K.   Waving the Flags  . . . . . . . . . . . . . . . . . 109
  129.                L.   Reading Scrolls . . . . . . . . . . . . . . . . . . 110
  130.                M.   Strategic Weapons . . . . . . . . . . . . . . . . . 110
  131.                N.   Food  . . . . . . . . . . . . . . . . . . . . . . . 113
  132.                O.   Characters as Containers  . . . . . . . . . . . . . 113
  133.                P.   Rules and Changing Scenes . . . . . . . . . . . . . 113
  134.                Q.   User-definable Command Parser . . . . . . . . . . . 114
  135.                R.   The Actor in Rules  . . . . . . . . . . . . . . . . 117
  136.                S.   The '@'-Words . . . . . . . . . . . . . . . . . . . 119
  137.                T.   Help Messages . . . . . . . . . . . . . . . . . . . 120
  138.  
  139.                                         Index . . . . . . . . . . . . . 122
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.           ii
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.           Figment User's Guide                                 Introduction
  182.  
  183.           Introduction 
  184.            
  185.           Figment is multi-media authoring system for interactive fiction. 
  186.           It is a tool for manipulating text (and when purchased, graphics
  187.           and songs) under computer control either to present information
  188.           or to create an illusion.  This makes it good for developing
  189.           certain types of simulators, role-playing trainers, and certainly
  190.           for entertainment.  Figment has special features for modeling
  191.           character development which makes it a unique tool for character
  192.           and plot modeling as well.
  193.  
  194.           You can develop stories and trade them with other Figment users. 
  195.           You can also obtain a copy of "Figlet", the play-only form of
  196.           Figment.  Figlet is the distribution vehicle for material you
  197.           generate with Figment.  Figlet users are licensed to distribute
  198.           Figlet freely with their material to make stand-alone story
  199.           disks.
  200.  
  201.           Figment is a spread-sheet/word processor/debugger for interactive
  202.           fiction.  You can write, play, and debug your work all in one
  203.           package.  No tedious compiling or loading is required.  You can
  204.           run your work immediately.  Figment brings the logic out to the
  205.           user level where you can modify it or do whatever you want with
  206.           it.  The editor displays all the data structures for you to
  207.           modify.
  208.  
  209.           A.   Overview of Features
  210.  
  211.           Briefly, Figment's many internal features are:
  212.  
  213.           1.   The window-managed display manages the screen efficiently
  214.                during playback.  Color is supported in text and graphics
  215.                modes.
  216.           2.   The Scene Description highlights changes during play in
  217.                reverse video, an excellent aid to comprehension.
  218.           3.   The command parser closely models natural English and
  219.                supports series operators, multiple sentences, object
  220.                synonyms, and function synonyms.
  221.           4.   The user-definable command parser supports boolean
  222.                operations on word groups.  It makes possible a very
  223.                flexible command entry and opens the story to include
  224.                virtually any user statement as a legal command.
  225.           5.   Function and object name synonyms.
  226.           6.   Commands can be logged and played back like a player piano
  227.                with speed control or single-stepped for debugging.
  228.           7.   The system senses player efficiency and can respond with
  229.                messages tailored to the user's skill.
  230.           8.   Viewpoints allow you to describe situations from the point
  231.                of view of the different characters in the scene.  The
  232.                player can assume the role of these characters to see the
  233.  
  234.                                                                           1
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.           Introduction                                 Figment User's Guide
  243.  
  244.                story from their perspective and to manipulate the
  245.                characters.
  246.           9.   Full-screen data entry editors.
  247.           10.  Text can be entered in a simple typing buffer or a full-
  248.                screen text editor as required.
  249.           11.  The at-symbol (@) denotes special words to be substituted
  250.                into your text including the user's name, the Actor's name,
  251.                the scene name, the command line, etc.
  252.           12.  Cut and paste operations are supported for editing most data
  253.                structures.
  254.           13.  User-defined attributes let you build rich character
  255.                definitions.
  256.           14.  Character profiles present a weighted decision matrix  of
  257.                attributes so you can say for example "If Actor does not fit
  258.                profile of leader..."
  259.           15.  User-defined object types, a useful adjunct to profiles.
  260.           16.  Links between objects can have user-definable types with
  261.                positive or negative values. You can interpret the values as
  262.                meaning like/dislike, strong/weak, attraction/
  263.                repulsion...whatever you like.
  264.           17.  Frame-based inference engine.  The rule-base is built in
  265.                small rule-bases local to specific situations allowing good
  266.                performance.  Both global and local rule-bases are
  267.                supported.
  268.           18.  The Player map gives the player a memory of places and
  269.                things, and fore-knowledge of them as well.  It allows
  270.                commands like "find object_name" or "go to place_name".
  271.           19.  Script file output can be generated from your story.  The
  272.                script can be printed on your line printer or edited in your
  273.                word processor.
  274.           20.  Help message system.  The author can develop and maintain
  275.                hints specific to the situation.
  276.  
  277.           In addition, graphics and music can be keyed to the story for a
  278.           multi-media presentation.  The graphics can be displayed in a
  279.           windowed text-with-graphics style like a WYSIWYG DTP package. 
  280.           This version will play music and graphics, but they cannot be
  281.           written without the optional graphics and music library
  282.           utilities.  The music requires an Adlib board for playback. 
  283.           Contact Patch Panel for more information.
  284.  
  285.  
  286.           B.   How to Read This Document
  287.  
  288.           This is a much-shortened version of the manual registered users
  289.           will receive about 100 pages more material in an attractive,
  290.           typeset, perfect-bound volume.
  291.  
  292.           Figment has two distinct parts: the Presentation Environment, and
  293.           the Editor.  Part I of this book describes the Presentation
  294.  
  295.           2
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.           Figment User's Guide                                 Introduction
  304.  
  305.           Environment where you play the material that you have written. 
  306.           Part I closes with a reference guide of all the commands used in
  307.           Playback mode.
  308.  
  309.           Part II discusses the Editor.  This part describes only the
  310.           mechanical process of editing the data.  It deliberately
  311.           postpones discussion and theory to Part III.  Part II includes a
  312.           reference guide of all the conditional and executional functions
  313.           you use to write your story rules. 
  314.  
  315.           Part III describes the inter-relationship of all the pieces and
  316.           illustrates constructions used to create different effects.  Part
  317.           III is organized by topics and represents the programmer's notes
  318.           for every feature.
  319.  
  320.           The Appendices discuss revisions and data conversion
  321.           considerations when converting stories from older revisions.  
  322.  
  323.                Note:  Figment has an optional graphics presentation
  324.                mode, but you will find no mention of it in this
  325.                document.  For information regarding any graphics
  326.                operation, consult the User's Guide for the Figment
  327.                Graphics Library Utility (Figglu) distributed with the
  328.                Figglu software.  Similarly, any discussion of music-
  329.                related work is found in the corresponding book for
  330.                Emilu.
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.                                                                           3
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.           Presentation Environment                     Figment User's Guide
  365.  
  366.           Part I.   The Presentation Environment
  367.  
  368.           When you start Figment, you enter the presentation environment. 
  369.           Here you find a scenario description and you give English-like
  370.           commands that act upon the various scene elements.  Your software
  371.           comes with a demo story, an accompanying log file, and a text
  372.           file called "hint.doc" for people who haven't the time to
  373.           struggle.
  374.  
  375.  
  376.           A.   Getting Started
  377.  
  378.           Stories are kept in files with ".sdf" file extension, but you do
  379.           not specify the extension.  All you have to do to start the demo
  380.           story is type "Figment" followed by the path to the story data
  381.           file:
  382.  
  383.                figment demo
  384.                figment b:demo                ;demo on drive b
  385.                figment c:\datafiles\demo     ;demo in another directory
  386.  
  387.           Do this now so you can follow along with the discussion.  Here
  388.           are some other starting options:
  389.  
  390.                figment <newname>             ;make up a name to make a new
  391.                                              ; story.
  392.                Figment /s demo               ;/s = suppress status display
  393.                Figment demo/s 10             ;10 = seed for random number 
  394.                                              ; generator
  395.                Figment demo 10 /s            ;switches go anywhere
  396.                Figment demo /i               ;suppress inventory display
  397.  
  398.  
  399.                NOTE:  This is the shareware version of Figment.  It is
  400.                about one fourth the capacity of the registered
  401.                version.  If you attempt to read a story that is too
  402.                large, it will report "Story requires too many elements
  403.                - Terminating" and return to DOS.  You will need the
  404.                registered version to read such a story.
  405.  
  406.  
  407.           a.   Select Display Switch - /Dn
  408.  
  409.           Figment automatically tests and selects the appropriate display
  410.           mode, but some clone adapters (notably non-register-compatible
  411.           EGA clones) can confuse the test giving undesirable results.  The
  412.           system appears to "hang".  If this symptom occurs, try specifying
  413.           the adapter manually with the display switch:
  414.  
  415.  
  416.  
  417.           4
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.           Figment User's Guide                     Presentation Environment
  426.  
  427.                figment demo 10 /D3      ;3 = EGA Color
  428.  
  429.                /Dn where n=
  430.  
  431.                     1    MDA  Monochrome Display Adapter (No graphics)
  432.                     2    CGA
  433.                     3    EGACOLOR
  434.                     4    EGAMONO
  435.                     5    VGAMONO
  436.                     6    VGACOLOR
  437.                     7    MCGACOLOR
  438.                     8    MCGAMONO
  439.                     9    HERCULES
  440.  
  441.                Note:  Forcing a non-Hercules device to Hercules mode
  442.                might not be a good thing to do.
  443.  
  444.           b.   Random Number Generator
  445.  
  446.           Figment supports random events.  You can force the random events
  447.           to be predictable events by choosing the seed for the random
  448.           number generator as demonstrated in the example above.  This is
  449.           necessary for debugging and often nice for playback.
  450.  
  451.  
  452.           B.   The Presentation Display
  453.  
  454.           Once started, you see four distinct regions (windows) on the
  455.           screen: Status Indicator Bar, Inventory, Scene Description and
  456.           Command Windows.  These regions are "dynamic", meaning they
  457.           stretch and shrink as needed to accommodate changing needs.
  458.  
  459.           The Status Indicator can be customized to the story requirements. 
  460.           Some stories might not use it at all.
  461.  
  462.           The Inventory region grows as your list of acquisitions grows. 
  463.           Again, some stories might not use it.  It changes when you change
  464.           viewpoint to reflect the actor's possessions.  (A useful feature
  465.           since you might not know them otherwise.)
  466.  
  467.           As the story progresses, elements of the Scene Description
  468.           change.  The newly changed descriptions are displayed in reverse
  469.           video to emphasize them and making it easy to see the effects of
  470.           your commands.  The Description Window can process multi-page
  471.           descriptions.  It pauses with the message "strike any key to
  472.           continue" between pages.
  473.  
  474.           The Command Window scrolls your commands and their responses.
  475.           Figment displays its ready prompt, the current actor's name, in
  476.           this case"Player:".
  477.  
  478.                                                                           5
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.           Presentation Environment                     Figment User's Guide
  487.  
  488.  
  489.           The Command Window scrolls split-screen fashion as you give
  490.           commands so that the scrolling lines do not destroy the Scene
  491.           Description.  Ordinary reports to your actions are given to the
  492.           command region:
  493.  
  494.                Player: go east
  495.                  You can't go that way.
  496.  
  497.           The Command Window can also process multi-page responses, but
  498.           note that the command dialogue is always sacrificed; it scrolls
  499.           off the top of the Command Window and is lost so be sure you have
  500.           read this message before typing any key to continue.  
  501.  
  502.  
  503.           C.   The Object of the Story
  504.  
  505.           Most interactive fiction is driven by manipulating objects,
  506.           meaning you can examine them, take them, drop them, etc.  They
  507.           represent "story variables". 
  508.  
  509.           Object names are composed of a few words, at least one of which
  510.           should be embedded in the scene description so that you have a
  511.           couple of chances of guessing right.  "Oil lamp" might be
  512.           addressed in any of the following ways:
  513.  
  514.                >take oil
  515.                >take the oil lamp
  516.                >take the lamp lighting the room
  517.                >take the lamp and jump in the lake
  518.  
  519.           Commands begin with verbs.  Verbs cannot be abbreviated:
  520.  
  521.                >ta balloon
  522.                I don't understand the command: "ta".
  523.                >take balloon
  524.                You take the Red Balloon.
  525.  
  526.           Object names represent arguments to the verb functions.  Names
  527.           can be abbreviated:
  528.  
  529.                >take ball
  530.                You take the Red Balloon.
  531.  
  532.           This presumes that the string "ball" is unique within the current
  533.           scene.  If there were an object called "Blue Ball" in the same
  534.           scene, you would have to be more specific.
  535.  
  536.  
  537.  
  538.  
  539.           6
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.           Figment User's Guide                     Presentation Environment
  548.  
  549.           D.   Command Lines
  550.  
  551.           Figment's command processor is very sophistocated.  Many
  552.           punctuation operators are supported.  Spaces before or after
  553.           these operators are optional.  It is best not to use punctuation
  554.           except for cases as described here.
  555.  
  556.           Figment lets you make complex commands that are broken down into
  557.           simpler commands for execution and logging.  Thus the command:
  558.  
  559.                Take the bat, ball and glove from the box, and give
  560.                them to the boy.
  561.  
  562.           would be broken into:
  563.  
  564.                take bat from box
  565.                take ball from box
  566.                take glove from box
  567.                give bat to boy
  568.                give ball to boy
  569.                give glove to boy
  570.  
  571.           and dispatched for processing and logging.  The resulting log
  572.           appears as though each little command were given separately. 
  573.           Conversely, text files of commands can be read back into Figment
  574.           as command logs.  These text files can contain the complex
  575.           commands since Figment will break them down into the simpler
  576.           forms and dispatch accordingly.  (See Command Logs.)
  577.  
  578.  
  579.           1.   Articles
  580.  
  581.           Articles such as "the", "a" and "an" are stripped out.  You need
  582.           not use them if you do not want to.
  583.  
  584.  
  585.           2.   Multiple Sentences in a Command - the Period Operator
  586.  
  587.           Multiple sentences can be given in a single command separated by
  588.           a period.  Thus:
  589.  
  590.                Take the bat. Go north. Give the bat to the boy.
  591.  
  592.           The last period on a line is optional.
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.                                                                           7
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.           Presentation Environment                     Figment User's Guide
  609.  
  610.           3.   Series Operations - the Comma Operator
  611.  
  612.           A comma between objects signifies a series of objects to be
  613.           submitted to a command for repeat processing.  A series may also
  614.           use the modifier "and", and spaces are not required when the
  615.           comma separates the objects.  Note that a series can be as short
  616.           as two objects:
  617.  
  618.                take bat,ball
  619.                take bat and ball
  620.                take bat, ball, glove.
  621.                take bat, ball, and glove
  622.                take bat, ball and glove
  623.                take bat,ball,and glove
  624.  
  625.           A series may be embedded between the verb and its modifier:
  626.  
  627.                take bat,ball,glove from box
  628.                give bat,ball,glove to boy
  629.  
  630.           but a series cannot be used with destinations after the modifier:
  631.  
  632.                take candy. give candy to Bobby, Billy and Mary
  633.  
  634.           A series cannot be used with verbs.  "Take, drop and kick the
  635.           football" is illegal.
  636.  
  637.  
  638.           4.   Pronouns
  639.  
  640.                a.   "it"
  641.  
  642.                Substitutes the last object used.  If no previous definition
  643.                for "it" exists, the message "vague pronoun reference" is
  644.                issued.
  645.  
  646.                     Take the book from the box and give it to the boy.
  647.  
  648.                Note that this will give the book to the boy and not the box
  649.                to the boy.  Note also that this carries over between
  650.                commands:
  651.  
  652.                     Take book.
  653.                     examine             ;examines scene leaves pronoun
  654.                                          unaffected
  655.                     Give it to the boy.
  656.  
  657.                This pronoun can lead to some confusion:
  658.  
  659.                     Take the arrows and give it to the indian.
  660.  
  661.           8
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.           Figment User's Guide                     Presentation Environment
  670.  
  671.  
  672.                Technically, this is correct since the object named "arrows"
  673.                is a single object, but the name implies a plural case
  674.                causing some people to say "them" which would substitute a
  675.                series yielding unexpected results.
  676.  
  677.  
  678.                b.   "them"
  679.  
  680.                A pronoun that is used to substitute the last series used.
  681.  
  682.                     Take the bat, ball, and box, and give them to
  683.                     the boy.
  684.  
  685.                This variable is also global between command lines and it
  686.                also returns a message, "vague series reference", when no
  687.                definition exists.
  688.  
  689.  
  690.           E.   Synonyms
  691.  
  692.           Figment supports synonyms for the command functions and for the
  693.           object names as well.  This makes the story more flexible and
  694.           lets it flow smoother.  The author defines the synonyms. "q" is
  695.           the synonym for "quit".
  696.  
  697.  
  698.           F.   The Actor
  699.  
  700.           The Actor is the character speaking to Figment, usually the
  701.           Player, but when you see a different character in the scene, you
  702.           can assume that role and act as that character.  When you begin a
  703.           story, the command line indicates that the current Actor is the
  704.           Player by printing a ready prompt like this:
  705.  
  706.                Player:
  707.  
  708.           You change the Actor by typing the name of a character in the
  709.           scene followed by a colon ":".  Figment responds with a new ready
  710.           prompt indicating the new character is speaking.  Example:
  711.  
  712.                Player: fairy:           ;the player becomes the fairy...
  713.                Toothy Fairy:            ;...and performs now as the fairy
  714.  
  715.           This action costs no moves and triggers no story logic.  You can
  716.           combine this action with the command for the actor:
  717.  
  718.                Player: fairy: examine wand
  719.                  Oh, darn!  That tourist has it.
  720.                Toothy Fairy:
  721.  
  722.                                                                           9
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.           Presentation Environment                     Figment User's Guide
  731.  
  732.  
  733.           The Fairy remains the Actor until you decide to change back to
  734.           the player or to another character.
  735.  
  736.           When you change the Actor, the Status Indicator changes to
  737.           reflect the new Actor's attributes.  The Inventory also changes
  738.           to reflect the Actor's possessions.  The Scene Description
  739.           changes to reflect the new Actor's viewpoint.  This may change
  740.           only a portion of the description depending on how much of the
  741.           story is written from the new Actor's viewpoint.
  742.  
  743.  
  744.           G.   Command Logs
  745.  
  746.           Command Logs are like "story macros".  The replay can be
  747.           automatic like a player piano or single-stepped by hitting the F9
  748.           key.  Playback can halted by typing "i" for "interrupt". 
  749.           Playback can then be single-stepped with the F9 key or continued.
  750.  
  751.                play 5    ;play the log named same as story with 5 second
  752.                          delays between commands
  753.                i         ;stop playback
  754.                <f9-key>  ;single-step some
  755.                <f9-key>
  756.                play continue  ;proceed
  757.  
  758.           Command logs are very important for designers debugging their
  759.           work, but that's not all.  They are useful for generating script
  760.           files.  They are 95% cheaper than save files for reproducing a
  761.           previous state and they can reproduce every state along the way
  762.           to the final one.  You would need maybe a hundred save files to
  763.           do that.
  764.  
  765.           Logs can be built by logging commands during play, but you will
  766.           probably goof.  The best way to make command logs is to use your
  767.           word processor.  That way, you can put comments on the end of any
  768.           line indicated with a prefixed ";" character.  Thus a command
  769.           sequence such as:
  770.  
  771.                     take the ball       ;the boy left it here
  772.                     north               ;enter the house
  773.                     pause               ;stop to check data in editor
  774.                     put ball on table
  775.                          ...commands continue like this
  776.  
  777.           can be written in a word processor and used as a log file. 
  778.           Comments must end before the end of the line.  Of course a log
  779.           file made in Figment cannot generate comments.
  780.  
  781.  
  782.  
  783.           10
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.           Figment User's Guide                     Presentation Environment
  792.  
  793.           The text file from your word processor must not contain any word
  794.           processing codes such as margin settings, fonts, indents, page
  795.           breaks etc.  If the resulting text file will not type cleanly
  796.           with the DOS "type" command, it will not be suitable input for
  797.           Figment.
  798.  
  799.           If you do not indicate a log file name, the system will use the
  800.           last log name used.  Failing that, it will use a log file with
  801.           the same name as the story.  See also the Command Reference for
  802.           the "play", "log" and "step (F9)" commands.
  803.  
  804.           The command verb "step" is a synonym for the F9 key and lets you
  805.           change the log file name for stepping.  
  806.  
  807.                step testlog1
  808.                  testlog1 set for stepping.
  809.                F9
  810.                F9
  811.                ...etc.
  812.  
  813.           The Status line can display the log file name if desired - handy
  814.           for debugging since it is easy to forget which log file you are
  815.           using.  Remove it from the status line when you ship your story
  816.           unless you ship the log file(s) too.
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.                                                                          11
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.           Presentation Environment                     Figment User's Guide
  853.  
  854.           H.   Command Reference
  855.  
  856.            Figment recognizes its own built-in commands and special user-
  857.           defined commands.  The author uses the user-defined command
  858.           processor to create a unique command for special situations such
  859.           as "Kiss the toad".  We cannot discuss those commands since we do
  860.           not know what authors will develop so this section can only
  861.           discuss the built-in commands.
  862.  
  863.           In the following definitions, "<>" means you insert something at
  864.           that point in the command.  For example, <object> would mean that
  865.           you would supply an object's name.  The symbols "[]" mean that
  866.           the part of the command is optional.  You do not actually type
  867.           the characters "<>" or "[]".
  868.  
  869.           Of course the author has ways of inhibiting or subverting these
  870.           commands, so you might not get the anticipated effect, but that
  871.           is the challenge of interactive fiction.
  872.  
  873.  
  874.           1.   Charm <character>
  875.  
  876.           One-shot version of the Hex command that allows you to disengage
  877.           and skip a wager.
  878.  
  879.           2.   Close <thing or feature>
  880.  
  881.           3.   Drink <thing>
  882.  
  883.           4.   Drop <thing>
  884.  
  885.           5.   Eat <thing>
  886.  
  887.           Some stories do not concern themselves with food.
  888.  
  889.           6.   Examine [me or <object>]
  890.  
  891.           The examine function often gives you essential clues, but it
  892.           costs you a move (Help does not).  The different forms are:
  893.  
  894.                "examine" by itself will describe the scene.
  895.                "examine me" will describe you, the player.
  896.                "examine" followed by an object name will describe the 
  897.                object.
  898.  
  899.           7.   F1 - Enter Story Editor
  900.  
  901.           Switch between Edit mode and Playback mode with F1.
  902.  
  903.  
  904.  
  905.           12
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.           Figment User's Guide                     Presentation Environment
  914.  
  915.  
  916.           8.   F9 - Single-Step a Log File
  917.  
  918.           Before you play your log file, you must re-establish the state of
  919.           the story when the logging process was started.  Do this with the
  920.           "restore" or "restart" functions then hit F9.  Each time you hit
  921.           F9, one command will execute.
  922.  
  923.           The F9-key does not let you specify a file name so the Step
  924.           command is a command synonymn that allows you to change log
  925.           files.  The F9-key will use the last log name used, if none was
  926.           used, then the log name matching the story name.  (See "Step".)
  927.  
  928.           You can step through a log then say:
  929.  
  930.                play continue t     where t = delay time in seconds
  931.  
  932.           The log will then play out to the end automatically.
  933.  
  934.           See also: Log, Play, and Save.
  935.  
  936.           9.   F10 - DOS Shell
  937.  
  938.           You can leave Figment to go to the DOS command interpreter by
  939.           hitting F10.  You may then do any work on your machine that you
  940.           like (word processing, spreadsheets, document printing,
  941.           communications, etc.)  When you are ready to return to Figment,
  942.           simply type "exit".  You will return to Figment exactly where you
  943.           left off.  If you will be gone a long time, it is probably wise
  944.           to save your story before you leave.  (See the command Save.)
  945.  
  946.           This function expects to find the DOS command interpreter,
  947.           "COMMAND.COM" on the diskette in the default disk drive.  You get
  948.           an error message and remain in Figment if COMMAND.COM is not
  949.           found.  
  950.  
  951.           10.  Fight <character>
  952.  
  953.           Fights are random processes with their outcome weighted by the
  954.           strengths of the two protagonists.  You are locked into the fight
  955.           until it completes, meaning one protagonist dies (see also Hit). 
  956.           The odds favor the stronger fighter, but certain objects improve
  957.           your odds by adding to your strength.   Sometimes weaker
  958.           combatants win; they just get lucky.
  959.  
  960.           Fighting is bad for your health.  Lose most of your health, and
  961.           you lose your strength.  Lose all your health, and you die.  You
  962.           have some control over this process since you can wager the
  963.           number of health points you want to commit on each cycle of the
  964.           fight.  This implies that you can hit heavy or hit light and
  965.  
  966.                                                                          13
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.           Presentation Environment                     Figment User's Guide
  975.  
  976.           receive in kind.  For example, if you wager 4 points, the system
  977.           computes a random transaction and apportions the results:
  978.  
  979.                Wager: 4
  980.                  You hit the Bear 3 times.
  981.                  The Bear hits you 1 times.
  982.  
  983.           This means that your opponent loses 3 health points while you
  984.           lose only 1 point.  It also means that your maximum wager is the
  985.           full number of health points that you have.
  986.  
  987.           You can skip a wager by entering zero or just hitting the Enter
  988.           key if you think (or know from experience - see Random Number
  989.           Generator) the random outcome will be unfavorable this turn, but
  990.           eventually you must commit to a wager.  Skipping also costs a
  991.           move, but considering it can cost several moves to recuperate a
  992.           lost health point, it can be a successful strategy to skip.
  993.  
  994.           Your health recovers with time after the fight.  You gain
  995.           strength and sometimes skill as a result of defeating an
  996.           opponent.
  997.  
  998.           A one-shot form of the fight command is provided as "Hit".
  999.  
  1000.           See also Hit, Charm, and Hex.
  1001.  
  1002.           11.  Find <object>
  1003.  
  1004.           This command will locate people and things you have seen before
  1005.           in prior scenes.  It will change the scene to the scene where the
  1006.           object is.  You cannot find objects you do not know exist, and
  1007.           you only know objects exist by seeing them in scenes.  Sometimes
  1008.           you have more knowledge than you realize so it does not hurt to
  1009.           try.
  1010.  
  1011.           This command is subject to any restrictions on path computation. 
  1012.           See also the "Go" command for more information on paths.
  1013.  
  1014.           12.  Give <thing> [to] <character>
  1015.  
  1016.           The forms:
  1017.  
  1018.                >give the book to the boy
  1019.                >give book to boy
  1020.                >give book boy
  1021.  
  1022.           are all legal, but the form:
  1023.  
  1024.  
  1025.  
  1026.  
  1027.           14
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.           Figment User's Guide                     Presentation Environment
  1036.  
  1037.                >give the boy the book
  1038.  
  1039.           is not legal.
  1040.  
  1041.           If you do not have the prescribed object in your possession, but
  1042.           it can be found in the scene, Figment will automatically take the
  1043.           object for you and then give it to the character.  This counts as
  1044.           a two step action meaning your move count is incremented twice. 
  1045.           The "take" action is a fully separate command, which is to say
  1046.           that the Story Designer can impose conditions on that action.
  1047.           See also: put, take.
  1048.  
  1049.           13.  Go  <direction>
  1050.                    <[to] [the] scene name>
  1051.  
  1052.           As you move in different directions, you change scenes. 
  1053.           Directions are given as the four points of the compass plus "up"
  1054.           and "down".  Thus:
  1055.  
  1056.                >go north
  1057.                >go up
  1058.  
  1059.           Actually, "go" is optional and the directions can be abbreviated
  1060.           to n, e, w, s, u, and d.  So:
  1061.  
  1062.                >n
  1063.  
  1064.           changes to the scene to the north of the current scene as defined
  1065.           by the story map.  
  1066.  
  1067.           The "go" command also recognizes the names of places (scenes)
  1068.           where the player has been before.  The player can say:
  1069.  
  1070.                go to the river
  1071.                go home
  1072.                go to the basement
  1073.  
  1074.           The scene you specify must be a scene you have been in before,
  1075.           and you must know the directions back to the scene from the
  1076.           current scene (typically by virtue of experience).
  1077.  
  1078.           As you explore different scenes, you acquire knowledge about
  1079.           where scenes are in relation to each other.  When you have
  1080.           reached that level of understanding about the story, it is nice
  1081.           to let Figment do the work for you.
  1082.  
  1083.           Figment will compute a path and begin moving through the scenes
  1084.           along the path until the destination is reached.  Each scene-
  1085.           change along the way is a legal move, and it is subject to any
  1086.           constraints upon the player that the player would experience if
  1087.  
  1088.                                                                          15
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.           Presentation Environment                     Figment User's Guide
  1097.  
  1098.           the moves were made manually.  If your health or your food
  1099.           supplies are low, this command might exhaust you since each scene
  1100.           change increments the move count.
  1101.  
  1102.           It is conceivable that the destination is known, but the
  1103.           directions needed to construct the path to it are not known. 
  1104.           When Figment cannot construct a path, it reports, "You don't know
  1105.           the way from here."  The player will have to explore some more by
  1106.           giving the compass directions until more directions along the
  1107.           path are known.
  1108.  
  1109.           Some scenes function like one-way valves.  They have no return to
  1110.           earlier scenes.  If such a scene lies along your path, the path
  1111.           function fails and you stay where you are.
  1112.  
  1113.           Each change of scene is subject to any restrictions placed on the
  1114.           "go" command in each scene along the way.  You may encounter a
  1115.           scene along the way that restricts your leaving until you have
  1116.           performed some special task.  In such a case, the path terminates
  1117.           at that scene.  When you have completed the task, you can
  1118.           continue, if you wish, by repeating your command: "go to the
  1119.           river".
  1120.  
  1121.           The Designer can give you knowledge of places and directions at
  1122.           the start of the story.  In which case, the path function can
  1123.           succeed even if you have never been to the scene before.  It's
  1124.           worth a try, and it's valuable knowledge if it's true.
  1125.  
  1126.           14.  Hex <character>
  1127.  
  1128.           "Hex" is the same as "Fight" except you compete on the basis of
  1129.           magical ability.  The one-shot form of Hex is Charm.
  1130.  
  1131.           15.  Hit <object>
  1132.  
  1133.           The one-shot form of the Fight command with the advantage that
  1134.           you are not locked in to a fight to the death.  It is best
  1135.           reserved for times when your health is low or when you are
  1136.           surrounded by bad-guys and you wish to keep the option to
  1137.           retreat.
  1138.  
  1139.           16.  Lock <thing or feature>
  1140.  
  1141.           17.  Open <thing or feature>
  1142.  
  1143.           Used with containers and other objects such as doors.  Locked
  1144.           objects cannot be opened.  Open containers describe their
  1145.           contents in the Scene Description and Inventory.
  1146.  
  1147.  
  1148.  
  1149.           16
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.           Figment User's Guide                     Presentation Environment
  1158.  
  1159.  
  1160.           18.  Pause Command
  1161.  
  1162.           An empty command whose sole reason to exist is to pause a log
  1163.           file.  Playback can be continued with the command "play
  1164.           cont[inue]".
  1165.  
  1166.           Do not confuse "pause" with "wait".  See also: Play, Step (F9),
  1167.           Wait.
  1168.  
  1169.           19.  Play [log_name] [cont[inue]] [delay_interval]
  1170.  
  1171.           Plays or continues playing a log file.  You will want to restore
  1172.           your saved version of your story before playing back the log
  1173.           file.  The playback can be very rapid so you may want to hit your
  1174.           "pause" key to study the responses or use the "step" command (F9)
  1175.           to execute logged commands one at a time.
  1176.  
  1177.           You can slow down the playback by specifying the delay interval
  1178.           in seconds between commands: "play 5" plays the default log with
  1179.           a 5 second delay between commands.
  1180.  
  1181.           If you strike the key, "i" or "I" while Figment is playing a log,
  1182.           the playback will interrupt playback immediately.  The "step"
  1183.           command (F9) may then be used to advance the log file or the
  1184.           playback can be resumed with the "continue" option.
  1185.  
  1186.           The option "cont" continues the log playback after it has been
  1187.           interrupted or paused.  Of course, it also works after stepping a
  1188.           log file any number of moves with F9.  The form of the command
  1189.           is:
  1190.  
  1191.                >play cont
  1192.  
  1193.           You can specify log file names in the play command.  This means
  1194.           you can play or step to a pre-determined point then switch to a
  1195.           different log.
  1196.  
  1197.           20.  Put <thing> [in or on] <thing or feature>
  1198.  
  1199.                >put the ball in the box
  1200.                >put the book on the table
  1201.  
  1202.           The author can inhibit foolish placements:
  1203.  
  1204.                >put the book on the flagpole
  1205.                   You can't put that there.
  1206.  
  1207.           If you do not have the prescribed object in your possession, but
  1208.           it can be found in the scene, Figment will automatically take the
  1209.  
  1210.                                                                          17
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.           Presentation Environment                     Figment User's Guide
  1219.  
  1220.           object for you and put it in or on the object.  This two-step
  1221.           action is treated as a fully separate command, which is to say
  1222.           that the author can impose conditions on the "take" action and
  1223.           your move count increments twice.
  1224.  
  1225.           21.  Quit
  1226.  
  1227.           Ends your Figment session and returns you to DOS.  Consider
  1228.           saving your session to disk first.  This is the only legal way
  1229.           out of Figment (Ctrl-C works, but it isn't legal).  Even when
  1230.           editing, you return to the Presentation Environment side and exit
  1231.           with "quit".  Quit shuts down music and switches off graphics
  1232.           mode when those features are used.   Ctrl-C does not.
  1233.  
  1234.           22.  Read [<Object>]
  1235.  
  1236.           If the appropriate story conditions do not hold true, this
  1237.           function just prints gibberish.
  1238.  
  1239.           23.  Restart [<Story Name>]
  1240.  
  1241.           Restarts the current story (or one you specify) at the beginning. 
  1242.           You cannot restart a story that you saved with the "save"
  1243.           command.  Use "restore" for that.  See the section on File
  1244.           Management for more information on ".sdf" and save files.
  1245.  
  1246.           24.  Restore [<Story Name>]
  1247.  
  1248.           Reloads a file made with the "save" command (See below).  If you
  1249.           do not specify a name it assumes you want to restore the story
  1250.           you are playing (which might not have saved form).  Restore
  1251.           differs from restart.  The state of the story returns to the
  1252.           state at the time the story was saved.
  1253.  
  1254.           25.  Save [<Story Name>]
  1255.  
  1256.           This function saves the story in its current state in a file on
  1257.           the disk with the specified name.  Do not specify a file
  1258.           extension.  A save file is reloaded with "restore".  "Save" never
  1259.           over-writes the original story conditions; their in separate
  1260.           files.  If you specify a name, Figment changes the current story
  1261.           name to that name.  Figment keeps the last save file as a backup
  1262.           renamed to a ".bak" extension.
  1263.  
  1264.           In order to use a ".bak" file, you must rename it to a ".sav" or
  1265.           ".sdf" file.  You do this with the DOS command "rename".  Again,
  1266.           exit with F10, make the changes, return and use "restore" or
  1267.           "restart".
  1268.  
  1269.           See also Top Level Editor, File Management, Restore, Restart.
  1270.  
  1271.           18
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.           Figment User's Guide                     Presentation Environment
  1280.  
  1281.  
  1282.           26.  Script [on or off]
  1283.  
  1284.           The Script command will output the story text, commands and
  1285.           responses to a listing file as it is played.  The resulting text
  1286.           file can be read into your word processor.  If you want to print
  1287.           it, print from your word processor.  It will need line-breaks and
  1288.           your word processor does that for you automatically.  The listing
  1289.           is contained in a file with the name of the story and a ".lst"
  1290.           file extension.  The listing could be over-written so if you want
  1291.           to guard against that, jump out of Figment with F10 and rename
  1292.           the file to some other extension.
  1293.  
  1294.           Note the forms:
  1295.  
  1296.                Player: script on   ;opens file, starts scripting mode
  1297.                Player: script off  ;turns off scripting, closes file
  1298.                Player: script      ;toggles on to off and vice versa
  1299.                                    ;does not open/close file
  1300.  
  1301.           While scripting is enabled, Figment prints "Scripting" in reverse
  1302.           video at the right of the command line.
  1303.  
  1304.           It is probably best to play a log file with scripting enabled,
  1305.           but you can also use it when you are giving commands manually. 
  1306.           You can toggle scripting on and off by saying "script" with no
  1307.           on/off modifiers.  This lets you turn off scripting while you
  1308.           experiment then reenable scripting and proceed.
  1309.  
  1310.           27.  Shoot <object> [with <weapon>]
  1311.  
  1312.           The shoot function requires great skill.  The life expectancy of
  1313.           novices shooting weapons is extremely short, but don't take our
  1314.           word for it.  Only certain weapons qualify as weapons that can be
  1315.           shot.  You would not shoot a sword for instance.  This function
  1316.           gives you an alternative to fighting on the basis of magic or
  1317.           strength.  If you have more than one suitable weapon, you must
  1318.           specify which one to use.
  1319.  
  1320.           28.  Step <log_name>
  1321.  
  1322.           Used to change the log file when single-stepping through the
  1323.           story.  Normally, single-stepping is done with the F9 key, but
  1324.           that does not allow a file name.
  1325.  
  1326.           29.  Take <thing> [from <object>]
  1327.  
  1328.           You can take a thing from the scene or, optionally, from a
  1329.           character or feature in the scene.  You get an error message if
  1330.  
  1331.  
  1332.                                                                          19
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.           Presentation Environment                     Figment User's Guide
  1341.  
  1342.           you attempt to take the character or feature itself or if you
  1343.           simply mis-type.
  1344.  
  1345.                >take the amulet
  1346.                You take the Amulet of Zendor.
  1347.                >take the keg from the Saint Bernard
  1348.                You take the Wooden Keg.
  1349.                >take the Saint Bernard
  1350.                You can't take the Saint Bernard.
  1351.                >take the #$%^#
  1352.                You can't take the #$%^#.
  1353.  
  1354.           30.  Toggle
  1355.  
  1356.           Changes the Scene Description from the long-hand description to
  1357.           the short-hand description.  Whenever you return to a scene you
  1358.           have been in before, you get a short-hand description.  This will
  1359.           change the display mode back to the long-hand description.  Many
  1360.           authors do not provide brief descriptions, in which case, Toggle
  1361.           does nothing.
  1362.  
  1363.           31.  Unlock <thing or feature>
  1364.  
  1365.           Many things must be unlocked before they can be opened.  In many
  1366.           cases, finding the "keys" that do this is the central theme of
  1367.           the story.
  1368.  
  1369.           32.  Wait [number]
  1370.  
  1371.           Skill suffers by waiting, but health can recuperate.  If you
  1372.           specify a number, Figment will wait that number of moves.  Any
  1373.           events that would normally transpire on those moves will still
  1374.           take place even though waiting is in itself an empty command.
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.           20
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.           Figment User's Guide                             The Story Editor
  1402.  
  1403.           Part II.  The Story Editor
  1404.  
  1405.           Part II discusses the mechanics of editing.  Use it as your
  1406.           editing reference when you want to know how to change something. 
  1407.           The "what and why" of editing is discussed in Part III once you
  1408.           understand the mechanics.
  1409.  
  1410.  
  1411.           A.   Introduction to the Editor
  1412.  
  1413.           The Editor is comprised of several data-entry editors to change
  1414.           story elements, including the story logic, with a few simple
  1415.           keystrokes.  You can enter the editor at any time before or
  1416.           during play to fix a bug.  Similarly when developing material in
  1417.           the editor, you can switch to playback mode and see immediately
  1418.           how it plays.
  1419.             
  1420.           You will understand the editor much better if you have a working
  1421.           example in front of you.  Call up the demo shipped with your
  1422.           software and follow along with the discussion trying each topic. 
  1423.           You cannot damage the original data so experiment at every stage
  1424.           of the discussion.  Hit the F1 key to flip back and forth between
  1425.           the story and the editor.  Try it now.
  1426.  
  1427.           When you first enter the editor, your cursor is at the top row of
  1428.           the screen which is called the Top Level Editor.  Hitting the
  1429.           up/down-arrow keys flips through the different editors.  Keep
  1430.           flipping and you come back to where you started.  Hit page-
  1431.           up/down to enter/exit a screen editor.  Try it now.
  1432.  
  1433.           Some of the data structures you want to see are hidden from view
  1434.           until you need them, for example links in the object data
  1435.           editors.  Use Page-down to get to lower levels and the
  1436.           left/right-arrow keys to move across the level.  The data appears
  1437.           when you put the cursor on the word "Links".
  1438.  
  1439.           Now that you can see the different data structures, we will talk
  1440.           about how Figment works and how to make a story.
  1441.  
  1442.  
  1443.           B.   Theory of Operation
  1444.  
  1445.           With Figment, you create objects and scenes.  The objects
  1446.           represent characters, props, and features in the scene.  The
  1447.           scenes (which are also a type of object) represent places where
  1448.           the objects reside.  You associate the objects to their scenes by
  1449.           making a link from the scene to the object.
  1450.  
  1451.           Scenes are tied together by the Story Map.  With the map done,
  1452.           you can use the "go" command in Presentation Mode much like
  1453.  
  1454.                                                                          21
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.           The Story Editor                             Figment User's Guide
  1463.  
  1464.           walking through the rooms on a house tour.  Without a map, you
  1465.           are stuck forever in the first scene.
  1466.  
  1467.           You write rules to govern the object behavior.  The collection of
  1468.           all rules is called the story logic.  Without the logic, the
  1469.           story is lifeless; the player can manipulate the objects, but
  1470.           nothing exciting happens.
  1471.  
  1472.           The text used in the story is stored in a variety of data
  1473.           structures.  The initial text to describe an object is part of
  1474.           the object's data structure.  It appears automatically when the
  1475.           object appears in (is linked into) the scene.  Rules store text
  1476.           to dispense in response to actions or to replace the object
  1477.           descriptions.  "Standard Messages" are snippets of frequently
  1478.           used text that can be used as "text-variables" in other text
  1479.           messages.  For example, the description, "The door is open." can
  1480.           contain a reference to a standard message consisting of only the
  1481.           word "open" which can be changed when the Player closes the door. 
  1482.  
  1483.  
  1484.           C.   How to Make an Interactive Story
  1485.  
  1486.           From the above, you should recognize a simple procedure for
  1487.           creating a story:
  1488.  
  1489.                Create scene objects and "stuff" objects
  1490.                Write initial object descriptions.
  1491.                Link stuff objects to scene objects
  1492.                Create map to relate scenes one to another
  1493.                Create logic
  1494.  
  1495.           Of course you need not create all your objects before you create
  1496.           scenes, etc.  You just need a few to get going.  You can add more
  1497.           later.  There is no hard, fixed order of development.  Work on
  1498.           what pleases you now.
  1499.  
  1500.           The map gives your story structure so the first few sessions are
  1501.           aimed at building up the map so you can take the house tour.
  1502.  
  1503.           Logic development is the hardest so postpone it as long as
  1504.           possible.  Try to sketch out your story with scenes and objects. 
  1505.           It is easy to develop "Paralysis by Analysis" so do not get too
  1506.           deep into logic development too soon.  You can easily add scenes
  1507.           later, but overhauling your map destroys your existing logic so
  1508.           do not attempt much logic until your map gels.
  1509.  
  1510.           Many secondary data structures are used to embellish the story:
  1511.           object types, link types, attributes, and profiles.  You add
  1512.           these as you need them to make the rules so do not concern
  1513.           yourself with these too early in the project.  The Player Map is
  1514.  
  1515.           22
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.           Figment User's Guide                             The Story Editor
  1524.  
  1525.           made for you automatically during play, but you can fill it in if
  1526.           you want to give the player foreknowledge of places and things -
  1527.            another embellishment.  Make Help messages last after other
  1528.           people have played your story.
  1529.  
  1530.           USE COMMAND LOGS!  Make one very early in the project, and use it
  1531.           to drive your development efforts.  You can deliberately add
  1532.           commands that you know will fail.  Why?  Because a log can
  1533.           represent future work - a story outline.  The log fails in the
  1534.           early going, but as you develop more data and rules you progress
  1535.           further and further until finally you can complete the entire
  1536.           log.  You then go back and make a harder outline or a different
  1537.           outline and repeat the process.  Also learn to insert "Pause"
  1538.           commands at points where you know the log will fail, then you can
  1539.           experiment manually.  And since you need to use logs so much, you
  1540.           will probably want to fix the random number generator so get used
  1541.           to starting Figment from DOS with the command form:
  1542.  
  1543.                figment <story_name> <seed_number>
  1544.  
  1545.           The first log you write is probably only the commands required to
  1546.           navigate through the scenes to the final scene of your story. 
  1547.           Gradually you add activities within the scenes developing the
  1548.           rules for them.  Single-step through your log and take notes of
  1549.           things you want to change.  Change the logic as required to make
  1550.           the log work.
  1551.  
  1552.           Recognize that what you are making is really a model.  Although
  1553.           the model can improve, it can never really be finished since you
  1554.           can always add more conditions by expanding the log file or
  1555.           writing a completely different one.  But eventually, the model
  1556.           becomes sufficiently large to encompass a large number of
  1557.           situations and demands placed on it.  At that point, you probably
  1558.           deem the work "complete enough".
  1559.  
  1560.  
  1561.           D.   Method of Editing
  1562.  
  1563.           The method of editing could be described as a "Poor-man's Mouse"
  1564.           interface since you will be navigating across the screen with the
  1565.           cursor control keys and in many cases changing values with them. 
  1566.  
  1567.           Figment is remarkably fault tolerant.  The two most notable areas
  1568.           where it is not are the areas of file management and deleting
  1569.           objects.  In both cases, Figment is obliged to assume that you
  1570.           want the command performed and so performs it.  It is your
  1571.           responsibility to understand the full ramifications of these
  1572.           commands.  To that end, special sections on these topics are
  1573.           provided late in the editing discussion when you have a better
  1574.  
  1575.  
  1576.                                                                          23
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.           The Story Editor                             Figment User's Guide
  1585.  
  1586.           understanding of the editing operations.  Until you reach that
  1587.           point, we recommend that you do not do these operations.
  1588.  
  1589.  
  1590.           1.   Scrolling Values
  1591.  
  1592.           Except where text is specifically required, you merely position
  1593.           the cursor over the data value you want to change, then hold down
  1594.           the up-/down-arrow cursor keys until you reach the value you
  1595.           want.  Release the key, and the new value is set.  We call this
  1596.           process "scrolling the data value".  Most data values are set
  1597.           this way so you will hear the term many times in this document.
  1598.  
  1599.           Usually different data types are displayed in different locations
  1600.           so when scrolling values, there is never any confusion about what
  1601.           is being changed.  In the case of expression editing within
  1602.           rules, different data types can be used in the same location. 
  1603.           When this occurs, we use the "Home" key to change the data type
  1604.           then we use the up-/down-arrow keys to scroll the data value. 
  1605.           Pay particular attention whenever we discuss the Home key,
  1606.           because it is not obvious from looking at the screen that the
  1607.           Home key can be used.
  1608.  
  1609.  
  1610.           2.   Navigating the Screen
  1611.  
  1612.           In order to scroll a data value, you must put the cursor at the
  1613.           value's screen position.  There are two pairs of keys that will
  1614.           do that.  The left-/right-arrow keys move the cursor within the
  1615.           current editing level.  We call this "advancing the cursor".  The
  1616.           Page-up/Page-Down keys change the current editing level.  Often,
  1617.           you must step down through several mini-levels.  The Escape key
  1618.           is used as a super-exit key when you want to leave these levels
  1619.           and move on to another task.
  1620.  
  1621.  
  1622.           3.   Text Editing
  1623.  
  1624.           Text can be changed in two ways: use the typing buffer to type in
  1625.           new text to replace the old text, or use Figment's full-screen
  1626.           text editor.  The typing buffer is the easiest way when the text
  1627.           is small such as object names.  Your editing capability is
  1628.           limited to the backspace key for correcting typos however. 
  1629.           Often, you begin to write a little message and end up writing a
  1630.           monster several sentences long riddled with corrections you would
  1631.           like to make.  No problem.  Just hit F6 and the text is swept
  1632.           into the full-screen editor.
  1633.  
  1634.           The full-screen text editor pulls the text into a buffer where
  1635.           you can use common word processing commands to move around in the
  1636.  
  1637.           24
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.           Figment User's Guide                             The Story Editor
  1646.  
  1647.           buffer and change the text.  This is the preferred text editing
  1648.           method for the longer messages you want to write.  More on that
  1649.           later.
  1650.  
  1651.           Any text item can be up to 2 KBytes long, including names, which
  1652.           is about a full screen completely covered with text.  Considering
  1653.           that scene descriptions and command responses are composed of
  1654.           several text items, you can compose screenfuls of text if you
  1655.           desire.   Bear in mind that this costs computer memory, but you
  1656.           should find that your imagination is taxed before the system is.
  1657.  
  1658.           A text item can be "erased" (set to length zero) simply by
  1659.           striking the key labeled "Enter" (or "Return" on some keyboards)
  1660.           instead of typing text when the cursor is positioned over the
  1661.           text item.  In fact, it is so easy to do this we caution you to
  1662.           stay away from the Enter key until you are sure you want it.
  1663.  
  1664.           Text strings that you write are passed around during play and may
  1665.           be used in several different places.  Often they are grouped
  1666.           together to form paragraphs and they are added and removed from
  1667.           that paragraph as the play progresses.  Figment runs the
  1668.           paragraph through a low-budget pretty-printer which breaks the
  1669.           lines at word boundaries.  Therefore, if you attempt to force
  1670.           some artificial format on the text within the editor, it can
  1671.           often look wrong at run-time.
  1672.  
  1673.           Similarly, hyphenating produces unexpected results at run-time. 
  1674.           Unless the word is actually a hyphenated word, it is best not to
  1675.           insert additional hyphens.
  1676.  
  1677.           Ignore end-of-line restrictions and simply type blindly away. 
  1678.           When the cursor reaches the end of the line, it simply wraps to a
  1679.           new line and keeps on going.  This produces lines with words that
  1680.           wrap in the middle, but as we said, Figment cleans this up at
  1681.           run-time.
  1682.  
  1683.           When using the typing buffer, you can write many lines.  When you
  1684.           get to the end of the line, keep going.  Don't hit Enter until
  1685.           you are through and want to submit the text.  Yes, it looks like
  1686.           you are writing all over creation, but keep going.  No harm done. 
  1687.           When you are finished, hit Enter, and jump up to the Top Level
  1688.           Editor for a moment, and the screen fixes itself.
  1689.  
  1690.           In the full-screen editor, you can always use hard-returns if you
  1691.           want them, and you need them for paragraph breaks, but you must
  1692.           use the full screen editor to enter them, because they terminate
  1693.           the typing buffer.
  1694.  
  1695.  
  1696.  
  1697.  
  1698.                                                                          25
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.           The Story Editor                             Figment User's Guide
  1707.  
  1708.  
  1709.           4.   Error Message Reports
  1710.  
  1711.           Most errors are simple mis-steps and only merit a beep. Larger
  1712.           errors report to the second line of the screen.  The message
  1713.           remains until you hit another key so just go on about your
  1714.           business and the message disappears.
  1715.  
  1716.  
  1717.           E.   Cut, Paste, and Insert Functions
  1718.  
  1719.           Cut and paste operations have been implemented for some data
  1720.           structures, but not all.  We discuss the general nature here and
  1721.           cover details on a case-by-case basis for each data structure. 
  1722.           These functions are context-sensitive, meaning you get the
  1723.           correct cut-paste operation for the item on which the screen
  1724.           cursor is positioned.
  1725.  
  1726.  
  1727.           1.   Insert
  1728.  
  1729.           The "insert" function is designed to open a gap in a list of data
  1730.           elements and leave you a new data item for editing.  It is used
  1731.           wherever the order of items is important.  Currently, it is
  1732.           implemented for rule bases, expressions and rule messages.  You
  1733.           insert a new data item into a list or sequence by hitting the
  1734.           Insert key when the cursor is positioned over the item where you
  1735.           want the new item inserted.
  1736.  
  1737.  
  1738.           2.   Cut - F7
  1739.  
  1740.           The cut function (F7 key) parks a data structure in a buffer
  1741.           temporarily for pasting to a new location in a list or sequence. 
  1742.           It is implemented for text strings of all kinds, rules, and
  1743.           expressions.
  1744.  
  1745.           Different cut buffers are used for each data type.  Cutting one
  1746.           data type will not overwrite any different data type parked in
  1747.           its cut buffer.  It does, however, overwrite the existing
  1748.           contents of the buffer when you repeatedly cut the same data
  1749.           type.
  1750.  
  1751.           Text strings can be cut anywhere they are used in objects or
  1752.           rules.  They can then be pasted back in new places.  This means
  1753.           that you can cut description strings out of objects and paste
  1754.           them back as rule messages and vice versa.
  1755.  
  1756.           The F7 key will cut a text item whenever the screen cursor is
  1757.           positioned at the start of the text.  You cannot take half a
  1758.  
  1759.           26
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.           Figment User's Guide                             The Story Editor
  1768.  
  1769.           string.  Cut the whole string, paste a copy back and edit the two
  1770.           strings separately.
  1771.  
  1772.           The cut buffers are not written to disk so they do not carry over
  1773.           between sessions, but they are unaffected by play or file
  1774.           read/write operations.
  1775.  
  1776.  
  1777.           3.   Paste - Alt-F7, Shift-F7
  1778.  
  1779.           The paste function pastes a copy of the appropriate cut buffer to
  1780.           the new location as indicated by the screen cursor.  If the cut
  1781.           buffer is empty, meaning you forgot to cut something, the paste
  1782.           function just beeps.
  1783.  
  1784.           When you paste a text string in an object (description or
  1785.           examination message), the old string at the cursor location is
  1786.           deleted and replaced with a copy of the string in the cut buffer. 
  1787.           You can move to another location and paste another copy of the
  1788.           same string.  For object text strings, the Shift-F7 and Alt-F7
  1789.           keys are synonymous.  You can use either key.
  1790.  
  1791.           Sequences behave slightly differently.  When you paste something
  1792.           in a list or sequence, the existing items are bumped back in the
  1793.           sequence, and the item in the cut buffer is inserted in the
  1794.           sequence.   Repeated pastes make multiple copies.  Rules in rule
  1795.           bases, expressions in clauses and rule message lists are all
  1796.           examples of items in sequences or lists.
  1797.  
  1798.           The two different paste keys, Shift-F7 and Alt-F7, are provided
  1799.           so that you can insert items in the sequence differently.  Shift-
  1800.           F7 inserts the item into the sequence after the item your cursor
  1801.           is pointing to.  Thus if your cursor points to item number 7, the
  1802.           newly pasted item becomes item number 8 and the cursor advances
  1803.           to point to it.  Alt-F7 inserts the new item before the item your
  1804.           cursor is pointing to.  Thus, item 7 becomes item 8 and the newly
  1805.           pasted item becomes item 7 to which your cursor is still
  1806.           pointing.
  1807.  
  1808.           Alt-F7 appears most like the traditional paste operation used in
  1809.           word processors so it will seem most natural to you.  Shift-F7 is
  1810.           used most for tacking items onto the ends of lists and sequences,
  1811.           a frequent task.  
  1812.  
  1813.  
  1814.           F.   The Top Level Editor
  1815.  
  1816.           The highest level in the editing hierarchy is the Top Level
  1817.           Editor.  It calls the different screen editors for the different
  1818.  
  1819.  
  1820.                                                                          27
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.           The Story Editor                             Figment User's Guide
  1829.  
  1830.           Story Elements.  You also read and write many data files from the
  1831.           Top Level Editor.
  1832.  
  1833.           You enter the Top Level Editor from the Presentation Environment
  1834.           by hitting the F1 key.  This puts the first screen editor on the
  1835.           screen, the Stuff Editor.  The Top Level Editor is always
  1836.           displayed as the top line in any other screen editor (except the
  1837.           text editor).
  1838.  
  1839.           The editor will warn you when you attempt to edit data or write
  1840.           data to disk that has been changed during play:
  1841.  
  1842.                Warning! Data changed during play.  Proceed? (Y/N)
  1843.  
  1844.           You have the choice of proceeding (which you must do when you are
  1845.           debugging a story and want to know what went wrong) or retrieving
  1846.           the data from disk (Use Shift-F2.  See File Management).  You
  1847.           will only be warned once; if you proceed to edit the altered data
  1848.           you will not be warned if you write it to disk.  If you are
  1849.           debugging, be sure to retrieve your original data after learning
  1850.           the fault and before making changes.
  1851.  
  1852.           You return to the Presentation Environment via the Page-Up key
  1853.           from the Top Level Editor or by hitting F1 from anywhere in the
  1854.           editor.  Try moving in and out of the Editor hitting F1 and Page-
  1855.           Up:
  1856.  
  1857.                F1 to enter Story Editor from Presentation Mode
  1858.                F1 or Page-Up to exit Editor to Presentation Mode 
  1859.  
  1860.           The different screen editors form the next level down from the
  1861.           Top Level Editor.  You can view these different editors with the
  1862.           Up-/Down-Arrow keys when the cursor is positioned by the element
  1863.           name, which it is when you enter the Top Level Editor from the
  1864.           Presentation Environment.  Each time you hit the key, the next
  1865.           screen editor is displayed.
  1866.  
  1867.           Note that as you keep hitting the Up-arrow key you come back
  1868.           around to the first screen and that the Down-arrow moves through
  1869.           the list of screens in the opposite direction.  This philosophy
  1870.           is common throughout the Story Editor; every key has its opposite
  1871.           number and lists are scrolled through to the end whereupon they
  1872.           "wrap" back around and start over.  For long lists, it is often
  1873.           easier to go backwards one step from the beginning to reach the
  1874.           end.
  1875.  
  1876.           The Top Level Editor also controls file input/output, but we will
  1877.           postpone that discussion until later.  Just note here that you
  1878.           move over to change the filename with the Left-/Right-arrow keys. 
  1879.           As with the Up-/Down-arrow keys you get the cursor-wrap and
  1880.  
  1881.           28
  1882.  
  1883.  
  1884.  
  1885.  
  1886.  
  1887.  
  1888.  
  1889.           Figment User's Guide                             The Story Editor
  1890.  
  1891.           forward-reverse effects.  F2 and F3 will read and write files
  1892.           respectively anytime your cursor is anywhere on the top line so
  1893.           don't hit them until you want to modify files.
  1894.  
  1895.           You can leave Figment and return to DOS temporarily by hitting
  1896.           F10 when in the Top Level Editor only.  This does not terminate
  1897.           Figment.  It leaves it sleeping in memory until you return with
  1898.           the DOS command "exit".  This lets you change filenames or disks
  1899.           before doing file I/O operations.  F10 is enabled anytime your
  1900.           cursor is anywhere on the top line of the editor screen.
  1901.  
  1902.           As mentioned in the Command Reference, F10 requires the file
  1903.           "COMMAND.COM" to be on the diskette in the default drive.
  1904.  
  1905.           So far, we have viewed different screen editors, but we have not
  1906.           entered them.  Do that with Page-Down.  Page-Down means "Enter
  1907.           lower-level editor".  Correspondingly, Page-Up means "Exit to
  1908.           higher level editor".  Change to the screen editor titled "Stuff"
  1909.           using the Up-arrow key, then hit Page-Down.  Your screen cursor
  1910.           jumps down to the next level which displays all the "Stuff" that
  1911.           have been defined for the story.
  1912.  
  1913.  
  1914.           G.   Summary of Editing Operations
  1915.  
  1916.           At this point, we have demonstrated much of the major editing
  1917.           features so a brief summary is in order before we continue. 
  1918.           Figment assigns its editing functions to special keys so they are
  1919.           executed with single keystrokes.  The key assignments are as
  1920.           follows:
  1921.  
  1922.  
  1923.                           Summary of Editor Key Assignments
  1924.  
  1925.                Up-/Down-Arrow means change the value of the item on
  1926.                which the cursor is sitting.  We call this process
  1927.                scrolling the value.  We deliberately use the word
  1928.                "scroll" in the remainder of this document to mean
  1929.                these arrow keys.
  1930.  
  1931.                Right-/Left-Arrow means advance to the next item on a
  1932.                given editing level.  We deliberately use the word
  1933.                "advance" in the remainder of this document to mean
  1934.                these arrow keys.
  1935.  
  1936.                Page-Up/Page-Down means change to the next level of
  1937.                editing operations.  Hit Page-Up enough times and you
  1938.                find yourself back in the Presentation Environment.
  1939.  
  1940.  
  1941.  
  1942.                                                                          29
  1943.  
  1944.  
  1945.  
  1946.  
  1947.  
  1948.  
  1949.  
  1950.           The Story Editor                             Figment User's Guide
  1951.  
  1952.                ESC - Escape is a super-page-up key.  Probably
  1953.                preferred to Page-up since it cannot over-shoot the Top
  1954.                Level Editor.  It is a rapid exit from deep levels.
  1955.  
  1956.                F1 enters the Editor from the Presentation Environment. 
  1957.                It also is a rapid exit from any level in the editor to
  1958.                the story.  Repeated strikes on F1 toggles back and
  1959.                forth between the editor and the story.
  1960.  
  1961.                F2 reads the file whose name is given on the top line
  1962.                of the screen.  F2 only works in the Top Level Editor.
  1963.  
  1964.                F3 writes to the file whose name is given on the top
  1965.                line of the screen.  F3 only works in the Top Level
  1966.                Editor.
  1967.  
  1968.                Shift-F2 reads the saved data file, the ".sav" file. 
  1969.                Similar to "restore" in the Presentation Environment. 
  1970.                It works only in the Top Level Editor.
  1971.  
  1972.                Shift-F3 writes a save file, the ".sav" file.  Similar
  1973.                to "save" in the Presentation Environment, but there is
  1974.                an important difference - it sets the data to starting
  1975.                conditions so the ".sav" file can be renamed a ".sdf"
  1976.                file.  Top Level only.
  1977.  
  1978.                F4 generates a listing file of the currently displayed
  1979.                object type or rule base.  F4 is only enabled in the
  1980.                Top Level Editor.
  1981.  
  1982.                Shift-F4 generates a full listing file of all the
  1983.                objects or all the rule bases in the database.  Shift-
  1984.                F4 is enabled in the Top Level Editor.
  1985.  
  1986.                F5 alphabetizes the stuff or scene objects depending on
  1987.                which screen you are viewing.  Implemented at the
  1988.                object name level only (not the Top Level).
  1989.  
  1990.                F6 invokes the full-screen text editor.  ESC exits this
  1991.                editor and returns to the Story Editor.  Enabled
  1992.                whenever the cursor is positioned over a text item.
  1993.  
  1994.                F7 - Cuts a text string, rule or expression.
  1995.  
  1996.                Shift-F7 - Paste, the opposite of F7.  In a sequence,
  1997.                it pastes after the current item.
  1998.  
  1999.                Alt-F7 - Paste also.  In a sequence, pastes before the
  2000.                current item.
  2001.  
  2002.  
  2003.           30
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.           Figment User's Guide                             The Story Editor
  2012.  
  2013.                Insert - Inserts (opens) a gap in a list or sequence.
  2014.  
  2015.                F10 exits Figment temporarily to DOS. "Exit" returns
  2016.                you to Figment.  F10 only works in the Top Level
  2017.                Editor.
  2018.  
  2019.                "+" creates new things: objects, links, rules,
  2020.                expressions, etc.
  2021.  
  2022.                "Delete" deletes things created with "+".
  2023.  
  2024.                "Home" used mainly in expression editing to change data
  2025.                types for scrolling values.  Also negates conditional
  2026.                functions.
  2027.  
  2028.           If you attempt to think of these keys as cursor movement keys,
  2029.           you will have a very hard time in the editor.  The cursor has a
  2030.           mind of its own and moves where it must to point to your position
  2031.           in the editing hierarchy.  In short, if you're trying to follow
  2032.           the cursor, you're in trouble, because it's following you!
  2033.  
  2034.           In practice, we break this convention in only a few places: in
  2035.           the full-screen text editor, the keys are used as they are in
  2036.           most word-processors, for example Page-Up moves to the top of the
  2037.           page; in the object editors we move through a matrix of names up,
  2038.           down, left and right with the arrow keys since it seems more like
  2039.           a full-screen text editing operation; and in label editing, we
  2040.           allow the up/down arrow keys to move up and down a list of names
  2041.           since scrolling is not used there.
  2042.  
  2043.           Once you make this conceptual leap, you should find that a great
  2044.           many editing operations resolve to only three key-pairs.
  2045.  
  2046.           Play alters the data so you must write your editing changes to
  2047.           disk before starting play or they will be lost.  A rigorous
  2048.           editing procedure would dictate that you should enter the editor,
  2049.           examine data structures to identify a problem, retrieve the save
  2050.           file from disk, make the changes, put the data back on the disk,
  2051.           return to the Presentation Environment, and play through to see
  2052.           if the correction was valid.
  2053.  
  2054.  
  2055.           H.   Stuff Editor
  2056.  
  2057.           Objects come in two types: Scenes and Stuff.  "Stuff" are best
  2058.           defined as objects that are not scenes.  Stuff comes in three
  2059.           types: "Things", "Features" and "Characters".  Stuff and Scenes
  2060.           are identical data structures except that they are stored in
  2061.           different places.  If you learn how to edit Stuff, then you know
  2062.           how to edit Scenes.
  2063.  
  2064.                                                                          31
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.           The Story Editor                             Figment User's Guide
  2073.  
  2074.  
  2075.           Objects are large and only a portion of the data can be displayed
  2076.           at a time.  If you want to study all the object data, you can
  2077.           dump it to a listing file by hitting the F4 key when in the Top
  2078.           Level Editor.  This will dump all the stuff objects or scene
  2079.           objects depending on which type is displayed when you hit the
  2080.           key.  The data is written to a file with the same name as your
  2081.           story but with a ".lst" extension.  You can print this on your
  2082.           lineprinter with the DOS "print" command.  Use F10 to invoke a
  2083.           DOS shell so you can type or print this file.
  2084.  
  2085.           You enter the Stuff Editor from the Top Level Editor by
  2086.           displaying the screen labeled "Stuff" using the Up-Arrow key. 
  2087.           You move down one level from the Top Level Editor to the Stuff
  2088.           Editor using the Page-Down key.  You exit the Stuff Editor by
  2089.           moving up one level to the Top Level Editor with the Page-Up key.
  2090.  
  2091.  
  2092.           1.   Stuff Names
  2093.  
  2094.           When you enter the Stuff Editor, you see the names of all the
  2095.           stuff that have been defined for the story.  Your cursor lands on
  2096.           the first name which is lit in reverse-video.  The names are
  2097.           displayed in a row-column matrix.
  2098.  
  2099.           Hit the right-arrow key and hold it down.  The cursor and
  2100.           reverse-video box advances sequentially to each object name.  The
  2101.           matrix of names can be large, so we break convention and use the
  2102.           up-/down-arrow keys to move up and down rows within the matrix.
  2103.  
  2104.           You can change any object name by typing a new name in its place
  2105.           when the cursor sits on that object's name.  Names are text which
  2106.           means you can make them up to 2 KBytes long if you like.  We
  2107.           display only the first 15 characters.  When you hit return, the
  2108.           new name is entered in place of the old name.  It is bad practice
  2109.           to leave object names blank although it is harmless.  As with all
  2110.           text items, you can also hit F6 and use the Full Screen Text
  2111.           Editor, but names are short so typing is easier.
  2112.  
  2113.           Anytime you change an object name, that change is immediately
  2114.           reflected throughout the story.  You never have to go around the
  2115.           editor changing each occurrence of the name wherever it is used. 
  2116.  
  2117.           You can duplicate names, but it is bad practice.  Also names that
  2118.           only partially duplicate existing names can cause some confusion
  2119.           for inexperienced players.  If you have two objects, one named
  2120.           "Red Ball" and the other named "Blue Ball" and the player says
  2121.           "Take ball.", the system responds with the first ball found, red
  2122.           or blue.
  2123.  
  2124.  
  2125.           32
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.           Figment User's Guide                             The Story Editor
  2134.  
  2135.           Avoid punctuation in names.  Names  like "Mr. Johnson" should
  2136.           omit the period since that will be mistaken for a sentence
  2137.           terminator.  Upper/Lower-case does not matter; use what you like.
  2138.  
  2139.  
  2140.           2.   Creating and Deleting Objects
  2141.  
  2142.           If you want to create new objects, hit the "+" key any time your
  2143.           cursor is in the matrix of object names.  The new object is added
  2144.           to the end of the matrix and labeled "(Undefined)".  There is no
  2145.           special order required of objects.  They can be created at any
  2146.           time.  You just make them when you need them.  You can make
  2147.           several at one time and fill them in later.  Any object named
  2148.           "(Undefined)" will not be written to disk (See the discussion on
  2149.           File Management later in this document) so it will eventually
  2150.           disappear with any subsequent file write/read operation if you do
  2151.           not use it.  Thus new objects should be given at least a working
  2152.           title if you want to keep them around.
  2153.  
  2154.           When the object list exceeds the space available to display the
  2155.           names, the list can be scrolled.  Simply move the cursor down any
  2156.           column of names in the matrix of names.  When you reach the
  2157.           bottom row, the matrix begins scrolling row by row until you
  2158.           reach the end.
  2159.  
  2160.           If you create more objects than can be displayed, you may think
  2161.           that nothing is happening, but scroll the name matrix and you
  2162.           will find them at the end of the list.  When you can create no
  2163.           more objects, Figment beeps as you strike the "+" key.
  2164.  
  2165.           Deleting objects is slightly harder.  Advance the cursor until it
  2166.           is over the object you want to delete and hit the "Delete" key. 
  2167.           This is easy enough, but it has created some problems for you. 
  2168.           Objects are the fundamental building blocks for the stories. 
  2169.           Many story elements refer to them.  Now that you have deleted the
  2170.           object, these other elements have nothing to refer to.  Figment
  2171.           inserts a dummy reference temporarily until you can change the
  2172.           reference.  You will have to work through the editor and change
  2173.           or eliminate these references.  You will see them marked
  2174.           "(Deleted)" in object link lists, rule bases, and maps.
  2175.  
  2176.           A full discussion of deleting objects is deferred until after you
  2177.           have an understanding of the full editing process and the
  2178.           aforementioned object references.  For now, we recommend that you
  2179.           consider re-naming an object instead of deleting it.  All of the
  2180.           references in other story elements will then reflect the new
  2181.           name.
  2182.  
  2183.  
  2184.  
  2185.  
  2186.                                                                          33
  2187.  
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.           The Story Editor                             Figment User's Guide
  2195.  
  2196.  
  2197.           3.   Alphabetizing Objects
  2198.  
  2199.           It is convenient to arrange the names in alphabetic order.  You
  2200.           can do that simply by hitting the F5 key when the cursor is in
  2201.           the name matrix.  You can do this anytime you add a new object or
  2202.           change an object name.
  2203.  
  2204.           You have done all that you can do at this level.  You can move
  2205.           down a level and change the object's data with Page-Down or you
  2206.           can return to the Top Level Editor with Page-Up.  When you move
  2207.           down a level, the object's name remains lit in reverse-video to
  2208.           remind you which object you are editing.
  2209.  
  2210.  
  2211.           4.   Player Object
  2212.  
  2213.           The first object in the Stuff List is the Player Object.  You
  2214.           cannot delete this object.  The name of this object is changed to
  2215.           reflect the player's name given in the entry dialogue when
  2216.           Figment is started.  (See "Getting Started".)  You are free to
  2217.           edit this object, but its type remains "Player" and cannot be
  2218.           changed.  Neither can you alphabetize this object.  Regardless of
  2219.           the player's name, this object never moves from the first
  2220.           position.
  2221.  
  2222.  
  2223.           5.   Object Data Selection
  2224.  
  2225.           Page Down from the Name Level and you can choose the data you
  2226.           want to edit.  See the line labeled:
  2227.  
  2228.              "System Attributes   Text   User Attributes   Links"
  2229.  
  2230.           Your cursor lands on "System Attributes", and they are displayed. 
  2231.           As you move the cursor left or right, the various data types are
  2232.           displayed in turn.  If you Page-up from this level you return to
  2233.           the name level, and the data type you selected is displayed for
  2234.           each object as you cycle through the objects.
  2235.  
  2236.           Stop at the data type you want to edit and hit Page Down to enter
  2237.           that level.
  2238.  
  2239.  
  2240.           a.   System Attributes
  2241.  
  2242.           This presents the attributes and flags required for the built-in
  2243.           functions.  It also includes the user-defined object types.  Your
  2244.           cursor lands on the attributes.  Advance the cursor to the flags
  2245.  
  2246.  
  2247.           34
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253.  
  2254.  
  2255.           Figment User's Guide                             The Story Editor
  2256.  
  2257.           or the object types if you want to select them.  Hit page down to
  2258.           enter the level of your choice.
  2259.  
  2260.  
  2261.           (1)  Attribute Editing
  2262.  
  2263.           Each attribute is used by a particular built-in function so
  2264.           attributes control how objects are used.  Except for the Type
  2265.           attribute, you need not worry about any other attributes until
  2266.           you use functions in the story that need them.  You can also use
  2267.           the attributes in rules that you write:
  2268.  
  2269.                If {
  2270.                  Player  is linked to  Obj Sub-Typ  Money
  2271.                }...
  2272.  
  2273.           This would mean, "does the Player have anything valuable?"
  2274.  
  2275.           Changing the object's Type attribute from "Thing" to "Feature"
  2276.           means that people cannot pick it up and carry it to another
  2277.           scene, for example an object called "Weather" is a feature of a
  2278.           scene.  As mentioned earlier, the object type will not change on
  2279.           the Player Object.
  2280.  
  2281.           The sub-type is used mainly with objects of type "Thing". 
  2282.           Objects of sub-type Armor or Weapon are used in fighting. 
  2283.           Objects of sub-type container report their contents when they are
  2284.           open, meaning when their "Open" flag is set to read "OPEN". 
  2285.           "Food" means the object can be eaten.  "Strategic" means it is a
  2286.           weapon that functions at a distance; it can be shot.  Potions can
  2287.           be drunk.  Scrolls can be read.  "Goody" is a catch-all.  If you
  2288.           do not know what something is, call it a goody.  "Money" means
  2289.           the object has monetary value.  Leave the sub-type alone until
  2290.           some function requires you change it.  See Part III.
  2291.  
  2292.           Strength, health, magic, size, and weight are numeric values,
  2293.           scroll them up or down as desired.  They range from -127 to 0 to
  2294.           127.  Note that they can be set to negative values only for
  2295.           objects of type "Thing", but read the discussion on them in Part
  2296.           III before using negative attributes.  You will probably want to
  2297.           specify a health value for any character you create since this is
  2298.           important for conflicts.
  2299.  
  2300.           Note as well the way that numeric values change when they reach
  2301.           very high or very negative quantities.  By the nature of binary
  2302.           math, a signed 8 bit integer becomes -128 when you increment past
  2303.           +127.
  2304.  
  2305.           The limit attribute specifies the maximum number of links you can
  2306.           make to other objects.  It is used, for example, to tell when the
  2307.  
  2308.                                                                          35
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.           The Story Editor                             Figment User's Guide
  2317.  
  2318.           player cannot take any more things or when you cannot put any
  2319.           more things in containers.  This numeric quantity varies from 0
  2320.           to 32, the maximum links allowed.  It is probably best to leave
  2321.           it at 16 until you know you want more or less.  The editor will
  2322.           not let you set this value lower than the existing number of
  2323.           links for the object.
  2324.  
  2325.           Some objects would never have objects linked to them, for example
  2326.           objects of sub-type food.  This means the limit attribute can be
  2327.           used to mean something else.  In the case of food, the limit
  2328.           attribute means the food value.  See the discussion on food in
  2329.           Part III of this document.  Similarly, the limit means the number
  2330.           of shots available for strategic weapons.  Again, you are
  2331.           referred to Part III for more detail.
  2332.  
  2333.           To edit attribute data, advance through the attributes until you
  2334.           arrive at the one you want to change.  Hold the Up- or Down-
  2335.           Arrow key down and the values will scroll.  Release the key when
  2336.           you reach the value you want.  Exit this level with Page-Up
  2337.           regardless of your cursor position.
  2338.  
  2339.  
  2340.           (2)  Flag Editing
  2341.  
  2342.           Flags are special (one-bit) attributes used to indicate the state
  2343.           of the object or permission to modify that state.  The flags are
  2344.           changed both by functions in the rule bases and by the player's
  2345.           commands during play.
  2346.  
  2347.           The flags are edited in the same manner as the attributes so we
  2348.           need not repeat those instructions.  A flag only has two states
  2349.           that depend on the type of the flag: ON or OFF, TRUE or FALSE,
  2350.           YES or NO, etc.  You see these displayed on the Flags line.
  2351.  
  2352.           Flags are grouped in pairs.  The first flag in the pair is the
  2353.           permission flag for the pair.  It indicates whether or not the
  2354.           player should be allowed to modify the second flag in the pair. 
  2355.           Permission flags are set to read "YES", meaning permission
  2356.           granted (the player is allowed to modify), or "NO" meaning
  2357.           permission denied.  Whenever permission is denied and the player
  2358.           attempts to modify a flag during play, the message "You are not
  2359.           allowed." is returned.
  2360.  
  2361.           The Lock-permission flag disables the story commands "lock" and
  2362.           "unlock".  You typically want to leave them disabled except for
  2363.           specific objects you want players to unlock.
  2364.  
  2365.           The Lock flag controls the story commands "open" and "close". 
  2366.           Objects can be locked open or locked closed.  Locked objects
  2367.  
  2368.  
  2369.           36
  2370.  
  2371.  
  2372.  
  2373.  
  2374.  
  2375.  
  2376.  
  2377.           Figment User's Guide                             The Story Editor
  2378.  
  2379.           return the message, "You can't.  It's locked." if you attempt to
  2380.           open or close them during play.
  2381.  
  2382.           The Open-permission flag also controls the open and close
  2383.           functions during play.  Typically it is used so the Designer can
  2384.           control the Open flag via rules.
  2385.  
  2386.           In addition to reserving the flags for exclusive use, the
  2387.           permission flags prevent the player from making silly
  2388.           constructions such as opening a character.
  2389.  
  2390.           The Put-permission flag is used to indicate if the player can put
  2391.           an object ON this object.  The Put function also has a form, Put-
  2392.           in, that is used with containers.  That form also checks the
  2393.           permission flag.
  2394.  
  2395.           The Put flag itself is used to indicate if there is an object on
  2396.           this object.  Some objects are ambiguous and can take objects
  2397.           placed in them or on them, e.g. a chest of drawers.  This flag
  2398.           resolves the ambiguity later when you attempt to describe the
  2399.           object.
  2400.  
  2401.           Further discussion of flags is deferred to Part III.
  2402.  
  2403.  
  2404.           (3)  User-Defined Object Types
  2405.  
  2406.           The System Type attribute tells you an object is a "Thing", but
  2407.           is it an automobile or an airplane?  A Louis XIV table?  User-
  2408.           defined Object Types let you add more descriptive labels to
  2409.           objects.  They are a more advanced topic, however, and beginners
  2410.           need not be concerned about them.
  2411.  
  2412.           User types are labels that you create separately.  They have
  2413.           their own editor to define the labels as part of the Parameter
  2414.           Editing Screen (see Parameter Editing).  All you do here is
  2415.           scroll through the list of labels that you defined on the
  2416.           Parameter Editing Screen.
  2417.  
  2418.           You might for example set the object type to character, the sub-
  2419.           type to container (so the system will report the object's
  2420.           possessions) and add the user type label "Waiter".  Then you
  2421.           could tell if there is a waiter in the room with a menu or
  2422.           perhaps your dinner.
  2423.  
  2424.           Editing the object's type labels is easy.  From the System
  2425.           Attribute level, advance the cursor to the title "User Types". 
  2426.           Hit Page Down.  Hit the "+" key to add new type labels.  Scroll
  2427.           up or down to change the label.  Hit "Delete" to remove an
  2428.  
  2429.  
  2430.                                                                          37
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.           The Story Editor                             Figment User's Guide
  2439.  
  2440.           unwanted label.  Advance through the labels with the Left- and
  2441.           Right-Arrows.  "Escape" or Page-Up exits this level.
  2442.  
  2443.           The order of the labels is not important.  An object either has a
  2444.           label or not.  The various functions merely test for the label. 
  2445.           You will notice that the system will not let you duplicate
  2446.           labels.
  2447.  
  2448.           You have conditional and executional functions to test and modify
  2449.           the user type attribute in your rules.
  2450.  
  2451.           (4)  User-Defined Flags with Probabilities
  2452.  
  2453.           User-defined Flags are 1-bit attributes you can use to signify
  2454.           something has happened or should happen.  Flags have only two
  2455.           states: TRUE and FALSE.  The flags are intended for use in your
  2456.           story logic.  Rules can test and change these flags to signal
  2457.           changing events.  This is an advanced topic so we will discuss it
  2458.           later.
  2459.  
  2460.           b.   Text
  2461.  
  2462.           Figment pulls the text from the object and uses it to build scene
  2463.           descriptions or examination reports.  The text that you write
  2464.           here merely represents the initial conditions for the objects. 
  2465.           The rules that you write can replace these descriptions with
  2466.           different ones.  That is how the story changes with the Player's
  2467.           actions.
  2468.  
  2469.           Descriptions come in two forms: Long and Short.  This is just for
  2470.           variety, and it can be a handicap during development trying to
  2471.           maintain both descriptions so you might want to focus on one and
  2472.           ignore the other.  Usually this means you ignore the brief
  2473.           description since the long description is the default mode.  A
  2474.           switch is provided in the Parameter editing screen to switch off
  2475.           brief mode processing.  Normally, this switch is OFF until you
  2476.           want to add brief mode text to your story.
  2477.  
  2478.           If you do not write a description of the object, it will be
  2479.           invisible during play.  This is legitimate, and often, too many
  2480.           object descriptions make the resulting composite scene
  2481.           description too clumsy so you blank some out.  When making a new
  2482.           object, you usually write something trivial like, "Here is the
  2483.           x...", so you can see that you successfully linked the object
  2484.           into the story.  Later, you change the text to say something more
  2485.           appropriate to the story.
  2486.  
  2487.           The examination message is reported to the command window during
  2488.           playback whenever the player examines an object.  It is optional
  2489.           so you can ignore it until you need it.
  2490.  
  2491.           38
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.           Figment User's Guide                             The Story Editor
  2500.  
  2501.  
  2502.           We described how to edit text earlier, but remember that they
  2503.           cannot exceed 2048 characters in length, and they can be edited
  2504.           by typing over them and/or by hitting F6 to invoke the full
  2505.           screen text editor.
  2506.  
  2507.           You have by now perhaps noticed that long text is displayed as a
  2508.           single line followed by "(...More)" implying that there is a
  2509.           longer text string than is actually displayed.  If you want to
  2510.           view the full string, hit F6.  This puts you in the Full Screen
  2511.           Editor.  It is assumed that you want to be here anyway if the
  2512.           text is longer than a single line.  Hit "ESC" to exit the editor.
  2513.  
  2514.           Figment is unique because it can change the story depending on
  2515.           who is speaking.  The Player can see another character in the
  2516.           scene and change to that character and see the story through that
  2517.           character's eyes.  We call that process "Changing the Actor". 
  2518.           Figment does that with Viewpoints.
  2519.  
  2520.  
  2521.           (1)  Viewpoints
  2522.  
  2523.           A viewpoint is a set of description and examination messages
  2524.           written from the perspective of a character in the scene.  We
  2525.           will call them simply views for short.  If you purchase the
  2526.           optional graphics and music packages, you can assign images and
  2527.           music to the viewpoints as well.
  2528.  
  2529.           Any object can have up to four views, but it always has at least
  2530.           one, the default view a.k.a. the "Player's Viewpoint".  As
  2531.           Figment builds the Scene Description during playback, it searches
  2532.           the scene and each object in the scene for views that match the
  2533.           current Actor.  If no view for the Actor is found for the object,
  2534.           it uses the text in the Player view for that object.
  2535.  
  2536.           You label each view for an object (Except the first, it's fixed
  2537.           to "Player".) as being the viewpoint of some character.  Of
  2538.           course if you do not have three characters defined (beyond the
  2539.           Player), you cannot have the four total views.
  2540.  
  2541.           Figment will not let you duplicate viewpoints.  When you add a
  2542.           new view, Figment chooses the next character from your list of
  2543.           objects that does not duplicate an existing view for this object. 
  2544.           You can then scroll the character names to find other legal
  2545.           candidates if you like.
  2546.  
  2547.           The character viewpoints for your objects need not be the same
  2548.           viewpoints for all objects unless you want them to be.  Also,
  2549.           many objects appear the same to everyone so other viewpoints are
  2550.  
  2551.  
  2552.                                                                          39
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.           The Story Editor                             Figment User's Guide
  2561.  
  2562.           not required; don't feel you have to define viewpoints if you do
  2563.           not want to.
  2564.  
  2565.           The actor currently defined in the story is shown at this level. 
  2566.           If you have changed the Actor in the story, you see that name
  2567.           here.  Otherwise, it reads "Player".  The system automatically
  2568.           displays the "Actor view" when you enter the text level editor. 
  2569.           Most of the time, this will be the Player View.
  2570.  
  2571.           Editing the viewpoints is simple.  From the word "Text", hit
  2572.           Page-Down.  Your cursor lands on the view number.  If there are
  2573.           more than one view, you can cycle through the views by scrolling
  2574.           up or down.  Add a new view by hitting the "+" key.  
  2575.  
  2576.           You can delete a viewpoint by hitting the "Delete" key when the
  2577.           cursor is positioned over the number of the viewpoint you want to
  2578.           delete.  Rules can refer to viewpoints in the "Copy msg"
  2579.           function.  When you delete a viewpoint, no effort is made to
  2580.           change such a reference to the deleted viewpoint.  They simply
  2581.           become ineffective since there will be no destination for the
  2582.           copying.
  2583.  
  2584.           Advance the cursor to label the view by scrolling the character
  2585.           names until you see the one you want.  Advance onward and edit
  2586.           the text in the usual manner.
  2587.  
  2588.           You can change the Actor here if you like, but remember it
  2589.           changes the actor for the story so be sure to put it back when
  2590.           you are through.  Advance the cursor to the Actor name and scroll
  2591.           the character names.  When a character name for the Actor matches
  2592.           a name for a view, the text on the screen will change to that
  2593.           view.  You can Page-Up to the object name level and display this
  2594.           Actor's view of each object as you advance through the object
  2595.           names.
  2596.  
  2597.  
  2598.           c.   User-Definable Attributes
  2599.  
  2600.           Put the cursor over the word "User Attributes".  The attributes
  2601.           for this object are displayed.
  2602.  
  2603.           The original premise for user-defined attributes applies to
  2604.           characters, but that does not limit them only to the characters
  2605.           or to human attributes.  We will begin by discussing characters
  2606.           and expand the philosophy later to include other needs.
  2607.  
  2608.           Writers are taught to develop characters along three lines:
  2609.           physical, psychological, and spiritual.  Figment groups user-
  2610.           definable attributes in three categories called simply Types 1,
  2611.           2, and 3.  You can establish the convention within your work that
  2612.  
  2613.           40
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.           Figment User's Guide                             The Story Editor
  2622.  
  2623.           Type 1 attributes are the physical attributes and Type 2
  2624.           attributes are the psychological ones etc.  Attributes for a
  2625.           hypothetical character might be:
  2626.  
  2627.                Type 1                   Type 2              Type 3   
  2628.           Strength       50   Courage        10   Devotion         10
  2629.           Beauty         20   Bravery         2   Purity          -40
  2630.           Warts          10   Paranoia       33   Je ne sais quoi 100
  2631.           Bad Smell      15   DrinksLikeFish 99   Chemistry        12
  2632.           Dresses Funny  10   Morals          0   Kind to Animals  23
  2633.                               Intellect     -10
  2634.  
  2635.  
  2636.           User-definable attributes are merely text labels that you add to
  2637.           the system on a separate editing screen (See Links and Attributes
  2638.           later in this document).  As you can see from the example above,
  2639.           the labels can be anything you can think of.  Once you have
  2640.           defined them for the system, you can add them to your objects
  2641.           here by scrolling those previously defined labels and setting
  2642.           their value.  The value can range from +127 to -128.  
  2643.  
  2644.           You need not specify a value if you do not want to.  It might be
  2645.           best to wait and see what values are required as you test your
  2646.           story.
  2647.  
  2648.           User Attributes are used in character profiles (See Profiles
  2649.           below).  These allow you to specify a decision matrix for special
  2650.           situations or character types.  You also have conditional and
  2651.           executional functions to test and modify the attributes in your
  2652.           rules.
  2653.  
  2654.           We said that user attributes can be used for inanimate objects
  2655.           too.  Consider attributes for an object like an airplane:
  2656.  
  2657.                    Type 1                Type 2             Type 3   
  2658.           Engine         50   Turbulence     -10  Airframe       -32
  2659.           Fuel           10   Attitude        20   
  2660.                               Icing           10
  2661.  
  2662.           From this you might surmise the engines are running fine, the
  2663.           fuel's getting low, the turbulence is getting bad, and that crack
  2664.           in the wing has you worried.  Hope the de-icers hold out.
  2665.  
  2666.           Notice that the concept of Physical, Psychological and Spiritual
  2667.           attribute types does not apply when you are not speaking of
  2668.           characters.  Hence we call them simply Types 1, 2, and 3.
  2669.  
  2670.           The purpose of the three categories is so that future functions
  2671.           can operate on the groups if desired.  For example, if you defeat
  2672.           an opponent in battle, you might win or acquire their physical
  2673.  
  2674.                                                                          41
  2675.  
  2676.  
  2677.  
  2678.  
  2679.  
  2680.  
  2681.  
  2682.           The Story Editor                             Figment User's Guide
  2683.  
  2684.           (Type 1) attributes, but if you fall in love you might share
  2685.           (average) the spiritual (Type 3) attributes.  Currently the major
  2686.           activity for user attributes is in Character Profiles (See
  2687.           Profiles below), which allow weight factors to be applied to
  2688.           groups of attributes based on their type.
  2689.  
  2690.           Editing user attributes is easy.  Page Down to the attribute line
  2691.           you want to change.  Move the cursor left or right to the
  2692.           attribute or value you want to change.  Scroll as required.  If
  2693.           you do not see an attribute you want when scrolling, go to the
  2694.           editing screen for Links and Attributes and define one.
  2695.  
  2696.           Page Down will move the cursor down and add more attributes when
  2697.           you hit the end of the list.  The delete key will delete the
  2698.           attribute the cursor is pointing to.  The "+" key adds attributes
  2699.           without moving the cursor.  Page-Up moves the cursor up and
  2700.           eventually exits this level.  "Esc" immediately exits this level.
  2701.  
  2702.  
  2703.           d.   Link Editing
  2704.  
  2705.           Links are associations between objects.  There are many ways that
  2706.           objects might be associated.  Figment lets you label the links to
  2707.           represent these different associations.  For example, consider
  2708.           the many ways that John and Mary might be related:
  2709.  
  2710.                Lovers
  2711.                Family - spouse, sibling, children, parents, cousins
  2712.                Classmates
  2713.                Work-related
  2714.                Church Group
  2715.                Tennis Match
  2716.                     .
  2717.                     .
  2718.                     .
  2719.  
  2720.           Knowing the type of relationship tells you more information which
  2721.           means you can write more complex rules with link types, but you
  2722.           are not required to specify the type of link if you do not want
  2723.           to.  It is just an option to enrich the story.  The default link
  2724.           type is "Generic", meaning "no implied type", and you may use it
  2725.           for all your links if you like.
  2726.  
  2727.           Even if you know the relationship, you do not know the strength
  2728.           of the relationship.  Figment lets you model the strength of
  2729.           relationships by including an optional value.  You can test or
  2730.           change this value from the story logic.
  2731.  
  2732.  
  2733.  
  2734.  
  2735.           42
  2736.  
  2737.  
  2738.  
  2739.  
  2740.  
  2741.  
  2742.  
  2743.           Figment User's Guide                             The Story Editor
  2744.  
  2745.                If {
  2746.                  John  is linked to  Mary  by  Romance > 20
  2747.                }...
  2748.  
  2749.           The size of the number implies the strength of the relationship. 
  2750.           Negative values are allowed.  Again, do not be concerned with
  2751.           values for the links in the early going.  They are another
  2752.           refinement for advanced users.
  2753.  
  2754.           Link types are defined on their own editing screen (See Links and
  2755.           Attributes, below).  Here, you merely scroll those types you have
  2756.           defined previously.
  2757.  
  2758.           The most common use for links is associating objects with scenes. 
  2759.           When the Player says "take the ball", Figment breaks the link
  2760.           from the scene to the ball and makes a link from the Player to
  2761.           the ball.  The story's Scene Description no longer mentions the
  2762.           ball, because that link is gone, and the Inventory reports the
  2763.           ball in the Player's possession.  In truth, nothing really
  2764.           happens to the ball at all!  The system is wide open.  You could
  2765.           link everybody to the ball, and it would appear as though
  2766.           everyone had the ball.
  2767.  
  2768.           The method for editing links is similar to that for user
  2769.           attributes.
  2770.  
  2771.           The limit attribute for the object specifies the maximum number
  2772.           of links you can make up to a final limit of 32.  (See the
  2773.           discussion on links in Part III.)
  2774.  
  2775.           The system lets you make duplicate links, but duplicate links can
  2776.           confuse your logic.  Check your design and correct it if
  2777.           necessary.
  2778.  
  2779.  
  2780.           I.   Scene Editor
  2781.  
  2782.           Once you know how to edit Stuff, you know how to edit Scenes
  2783.           since they are the same data structure and the same editing
  2784.           style.
  2785.  
  2786.           Most attributes are ignored for scenes.  They are there only for
  2787.           the purposes of standardization with stuff.  You may want to use
  2788.           the lock and open flags when you get to writing rules.  They can
  2789.           be used safely.  Also, the limit attribute affects the link count
  2790.           as with the Stuff objects.
  2791.  
  2792.           Links are important to scenes.  Scenes are not much to look at by
  2793.           themselves.  They get their richness by virtue of the stuff that
  2794.           you link to them.  The order in which you create links can be
  2795.  
  2796.                                                                          43
  2797.  
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.           The Story Editor                             Figment User's Guide
  2805.  
  2806.           important too since they affect the description paragraph for the
  2807.           Scene Description during play.
  2808.  
  2809.           When Figment composes the Scene Description in the Presentation
  2810.           Environment, it looks at the link list for the scene to see what
  2811.           descriptions to use.  The first line of text comes from the scene
  2812.           object itself, its description line(s) are from the scene
  2813.           description that you see when you display the scene in the
  2814.           editor.  Then it gets any feature description text from any
  2815.           feature stuff that are linked to the scene, then the character
  2816.           descriptions, and finally, any thing descriptions.  Thus the
  2817.           story's Scene Description flows from what the scene is like, to
  2818.           who is in it, and finally to what you can take from it.  As
  2819.           events occur, either by your action or the story's, they may
  2820.           alter the scene so the description is re-composed and re-
  2821.           displayed.  If no changes occur, then nothing happens.
  2822.  
  2823.           You are not required to link the Player Object into the scene,
  2824.           but when you do, the player's description is added to the scene
  2825.           description just after the scene object's description.
  2826.  
  2827.           Since features automatically come before any characters anyway,
  2828.           you need not worry about placing them in front of characters in
  2829.           the scene's link list.  You need only get the features in the
  2830.           order in which you want them to appear relative to each other
  2831.           feature.  The first feature description you want to appear must
  2832.           have its object name appear ahead of any other feature on the
  2833.           scene's link list.  The same applies for the characters and the
  2834.           things.  
  2835.  
  2836.           All this points to the importance of setting an object's type
  2837.           attribute when you create new stuff as we discussed earlier.
  2838.  
  2839.           That is all there is to editing scenes.  We will use the scenes
  2840.           to construct the Story Map.
  2841.  
  2842.  
  2843.           J.   Story Maps
  2844.  
  2845.           Earlier, we recommended a methodology wherein we said you should
  2846.           make objects, make scenes, link the scenes to their objects, and
  2847.           build the Story Map so we will discuss maps next.  Figment
  2848.           supports two kinds of maps: the Story Map and the Player Map. 
  2849.           The Player Map is a luxury we can ignore for now.
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.           44
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864.  
  2865.           Figment User's Guide                             The Story Editor
  2866.  
  2867.           1.   About Maps
  2868.  
  2869.           The map ties the scenes together.  In it, you specify each
  2870.           scene's neighbors and what direction to go to reach them.  Maps
  2871.           usually are only edited when you add new scenes to the story,
  2872.           delete old ones or when you want to change the exit directions. 
  2873.           You do not edit the map just because you modified the scene or
  2874.           its name.  If you change a scene's name, you immediately see the
  2875.           new name when you switch the screen to view the map.
  2876.  
  2877.           You are not obliged to use all the scenes you have defined.  In
  2878.           fact, scenes are not really in the story until you put them in
  2879.           the map.  Scene-change operations will not work in the story
  2880.           until you make a map entry for your scene.
  2881.  
  2882.           Story logic is very intimately related to the Story Map.  Figment
  2883.           sub-divides its rule base into local rule bases for every scene
  2884.           in the story (technically map block in the story).  It makes a
  2885.           new local rule base every time you create a map block.  (Careful
  2886.           - It also deletes it when you delete the map block.)
  2887.  
  2888.           Figment has one very special feature to its Story Map: you can
  2889.           re-visit old scenes and encounter new logic.  You are not
  2890.           required to make your story do this, but you can do it.  It is
  2891.           all in how you make your map.  For purposes of this discussion,
  2892.           we will refer to any map that does not make new rule bases for
  2893.           old scenes as a simple map, and we will call a map that does make
  2894.           a new rule base for an old scene a complex map.
  2895.  
  2896.  
  2897.           2.   Editing Simple Maps
  2898.  
  2899.           To access the Story Map, move to the Top Level Editor and change
  2900.           the screen with the Up-Arrow key.  The screen displays a matrix
  2901.           of scene blocks.  Each block is numbered and titled with the name
  2902.           of a scene we want to use.  Note that if none of the scene names
  2903.           repeat in the block titles, then it is a simple map.  Under each
  2904.           block title name are the names of the titled scene's neighbors
  2905.           listed by the compass directions you would use to access the
  2906.           neighboring scene.  
  2907.  
  2908.           We display the symbol "-*-" to mean that there is no neighboring
  2909.           scene in that direction.  The player gets the message, "You can't
  2910.           go that way." when attempting to leave the scene in that
  2911.           direction.
  2912.  
  2913.           Note that you are not required to return by the same path that
  2914.           you arrived.  In the real world, if Scene A is west of Scene B,
  2915.           then logically B is east of A.  This law does not hold true for a
  2916.           fictional world; you can return to A from B by any direction you
  2917.  
  2918.                                                                          45
  2919.  
  2920.  
  2921.  
  2922.  
  2923.  
  2924.  
  2925.  
  2926.           The Story Editor                             Figment User's Guide
  2927.  
  2928.           like.  If B does not refer to A, then it is a one-way street from
  2929.           A to B with no return to A.
  2930.  
  2931.           Story maps are easy to edit once you recognize that all you are
  2932.           doing is specifying the exits from a scene.  The mechanics of
  2933.           editing are simple (since by now you are an experienced story
  2934.           editor):  Page-Down from the Top-Level, Right-Arrow to the block
  2935.           you want to change, Page-Down to the direction you want to
  2936.           change, scroll the scene names then Right-Arrow to another scene
  2937.           or Page-Up until you are back to the Top-Level.  
  2938.  
  2939.           You can add or delete map blocks with the "+" and "Delete" keys. 
  2940.           The new block is titled "Not Defined".  When you create more map
  2941.           blocks than will fit on a screen, you see nothing happening, but
  2942.           if you advance the cursor to the last block on the screen,
  2943.           Figment will begin scrolling blocks.  Continue advancing until
  2944.           see your added blocks at the end of the list.
  2945.  
  2946.           The first block in the map is the entry scene for the story. 
  2947.           Thereafter, there is no mandatory order.  The first scene points
  2948.           to its neighbors who in turn point to their neighbors, etc.  Thus
  2949.           the second block on the screen is not necessarily the second
  2950.           scene the player will see when playing the story.
  2951.  
  2952.           As you plan your map, remember that if during play you return to
  2953.           a scene you were in before, it will be in whatever condition you
  2954.           left it and its rule bases will also be in whatever state they
  2955.           were when you left (rules that switched off do not switch on
  2956.           again).
  2957.  
  2958.  
  2959.           3.   Complex Map Editing
  2960.  
  2961.           Complex maps are, naturally, harder.  Remember we mentioned that
  2962.           the scenes are numbered in the map block titles?  This is crucial
  2963.           to an understanding of complex maps.  An example helps here. 
  2964.           Retrieve our demo and bring the map up on the screen in the
  2965.           editor.  We attempt to reproduce this here in our book, but it is
  2966.           better to see it in action.  Using the first three blocks from
  2967.           that demo map as an example:
  2968.  
  2969.                    0 Mountains     1 Foggy Hollow 2 At the Beach
  2970.                N   1 Foggy Hollow  3 Dark Forest      -*-        N
  2971.                E    -*-              -*-              -*-        E
  2972.                W   4 Spooky Cave     -*-              -*-        W
  2973.                S    -*-            0 Mountains    1 Foggy Hollow S
  2974.                U    -*-              -*-              -*-        U
  2975.                D   2 At the Beach    -*-              -*-        D
  2976.                                                     
  2977.  
  2978.  
  2979.           46
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.           Figment User's Guide                             The Story Editor
  2988.  
  2989.           This seems straightforward.  If we leave scene zero, the Mountain
  2990.           scene, going north we arrive at scene 1, the Hollow.  Continuing
  2991.           northward from there, we end up at scene 3, the Dark Forest.
  2992.  
  2993.           What happens if we change the title of block 3 from Dark Forest
  2994.           to Mountains?  Do this now by scrolling the name using your
  2995.           cursor control keys.  Now in block 1, the record has changed to
  2996.           indicate the mountain scene is simultaneously to the north and
  2997.           the south of the Hollow.  But note that the numbers are
  2998.           different.
  2999.  
  3000.           Now imagine that we travel this new path we have just made.  If
  3001.           we go south from the Hollow, we return to block zero, the
  3002.           Mountain scene as we left it and with the rule bases as we left
  3003.           them.  If we go north from the Hollow, we enter the same Mountain
  3004.           scene (object) but a different set of local rules.
  3005.  
  3006.           Now assume you edit the block titled Hollow.  Position your
  3007.           cursor to the North direction record.  You find as you scroll the
  3008.           scene names that you get two references to the scene named
  3009.           "Mountains".  You get "0 Mountains" and "3 Mountains".  Which one
  3010.           do you want?  Your choice would be based on which rule base you
  3011.           want.
  3012.  
  3013.           Thus it is important to note the numbers next to the scene names
  3014.           and make sure as you design your map that you are pointing to the
  3015.           scene the way that you want to.  By now you recognize that you
  3016.           are not specifying scene names in map blocks, you are specifying
  3017.           other map blocks which happened to be titled with the scene
  3018.           names.  Map blocks do not really have names, just numbers.
  3019.  
  3020.  
  3021.  
  3022.  
  3023.  
  3024.  
  3025.  
  3026.  
  3027.  
  3028.  
  3029.  
  3030.  
  3031.  
  3032.  
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.                                                                          47
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.           The Story Editor                             Figment User's Guide
  3049.  
  3050.           K.   Story Rules (Logic Programming)
  3051.  
  3052.           Rules form the logic that drives your story, and they are
  3053.           undoubtedly the hardest part of Figment for new users.  Figment
  3054.           can function with absolutely no rules - but it is very dull.  The
  3055.           more rules you can add, the more interesting your story will be. 
  3056.           In other words, you have to achieve critical mass.  A couple
  3057.           hundred rules with maybe 600 rule-expressions makes a nice story.
  3058.  
  3059.           It is very easy to get in over your head with rule bases. 
  3060.           Initial efforts seem to go well enough, but you soon reach a
  3061.           point where doubling the size of the rule base more than
  3062.           quadruples the complexity.  Do not try to fight this phenomenon;
  3063.           it is one of those immutable facts of life.  Our advice, when
  3064.           that happens, is to split the scene into two, smaller, simpler
  3065.           scenes.
  3066.  
  3067.           Assume one case where you put thirty rules into one scene and
  3068.           another case where you put three rules into ten scenes.  In terms
  3069.           of story development, your story has grown by the same quantity
  3070.           in both cases, but the work will be much easier in the second
  3071.           case.  We say this because beginners tend to overwork the first
  3072.           scene and become disillusioned when they "hit the wall".  You
  3073.           have to work up to it gradually if you want to scale the wall. 
  3074.           This is partly why we tell you to make several scenes and a map
  3075.           before you write rules.
  3076.  
  3077.  
  3078.           1.   Theory of Operation
  3079.  
  3080.           A rule specifies actions to take in the event of certain
  3081.           conditions.  In many cases, the action is simply to print a
  3082.           message in response to the operator's command creating the
  3083.           illusion of a dialogue.  The "conditions" might be a certain
  3084.           player action or the state of the many object attributes and
  3085.           associations.  If the conditions hold true, the rule is said to
  3086.           "fire", meaning its specified actions are performed.  The
  3087.           collection of all rules is called the Story Logic.
  3088.  
  3089.           Figment divides the logic four ways into global and local logic
  3090.           and pre-command and post-command logic.  Pre-command logic is
  3091.           concerned with a specific action.  Post-command logic is
  3092.           concerned with the effects of any action.  This allows you to
  3093.           make a "logic sandwich" that surrounds any action:
  3094.  
  3095.                >Take the Booby Trap
  3096.                     [test for "take" and locked Booby Trap]
  3097.                It doesn't look safe to me, but ok if you say so.
  3098.                     [command proceeds]
  3099.                You take the Booby Trap.
  3100.  
  3101.           48
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.           Figment User's Guide                             The Story Editor
  3110.  
  3111.                     [test for possession of locked Booby Trap
  3112.                     then kill player and print message]
  3113.                Some people go out with a bang.  Others go out with a
  3114.                wimper.  Lucky you.  You get to do both!
  3115.  
  3116.           Global logic applies to all scenes.  Local logic applies only to
  3117.           the scene for which it was written.  
  3118.  
  3119.           Global and local logic are identical in nature, but global logic
  3120.           is stored separately and used repeatedly in every scene.  Usually
  3121.           you write all logic for the local scene.  When you find you want
  3122.           to use the same rule in a different scene, you move it to the
  3123.           global storage area with cut and paste operations.  Rules
  3124.           governing the behavior of objects of type "Thing" are good
  3125.           candidates for global rules because the player can carry them
  3126.           from scene to scene.
  3127.  
  3128.           The logic is organized into sequences of rules called rule bases. 
  3129.           There are four rule bases that apply when processing any comand: 
  3130.  
  3131.                Global Pre-Command  Rule Base
  3132.                Local  Pre-Command  Rule Base
  3133.                Global Post-Command Rule Base
  3134.                Local  Post-Command Rule Base
  3135.  
  3136.           The primary reason for the organization is to improve the
  3137.           performance, but it has the added effect of cataloging the rules
  3138.           so you can find them easier, which is always good to do.
  3139.  
  3140.           We will ignore global logic now since the important distinction
  3141.           is between the pre- and post-command rules.  You can develop
  3142.           rules local to a scene.  When you see you need them in other
  3143.           scenes, you can move (cut/paste) them to the global rule base.
  3144.  
  3145.           When a command is given during play, Figment will process the
  3146.           command sufficiently to ensure the arguments are legal and that
  3147.           the command syntax is correct.  Any mistake here will stop the
  3148.           processing and yield some generic error message.  This means that
  3149.           none of your logic will be triggered by ordinary operator errors. 
  3150.           This error-check ensures that the command will complete
  3151.           successfully unless you have written some intervening logic. 
  3152.           Some common operator errors:
  3153.  
  3154.                >take the book
  3155.                You already have it.
  3156.                >take the ball
  3157.                There is no ball here.
  3158.                >drop the rock
  3159.                You don't have a rock.
  3160.  
  3161.  
  3162.                                                                          49
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.           The Story Editor                             Figment User's Guide
  3171.  
  3172.           Once a command is determined to be legal, Figment interrupts
  3173.           command processing and checks every rule in the Global and Local
  3174.           Pre-Command Rule Bases to see if there is a rule for this command
  3175.           action.  There may be several such rules or there may be none. 
  3176.           Any rules for this command are evaluated to see if their
  3177.           conditions hold true.  If they hold true, the rule fires and its
  3178.           Command Flag is returned which enables or disables continued
  3179.           command processing.  Rule processing continues until all rules
  3180.           that apply have been processed.
  3181.  
  3182.           Figment returns from rule processing to complete the command
  3183.           execution.  It is at this point that the normal command action
  3184.           takes place if the command has not been disabled by a rule. 
  3185.  
  3186.           Summarizing:
  3187.  
  3188.                All Global and Local Pre-Command Rules are checked on
  3189.                every command to find applicable rules.
  3190.  
  3191.                All applicable rules for the action are evaluated.  (We
  3192.                do not quit early if a rule inhibits the command.)
  3193.  
  3194.                Rules that fire return a flag to indicate whether
  3195.                command processing should continue.  A single negative
  3196.                flag will stop the command processing.
  3197.  
  3198.           We know the command will complete, because it was pre-checked so
  3199.           Figment only needs permission from your rules to proceed.  After
  3200.           all this, the Post-Command rules seem anti-climatic.  They just
  3201.           test for changes in state meaning links or attributes which
  3202.           changed since the last command completed.
  3203.  
  3204.           From all of the above, you should recognize that all Global Pre-
  3205.           Command Rules are processed on each and every command regardless
  3206.           of the scene making it the most-used rule base while the Local
  3207.           Post Command Rules are processed only on a successful command in
  3208.           the current scene making them the least-used rule bases. 
  3209.           Minimizing global pre-command rules and maximizing local post-
  3210.           command rules improves performance and makes debugging your story
  3211.           easier - if Figment ignores a rule base so can you.  Figment will
  3212.           ignore the post-command rule bases entirely until a command
  3213.           completes successfully.
  3214.  
  3215.           Most beginners over-use the pre-command rule bases.  This is bad
  3216.           for several reasons: performance suffers, capacity in rule bases
  3217.           is finite, and the rules are too action-specific.  Probably half
  3218.           of these rules could be re-written as Post-Command rules creating
  3219.           a better balanced, better performing story that is more user-
  3220.           tolerant.
  3221.  
  3222.  
  3223.           50
  3224.  
  3225.  
  3226.  
  3227.  
  3228.  
  3229.  
  3230.  
  3231.           Figment User's Guide                             The Story Editor
  3232.  
  3233.           Observe.  A pre-command rule is concerned with an action.  A
  3234.           post-command rule is concerned with the result of an action. 
  3235.           Many times it is just the result you want.  Imagine the object of
  3236.           a scene is to obtain a bank loan.  Bankers only need to see
  3237.           sufficient funds to repay a loan, and there are many ways to
  3238.           achieve that.  You would have to write many pre-command rules to
  3239.           consider them all, but you only need to test a user-defined
  3240.           attribute for "Net Worth" or "Cash Flow" with a post-command rule
  3241.           to satisfy a banker.
  3242.  
  3243.           Most interactive fiction hinges around the player making the
  3244.           correct actions.  This is often unavoidable, but the price is
  3245.           that many stories are stuck until the player discovers the right
  3246.           move.  It also does not tolerate the player's innovations.  They
  3247.           often can think of things you did not.  You can avoid this by re-
  3248.           phrasing the rule as a post-command rule and creating some
  3249.           literary device waiting in reserve that creates the right
  3250.           conditions if the player takes too long to perform the right
  3251.           action.  This is really the best of both worlds because it
  3252.           tolerates beginners without penalizing experts.
  3253.  
  3254.            
  3255.           2.   Anatomy of a Rule
  3256.  
  3257.           It's time to study the rule itself.  Post-Command rules are
  3258.           slightly simpler so go to the Top Level Editor and set the screen
  3259.           to display the Post-Command Rule Base and follow along with the
  3260.           discussion.  Page-down and you can scroll the rule number to see
  3261.           the different rules in the rule base.
  3262.  
  3263.           A rule has three major parts: a conditional clause (the "IF"
  3264.           part), an executional clause (the "THEN" part) and up to sixteen
  3265.           messages that can be "dispensed" (printed, used, or sent
  3266.           somewhere).  The conditional clause has up to eight expressions
  3267.           (typically tests of links and flags), all of which must hold true
  3268.           in order to fire the executional clause.  The executional clause
  3269.           can perform up to eight operations each time the rule fires.
  3270.  
  3271.           You can specify three types of rules: IF, WHILE and FOR.  Page-
  3272.           down from the rule number level.  Your cursor lands on the rule
  3273.           type.  These types scroll under the cursor when you hit the Up-
  3274.           Arrow key.
  3275.  
  3276.           The IF-type rule will fire only once.  It then switches itself
  3277.           OFF and is never processed again for the remainder of the story. 
  3278.           To the right of the rule number, you see an indicator which reads
  3279.           "Switched: ON (or OFF)".  You can reset this manually if you
  3280.           like.  Usually you check this indicator when debugging to see if
  3281.           the rule fired.
  3282.  
  3283.  
  3284.                                                                          51
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.           The Story Editor                             Figment User's Guide
  3293.  
  3294.           A WHILE-type rule is an IF-type rule that never switches off.  It
  3295.           will always fire when its conditions hold true.  The indicator
  3296.           should always read "ON" for a WHILE clause.  (It might not if you
  3297.           have recently changed the type and forgotten to switch it back ON
  3298.           so get in the habit of checking.)
  3299.  
  3300.           The FOR-type rule is very powerful (read tricky).  It is used for
  3301.           stunts.  A counter tracks the number of times that the conditions
  3302.           have held true.  You specify the start and stop counts when you
  3303.           want the rule to fire.  If you specify the start count to be 3
  3304.           for example, then nothing happens the first two times the
  3305.           conditions are true.  You can also specify a step count which
  3306.           causes the rule to fire every second or third time and so forth. 
  3307.           This can be used to make messages appear at intervals.  The
  3308.           indicator will show the rule has switched OFF when it reaches its
  3309.           specified stop count.
  3310.  
  3311.           The processor checks each rule but skips to the next rule when it
  3312.           sees the rule has been switched off.  Rules should always be
  3313.           switched on at the start of play for the scene.  You may,
  3314.           however, want to switch off some rules in order to debug others. 
  3315.           The switch also functions as a "soft delete".  You can keep an
  3316.           obsolete rule switched off and switch it on later if you decide
  3317.           to keep it.  There is no way to switch a rule on during play once
  3318.           it is switched off.  You can, however, simulate that effect by
  3319.           testing a lock flag (or any other attribute or flag) and having
  3320.           another rule change that lock flag.  Thus a rule can appear to be
  3321.           asleep until the lock flag changes.  There are many examples of
  3322.           this in the demo.
  3323.  
  3324.           The Conditional Clause, the Executional Clause and the Messages
  3325.           represent separate editing levels that you enter with Page Down.
  3326.  
  3327.           The rule editing screen is the most dynamic editing screen.  The
  3328.           rule expands and shrinks as you add and delete expressions and
  3329.           messages.  The expressions themselves also expand and shrink as
  3330.           you change their functions, arguments, and modifiers.  You often
  3331.           cannot display all the messages at once so you see a rolling
  3332.           window of messages as you step through the message list.
  3333.  
  3334.           All of the conditional expressions must hold true for the rule to
  3335.           fire.  Experienced users will recognize this as a "Logical AND"
  3336.           and immediately ask where is the "Logical OR"?  The answer is
  3337.           that each rule in the rule base is logically OR'd meaning that
  3338.           Rule A fires, OR Rule B, OR Rule C, etc.  So if you want to OR an
  3339.           expression, copy the rule and change the conditional expressions. 
  3340.           This sounds wasteful, but in practice if you change the
  3341.           conditions, you probably will change the executional expressions
  3342.           and/or the messages too which means you need a new rule anyway.
  3343.  
  3344.  
  3345.           52
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.           Figment User's Guide                             The Story Editor
  3354.  
  3355.  
  3356.           3.   Expressions
  3357.  
  3358.           This is an overview of expressions and their editing.  We will
  3359.           cover expression editing in full detail later.
  3360.  
  3361.           We call each line of the conditional or executional clause an
  3362.           expression.  An expression is composed of a function, objects
  3363.           that act as arguments to the function, and modifiers.  For
  3364.           example:
  3365.  
  3366.                While {
  3367.                  Player  is linked to  Ball  by Ownership
  3368.                }...
  3369.  
  3370.           This expression asks "Does the Player own the ball?" (as opposed
  3371.           to merely having it in his or her possession.)  The conditional
  3372.           function in this example is "is_linked_to".  Its arguments are
  3373.           Player and Ball, and the term "by Ownership" acts as a modifier. 
  3374.           Figment will check to see if there is a link with the label
  3375.           "Ownership" in the Player's link list.  If there is, the rule
  3376.           fires.
  3377.  
  3378.           The syntax reference (see Conditional Function Reference, later)
  3379.           indicates that the modifiers for "is_linked" are optional.  That
  3380.           means if you scroll them far enough, they blank out.  This yields
  3381.           the expression: "Player is linked to Ball".  Figment would then
  3382.           return "true" if it found any link to the ball in the Player's
  3383.           link list regardless of type or value.
  3384.  
  3385.           We change each portion of an expression by scrolling.  Try it. 
  3386.           Advance the cursor from the rule type to the first expression and
  3387.           hit Page-down.  The rule type lights in reverse video to signify
  3388.           expression editing has been initiated.  Your cursor lands on the
  3389.           expression's function.  Scroll the functions and stop at the
  3390.           function you want to use.  Notice the entire expression can
  3391.           change depending on the function.  Some functions need three
  3392.           arguments while others need only one, some have modifiers, etc. 
  3393.           When you have decided on the function move the cursor left or
  3394.           right to set the arguments and the modifiers.
  3395.  
  3396.           We will cover the rule editing in detail later.
  3397.  
  3398.           You are not required to write any conditional expressions at all
  3399.           if you do not want to.  An empty conditional clause means the
  3400.           rule is always true, and it fires every time the player
  3401.           successfully completes a command.  Pre-command rules, by the way,
  3402.           cannot have empty conditional clauses, because they test for
  3403.           action so you would be testing for no action which means it would
  3404.           become a Post-command rule.  (When you want a Pre-Command rule to
  3405.  
  3406.                                                                          53
  3407.  
  3408.  
  3409.  
  3410.  
  3411.  
  3412.  
  3413.  
  3414.           The Story Editor                             Figment User's Guide
  3415.  
  3416.           fire on any command, you can negate the User-defined Command
  3417.           Parser.)
  3418.  
  3419.           Neither are you required to write any executional clause at all. 
  3420.           Often you need only the message since it prints to the command
  3421.           window automatically so it is not unusual to see an empty
  3422.           executional clause.
  3423.  
  3424.  
  3425.           4.   Messages
  3426.  
  3427.           Interactive fiction requires delivering an appropriate message in
  3428.           response to a player's actions so shipping text strings to
  3429.           various destinations is an important activity for executional
  3430.           functions.  Most rules are used primarily to hold messages for
  3431.           delivery at the appropriate time.  The text that you defined for
  3432.           your objects merely represents the initial condition.  Your rules
  3433.           will alter it during play by copying messages to the description
  3434.           and examination strings.
  3435.  
  3436.           When the rule fires, its Current Message is printed automatically
  3437.           to the Command Window where it appears as though in response to
  3438.           the player's command.  You can switch the automatic printing off
  3439.           when you want the message copied to a different destination.  For
  3440.           example, the message can be copied to an object's Long
  3441.           Description which will cause the story's Scene Description to
  3442.           change.
  3443.  
  3444.           The rule reports its Current Message number at the end of the
  3445.           line titled "Messages".  Usually this begins as message number
  3446.           one.  The Current Message number does not change unless you
  3447.           change it with the executional function "inc_message" which
  3448.           increments the current message number.  This can be used to
  3449.           change the message for the next time the rule fires or for
  3450.           copying multiple messages to multiple destinations.  For example:
  3451.  
  3452.                While {
  3453.                  Player  is linked to  Ball
  3454.                } Then {
  3455.                  inc_message
  3456.                } Messages: 4 total  Switched On  Current Msg: 1
  3457.                1. Hey that's a neat ball.
  3458.                2. It's not yours. You better not keep it.
  3459.                3. I think it belongs to someone else.
  3460.                4. You're going to get in trouble.
  3461.  
  3462.           This rule prompts a warning message to the command line each time
  3463.           the player completes a command as long as the player has the
  3464.           object named Ball.  With each move the message gets progressively
  3465.           ominous, because the Current Message pointer is incremented each
  3466.  
  3467.           54
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.           Figment User's Guide                             The Story Editor
  3476.  
  3477.           time the rule fires.  Eventually the last message is encountered. 
  3478.           The inc_message function cannot increment past the last message
  3479.           so this rule will continue prompting the last message each time a
  3480.           command completes, meaning the system will nag ad nauseum until
  3481.           you drop the ball.  Some people won't want the nagging message
  3482.           that keeps prompting.  In which case, change the rule type to
  3483.           "For 1 to 4 step 1".  Now the rule shuts down after it reaches
  3484.           the fourth message.
  3485.  
  3486.           An executional function, "on_skill", is also provided that allows
  3487.           you to deliver the appropriate message relative to the player's
  3488.           skill level so you can even tailor your work to beginners or
  3489.           experts.  There are five skill levels so on-skill chooses one
  3490.           message from a block of five.  You can have up to 16 messages and
  3491.           combine "inc_message" with "on_skill" to increment to the next
  3492.           block of five messages.  This can yield a progression of three
  3493.           messages chosen according to the player's skill.
  3494.  
  3495.           Often you do not want the message to be printed automatically. 
  3496.           You can suppress the automatic printing with the ON/OFF switch on
  3497.           the Messages line so you can copy messages to object descriptions
  3498.           and examination messages without printing them to the command
  3499.           window.
  3500.  
  3501.  
  3502.           5.   A Rule Base in Action
  3503.  
  3504.           An example from the demo serves to illustrate a sequence of rules
  3505.           in action.  These rules are all post-command rules meaning that
  3506.           the player must complete a move each time the rule is to be
  3507.           processed for possible firing.  In other words, we have
  3508.           programmed a mini-drama to unfold while the player is fiddling
  3509.           with other things.  The entire sequence discussed here takes a
  3510.           total of 9 moves to complete.
  3511.  
  3512.           We add the character "Rushin' Bear" to the scene.  We want to put
  3513.           messages to its description message, but we will clobber the
  3514.           existing message before it is displayed (Relatively harmless, but
  3515.           wasteful), so we delay the message transfer one move with a FOR
  3516.           clause that begins on the second move after the bear is added to
  3517.           the scene:
  3518.  
  3519.                FOR 2 to 5 step 1 {
  3520.                  <scene>  is linked to  Rushin' Bear
  3521.                } THEN {
  3522.                  copy msg to  Rushin' Bear's  Long Description
  3523.                  inc_msg
  3524.                } Message 4 Total   Switched OFF
  3525.                 < 4 messages >
  3526.  
  3527.  
  3528.                                                                          55
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534.  
  3535.  
  3536.           The Story Editor                             Figment User's Guide
  3537.  
  3538.           By delaying the start of message transfer to the second move
  3539.           after the bear arrives, we allow the object's original
  3540.           description to be displayed, then we copy a message in its place
  3541.           and increment this rule's message pointer to this rule's second
  3542.           message.  Process repeats three more times.  The result is that
  3543.           we announce the bear's pending arrival with a sequence of
  3544.           increasingly ominous messages.
  3545.  
  3546.           Once done, we want the bear to initiate a fight so we unlock the
  3547.           bear after the fifth move:
  3548.  
  3549.                FOR 5 to 5 Step 1 {
  3550.                  * the scene *  is linked to  Rushin' Bear
  3551.                } THEN {
  3552.                  unlock  Rushin' Bear
  3553.                } Message  0 Total  Switched OFF
  3554.                  < no messages>
  3555.  
  3556.           This functions exactly like an IF statement, but it is delayed 5
  3557.           counts.  We then follow with a third rule (not shown here), a 4-
  3558.           count FOR statement that tests the Bear's lock flag and unleashes
  3559.           a barrage of punishment forcing the player to fight the bear or
  3560.           die.  The entire Bear sequence was triggered by the player's
  3561.           action.  (Extra Credit: Study the listing in the demo.  Can you
  3562.           find the event that brought the Bear?  Wasn't that easy?)
  3563.  
  3564.           This sequence of only three rules has driven a little mini-drama
  3565.           in the scene.  There can be many such dramas contained within the
  3566.           rule bases, all of which progress one notch with each command. 
  3567.           The player only sees the Scene Description change and the command
  3568.           responses appear after typing a command.  The impression is as
  3569.           though the different dramas played out in the scene are
  3570.           progressing in parallel.
  3571.  
  3572.  
  3573.           L.   Editing Rule Bases
  3574.  
  3575.           Once you have practiced editing objects (stuff and scenes), rule
  3576.           editing should come as no great difficulty.  They are, by their
  3577.           nature, more complex than objects so there is a greater amount of
  3578.           work here.
  3579.  
  3580.           By now you should recognize that if what you want to edit is not
  3581.           accessible with the Right-Arrow key, it is on a level lower and
  3582.           that the Page-Down key will reach that level.  You should also
  3583.           recognize that the editor will show you what you can edit on this
  3584.           level by holding the Right- or Left-Arrow down and watching where
  3585.           the cursor flies.
  3586.  
  3587.  
  3588.  
  3589.           56
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596.  
  3597.           Figment User's Guide                             The Story Editor
  3598.  
  3599.           Also the Home key is used extensively in expression editing to
  3600.           give you more options.
  3601.  
  3602.  
  3603.           1.   Rule Base Editing
  3604.  
  3605.           From the Top Level Editor, select the appropriate screen editor
  3606.           for Pre- or Post-Command Rule Base editing.  Hit Page-Down.  Your
  3607.           cursor lands at the rule number.  We call this the Rule Base
  3608.           Level, because you are addressing the rule base as a whole, not
  3609.           elements of the rule (Yes, the rule's switches are at this level
  3610.           for convenience).
  3611.  
  3612.           You can display the different rules in the rule base by scrolling
  3613.           the rule number.  The label, "Rule #1 of 10" means there are ten
  3614.           rules in this rule base and you are viewing the first one.  You
  3615.           can also delete, insert, cut or paste a rule at this point.
  3616.  
  3617.           Moving left, you can change the scene (Map Block, actually) by
  3618.           scrolling the scene name to access the different rule bases for
  3619.           each scene of the story or the global rule bases.  Moving right,
  3620.           you can change the switches for the particular rule currently
  3621.           displayed.
  3622.  
  3623.           Page-Up from this level returns you to the Top-Level Editor, also
  3624.           Escape.
  3625.  
  3626.  
  3627.           a.   Adding/Deleting Rules
  3628.  
  3629.           Rules can be added or deleted with the "+" and "Delete" keys
  3630.           respectively.  Try adding a new rule now and note that the rule
  3631.           count changes.  The new rule has been added to the end of the
  3632.           rule list and the screen now displays the new rule.
  3633.  
  3634.           You are probably wondering why the screen display did not change. 
  3635.           The reason is that the "+" function is actually a copy function
  3636.           too.  It made a copy of the rule you were viewing when you hit
  3637.           the "+" key and displayed the copy, changing only the rule
  3638.           number.  Often you want to make a rule very similar to a rule you
  3639.           already have.  Display this rule with the Up-Arrow key then hit
  3640.           "+".  The new rule copy is added to the end of the list.  Now
  3641.           edit the new rule to adapt it to your needs.
  3642.  
  3643.           Note that this can also be used for re-ordering the rule sequence
  3644.           by copying rules to the end of the list with the "+" key then
  3645.           deleting the originals with the "Delete" key.  The order of rules
  3646.           can be important when rules are dependent on each other.  A
  3647.           better way to change the order of the rule sequence is to use cut
  3648.           and paste operations.
  3649.  
  3650.                                                                          57
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658.           The Story Editor                             Figment User's Guide
  3659.  
  3660.  
  3661.           To delete a rule, scroll the rule number until you are displaying
  3662.           the rule you want to delete.  Hit the button labeled "Delete" on
  3663.           your keyboard.  There are no contingencies to be concerned with
  3664.           as with object deletion.  Only the deleted rule is affected.
  3665.  
  3666.  
  3667.           b.   Inserting Rules
  3668.  
  3669.           You can insert an empty rule anywhere in the sequence.  Scroll up
  3670.           the rule number until you are viewing the point where you want to
  3671.           insert a new rule.  Hit the key labeled "Insert" on your
  3672.           keyboard.  The rule you are viewing and the following rules will
  3673.           be moved back in the sequence one position and you will be
  3674.           viewing a new rule you can edit.
  3675.  
  3676.  
  3677.           c.   Cutting Rules - F7
  3678.  
  3679.           The "cut" function is especially useful for moving rules within
  3680.           the sequence and between different rule bases.  There is no
  3681.           difference between local and global rule bases, and you can move
  3682.           rules freely from one to the other.  There are subtle differences
  3683.           between pre- and post-command rules, but the paste function will
  3684.           let you paste the wrong type, and you are expected to correct the
  3685.           differences (the first expression, and the enable switch).
  3686.  
  3687.           To cut a rule, simply scroll the rule number until you are
  3688.           displaying the rule you want to cut and hit the F7 key.  The rule
  3689.           is removed from the sequence and held for a later paste
  3690.           operation.
  3691.  
  3692.           Repeated strikes on F7 is comparable to Delete.  Each time you
  3693.           cut a rule, the last rule in the cut buffer is over-written with
  3694.           only the final rule cut being saved for pasting.
  3695.  
  3696.  
  3697.           d.   Pasting Rules - Shift-F7, Alt-F7
  3698.  
  3699.           The "paste" function presumes you have cut a rule prior to the
  3700.           paste operation, and it will beep if there has been no rule cut
  3701.           prior to the paste operation.  If you are not sure what rule is
  3702.           in the cut buffer, paste it anyway.  You can delete it or cut it
  3703.           out again with a single keystroke so no harm done.
  3704.  
  3705.           To paste a rule, scroll the rule numbers until you arrive at the
  3706.           point in the sequence where you want to insert the rule.  Hit
  3707.           Alt-F7 to paste the rule before this rule or Shift-F7 to paste
  3708.           after this rule.  In either case, you will end up displaying the
  3709.           newly pasted rule.
  3710.  
  3711.           58
  3712.  
  3713.  
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.           Figment User's Guide                             The Story Editor
  3720.  
  3721.  
  3722.           If you want to paste a rule to the first position in a sequence,
  3723.           display rule number one and hit Alt-F7.  If you want to tack a
  3724.           rule onto the end of the sequence, display the last rule and hit
  3725.           Shift-F7.
  3726.  
  3727.           Repeated pastes will insert repeated copies into the rule base.
  3728.  
  3729.  
  3730.           e.   Changing Scenes (and Rule Bases) in the Editor
  3731.  
  3732.           To the left of the rule number is the scene name.  This indicates
  3733.           you are looking at the local rule base for the scene (Map Block
  3734.           actually) in question.  Move the cursor over the name and scroll
  3735.           the name.  You have changed the display to display the local rule
  3736.           bases for a different scene in your map.  You should recognize
  3737.           that they change in the order in which they are specified in your
  3738.           map (not the order in which the scenes are listed in the Scene
  3739.           Editor).
  3740.  
  3741.           Every Map Block gets its own pair of rule bases.  When you enter
  3742.           the editor, you are looking at the rule bases for the current
  3743.           scene (Map Block) in the story, but you can change the scene here
  3744.           and study other rule bases.  Note that this changes the scene for
  3745.           the story as well.  If you hit F1, you find yourself viewing the
  3746.           story in a different scene.
  3747.  
  3748.           The Shift-F3 (write-all) function in the Top Level Editor is
  3749.           designed to reset the story to the starting scene.  Usually you
  3750.           hit this routinely on your way out of the editor so any scene
  3751.           changes here are harmless.  Sometimes, you are just poking around
  3752.           and do not want to save your changes so remember to put the scene
  3753.           back before you leave the editor.
  3754.  
  3755.           The scene-change function will not work if you have not made a
  3756.           map.  This discussion assumes you are working on an existing
  3757.           story which has a map defined.  If you are working on a new
  3758.           story, you are stuck in scene zero until you define the map.  See
  3759.           the section on map editing for further details.
  3760.  
  3761.           A word of caution.  Note that there is a number beside the scene
  3762.           name.  This is the number of the map block, since as we
  3763.           mentioned, it is the map block that you are changing.  See the
  3764.           section on the Map Editor for full details of Map Blocks. 
  3765.           Remember we mentioned that sometimes you re-use scenes with
  3766.           different logic by creating different map blocks titled with the
  3767.           same scene.  The number tells them apart.
  3768.  
  3769.  
  3770.  
  3771.  
  3772.                                                                          59
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.           The Story Editor                             Figment User's Guide
  3781.  
  3782.  
  3783.           f.   Global Rule Bases
  3784.  
  3785.           Global rule bases appear in every way identical to the local rule
  3786.           bases.  To access them for editing, simply move the cursor over
  3787.           the scene name and scroll up or down until the name "Pre-global"
  3788.           or "Post-global" appears.  Add and edit the rules as you would
  3789.           edit any sequence.  Be sure to re-set the scene name if you are
  3790.           returning to the Presentation Environment.
  3791.  
  3792.  
  3793.           g.   Rule ON/OFF Switch
  3794.  
  3795.           Also at this level is the aforementioned switch to turn off the
  3796.           rule.  Many rules switch off during the course of play.  You can
  3797.           manually toggle this switch by advancing over to this item and
  3798.           scrolling this flag.  Continue advancing and the cursor wraps
  3799.           back around to the scene name and the rule number.
  3800.  
  3801.  
  3802.           h.   Listing Rule Bases
  3803.  
  3804.           The F4 key will write the full rule base (either Pre- or Post-,
  3805.           not both) for the current scene to a disk file where you can read
  3806.           it at your leisure.  The F4 key is enabled in the Top Level
  3807.           Editor when the screen is displaying either the Pre- or the Post-
  3808.           Command rule editor.  Page up to the top line on the screen and
  3809.           hit F4.  You just made a listing file on your disk with the same
  3810.           name as the story but with a ".LST" file extension.  Every time
  3811.           you hit F4, the previous contents of this file are deleted and
  3812.           replaced with the new listing.  You can exit with F10 to read
  3813.           this file with the DOS command "type" or print it on your printer
  3814.           with the DOS "print" command.
  3815.  
  3816.           If you change the screen (or change the scene) to display a
  3817.           different rule base, then hit F4 again, the same disk file will
  3818.           be re-used and your last listing will be lost.  (Call it a
  3819.           "losting".)
  3820.  
  3821.           Shift-F4 generates a listing file for all the rule bases for
  3822.           every map block, in effect, a full logic dump.  Take care.  This
  3823.           can generate a file 60% as large as the original story file.  If
  3824.           you are tight on disk space, you may want to swap diskettes
  3825.           before hitting Shift-F4.  Again, this over-writes any existing
  3826.           listing file.
  3827.  
  3828.           Listings are fully expendable, feel free to delete them when you
  3829.           need to recover disk space.  The file is automatically created
  3830.           when you hit F4 if the file does not already exist.
  3831.  
  3832.  
  3833.           60
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.           Figment User's Guide                             The Story Editor
  3842.  
  3843.           Note.  DOS installs a print driver routine the first time you
  3844.           give the print command after booting up.  This routine is then
  3845.           left in memory waiting for any subsequent print requests.  If you
  3846.           have not printed anything before you start Figment, and you use
  3847.           F10 to visit DOS and do your printing, you will install this
  3848.           print driver at a memory location above the last memory address
  3849.           that Figment consumes.  Eventually, you return to Figment and
  3850.           quit completely to run another DOS application.  If this program
  3851.           consumes more memory than Figment did, it runs afoul of the print
  3852.           driver sitting in an unusually high location in memory, and you
  3853.           get the alarming message:
  3854.  
  3855.                Insufficient memory to execute program.
  3856.  
  3857.           The only way to kill this print driver is to re-boot your
  3858.           machine.  Hit reset.
  3859.  
  3860.           To avoid this problem, load the print driver first by giving the
  3861.           print command with no filename.  This loads the driver and
  3862.           reports to you that the print queue is empty.  Now start Figment. 
  3863.           If you use this feature often, you may want to create a batch
  3864.           file so you will not forget.
  3865.  
  3866.  
  3867.           2.   Rule Level Editing
  3868.  
  3869.           Hit Page-Down from the Rule Base Level Editor and your cursor
  3870.           lands at the Rule Type.  Advance the cursor and it moves
  3871.           sequentially to the Conditional Expressions, the Executional
  3872.           Expressions and the Messages where it wraps back to the rule
  3873.           type.  These are separate editing levels, and you can access them
  3874.           by hitting Page-Down when the cursor is at these locations.
  3875.  
  3876.           Page-Up/Escape returns to the Rule Base Level Editor.
  3877.  
  3878.  
  3879.           a.   Rule Type
  3880.  
  3881.           You can scroll the rule type.  Notice the start, stop, and step
  3882.           counts magically appear and disappear when you set the rule type
  3883.           to FOR.  Notice if a rule is switched OFF that changing the type
  3884.           does not automatically switch it ON.  You must do this manually.
  3885.  
  3886.  
  3887.           b.   Expression Editing
  3888.  
  3889.           Expression level editing is very similar for both the conditional
  3890.           and executional clauses so we will describe both processes
  3891.           simultaneously.  There is only a slight variation in format
  3892.           between the two expression types.
  3893.  
  3894.                                                                          61
  3895.  
  3896.  
  3897.  
  3898.  
  3899.  
  3900.  
  3901.  
  3902.           The Story Editor                             Figment User's Guide
  3903.  
  3904.  
  3905.           When you enter expression level editing with Page-Down, the
  3906.           rule's type statement or the word "Then" lights up in reverse
  3907.           video to indicate the expression level editor is enabled. If you
  3908.           do not see this light, you cannot edit the expressions.  Figment
  3909.           will only beep as you attempt to scroll values.
  3910.  
  3911.           Continue hitting Page-Down to move down to the expression you
  3912.           want to change.  Page-Down also automatically adds new
  3913.           expressions for you when you hit the end of the list up to a
  3914.           maximum of eight  expressions per clause.  It then moves down to
  3915.           the newly added expression.
  3916.  
  3917.           Page-Up moves up the list and finally exits the expression level
  3918.           editor whereupon the reverse video returns to normal signifying
  3919.           you have left expression editing.
  3920.  
  3921.           The "+" key automatically adds new expressions to the end of the
  3922.           list, but it does not move into them.
  3923.  
  3924.           The Delete key deletes the expression the cursor is on.
  3925.  
  3926.           The rule display automatically expands and contracts to
  3927.           accommodate newly added and deleted expressions.
  3928.  
  3929.           If the clause is empty, it reads "No Expressions", meaning you
  3930.           must add one.  Otherwise Figment will beep when you attempt to
  3931.           edit nothing.
  3932.  
  3933.           As you make changes to the expressions, Figment re-computes the
  3934.           line length to accommodate the various options you have selected.
  3935.           The cursor centers on the function phrase or the function's
  3936.           argument phrases.  It changes position slightly as you change
  3937.           these phrases.  The cursor can only be an approximate guide to
  3938.           say that you are working on the function or its arguments.  It
  3939.           cannot indicate all the possible options at each location. 
  3940.           Experiment with the up/down arrow keys and the Home key to see
  3941.           what your choices are.
  3942.  
  3943.  
  3944.           (1)  Setting the Function
  3945.  
  3946.           When you enter expression editing, your cursor lands on the
  3947.           expression's function.  The editing operations that you can do on
  3948.           an expression depend on the function so this will be your first
  3949.           task.  Set the function you want by scrolling the function names
  3950.           with the Up-Arrow key.
  3951.  
  3952.           You can negate conditional expressions by hitting the Home key
  3953.           when the cursor is on a function.  The Home key is very powerful,
  3954.  
  3955.           62
  3956.  
  3957.  
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.           Figment User's Guide                             The Story Editor
  3964.  
  3965.           but here it only serves to toggle negation on or off.  (See data
  3966.           types below.)
  3967.  
  3968.           The editor will only scroll the functions that are legal for your
  3969.           context: conditional functions will only scroll in conditional
  3970.           expressions, executional functions in executional expressions and
  3971.           story commands in the first conditional expression of a pre-
  3972.           command rule.  No system-level functions (restart, restore, save,
  3973.           toggle, etc.) will be seen in the expression editor meaning you
  3974.           are not allowed to write rules to inhibit or restrain them.
  3975.  
  3976.  
  3977.           (2)  Expression Argument Counts
  3978.  
  3979.           The editor varies the expression argument count according to the
  3980.           function.  Some functions require no arguments while some allow
  3981.           several.  As you advance the cursor with the right-arrow key, the
  3982.           cursor skips over each argument position and eventually wraps
  3983.           back to the beginning of the expression when the maximum
  3984.           allowable argument is passed.  Thus as you change the function,
  3985.           the cursor will make shorter or longer laps as you cycle it left
  3986.           and right.
  3987.  
  3988.           Some functions have different forms that use different numbers of
  3989.           arguments.  For example, you can say:
  3990.  
  3991.                If {
  3992.                  Player  does take  ball
  3993.                }...
  3994.  
  3995.                or
  3996.  
  3997.                If {
  3998.                  Player  does take  ball  from boy
  3999.                }...
  4000.  
  4001.           In such a case if you choose not to use the last argument, simply
  4002.           scroll up (or down) the last argument's name until it blanks out. 
  4003.           The modifier will also disappear.
  4004.  
  4005.  
  4006.           (3)  Data Types - The "Home" Key
  4007.  
  4008.           Each function specifies the legal data types for its arguments
  4009.           (see the Command Reference sections) so that the editor can
  4010.           inhibit mistakes before they occur.  The "Home" key is used to
  4011.           access different data types for the function arguments.  It also
  4012.           serves to negate conditional expressions when the cursor is
  4013.           positioned over the function.
  4014.  
  4015.  
  4016.                                                                          63
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.  
  4023.  
  4024.           The Story Editor                             Figment User's Guide
  4025.  
  4026.           Some functions allow a wide variety of data types for the
  4027.           function arguments while others allow only one.  You can check
  4028.           the syntax in the Command Reference sections that follow.  You
  4029.           might find it easier just to try hitting the Home key.  If
  4030.           nothing happens, the function allows no other options for data
  4031.           types at that location in the expression.  
  4032.  
  4033.           For example, the function "is linked to" tests for a link from
  4034.           one object to another.  When making links, you should recognize
  4035.           that scenes can have links to objects, but objects cannot have
  4036.           links to scenes.  The reason is that links imply "possession" or
  4037.           similar association.  Scenes have objects in them, but objects do
  4038.           not have scenes in them.  Neither can scenes be linked to other
  4039.           scenes.  Thus the "is linked to" function specifies its arguments
  4040.           as follows:
  4041.  
  4042.                <stuff or scene>  is linked to  <stuff>
  4043.  
  4044.           If you strike the Home key when the cursor is positioned over the
  4045.           first argument, you can change to scrolling scene names from
  4046.           scrolling stuff names.  Another strike on the Home key, and you
  4047.           are back to scrolling stuff names.
  4048.  
  4049.           The significance of this is that you can access any scene name in
  4050.           many functions, but only where it is legal to do so.  For
  4051.           example, you might want to specify scene names or directions when
  4052.           testing the "go" command:
  4053.  
  4054.                If {
  4055.                  Player  does go  North
  4056.                }...
  4057.  
  4058.                or
  4059.  
  4060.                If {
  4061.                  Player  does go  to Basement
  4062.                }...
  4063.  
  4064.  
  4065.           (4)  Arguments Specified by Attributes
  4066.  
  4067.           Some functions allow their arguments to be specified by the
  4068.           attributes Type and Sub-type.  For example:
  4069.  
  4070.                If {
  4071.                  Player  is linked to  obj sub-type Money
  4072.                }...
  4073.  
  4074.  
  4075.  
  4076.  
  4077.           64
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.           Figment User's Guide                             The Story Editor
  4086.  
  4087.           This would be read as: "If the player is linked to an object of
  4088.           sub-type 'Money'..." meaning "Does the player have something of
  4089.           value?".
  4090.  
  4091.           To access the attributes, simply hit the Home key when the cursor
  4092.           is positioned over the second object until you see the sub-type
  4093.           attributes.  Scroll the sub-type names until you see the one you
  4094.           want.
  4095.  
  4096.  
  4097.           (5)  Pronouns
  4098.  
  4099.           Whenever you specify arguments to functions indirectly, for
  4100.           example by their attributes, you create a separate problem.  How
  4101.           do you refer to them later?  Figment supports some special
  4102.           pronouns for that purpose.  For example:
  4103.  
  4104.                If {
  4105.                  Player  is linked to  obj sub-type Money
  4106.                } Then {
  4107.                  Take  * the object *  from Player
  4108.                }...
  4109.  
  4110.           We display the pronoun "the object" between asterisks to remind
  4111.           you that this is a pronoun.
  4112.  
  4113.           Further discussion on pronouns is available for registered users.
  4114.  
  4115.  
  4116.           (6)  Cutting and Pasting Expressions
  4117.  
  4118.           You can cut an expression out of the clause by hitting F7.  The
  4119.           cursor location does not matter.  It can be anywhere on the
  4120.           expression.  The expression can then be pasted back with Alt-F7
  4121.           or Shift-F7 as described above for rules.
  4122.  
  4123.           When you paste an expression of the wrong type in a clause,
  4124.           Figment quickly converts the function in the newly copied
  4125.           expression to the appropriate type.  Figment is in effect
  4126.           politely telling you that you will have to re-state the
  4127.           expression anyway.  Net effect, pasting will not look much
  4128.           different from inserting for the majority of cases.
  4129.  
  4130.  
  4131.           (7)  Inserting Expressions
  4132.  
  4133.           The Insert key will insert a new expression in the clause at the
  4134.           cursor location.  The existing expressions are bumped back to
  4135.           open the gap in the sequence for the new expression.
  4136.  
  4137.  
  4138.                                                                          65
  4139.  
  4140.  
  4141.  
  4142.  
  4143.  
  4144.  
  4145.  
  4146.           The Story Editor                             Figment User's Guide
  4147.  
  4148.           Note when inserting a new first expression to a pre-command
  4149.           rule's conditional clause, the old expression moves back and is
  4150.           transformed to an ordinary conditional expression.
  4151.  
  4152.  
  4153.           3.   Message Editing
  4154.  
  4155.           Message editing is accessed via Page-Down when the cursor is
  4156.           positioned over the word "Message" on the screen.  The word
  4157.           "Message" lights up in reverse video when you enter the message
  4158.           editing level, and the cursor jumps to the message switch.  Set
  4159.           the message display switch to "off" or "on" by scrolling up with
  4160.           the Up-arrow key.  Advance to the "Current Msg:" position with
  4161.           the Right-arrow key.
  4162.  
  4163.           The Current Message refers to the message that will be passed or
  4164.           displayed the next time the rule uses its messages.  The
  4165.           executional function "inc_message", for example, will advance the
  4166.           Current Message pointer so that the next message can be passed. 
  4167.           If you have been playing the story before entering the editor,
  4168.           you might see it pointing to some value other than 1.  You would
  4169.           set the Current Message value whenever you use a function like
  4170.           the user-defined command parser ("say_cmnd") that uses the first
  4171.           rule message by default.  Otherwise, you probably do not have to
  4172.           change this value.
  4173.  
  4174.           Advancing one more position (or hitting Page-Down) puts you in
  4175.           position for editing the rule messages.  Page-Up/Down moves you
  4176.           to the appropriate message for editing. You cannot edit a message
  4177.           where none exists so hit "+" or Page-Down when there are no
  4178.           messages so that you have a message to edit.   Note that the
  4179.           message total shown on the screen updates as you add and delete
  4180.           messages.  If it reports zero messages, you cannot edit a message
  4181.           until you add one.
  4182.  
  4183.           Page-Up/Down behaves in a similar fashion as for expression
  4184.           editing so do "+" and Delete.  Note that when screen space is
  4185.           limited, the messages will roll up/down in a window as required
  4186.           to fit the available space.
  4187.  
  4188.           The F7 key will cut the message to the text buffer from which it
  4189.           can be pasted back (wherever text is needed: rule messages,
  4190.           object names, descriptions, etc.).
  4191.  
  4192.           Pasting behaves slightly different for rule messages than it does
  4193.           for object text strings.  The message the screen cursor points to
  4194.           is not replaced by the text in the cut buffer.  Instead, the cut
  4195.           buffer is inserted as a message in the list of rule messages. 
  4196.           Alt-F7 and Shift-F7 behave as they do in expression editing, and
  4197.           repeated paste operations will generate repeated copies.
  4198.  
  4199.           66
  4200.  
  4201.  
  4202.  
  4203.  
  4204.  
  4205.  
  4206.  
  4207.           Figment User's Guide                             The Story Editor
  4208.  
  4209.  
  4210.           The message itself is edited in the normal manner for all text. 
  4211.           When the cursor is positioned at the start of the message, you
  4212.           can type in replacement text directly or you can hit "F6" and use
  4213.           the full-screen text editor to modify existing text.
  4214.  
  4215.           Page-Up exits the message editing level and returns to the rule
  4216.           editing level.  When the list of messages is long, Escape is
  4217.           easier. 
  4218.  
  4219.           Be sure to leave the rule's current message indicator reading the
  4220.           message number you want.  Typically this is the first message,
  4221.           but you can skip messages if you want.
  4222.  
  4223.           That is all there is to editing rules.  You can exit with Page-
  4224.           Up.  We now discuss the distinction between Pre- and Post-Command
  4225.           Rule Bases and then discuss the various rule functions in detail.
  4226.  
  4227.  
  4228.           M.   Pre-Command Rules
  4229.  
  4230.           Often you want to intercept or block a command from executing. 
  4231.           Pre-Command rules allow you to do that.
  4232.  
  4233.           Change the screen now so you can study the Pre-Command Rule
  4234.           Editor.  It is very similar to the Post-Command Rule Editor, by
  4235.           deliberate design so that you will have less editing to learn. 
  4236.           The major distinctions are the addition of the "Command" switch
  4237.           in the upper right corner of the screen and the first conditional
  4238.           expression.
  4239.  
  4240.           The Pre-Command rule differs from its Post-Command counterpart in
  4241.           that its first conditional expression tests for the verb in the
  4242.           player's command.  This expression is phrased as, "If {player
  4243.           does [not] <verb>}".  The remaining expressions, if any, test
  4244.           state variables as the Post-Command rule does.
  4245.  
  4246.           The Pre-Command Rule has the option of enabling the command
  4247.           (allowing it to proceed) or disabling it (blocking command
  4248.           completion).  A blocked command is a failed command, and the
  4249.           Post-Command rules are not processed.  Pre- and Post- rules are
  4250.           often used in combination.  A rule in the Pre-Command Rule Base
  4251.           performs operations that in turn trigger a rule in the Post-
  4252.           Command Rule Base.
  4253.  
  4254.           Pre-Command rules are rules tagged for a specific function.  Some
  4255.           functions turn this around and deliberately use them as a source
  4256.           of user-defined messages.  (See Fight, Shoot, Hit, Charm)  The
  4257.           User-Defined Command Parser is implemented as a Pre-Command Rule,
  4258.  
  4259.  
  4260.                                                                          67
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.           The Story Editor                             Figment User's Guide
  4269.  
  4270.           but this is the subject of an entire section of this book by
  4271.           itself.
  4272.  
  4273.  
  4274.           1.   Modifiers in Pre-command Rule Expressions
  4275.  
  4276.           We have seen conditional expressions with modifiers, and we have
  4277.           seen how we can use them or omit them in our expressions when we
  4278.           want to be specific or general.  Many story commands have
  4279.           modifiers too, and you have the option of testing for these
  4280.           modifiers or ignoring them.  When you ignore the modifier, you
  4281.           create a broader test case, and when you include the modifier you
  4282.           create a more specific test.
  4283.  
  4284.           For example, the expression:
  4285.  
  4286.                If {
  4287.                  Player  does give  bat
  4288.                }...
  4289.  
  4290.           does not care to whom the player gives the bat, while the
  4291.           following expression does:
  4292.  
  4293.                If {
  4294.                  Player  does give  bat  to Boy
  4295.                }...
  4296.  
  4297.           Only a few commands use modifiers, but they are critical
  4298.           commands:
  4299.  
  4300.                take - from
  4301.                give - to
  4302.                put - in
  4303.                put - on
  4304.                shoot - with
  4305.  
  4306.           Modifiers are associated with the last argument in the
  4307.           expression.  If you have blanked this argument, then you will not
  4308.           see the modifier either.  Scroll the argument until you see the
  4309.           object name you want.  The modifier will appear along with the
  4310.           argument name.  Figment will set a default modifier commonly used
  4311.           with the chosen function.  Where the function allows more than
  4312.           one modifier (e.g. put), you can change the modifier by hitting
  4313.           the Home key and scrolling the modifier names.  Hit the Home key
  4314.           again and you are back to scrolling object names.
  4315.  
  4316.  
  4317.  
  4318.  
  4319.  
  4320.  
  4321.           68
  4322.  
  4323.  
  4324.  
  4325.  
  4326.  
  4327.  
  4328.  
  4329.           Figment User's Guide                             The Story Editor
  4330.  
  4331.           2.   Directions in Pre-Command Rules
  4332.  
  4333.           You can test for specific directions in the "go" command.  The
  4334.           same philosophy applies as described above for modifiers.  If you
  4335.           do not specify a direction, then the rule will fire regardless of
  4336.           which direction the player goes.
  4337.  
  4338.  
  4339.           3.   Negating Pre-Command Rules
  4340.  
  4341.           Negation is allowed for Pre-Command Rule expressions.  The first
  4342.           conditional expression in a pre-command rule is phrased as, "If {
  4343.           Player does (command)...}" or "If { Player does not
  4344.           (command)...}".  The form changes when you hit the "Home" key. 
  4345.           A negated command rule simply means that the rule will fire on
  4346.           any command unless the player gives this command.  In fact a
  4347.           negated "while" rule will fire every time until the player gives
  4348.           the specified command.  This can be very tedious if the same
  4349.           message repeats continuously so such a rule would probably
  4350.           include extra conditional expressions to narrow the possibilities
  4351.           of its firing.
  4352.  
  4353.           Some functions have alternate forms and the rule can be very
  4354.           specific.  Consider the case where the test is:
  4355.  
  4356.                If {
  4357.                  Player  does not take  Ball
  4358.                }...
  4359.  
  4360.           and the player says "take ball from boy", which is different so
  4361.           the rule would fire.
  4362.  
  4363.  
  4364.  
  4365.  
  4366.  
  4367.  
  4368.  
  4369.  
  4370.  
  4371.  
  4372.  
  4373.  
  4374.  
  4375.  
  4376.  
  4377.  
  4378.  
  4379.  
  4380.  
  4381.  
  4382.                                                                          69
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.           The Story Editor                             Figment User's Guide
  4391.  
  4392.           N.   Conditional Function Reference
  4393.  
  4394.           This section describes the Conditional functions you can use in
  4395.           your rules.  The next section describes the Executional
  4396.           functions.  Conditional functions are used in the conditional
  4397.           part of a rule.  They are phrased slightly different from the
  4398.           executional functions in order to achieve a more natural style.
  4399.  
  4400.                If {
  4401.                  Player  is linked to  Ball
  4402.                } Then {...
  4403.  
  4404.           seems more natural than perhaps:
  4405.  
  4406.                If {
  4407.                  is linked  Player  Ball
  4408.                } Then {...
  4409.  
  4410.           Meanwhile, Executional functions are used in the command sense.
  4411.  
  4412.                ...} Then {
  4413.                  link  Romeo  to Juliet  by Romance  > 30
  4414.                  copy msg to Romeo's  Long Description
  4415.                }...
  4416.  
  4417.  
  4418.           1.   Does_Action
  4419.  
  4420.           Syntax    <Character>  does [not]  <action>
  4421.  
  4422.           This is the primary conditional function for pre-command rules. 
  4423.           You only see this function when you are editing the first
  4424.           expression of a pre-command rule.
  4425.  
  4426.           The character can be any character including the Player and the
  4427.           Actor.
  4428.  
  4429.           The action is any legal command from the Presentation
  4430.           Environment, but you will not find system-level commands like
  4431.           "restore" or "restart" here.  The syntax for the action follows
  4432.           the command syntax in the Presentation Environment.  Only rarely
  4433.           is there a special option.  For example:
  4434.  
  4435.                If {
  4436.                  Actor  does go  anywhere
  4437.                } Then ...
  4438.  
  4439.           You will not find the direction "anywhere" in the "go" command
  4440.           syntax.  It is a special implementation so you can write rules to
  4441.           inhibit all exits from the scene.
  4442.  
  4443.           70
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.           Figment User's Guide                             The Story Editor
  4452.  
  4453.  
  4454.  
  4455.           2.   Fit_Profile
  4456.  
  4457.           Syntax    <object>  does [not] fit profile of  <profile label>
  4458.  
  4459.           Compares a set of the object's attributes to a weighted decision
  4460.           matrix of attributes.  See Profiles.
  4461.  
  4462.  
  4463.           3.   Have_Attribute
  4464.  
  4465.           Syntax
  4466.             <object> does [not] have attribute <attr label> [<>= value]
  4467.             <pronoun>
  4468.  
  4469.                If {
  4470.                  Actor  does have attribute  Wisdom  > 12
  4471.                }...
  4472.  
  4473.  
  4474.           4.   Is_dead
  4475.  
  4476.           Syntax: <character> is [not] dead
  4477.  
  4478.           Use this in conflicts to test for the defeat of characters.  When
  4479.           an opponent dies in a conflict it is probably the Player that
  4480.           killed them.  When Players die in a conflict, it is not clear who
  4481.           killed them since there can be multiple opponents.  This will
  4482.           tell when the Player is dead, but it will not tell you who did
  4483.           the deed.
  4484.  
  4485.           There is also a special case where you want to use this function:
  4486.  
  4487.                If {
  4488.                  Player  is dead
  4489.                } Then {
  4490.                  Kill  Player
  4491.                } ...
  4492.  
  4493.           This seems especially vindictive, but Figment is always trying to
  4494.           recuperate Players when their health is failing.  If this healing
  4495.           process coincides with the death blow, Players appear to
  4496.           resurrect.  This rule, however, seals their fate.  It also gives
  4497.           you an opportunity for some parting words.
  4498.  
  4499.           It is probably wise to put such a rule in the Post-Command Rule
  4500.           Base for any scene where a conflict can occur or you can put it
  4501.           in the Global Post-Command Rule Base.
  4502.  
  4503.  
  4504.                                                                          71
  4505.  
  4506.  
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.           The Story Editor                             Figment User's Guide
  4513.  
  4514.  
  4515.           5.   Is_linked_to
  4516.  
  4517.           Syntax
  4518.             <object> is [not] linked to <object> [by link-type] [<>=value]
  4519.             <pronoun>                   <obj type>
  4520.                                         <obj sub-type>
  4521.                                         <pronoun>
  4522.                                         <obj user-type>
  4523.  
  4524.                If {
  4525.                  Boy  is linked to  ball
  4526.                  Romeo  is linked to  Juliet  by Romance  > 12
  4527.                  John  is linked to  Mary  by Marriage
  4528.                  John  is linked to  House  by Mortgage  > 100
  4529.                }...
  4530.  
  4531.           You can test for links to object types or sub-types.  For
  4532.           example:
  4533.  
  4534.                If {
  4535.                  Player  is linked to  obj sub-type Money
  4536.                } Then {
  4537.                  take  * the object *  from  Player
  4538.                }...
  4539.  
  4540.           Another example:
  4541.  
  4542.                If {
  4543.                  Player  does give  Flowers  to  Juliet
  4544.                  Player  is linked to  Juliet  by Romance  > 20
  4545.                } Then {
  4546.                  Link  Juliet  to  Player  with Romance  20
  4547.                } Message  1 Total  Switched: ON  Current Msg: 1
  4548.                1. Gosh, @Player, I didn't know you cared.
  4549.  
  4550.  
  4551.           6.   Is_locked
  4552.  
  4553.           Syntax:   <object>  is [not] locked
  4554.  
  4555.                If {
  4556.                  Bear  is not locked
  4557.                } Then {
  4558.                  change  Player's  Health  -2
  4559.                } Message  1 Total  Switched: ON
  4560.                1.   Boy these bears get mean when you chain 'em up don't
  4561.                     they?
  4562.  
  4563.  
  4564.  
  4565.           72
  4566.  
  4567.  
  4568.  
  4569.  
  4570.  
  4571.  
  4572.  
  4573.           Figment User's Guide                             The Story Editor
  4574.  
  4575.           7.   Is_open
  4576.  
  4577.           Syntax:   <object>  is [not] open
  4578.  
  4579.  
  4580.           8.   Is_type
  4581.  
  4582.           Syntax:  <Stuff>  is [not] <user type label>
  4583.                    <Scene>           <type attribute>
  4584.                    <Pronoun>         <sub type attribute>
  4585.  
  4586.                If {
  4587.                  Player  is  user type Lawyer
  4588.                }...
  4589.  
  4590.           The type and sub-type attributes are provided for completeness. 
  4591.           There is no crying need for them, but they might be useful
  4592.           testing pronouns.
  4593.  
  4594.  
  4595.           9.   Is_wizard
  4596.  
  4597.           Syntax:   <Player>  is [not] wizard
  4598.  
  4599.                If {
  4600.                  Player  is wizard
  4601.                } Then {
  4602.                  unlock  Door
  4603.                  open  Door
  4604.                } Message  1 Total  Switched: ON
  4605.                1.   The Shaman knows a Wizard when he sees one
  4606.                     and steps aside holding the door for you.
  4607.  
  4608.  
  4609.           10.  Probable_Event
  4610.  
  4611.           Syntax:   <value>%  [not] Probable Event
  4612.  
  4613.           This conditional function will generate a random action of your
  4614.           designation.  The rule would look like:
  4615.  
  4616.                While {
  4617.                  15%  Probable Event
  4618.                } Then {
  4619.                  go_to_map_block  7 Over the Cliff
  4620.                } Messages  1 Total  Switched: ON  Current Msg: 1
  4621.                1 A capricious wind blows you off the cliff.
  4622.  
  4623.           The percentage you specify determines the probability, hence the
  4624.           name Probable Event.  In this case, the player has a 15%
  4625.  
  4626.                                                                          73
  4627.  
  4628.  
  4629.  
  4630.  
  4631.  
  4632.  
  4633.  
  4634.           The Story Editor                             Figment User's Guide
  4635.  
  4636.           probability of getting blown off the cliff each time the rule is
  4637.           checked.
  4638.  
  4639.           You may negate the function.  Something that is 85% not probable
  4640.           is 15% probable.  You can also just change the percentage and
  4641.           achieve the same effect.
  4642.  
  4643.           This rule will drive you bats during debugging or demonstrating
  4644.           your story even if you specify the starting seed for the random
  4645.           number generator.  You may have to switch the rule off manually
  4646.           in the editor.
  4647.  
  4648.  
  4649.           11.  Say_cmnd (User-Defined Command Parser)
  4650.  
  4651.           Syntax:   Player  does [not] say cmnd
  4652.  
  4653.           This is the User-Defined Command Parser.  It is only used in Pre-
  4654.           Command rules.  The function uses the first message in the rule
  4655.           as a specification of word groups and the Boolean operations that
  4656.           should be performed to form a sentence from the word groups. 
  4657.           Punctuation should not be used.  Differences in upper or lower
  4658.           case letters is ignored.  Rule messages can be up to 2K bytes,
  4659.           but command sentences cannot exceed 80 characters.
  4660.  
  4661.           Example:
  4662.  
  4663.                If {
  4664.                  Actor  does say cmnd
  4665.                  <other conditions go here>
  4666.                } Then {
  4667.                  unlock  door
  4668.                  open  door
  4669.                  copy msg to  Door's  Long Desc.
  4670.                  inc_msg
  4671.                  copy msg to  Door's  Brief Desc.
  4672.                } Message  1 Total  Switched: On  Current Msg: 2
  4673.                1. (Abracadabra or Shazam or Hocus Pocus)
  4674.                2. With a rumbling groan, the mighty stone door swings open.
  4675.                3. The door stands open before you.
  4676.  
  4677.           A simple example like this could probably be solved with
  4678.           synonyms, but not as well.  Synonyms are global and act as extra
  4679.           handles for grabbing built-in functions.  In this case if
  4680.           synonyms were used, people would be using magic words to open
  4681.           doors, windows, boxes,... everything.  User-defined commands can
  4682.           be local to specific situations within a scene so that you can
  4683.           write unique rules.
  4684.  
  4685.  
  4686.  
  4687.           74
  4688.  
  4689.  
  4690.  
  4691.  
  4692.  
  4693.  
  4694.  
  4695.           Figment User's Guide                             The Story Editor
  4696.  
  4697.           Only the first message is tested.  The remainder are left for
  4698.           your use.  This makes this rule form unique in that you probably
  4699.           want to leave the message pointer set to the second message and
  4700.           not, as is usual, pointing to the first message.  If you left the
  4701.           rule pointing to message number one, the effect would be as
  4702.           though the command phrase were being echoed back to the player.
  4703.  
  4704.           More discussion on Synonyms and the User-Defined Command Parser
  4705.           can be found in Part III.
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.                                                                          75
  4749.  
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.           The Story Editor                             Figment User's Guide
  4757.  
  4758.           O.   Executional Function Reference
  4759.  
  4760.           The executional functions are used in the second part of the
  4761.           rule.  You can see these functions when you scroll them in the
  4762.           editor.
  4763.  
  4764.  
  4765.           1.   Assign_User_Type
  4766.  
  4767.           Syntax:  Assign <label>  to <stuff>
  4768.                                       <scene>
  4769.                                       <pronoun>
  4770.  
  4771.           Adds the user-defined object type label to the object if the
  4772.           object does not already have the label.  See also "Remove User
  4773.           Type".
  4774.  
  4775.  
  4776.           2.   Change
  4777.  
  4778.           Syntax:   Change <object>'s  <attribute>  <value>
  4779.  
  4780.           Changes an object's attribute by the specified value.  If the
  4781.           value is negative, this is equivalent to subtracting the value. 
  4782.  
  4783.           Attributes are signed 8 bit quantities, meaning they can hold
  4784.           numbers from -128 to +127.  Normally in computer math if you add
  4785.           too much to a positive integer, you "overflow" and get a negative
  4786.           number.  That is, 126 + 2 = -128 in 8 bit integer math.  Figment
  4787.           prevents overflow; it just stops when it reaches the limit so
  4788.           with the change function, 126 + 2 = 127.
  4789.  
  4790.                While {
  4791.                  Player  is linked to  Pharoah's Curse
  4792.                } Then {
  4793.                  Change  Player's  Health  -2
  4794.                } Messages  Switched: ON  Current Msg: 1
  4795.                1.  You feel your life force gradually slip from you.
  4796.  
  4797.  
  4798.           3.   Change User-Attribute
  4799.  
  4800.           Syntax:  Change  <object>'s  <Type 1 Attribute>  <value>
  4801.                            <pronoun>   <Type 2 Attribute>
  4802.                                        <Type 3 Attribute>
  4803.  
  4804.           Used to specify a value to add to the object's specified
  4805.           attribute value.  If the object does not have the attribute, the
  4806.           attribute is added to the object and set to the value.  The value
  4807.           can be positive or negative.
  4808.  
  4809.           76
  4810.  
  4811.  
  4812.  
  4813.  
  4814.  
  4815.  
  4816.  
  4817.           Figment User's Guide                             The Story Editor
  4818.  
  4819.  
  4820.           Attribute values are signed 8-bit integers meaning they can vary
  4821.           from -128 to +127.  This function does not permit overflow.  If
  4822.           you add 5 to 124 for example, the result will be 127.
  4823.  
  4824.  
  4825.           4.   Change_score
  4826.  
  4827.           Syntax:   Change_score  <value>
  4828.  
  4829.           Changes the player's score by the amount specified.  Values can
  4830.           be positive or negative.
  4831.  
  4832.  
  4833.           5.   Close
  4834.  
  4835.           Syntax:   Close <object>
  4836.  
  4837.           Set the object's "open" attribute flag to read "CLOSED".  The
  4838.           open, close, lock and unlock functions are more powerful in the
  4839.           rules than they are for the player during play.  The player can
  4840.           only perform these operations on objects whose sub-type attribute
  4841.           is set to "Container", and only when the object's permission flag
  4842.           lets them.  The story designer, however, can perform these
  4843.           operations on any object.  This, in effect, reserves this flag
  4844.           partially for private use.
  4845.  
  4846.  
  4847.           6.   Copy_Msg_To
  4848.  
  4849.           Syntax:
  4850.             Copy msg to  <character>'s view of  <object>'s  Long Desc.
  4851.                                                 <pronoun>   Brief Desc.
  4852.                                                             Exam. Msg.
  4853.  
  4854.           This function copies the rule's current message to the specified
  4855.           viewpoint of an object.  The old object text is lost.  The
  4856.           message is also printed to the Command Window unless the rule
  4857.           specifies that printing is switched off.
  4858.  
  4859.           If the message you are copying is of zero length, it will
  4860.           effectively erase the destination string.
  4861.  
  4862.           When editing this function, set the destination object's name
  4863.           first.  The system will then scroll the legal viewpoints for that
  4864.           object.  Since many objects have only the default, Player,
  4865.           viewpoint, the viewpoint scrolling will often be frozen at
  4866.           "Player's view".
  4867.  
  4868.  
  4869.  
  4870.                                                                          77
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.           The Story Editor                             Figment User's Guide
  4879.  
  4880.           Copy_msg_to is commonly used in conjunction with repetitive rules
  4881.           (While and For) and the Inc_msg function to create message
  4882.           progressions:
  4883.  
  4884.                For 1 to 4 by 1 {
  4885.                  <some conditions>
  4886.                } Then {
  4887.                  copy msg to Player's view of <object_name>'s  Long Desc.
  4888.                  inc_msg
  4889.                } Message  4 Total  Switched: OFF  Current Msg: 1
  4890.                <4 messages specified>
  4891.  
  4892.           In the example above, the rule type "While" could be used instead
  4893.           of the "For" type, because Inc_msg stops at the last message so
  4894.           the message progression stops harmlessly.  Of course a "While"
  4895.           could not be substituted for the "For" if the  statement were
  4896.           changed to "For 2 to 8 by 2 {...", which slows the progression
  4897.           down to every other count.
  4898.  
  4899.  
  4900.           7.   Go_to_Map_Block
  4901.  
  4902.           Syntax: go to Map Block  <Map Block>
  4903.  
  4904.           This executional function will change scenes from within a rule
  4905.           base.  When a rule fires and this function is encountered, the
  4906.           scene will change to the new scene as specified from the Story
  4907.           Map block number.
  4908.  
  4909.           Assume the pre-command rule base for a given scene includes the
  4910.           following rule:
  4911.  
  4912.                While {
  4913.                  Player  does eat  Magic Cookie
  4914.                } Then {
  4915.                  Go_to_map_block  3 Thru Looking Glass
  4916.                } ...
  4917.  
  4918.           This function behaves differently than other executional
  4919.           functions.  Normally an executional function just executes
  4920.           immediately.  However, changing scenes also means the rule base
  4921.           will change so a jump to a new scene in the middle of processing
  4922.           the rule base would also jump you to the middle of another rule
  4923.           base.  Not good.  Moreover, we want all the other rules to have
  4924.           their chance to vote on the action as they do with all commands.
  4925.  
  4926.           Therefore, this function is designed to wait until the pre- and
  4927.           post-command rule bases are completed before jumping to the
  4928.           specified scene.
  4929.  
  4930.  
  4931.           78
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.           Figment User's Guide                             The Story Editor
  4940.  
  4941.           If you use this function in a pre-command rule as in the example
  4942.           above, you can control it with the "Enable" switch.  If you
  4943.           disable the function, the post command processing is not
  4944.           performed and the jump to the new scene is also not performed. 
  4945.           Other pre-command rules can also be testing for the "eat"
  4946.           command, and they in turn might disable the "eat" command and
  4947.           thereby inhibit the jump.
  4948.  
  4949.           If there are multiple rules checking for a command, you will
  4950.           probably want this rule to be a "While" rule.  Otherwise, it will
  4951.           expire, but Figment will not jump to this scene, when other rules
  4952.           block the command.  When the player's actions eventually satisfy
  4953.           the various rules involved, the "while" rule can still fire and
  4954.           trigger the jump to the new scene.
  4955.  
  4956.           When used in a post-command rule, Figment will allow the post-
  4957.           command rule base to complete before changing scenes.  Then, it
  4958.           changes scene and cycles through the post-command rule base for
  4959.           the new scene.  This method preserves the appearance of a "go"
  4960.           command.
  4961.  
  4962.           Notice that you are specifying map blocks, not scene object
  4963.           names.  If you are using a complex map (see the User's Guide for
  4964.           a discussion of complex maps), you will get the correct map block
  4965.           that you want.
  4966.  
  4967.  
  4968.           8.   Inc_moves
  4969.  
  4970.           Syntax:   Inc_moves
  4971.  
  4972.           Used to increment the move count when your rule disables the
  4973.           player's command and you do not want to give the player a free
  4974.           move.  It increments one move at a time, but you can use it
  4975.           several times in the same executional clause.
  4976.  
  4977.  
  4978.           9.   Inc_msg
  4979.  
  4980.           Syntax:   Inc_msg
  4981.  
  4982.           Increment the rule's message pointer one message after the
  4983.           message has been displayed on the command line or copied to an
  4984.           object (see also Copy_Msg_to).  Rules can have a total of up to
  4985.           16 messages, but usually less.  Inc_msg will never exceed the
  4986.           existing total.  If Inc_msg were to execute five times while the
  4987.           message total was set to 2, the second message would appear four
  4988.           times.
  4989.  
  4990.  
  4991.  
  4992.                                                                          79
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.           The Story Editor                             Figment User's Guide
  5001.  
  5002.                For 1 to 5 Step 1 {
  5003.                  <scene> is_linked_to  Stage Coach
  5004.                } Then
  5005.                  inc_msg
  5006.                } Message 5 Total  Switched: ON  Current Msg: 1
  5007.                1.  You see a cloud of dust on the horizon.
  5008.                2.  Hmm.  It's the Wells Fargo Express.
  5009.                3.   You pull your bandanna over your face and check your
  5010.                     pistol.
  5011.                4.  Thundering hooves drown out your pounding heartbeat.
  5012.                5.  You race from hiding and rob the stage.
  5013.  
  5014.  
  5015.           10.  Kill
  5016.  
  5017.           Syntax: Kill <character>
  5018.  
  5019.           Usually used by the Story Designer to terminate the player and
  5020.           hence the story when the player attempts a conspicuously bad
  5021.           action.  It can also be used to defeat the conflict "escape
  5022.           clause" (see also is_dead).
  5023.  
  5024.  
  5025.           11.  Link_to
  5026.  
  5027.           Syntax:  Link  <object>  to  <object>  by <link_type> [<value>]
  5028.                          <pronoun>     <pronoun>
  5029.  
  5030.           Adds a reference to the second object in the first object's link
  5031.           list.  The Link function creates a link of the specified type and
  5032.           sets the value to the specified value.  Example:
  5033.  
  5034.                ...} Then {
  5035.                  Link  Romeo  to Juliet  by Romance  12
  5036.                }...
  5037.  
  5038.           You cannot make duplicate links with this function.  If the link
  5039.           of the specified type already exists, the expression value is
  5040.           merely added to the existing link value.
  5041.  
  5042.           Links are one-way in Figment.  The Juliet-object now shows a link
  5043.           reference to the Romeo-object.  If the feeling is mutual then add
  5044.           another expression for the opposite link.  Otherwise, this is
  5045.           unrequited love, but who actually loves whom?  That all depends
  5046.           on what messages you print when you test the links.  You can
  5047.           write the text either way.
  5048.  
  5049.  
  5050.  
  5051.  
  5052.  
  5053.           80
  5054.  
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.           Figment User's Guide                             The Story Editor
  5062.  
  5063.           12.  Lock
  5064.  
  5065.           Syntax:   Lock <object>
  5066.  
  5067.  
  5068.           13.  Msg_to_name
  5069.  
  5070.           Syntax:   Msg_to_name    <object>
  5071.  
  5072.           Copies the rule's current message to the object's name thereby
  5073.           renaming the object.  This is fully legitimate and often done. 
  5074.           Since Figment is designed to reference the current object name at
  5075.           all times, your rules using the old name are automatically
  5076.           switched to the new name so they function as intended.
  5077.  
  5078.  
  5079.           14.  On_skill
  5080.  
  5081.           Syntax:   On_skill
  5082.  
  5083.           The on_skill function sets the rule's message pointer according
  5084.           to the Player's current skill level.  There are 5 skill levels
  5085.           and 16 possible messages.  Thus the first message is used for the
  5086.           first (novice) skill level, and the second message for the second
  5087.           level, etc.  You are not required to specify a message for each
  5088.           level.  The message pointer then stops at the highest message
  5089.           specified.  For example the following rule generates one message
  5090.           for novices and a more informative message for more experienced
  5091.           players:
  5092.  
  5093.                If {
  5094.                  Passage Door  is_locked
  5095.                } Then {
  5096.                  on_skill
  5097.                } Message 2 Total   Switched: ON  Current Msg: 1
  5098.                1. The sign reads: "Forbidden Zone".
  5099.                2. The sign reads: "Forbidden Zone", but you don't
  5100.                   believe everything you read do you?
  5101.  
  5102.           This function is special in that it must appear first on the list
  5103.           of executional functions for the rule, otherwise, it will be
  5104.           ignored.
  5105.  
  5106.  
  5107.  
  5108.  
  5109.  
  5110.  
  5111.  
  5112.  
  5113.  
  5114.                                                                          81
  5115.  
  5116.  
  5117.  
  5118.  
  5119.  
  5120.  
  5121.  
  5122.           The Story Editor                             Figment User's Guide
  5123.  
  5124.  
  5125.           15.  Open
  5126.  
  5127.           Syntax:   Open <object>
  5128.  
  5129.           Set the object's "Open" attribute to read "OPEN".  This function
  5130.           does not concern itself with the status of the object's lock
  5131.           flag.
  5132.  
  5133.  
  5134.           16.  Remove_User_Type
  5135.  
  5136.           Syntax:  Remove  user type <label>  from <object>
  5137.                                                    <pronoun>
  5138.  
  5139.           See also "Add User Type".
  5140.  
  5141.  
  5142.           17.  Take_from
  5143.  
  5144.           Syntax:   Take  <object>  from  <object>
  5145.  
  5146.           Removes a link entry in the second object's link list that refers
  5147.           to the first object.  If the object is not linked to some other
  5148.           object, it is out of play until another rule links it to
  5149.           something.
  5150.  
  5151.                If {
  5152.                  <test conditions here>
  5153.                } Then {
  5154.                  take  Royal Jewels  from  Player
  5155.                  link  Royal Jewels  to  <scene_name>
  5156.                } ...
  5157.  
  5158.           The above example is equivalent to the command "drop" except the
  5159.           player does not give the command.  Since no message is given, the
  5160.           player might not even be aware that it happened, although the
  5161.           object's description will now appear in the scene description.
  5162.  
  5163.  
  5164.           18.  Toggle_lock
  5165.  
  5166.           Syntax:   Toggle_lock    <object>
  5167.  
  5168.           Changes the object's lock attribute flag from ON to OFF or from
  5169.           OFF to ON.  See also "lock" and "unlock".  Also ignores the lock-
  5170.           enable flag.
  5171.  
  5172.  
  5173.  
  5174.  
  5175.           82
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183.           Figment User's Guide                             The Story Editor
  5184.  
  5185.  
  5186.           19.  Toggle_open
  5187.  
  5188.           Syntax:   Toggle_open    <object>
  5189.  
  5190.           Changes the object's "open" attribute flag to OPEN from CLOSED or
  5191.           from CLOSED to OPEN.  Also ignore the open-able flag.  See also
  5192.           the executional functions close and open.
  5193.  
  5194.  
  5195.           20.  Unlock
  5196.  
  5197.           Syntax:   Unlock    <object>
  5198.  
  5199.           Changes the object's lock attribute flag to OFF.
  5200.  
  5201.           See also the executional functions lock and toggle_lock.
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.  
  5211.  
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.  
  5219.  
  5220.  
  5221.  
  5222.  
  5223.  
  5224.  
  5225.  
  5226.  
  5227.  
  5228.  
  5229.  
  5230.  
  5231.  
  5232.  
  5233.  
  5234.  
  5235.  
  5236.                                                                          83
  5237.  
  5238.  
  5239.  
  5240.  
  5241.  
  5242.  
  5243.  
  5244.           The Story Editor                             Figment User's Guide
  5245.  
  5246.           P.   Player Maps
  5247.  
  5248.           Figment uses the Story Map to track scenes and the directions
  5249.           from those scenes to other scenes.  The Player is assigned a
  5250.           similar map to track map knowledge acquired as a result of play. 
  5251.           The Player Map tracks the scenes that the player has visited and
  5252.           the directions used from those scenes.
  5253.  
  5254.           Initially, the player has a very limited knowledge of the Story
  5255.           Map.  Only the starting scene is known at the start of play (but
  5256.           the author can specify more).  When the player moves to a
  5257.           different scene, the player's knowledge of the new scene is added
  5258.           to the Player Map.  The player only acquires the direction
  5259.           knowledge that he or she has actually used.  That is to say, just
  5260.           because you have visited a scene, does not mean that you know all
  5261.           the possible exits from that scene.
  5262.  
  5263.           The "go" command during playback can refer to places (scenes) by
  5264.           name and Figment will compute the path to the scene from the
  5265.           Player Map.  Similarly the "find" command computes a path to a
  5266.           scene that has the object the Player wants to find.
  5267.  
  5268.           Often, you want to give the Player foreknowledge of places and
  5269.           things.  For example a story about a haunted house would probably
  5270.           speak of the public rooms: living room, dining room, front hall,
  5271.           et cetera so you want people to refer to them naturally by name
  5272.           as in "go to the Living Room" or "find the coffee table".  On the
  5273.           other hand, you do not have to tell them about the secret
  5274.           passageway in the library.
  5275.  
  5276.           The Story Designer can edit the Player Map to provide any amount
  5277.           of environmental knowledge as required.  Editing the Player Map
  5278.           is similar to editing the Story Map, but the Player Map can never
  5279.           be more than the Story Map.  You are not really constructing a
  5280.           map when you are editing the Player Map.  You are specifying
  5281.           values as "on" or "off" meaning the player knows or does not know
  5282.           this scene or direction.
  5283.  
  5284.           The Player Map screen editor is accessed from the Top Level
  5285.           Editor.  It is the screen following the Story Map.  You move the
  5286.           cursor in the same manner as with the Story Map, but the values
  5287.           that scroll are restricted to only those contained in the Story
  5288.           Map.  Thus when you set a value in the Player Map you are saying
  5289.           that the player knows this scene or a direction from this scene
  5290.           in the Story Map.
  5291.  
  5292.           You cannot add or delete blocks from the Player Map.  You are
  5293.           restricted to the same blocks as defined by the Story Map.  You
  5294.           turn them off or on by moving the cursor to the appropriate
  5295.  
  5296.  
  5297.           84
  5298.  
  5299.  
  5300.  
  5301.  
  5302.  
  5303.  
  5304.  
  5305.           Figment User's Guide                             The Story Editor
  5306.  
  5307.           location and scrolling up or down with the up-arrow or down-
  5308.           arrow keys.
  5309.  
  5310.           You cannot edit the directions from a scene until you specify the
  5311.           scene in the map block title.  (The Player cannot know the exits
  5312.           from a scene until the scene is known).  If you turn "off" the
  5313.           scene in the block title, any directions you have specified are
  5314.           also turned off.
  5315.  
  5316.           If you want the Player Map to be equivalent to the Story Map, you
  5317.           can dump the Story Map to disk with F3, change the screen to the
  5318.           Player Map and read the map data into the Player Map with F2. 
  5319.           This is a handy technique since it is often easier to say what
  5320.           you don't want than it is to say what you do want.
  5321.  
  5322.           It is a good idea to compare the Story Map with the Player Map
  5323.           you are making.  This is easy to do.  Go to the Top-Level Editor
  5324.           and switch between the two screens while studying one block at a
  5325.           time.  You will notice entire blocks or exits from blocks that
  5326.           you will want to specify.
  5327.  
  5328.  
  5329.           Q.   Synonym Editing
  5330.  
  5331.           Figment allows you to specify synonyms for both functions and
  5332.           objects.  A synonym simply allows you to substitute any phrase
  5333.           consisting of any number of words for a Figment command or an
  5334.           object name in the story.  It allows you for example to say:
  5335.  
  5336.                >cut the rope  or
  5337.                >pick up the rock
  5338.  
  5339.           instead of:
  5340.  
  5341.                >unlock the rope    or
  5342.                >take the rock
  5343.  
  5344.           In the examples above, you would still write rules that test for
  5345.           the "unlock" and "take" functions.  Rules will never refer to
  5346.           synonyms.  "Cut" is not actually a command.
  5347.  
  5348.           Synonyms take a lot of the frustration out of stories, and their
  5349.           use is encouraged.
  5350.  
  5351.           Synonym editing is simple and straightforward.  We'll skip the
  5352.           navigation discussion.  New synonyms are created by hitting the
  5353.           "+" key and they are deleted with the "Delete" key.  The text is
  5354.           typed in or edited.
  5355.  
  5356.  
  5357.  
  5358.                                                                          85
  5359.  
  5360.  
  5361.  
  5362.  
  5363.  
  5364.  
  5365.  
  5366.           The Story Editor                             Figment User's Guide
  5367.  
  5368.           Synonyms form a part of your story file.  They also can be dumped
  5369.           separately so that you can move them into new stories.  You will
  5370.           want to do this.  If you get used to saying "look" for "examine"
  5371.           you will quickly notice its absence in your new story.
  5372.  
  5373.  
  5374.           R.   Parameter Editing Screen 
  5375.  
  5376.           This screen editor includes two separate editors: the Parameter
  5377.           Editor and the Status Editor.  From the Top Level Editor, Page-
  5378.           Down.  The cursor lands on the title "Parameters".  You can
  5379.           advance the cursor to the "Status Editor" to access that editor.
  5380.           There is also an indicator panel to tell you how full your story
  5381.           is to aid your planning.
  5382.  
  5383.  
  5384.           1.   Parameter Editor
  5385.  
  5386.           Parameter editing allows you to change some fundamental story
  5387.           parameters.  By now you should understand the editing process
  5388.           enough that we can dispense with discussions of page-down and
  5389.           arrow keys and simply focus on the parameters themselves.
  5390.  
  5391.  
  5392.           a.   The Title
  5393.  
  5394.           The title is a text string that you provide.  You may use this to
  5395.           include your copyright statement if you like.  The title with its
  5396.           copyright statement is written to the save file and fulfills the
  5397.           requirement of the copyright laws for embedding your copyright
  5398.           statement in the data files.  It is also displayed each time the
  5399.           story is retrieved, also in compliance with the requirements of
  5400.           copyright law.  Most texts on copyrights say it is good practice
  5401.           to make a copyright statement early in the development process. 
  5402.           You never know if you might want to publish it.
  5403.  
  5404.           The title message is allocated its own screen at the start of the
  5405.           story.  If you define a title message, Figment will pause after
  5406.           printing it and print the message: "Strike any key to continue." 
  5407.           The intention is that you will define a title with perhaps a
  5408.           copyright statement, an abstract or introduction, licensing
  5409.           information, etc.
  5410.  
  5411.           The user's name is also requested in the title message processing
  5412.           whenever you include the word "@Get_User" in the title.  You can
  5413.           do this at the start of the title, and echo it back later in the
  5414.           message with "@Full_name".  The name is parsed into the @User[]
  5415.           names, and the Player name is set to @User[0], the user's first
  5416.           name.
  5417.  
  5418.  
  5419.           86
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.           Figment User's Guide                             The Story Editor
  5428.  
  5429.           Usually during development, you do not want to be bothered with
  5430.           user name processing so you omit the keyword "@Get_User" from
  5431.           your title.  Later when you want to distribute your story, you
  5432.           replace the keyword. 
  5433.  
  5434.           b.   Exit Message
  5435.  
  5436.           The "Exit Message" string will be printed whenever the player
  5437.           quits or is killed.  The copy_msg_to executional function can
  5438.           copy rule messages to the exit message so that you can maintain
  5439.           it during the course of your story.
  5440.  
  5441.           c.   Password
  5442.  
  5443.           You can assign an optional password to your story that will
  5444.           prohibit people from editing your story.  When this string is
  5445.           defined, Figment will prompt you for the password before it
  5446.           switches to editing mode with the F1 key.
  5447.  
  5448.           d.   Default Player Name
  5449.  
  5450.           This name is assigned to the Player object during start-up.  It
  5451.           is used regardless of what name has been left assigned to the
  5452.           Player object during play or editing.  This eliminates the need
  5453.           to set this with rules during start-up.
  5454.  
  5455.           e.   Moves and Score
  5456.  
  5457.           The move count and the score can be adjusted here.  The Shift-F3
  5458.           function automatically zeroes them before saving the data.  You
  5459.           can adjust the move count and score in order to modify the skill
  5460.           level (displayed here for convenience) for debugging skill-
  5461.           dependent sequences.  The Move counter must be greater than zero
  5462.           in order for the skill level to change (guards against divide-
  5463.           by-zero error).
  5464.  
  5465.  
  5466.           f.   Recuperation Parameters
  5467.  
  5468.           "Recup-int" means "recuperation interval".  When the Player's
  5469.           health is low, Figment restores the Player's health slowly over
  5470.           time to represent a healing process.  Increasing this interval
  5471.           slows the recuperation process while decreasing it speeds it up.
  5472.  
  5473.  
  5474.           g.   Food parameters
  5475.  
  5476.           "Food-cnt" tracks the current food point status.  This value
  5477.           increases as the player consumes food and decreases one point at
  5478.           a time in an interval specified by "Food-dec-int".  Setting a
  5479.  
  5480.                                                                          87
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.           The Story Editor                             Figment User's Guide
  5489.  
  5490.           high food count and a large interval will effectively eliminate
  5491.           food concerns from your story if you would rather not bother with
  5492.           it.  Going the other way will have your player consuming
  5493.           everything in sight in a desperate attempt to stay alive.
  5494.  
  5495.           Figment begins warning you when the food count is getting low.  
  5496.           "Food-msg-int" specifies the interval between these messages. 
  5497.           The appropriate size would be:
  5498.  
  5499.                initial-food-count * food-dec-int / 5 = food-msg-int
  5500.  
  5501.           You can always specify other values which makes Figment more or
  5502.           less of a food nag.
  5503.  
  5504.           h.   Brief Enable Switch
  5505.  
  5506.           The processing of brief messages can be disabled by setting this
  5507.           switch.  This greatly eases story development and reduces the
  5508.           data file size.  The default mode is "Disabled".  When you want
  5509.           to add brief messages to your story, change the switch to
  5510.           "Enabled".
  5511.  
  5512.           When brief-mode processing is disabled, Figment uses the Long
  5513.           Description message always.  When Brief is enabled, Figment uses
  5514.           the brief message when one is defined, otherwise no description
  5515.           of the object is printed.  Remember that brief mode descriptions
  5516.           are used only when you return to a scene you have been in before.
  5517.  
  5518.  
  5519.           2.   Status Editing
  5520.  
  5521.           The status banner displayed at the top of the screen during
  5522.           playback can be modified to display the parameters and attributes
  5523.           you want to use.  
  5524.  
  5525.           The status banner is composed of active elements that report the
  5526.           various parameters as formatted text.  The various text pieces
  5527.           are strung together as a single line of text.  Hit the "+" key to
  5528.           add a new element.  Hit the "Delete" key to remove an element.
  5529.  
  5530.           Scroll the parameters using the up- and down-arrow keys.  Hit the
  5531.           Home key to access a different data type.  The data types are
  5532.           arranged as follows:
  5533.  
  5534.                Story Parameters: Score, Moves, Current Scene Name, Log Name
  5535.                Actor's System Attributes: Skill, Strength, Health, etc.
  5536.                Actor's Category I User Defined Attributes
  5537.                Actor's Category II User Defined Attributes
  5538.                Actor's Category III User Defined Attributes
  5539.  
  5540.  
  5541.           88
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.  
  5549.           Figment User's Guide                             The Story Editor
  5550.  
  5551.           Repeated strikes of the Home key will cycle the data types from
  5552.           Story Parameters through the System Attributes and on through the
  5553.           various User-Defined Attributes.
  5554.  
  5555.           S.   Help Messages and User Type Editing
  5556.  
  5557.           These two editors are combined on one screen.  Move the cursor
  5558.           over the desired editor and hit page-down.
  5559.  
  5560.           1.   Help Message Editor
  5561.  
  5562.           Every map block has a help message string.  You can edit them
  5563.           here.  If there are more blocks than lines, just keep hitting
  5564.           page-down and they will begin to scroll until you find the one
  5565.           you want.  Edit the text in the normal manner with the typing
  5566.           buffer or the full-screen editor.
  5567.  
  5568.           During play, the copy_msg_to function in your rules can copy new
  5569.           messages to the help message.  This allows you to create context-
  5570.           sensitive help.
  5571.  
  5572.           Usually the help message is more instructive as opposed to the
  5573.           examination messages which might be descriptive.
  5574.  
  5575.           2.   User Type Label Editing
  5576.  
  5577.           User type labels for objects are text strings that you create to
  5578.           describe things.  They might be character types: "Cleric",
  5579.           "Warrior", "Thief", or they might be object types: "Car", "Boat",
  5580.           "Plane" or anything else you can think of.  You might also
  5581.           categorize scenes: "Chase Scene", "Death Scene", "Romantic
  5582.           Interlude", etc.
  5583.  
  5584.           You can add and delete labels with "+" and "Delete" keys.  
  5585.  
  5586.           Labels can be as many characters long as you like, but we often
  5587.           can only print the first 10-16 characters so brevity helps. 
  5588.           Don't make duplicate labels.
  5589.  
  5590.           When you delete a label, Figment checks for references to that
  5591.           label in other data structures.  Object type labels are used in
  5592.           objects and rule expressions ("is_user_typ" and "assign").  If
  5593.           some data structure uses this label, Figment reports it and
  5594.           stops.  You must remove this reference by going to that data
  5595.           structure and deleting the reference before you can delete the
  5596.           label.  There are probably more references like this one so you
  5597.           will want to check for them before returning to delete the label.
  5598.  
  5599.           When there are no references to a label, it is easy to delete it. 
  5600.  
  5601.  
  5602.                                                                          89
  5603.  
  5604.  
  5605.  
  5606.  
  5607.  
  5608.  
  5609.  
  5610.           The Story Editor                             Figment User's Guide
  5611.  
  5612.           It is much easier to rename a label.  Just type a new name for
  5613.           the label.  All references to the label will reflect the new
  5614.           name.  Figment really does not know what your labels mean, it
  5615.           only knows that deleting them can destroy a lot of other work so
  5616.           it checks before deleting.
  5617.  
  5618.           This process is deliberately similar to that for the Link Types
  5619.           and the User Defined Attributes so once you get the knack, the
  5620.           others follow neatly.
  5621.  
  5622.  
  5623.           T.   Link and Attribute Type Definitions
  5624.  
  5625.           A separate editing screen is used to specify the link types and
  5626.           attribute types.  The method of editing is sufficiently similar
  5627.           that we can discuss them together.  The process is very similar
  5628.           to that for User-defined object types.  As before, Link and
  5629.           attribute types are merely text labels that you create to
  5630.           identify a link or attribute you want to use.
  5631.  
  5632.           The labels you make can be as long as you like, but screen space
  5633.           limitations mean we can often only display 10-16 characters
  5634.           depending on where they are used.  Abbreviations are fully
  5635.           legitimate.  Use them as needed.
  5636.  
  5637.           Do not duplicate link labels.  User Attributes can duplicate if
  5638.           the duplicate labels are in separate categories.  For example,
  5639.           "strength" might be a physical, psychological or spiritual
  5640.           attribute for a character.  If you felt that way, then you would
  5641.           list strength separately in each category.
  5642.  
  5643.           You can delete link types and user attributes.  As with object
  5644.           types, Figment reports the first conflict it finds and stops. 
  5645.           Delete the reference, and you can come back and delete the label. 
  5646.           Link labels are used in objects and rule expressions ("is_linked"
  5647.           and "link").  Attribute labels are used in objects, rule
  5648.           expressions, and profiles.
  5649.  
  5650.           You cannot delete link type "Generic".
  5651.  
  5652.           The editing keys work in the by-now-familiar manner.  "+",
  5653.           Delete, Page-Up, Page-down keys perform as they always do.  The
  5654.           ESC key is a rapid exit to the next highest level.
  5655.  
  5656.  
  5657.           U.   Profiles
  5658.  
  5659.           Profiles are a weighted decision matrix applied to an object's
  5660.           user attributes.  They allow you to list attributes and apply
  5661.           weight factors to arrive at scores.  The resulting scores can
  5662.  
  5663.           90
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.           Figment User's Guide                             The Story Editor
  5672.  
  5673.           return TRUE/FALSE values if they are above or below the cutoff
  5674.           criteria.
  5675.  
  5676.           For example, assume you want to determine if Romeo and Juliet are
  5677.           lovers.  You might write the following rule:
  5678.  
  5679.                If {
  5680.                  Romeo  does fit profile of  Juliet's Lover
  5681.                  Juliet  does fit profile of  Romeo's Lover
  5682.                  <other conditional expressions>
  5683.                } Then {
  5684.                  Link  Romeo  to Juliet  by Romance  Value 20
  5685.                  Link  Juliet  to Romeo  by Romance  Value 20
  5686.                } ...<sound of violins and waves crashing on beach>
  5687.  
  5688.           More information on profiles can be had in the User's Guide for
  5689.           Registered users.
  5690.  
  5691.  
  5692.           V.   Standard Messages and Text Variables
  5693.  
  5694.           Standard messages can be used as "text variables" to create
  5695.           specially-adaptable messages.
  5696.  
  5697.           Text is used in several places:
  5698.  
  5699.                object descriptions
  5700.                object examination messages
  5701.                command responses (from rules firing)
  5702.  
  5703.           Wherever text is written, the user can include the special text
  5704.           symbol: "@Msg: nnn", where nnn means some number, three decimal
  5705.           digits or less.  Figment will remove this symbol during
  5706.           processing and insert the message as specified by the number. 
  5707.           (see @-Words)
  5708.  
  5709.           A separate editing screen is provided where the developer can
  5710.           write these standard messages.  Their only identifier is their
  5711.           number so they are referred to as Standard Message 1, Standard
  5712.           Message 2, etc. to differentiate them from rule messages.
  5713.  
  5714.           By themselves, Standard Messages can simplify development and
  5715.           maintenance.  Where a line of text is used frequently, the
  5716.           developer can write it once and use it repeatedly.  Maintenance
  5717.           is thereby simplified too, because only one instance must be
  5718.           corrected.
  5719.  
  5720.           Further, you can create text composed only of standard messages. 
  5721.           You can write rules that copy their messages to the standard
  5722.           messages.  The result is that the standard messages function like
  5723.  
  5724.                                                                          91
  5725.  
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.           The Story Editor                             Figment User's Guide
  5733.  
  5734.           text variables to form a larger body of text that changes as
  5735.           different rules fire.
  5736.  
  5737.           When you are using Standard Messages as Text Variables, the
  5738.           message can look odd, because it is often just a scrap of text. 
  5739.           A standard message might read:
  5740.  
  5741.                12. and it has the old text I don't want anymore.
  5742.  
  5743.           Then the object's examination message can include a reference to
  5744.           Message 12 among the text that it reports:
  5745.  
  5746.                "This is the object's examination message, @Msg: 12"
  5747.  
  5748.           making the examination message read:
  5749.  
  5750.                "This is the object's examination message, and it has the
  5751.                old text I don't want anymore."
  5752.  
  5753.  
  5754.  
  5755.  
  5756.  
  5757.  
  5758.  
  5759.  
  5760.  
  5761.  
  5762.  
  5763.  
  5764.  
  5765.  
  5766.  
  5767.  
  5768.  
  5769.  
  5770.  
  5771.  
  5772.  
  5773.  
  5774.  
  5775.  
  5776.  
  5777.  
  5778.  
  5779.  
  5780.  
  5781.  
  5782.  
  5783.  
  5784.  
  5785.           92
  5786.  
  5787.  
  5788.  
  5789.  
  5790.  
  5791.  
  5792.  
  5793.           Figment User's Guide                             The Story Editor
  5794.  
  5795.  
  5796.           A rule might then say:
  5797.  
  5798.                If {
  5799.                 <something>
  5800.                } Then {
  5801.                  copy msg to  Standard Message 12
  5802.                } Messages 1 Total  Switched: ON  Current Msg: 1
  5803.                1. and it has the new text I want to see.
  5804.  
  5805.           When the rule fires, the examination string now reads:
  5806.  
  5807.                This is the object's examination message, and it has the new
  5808.                text I want to see.
  5809.  
  5810.           Of course text can be composed only of Standard Messages:
  5811.  
  5812.                "@Msg: 5  @Msg: 2  @Msg: 9"
  5813.  
  5814.                or if you want paragraph breaks in the report:
  5815.  
  5816.                "@Msg: 5
  5817.  
  5818.                @Msg: 2
  5819.  
  5820.                @Msg: 9"
  5821.  
  5822.           The result is a unique string composed of standard messages which
  5823.           can be changed as rules fire and copy their messages to the
  5824.           Standard Messages.  It is probably difficult to make a reasonable
  5825.           body of text if you are trying to manipulate a composition made
  5826.           from more than a few messages.  Complexity rises rapidly here.
  5827.  
  5828.  
  5829.           1.   Editing Standard Messages
  5830.  
  5831.           Editing the messages is easy.  The '+' key adds new messages.
  5832.  
  5833.           Deleting standard messages can cause headaches.  If you delete
  5834.           Message #2, for example, Message #3 becomes #2.  If your text
  5835.           refers to Message #2, it will get a different message than was
  5836.           originally intended.  This reference has to be edited manually by
  5837.           changing the text.  Not fun, especially if there are 30 messages
  5838.           after #2.  Consider just blanking the message instead.  You can
  5839.           use it later if you need another standard message.
  5840.  
  5841.  
  5842.  
  5843.  
  5844.  
  5845.  
  5846.                                                                          93
  5847.  
  5848.  
  5849.  
  5850.  
  5851.  
  5852.  
  5853.  
  5854.           The Story Editor                             Figment User's Guide
  5855.  
  5856.           W.   Full-Screen Text Editor
  5857.  
  5858.           The full-screen editor implements a limited sub-set of text
  5859.           processing commands available on full-function word processors. 
  5860.           It is designed so that it can be invoked seamlessly from the
  5861.           typing buffer since most story messages start small and grow
  5862.           suddenly when inspiration strikes.
  5863.  
  5864.           To invoke the text editor, simply hit F6 at any time while typing
  5865.           text anywhere in the Story Editor.  The screen erases and the
  5866.           text you began to type and the text it was replacing are put into
  5867.           the editing buffer and displayed on the editing screen.
  5868.  
  5869.           The cursor keys now behave like word processing keys:
  5870.                Left- or Right-Arrow moves the cursor one character.
  5871.  
  5872.                Up- or Down-Arrow moves the cursor one row.
  5873.                Home moves cursor to start of row.
  5874.  
  5875.                End moves cursor to end of row.
  5876.                Page-Up moves cursor to start of buffer.
  5877.  
  5878.                Page-Down moves cursor to end of buffer.
  5879.                Ctrl-Left- or Ctrl-Right-Arrow moves cursor one word.
  5880.  
  5881.                Ctrl-end deletes text from current cursor position to the
  5882.                end of the current row.
  5883.                Delete deletes one character in front of cursor.
  5884.  
  5885.                Backspace deletes one character behind cursor.
  5886.                Escape exits the editor.
  5887.  
  5888.                CTRL-X exits editor, but discards the changes returning the
  5889.                original string unchanged.  Use this when you goof.
  5890.  
  5891.           Just type text as you would in any word processor.  When you are
  5892.           through, simply hit Escape.  The screen erases, and you find
  5893.           yourself back in the Story Editor with your cursor pointing to
  5894.           your new text string.
  5895.  
  5896.           The editing buffer is limited to 25 lines of 80 characters. 
  5897.           (When we say it's a full-screen editor, we mean it - ONE full
  5898.           screen.)
  5899.  
  5900.           See also the discussion on hard and soft returns in section
  5901.           I.A.2. titled "Editing Text" earlier in this document.
  5902.  
  5903.  
  5904.  
  5905.  
  5906.  
  5907.           94
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.           Figment User's Guide                             The Story Editor
  5916.  
  5917.           Tabs are not implemented in the editor since their results would
  5918.           be unpredictable during playback as messages are combined in
  5919.           different ways.
  5920.  
  5921.  
  5922.           X.   File Management
  5923.  
  5924.           Playback quickly alters the data you so carefully edited so good
  5925.           file management skills are important to protect your work. 
  5926.           Figment can produce a great many file types that may seem
  5927.           confusing at first.  This section discusses these various files
  5928.           so you can manage them properly.
  5929.  
  5930.  
  5931.           1.   File Naming Conventions
  5932.  
  5933.           When you start a story, default file names are constructed from
  5934.           the story name and some standard file extensions.  Other
  5935.           utilities like logging and scripting also produce files with
  5936.           special name extensions.  You can recognize the type of file by
  5937.           its extension.  These extensions are:
  5938.  
  5939.                .sdf - story data file
  5940.                .sav - saved data file
  5941.                .bak - last saved file
  5942.                .lst - listing or script output
  5943.                .log - log file
  5944.  
  5945.           Of these, the files you really want to archive are the Story Data
  5946.           File and the text form of your log file if you have one.  The
  5947.           rest can be periodically purged from your disk.  The DOS batch
  5948.           file, "purge.bat" is provided for that purpose.  Edit this batch
  5949.           file to suit your needs, but rename it so it will not be
  5950.           clobbered by the old purge batch file when you upgrade.
  5951.  
  5952.           You should recognize the story file by now since it is the file
  5953.           that you read in at the start of the session.  The save file is
  5954.           the file you write with the "save" command in the Presentation
  5955.           Environment or the Shift-F3 key in the editor.  Figment cannot
  5956.           write a story data file (".sdf").  It can only write a save file
  5957.           (".sav").  In this way, the story data file is protected and
  5958.           never over-written.  It preserves the data in the form you want
  5959.           it for startup.  To make a story data file, simply rename a save
  5960.           file using the DOS command, "rename":
  5961.  
  5962.                rename demo.sav demo.sdf
  5963.  
  5964.           Another way is to copy the data:
  5965.  
  5966.                copy demo.sav demo.sdf
  5967.  
  5968.                                                                          95
  5969.  
  5970.  
  5971.  
  5972.  
  5973.  
  5974.  
  5975.  
  5976.           The Story Editor                             Figment User's Guide
  5977.  
  5978.  
  5979.           You might do this at the end of an editing session so that the
  5980.           story data file is ready for the start of the next session.
  5981.  
  5982.           The save file represents work in progress.  It is good practice
  5983.           to keep it separate from the story data file until you have had a
  5984.           chance to test it out and build confidence that it is doing what
  5985.           you want.  When you are satisfied with it, you can rename it to a
  5986.           story data file.  Some people like to copy it to a working name
  5987.           so they can start figment with that name, otherwise you must use
  5988.           "restore" after starting to get your working version loaded.
  5989.  
  5990.                copy demo.sav temp.sdf
  5991.                figment temp
  5992.  
  5993.           Later, you can rename or copy the working copy back to the
  5994.           intended name:
  5995.  
  5996.                rename temp.sav demo.sdf
  5997.  
  5998.           The best way to get started is to copy our demo file so you can
  5999.           begin creating your own files for practice.
  6000.  
  6001.                copy demo.sdf <new_name>.sdf
  6002.  
  6003.           Then start Figment with that name:
  6004.  
  6005.                figment <new_name>
  6006.  
  6007.           You can start a completely new story by making up a new name that
  6008.           does not exist on your disk.  Use that name to start Figment:
  6009.  
  6010.                figment zilch
  6011.  
  6012.           Figment finds no file named "zilch.sdf" so it starts without it. 
  6013.           You arrive in Figment staring at a very dull story.  You then
  6014.           enter the editor and begin creating your data.  When you save
  6015.           your data, you have a new file called "zilch.sav"
  6016.  
  6017.  
  6018.           2.   Read-all, Write-all
  6019.  
  6020.           Shift-F2 and Shift-F3 are the primary read-write tools for
  6021.           developers.  These are similar to "save" and "restore" in the
  6022.           playback environment, but there is one important difference. 
  6023.           Shift-F3 is designed to prepare the save file for use as a story
  6024.           data file (.sdf file).  This means it will set important data to
  6025.           the values they should have at the start of the story.  For
  6026.           example, the move count and the score should be set to zero.  The
  6027.           scene should be set to the first scene in the map, et cetera.
  6028.  
  6029.           96
  6030.  
  6031.  
  6032.  
  6033.  
  6034.  
  6035.  
  6036.  
  6037.           Figment User's Guide                             The Story Editor
  6038.  
  6039.  
  6040.           The process sounds good on paper, but recognize the limitations. 
  6041.           Figment cannot tell what the Player's health should be for
  6042.           example or any of many attributes and associations.  Figment does
  6043.           warn you before editing if you have been playing your story so
  6044.           you should have retrieved your file from disk before editing.
  6045.  
  6046.           The Shift-F3 function really expects that you will be developing
  6047.           with a log file to play the story through a standard set of
  6048.           commands as you work to debug your story.  Without this log file,
  6049.           the Shift-F3 function's automatic reset will certainly aggravate
  6050.           you.  If you did not want the automatic reset, you could hit F1
  6051.           to return to the playback environment and then say "save".  This
  6052.           would save the data without the automatic reset.
  6053.  
  6054.           Except in rare instances, the "save" command is not recommended
  6055.           for developers.  Use Shift-F2 instead.
  6056.  
  6057.           The "restore" command and the Shift-F2 function are the same.
  6058.  
  6059.  
  6060.           3.   Data Backups and Version Numbering
  6061.  
  6062.           After you quit Figment, you may want to make backup copies of the
  6063.           files you made on a separate diskette.  Use the DOS COPY or XCOPY
  6064.           command to do this.
  6065.  
  6066.           At the least, you will want the ".sdf" file, but you may want any
  6067.           others you have been making, for example logs.  The following
  6068.           command will copy all the files for a story from the current
  6069.           directory to a diskette in drive B.
  6070.  
  6071.                copy <story name>.* b:\*.*
  6072.  
  6073.           You can, if you like, rename the files at this time and thereby
  6074.           create version numbers:
  6075.  
  6076.                copy story.* b:\story2.*
  6077.  
  6078.           The advantage, of course, is that you can go back and retrieve
  6079.           old versions should you discover some disastrous consequence of
  6080.           your editing.
  6081.  
  6082.           As mentioned previously, the listing file produced for the rules
  6083.           is expendable.  You can see that if you do not delete it before
  6084.           copying the set, you will be proliferating obsolete listing
  6085.           files.  We recommend that you print any listings that you want,
  6086.           then delete "*.LST" before copying the data set.
  6087.  
  6088.  
  6089.  
  6090.                                                                          97
  6091.  
  6092.  
  6093.  
  6094.  
  6095.  
  6096.  
  6097.  
  6098.           The Story Editor                             Figment User's Guide
  6099.  
  6100.           The DOS batch file, "PURGE.BAT", will delete the data set files,
  6101.           the backup file and the listing file for a story.  It will not
  6102.           delete story data files, log files, nor save files.  It is a
  6103.           useful tool for cleaning up a disk or directory that is cluttered
  6104.           with obsolete files.  To use it, simply type "purge <story_name>"
  6105.           (where <story_name> means you type the name of the story) from
  6106.           the DOS command line prompt.
  6107.  
  6108.  
  6109.           4.   The Data Set Files
  6110.  
  6111.           The Data Set read/write functions (F2/F3) have largely been
  6112.           superseded by the restore/save functions (Shift-F2/Shift-F3) and
  6113.           so have most of their applications.  The Data Set files let you
  6114.           dump portions of your story so you can read them into a different
  6115.           story.  Yes, as a matter of fact, you can screw up your story
  6116.           using F2/F3 so they are not recommended for beginners or the
  6117.           faint of heart.  Information on the Data Set files can be found
  6118.           in the User's Guide for registered users.
  6119.  
  6120.  
  6121.           Y.   Deleting Objects
  6122.  
  6123.           As mentioned earlier, deleting objects is easy: advance the
  6124.           cursor over the object name and hit the "Delete" key.  The
  6125.           problem is the object references, and it is similar to handling
  6126.           the "(Not Found)" problem.
  6127.  
  6128.           Figment inserts a reference to a dummy object named "(Deleted)"
  6129.           wherever there is a reference to an object you are trying to
  6130.           delete.  When all references have been replaced, it safely
  6131.           deletes the object.  Figment cannot resolve what to do with these
  6132.           references so it does not try.  It simply leaves this dummy in
  6133.           place for you to correct at your leisure.  There are many places
  6134.           this object might be referenced:
  6135.  
  6136.                Link lists in other objects
  6137.                Rules
  6138.                Story and Player Maps
  6139.  
  6140.           Deleting one object can make many references to the "(Deleted)"
  6141.           object.  Deleting several objects at once simply makes more
  6142.           references and it can make it hard for you to figure out the
  6143.           right correction.  Maybe you want to delete one object at a time.
  6144.  
  6145.           Note when deleting scenes that this does not remove rule bases. 
  6146.           The map block that referred to this scene is simply titled
  6147.           "(Deleted)".  Only when you delete this map block in the map
  6148.           editor will the rule base for that map block be lost.  You may
  6149.           play your story with the map still referring to deleted scenes. 
  6150.  
  6151.           98
  6152.  
  6153.  
  6154.  
  6155.  
  6156.  
  6157.  
  6158.  
  6159.           Figment User's Guide                             The Story Editor
  6160.  
  6161.           When you arrive in a deleted scene, Figment politely reports,
  6162.           "This scene has been deleted."  This should be your cue to fix
  6163.           your map.
  6164.  
  6165.           You can leave these references to "(Deleted)" in place, play your
  6166.           story and fix them when found.  The sky has not fallen and panic
  6167.           is not required.  You can even write and read the story to/from
  6168.           disk.  The reference to "(Deleted)" stays with you until you are
  6169.           ready to fix the reference.  It is simply a civilized reminder
  6170.           that you have some editing to do.  As with all edits you will
  6171.           want to write the repaired data to disk when done.  
  6172.  
  6173.           Recognize that if you are deleting an object just to replace it
  6174.           with a different object, then you should not delete the object at
  6175.           all.  You should rename it.
  6176.  
  6177.  
  6178.           Z.   Debugging Tips
  6179.  
  6180.           By now, it should be clear that the data in the editor reflects
  6181.           the current state of the story when you entered the editor.  This
  6182.           means that the editor functions well as a debugger because it can
  6183.           display any data at will.  Coupled with a log file and its pause,
  6184.           interrupt and single-stepping features, this is a powerful
  6185.           debugging technique.
  6186.  
  6187.           This section gives you advice for what to look for in the editor
  6188.           when you have a problem with your story.  Once you have
  6189.           identified the problem, read in the data from disk to reset the
  6190.           data to the starting condition, fix the problem, then file the
  6191.           data back out and go back to the Presentation Environment to try
  6192.           your fix.
  6193.  
  6194.           If you are not getting the messages in the description you
  6195.           expected, check the scene object and the objects in the scene. 
  6196.           If the messages are there, but not displaying, check the
  6197.           attributes.  If the attributes are wrong, the object might be
  6198.           ignored.  If the attributes are right, look at the scene object
  6199.           to see if the offending object is linked in to the scene.  Most
  6200.           likely this problem occurs with new objects when you forget to
  6201.           set the attributes or link it into the scene.
  6202.  
  6203.           If you are not getting messages you expect from rules, you can
  6204.           have several problems:
  6205.  
  6206.                Check to see if the message has switched off.
  6207.  
  6208.                Check the rule type.  Is it an "If" rule that has switched
  6209.                off when it should have been a "While" rule that would stay
  6210.                on?   
  6211.  
  6212.                                                                          99
  6213.  
  6214.  
  6215.  
  6216.  
  6217.  
  6218.  
  6219.  
  6220.           The Story Editor                             Figment User's Guide
  6221.  
  6222.  
  6223.                Do the conditions hold true?
  6224.  
  6225.                If the rule conditions require links between objects, do
  6226.                those links exist?
  6227.  
  6228.                Is the message pointer displaying the wrong message
  6229.                currently in the editor?
  6230.  
  6231.                Did you leave the message print switch set wrong?
  6232.  
  6233.                Did you omit an "inc_msg" step in the executionals?
  6234.  
  6235.                Check Pre-command rules to see if you forgot to set the
  6236.                enable/disable switch.
  6237.  
  6238.                Check the order of rules.  Does a rule that should establish
  6239.                the conditions for this rule come after this rule?  Change
  6240.                the order.
  6241.  
  6242.                If you have been deleting objects or juggling data files,
  6243.                look for a reference to "Deleted" or "Not Found".
  6244.  
  6245.  
  6246.  
  6247.  
  6248.  
  6249.  
  6250.  
  6251.  
  6252.  
  6253.  
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.  
  6267.  
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.           100
  6274.  
  6275.  
  6276.  
  6277.  
  6278.  
  6279.  
  6280.  
  6281.           Figment User's Guide                                 Story Design
  6282.  
  6283.           Part III. Story Design
  6284.  
  6285.           So far we have discussed what Figment is, how it works, and its
  6286.           commands and procedures.  This section discusses some of the
  6287.           finer points of story design that are not immediately obvious
  6288.           from the mechanical descriptions so far.
  6289.  
  6290.  
  6291.           A.   Skill Level
  6292.  
  6293.           You need not worry about the skill level in the early stages of
  6294.           your story design.  This is an embellishment that comes later in
  6295.           the evolution of your story.  Once your story has developed a
  6296.           structure and you can point to key milestones in the play, then
  6297.           you can award points with "change_score" when the player
  6298.           completes certain tasks.
  6299.  
  6300.           Skill can be considered a measure of the player's efficiency.  If
  6301.           the player achieves point awards (that you the story designer
  6302.           give the player) greater than or equal to the number of moves,
  6303.           then the highest skill level is achieved.  There are five levels:
  6304.           Novice, Average, Pro, Expert, and Wizard.
  6305.  
  6306.           A player's health grows slowly over time to a level limited by
  6307.           the player's skill.  Since health points are the "fuel" for
  6308.           battle, player's with greater skill can start from a greater
  6309.           advantage.  This is a minor point, however.
  6310.  
  6311.           Similarly, the maximum food-count that a player can achieve is
  6312.           also a function of skill.  Thus excessive food is wasted on
  6313.           novices, while wizards get more mileage from their food.  Maybe
  6314.           they are in better training.  
  6315.  
  6316.           A good rule of thumb might be to award a number of score points
  6317.           with "change_score" equal to the minimum number of moves required
  6318.           to complete a scene.  (Actually, you will have to award a few
  6319.           extra points for round-off.)  This strategy makes it
  6320.           theoretically possible to attain Wizard status although it will
  6321.           be practically impossible.
  6322.  
  6323.           See also the discussion on strategic weapons later in this
  6324.           section since they are the only thing that absolutely requires
  6325.           skill.
  6326.  
  6327.  
  6328.           B.   Examine Strings
  6329.  
  6330.           Examination strings are a useful way for providing necessary
  6331.           clues so that play can proceed.  The "on_skill" function was
  6332.           specifically intended so you can pass clues at an appropriate
  6333.  
  6334.                                                                         101
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.  
  6341.  
  6342.           Story Design                                 Figment User's Guide
  6343.  
  6344.           level of difficulty based on the player's skill.  You might
  6345.           choose to reveal more information to highly skilled players as a
  6346.           reward for earning their high status.  On the other hand, you
  6347.           might take pity on beginners.  In practice, you might do some of
  6348.           both at different times in the story.
  6349.  
  6350.           Examine strings are also used to write victory messages in
  6351.           conflicts.  See also "Conflict Conclusions" later in this
  6352.           section.
  6353.  
  6354.  
  6355.           C.   Health Points
  6356.  
  6357.           As mentioned your health suffers in conflicts.  It also suffers
  6358.           from hunger.  When the player's health is low, Figment begins a
  6359.           recuperation process by gradually incrementing the player's
  6360.           health until it reaches limits according to the player's skill.
  6361.           Depending on how you have composed your scene, you may have to
  6362.           speed this process up.  
  6363.  
  6364.           You can manipulate this directly with executional functions in
  6365.           rules by concocting some literary device ("You discover a healing
  6366.           potion") and award extra health points with the "change_health"
  6367.           function.  This can also back-fire ("Sorry, this must have been a
  6368.           bad batch.").
  6369.  
  6370.           Potions and food, when consumed, add their health attributes as
  6371.           well.  You can sprinkle them throughout your story, but you
  6372.           cannot dictate when the player will actually consume them. 
  6373.           Players can be understandably gun-shy about them since they can
  6374.           also backfire on them with negative attributes.  See the
  6375.           discussions on potions and food later in this section.
  6376.  
  6377.           You can also control the rate of recuperation for the story in
  6378.           the parameter editor.  Fast-paced stories with many fight
  6379.           sequences may require faster recovery.  Increasing the
  6380.           recuperation rate increases the probability that the player will
  6381.           escape defeat in conflicts.  See also the escape clause
  6382.           description under "Conflicts" in this section.
  6383.  
  6384.  
  6385.           D.   Strength
  6386.  
  6387.           A player's strength can grow steadily to the maximum (+127) value
  6388.           after sufficient conflicts if you do not create some pitfalls to
  6389.           reduce it.  For a while, you can compensate for this with more
  6390.           potent bad guys, but eventually, you may have to prune the
  6391.           player's strength level.  Poor health of course reduces the
  6392.           player's strength automatically.
  6393.  
  6394.  
  6395.           102
  6396.  
  6397.  
  6398.  
  6399.  
  6400.  
  6401.  
  6402.  
  6403.           Figment User's Guide                                 Story Design
  6404.  
  6405.           Similar thoughts apply to magic.  There are no automatic
  6406.           reductions for magic so you must apply your own.
  6407.  
  6408.  
  6409.           E.   Conflicts
  6410.  
  6411.           In order to start a conflict (Hex or Fight) the opponent must
  6412.           have some health points, otherwise you immediately defeat your
  6413.           opponent.  If this happens, it probably means the story designer
  6414.           did not intend for you to engage this character in conflict.  As
  6415.           a story designer, perhaps you do not want to signal your
  6416.           intentions so clearly.  You may want to give all your characters
  6417.           some health points so they can put up some kind of fight.
  6418.  
  6419.           Note that you are not required to give your characters any
  6420.           strength or magic points.  The player can engage these characters
  6421.           and quickly dispatch them.  They must have neither strength nor
  6422.           magic for this to occur (Otherwise, the character might deflect
  6423.           you.  Read on.).
  6424.  
  6425.           You do not grow by defeating wimpy characters without the
  6426.           necessary qualifications (magic or strength), but you get a point
  6427.           award as though this were a good thing to do.  In fact, you might
  6428.           be eliminating someone who could help you solve a puzzle, in
  6429.           which case you won a small consolation, but lost in the end.
  6430.  
  6431.           An opponent who has only magic, but no strength will deflect you
  6432.           if you attempt to fight the character.  Similarly, you will also
  6433.           be deflected if you attempt to hex a character who has only
  6434.           strength and no magic.  In this way, you are coerced into the
  6435.           correct form of conflict.  Characters can have both strength and
  6436.           magic, in which case you can either fight or hex them, but not
  6437.           both since they (or sadly, you) will be eliminated by one
  6438.           conflict or the other.
  6439.  
  6440.           Although you are locked into a fight to its conclusion, the story
  6441.           still proceeds as you fight.  That is to say that each wager
  6442.           counts as a move and the post-command rule base is still
  6443.           processed with each move.  This means that other actions can
  6444.           still transpire while you are engaged in battle.  Consider using
  6445.           "hit" and "charm" when characters gang up on you.  At least then
  6446.           you might be able to retreat.
  6447.  
  6448.           Perhaps we should not tell you, but there is one loophole out of
  6449.           conflicts.  The fight ends when you lose all your health, but
  6450.           Figment doles out health points when you are ill.  If the killing
  6451.           blow drops you to zero only, and if it happens to be that move
  6452.           when Figment gives you a health point, then you are out of the
  6453.           fight but miraculously saved.  We recommend you flee.  (Yes, this
  6454.           was a bug, but we liked it so much we made it a feature.)
  6455.  
  6456.                                                                         103
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.           Story Design                                 Figment User's Guide
  6465.  
  6466.  
  6467.  
  6468.           1.   Conflict Conclusions
  6469.  
  6470.           You may have noticed there are no gruesome remains after
  6471.           dispatching your opponents in battle.  (This is a family show.) 
  6472.           Figment's little minions quickly spirit away the remains leaving
  6473.           any objects the character possessed behind as booty.
  6474.  
  6475.           This can be used as another way to introduce new objects into
  6476.           play since objects that characters have are not known to the
  6477.           player unless you happen to write messages mentioning them.  Note
  6478.           that there is nothing to stop a player from taking these things
  6479.           directly from the character unless you write pre-command rules to
  6480.           prevent them.  Of course it is extremely difficult to take what
  6481.           you do not know is there, but this knowledge quickly comes with
  6482.           repeat plays.  (Skill from experience again.)
  6483.  
  6484.           When the conflict is over, Figment reports the examination
  6485.           message for the victor.  Thus if you want a clever message to
  6486.           appear at the end of the conflict, you write a Pre-Command rule
  6487.           that loads the examination messages for the character and the
  6488.           player.  Since any existing examination messages are probably not
  6489.           appropriate for the moment of victory, you will have to write a
  6490.           rule just to blank them so you may as well write some appropriate
  6491.           message.
  6492.  
  6493.           You can also use this rule to award points in advance in addition
  6494.           to the one that the player will get for winning.  If the player
  6495.           loses the battle, the score is irrelevant anyway so there is no
  6496.           harm in awarding extra points in advance.
  6497.  
  6498.  
  6499.           2.   Negative Attributes in Conflicts
  6500.  
  6501.           The editor prohibits negative attributes for all objects except
  6502.           those of type "Thing", but the Player's attributes can go
  6503.           negative as a result of consuming food and potions.  Since
  6504.           conflicts take the sum of the appropriate attributes in order to
  6505.           weight the outcome, a negative attribute can serve to handicap
  6506.           the Player.  There are two possibilities.  Consider them when
  6507.           debugging conflicts.
  6508.  
  6509.           One possibility is that the player's attributes themselves are
  6510.           less than one.  In which case, Figment will not allow the player
  6511.           to enter the conflict in the first place.
  6512.  
  6513.           The second possibility is that the player may be carrying objects
  6514.           with negative attributes.  Figment sums the attributes of the
  6515.  
  6516.  
  6517.           104
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.           Figment User's Guide                                 Story Design
  6526.  
  6527.           player's possessions to arrive at a value for weighting the
  6528.           results of the random number generator.
  6529.  
  6530.           Figment grants one small boon when dealing with negative
  6531.           attributes.  If the sum of the attributes is negative, Figment
  6532.           adds the minimum to the Player's attribute to allow the conflict
  6533.           to proceed.  In the extremely unlikely event that the player
  6534.           might win, the added attributes remain as a bonus even if the
  6535.           offending objects are later dropped.
  6536.  
  6537.           Whether or not the player succeeds as a result of this, depends
  6538.           entirely on the opposing character.  If the opposing character is
  6539.           weak, then the player stands a fair chance of winning.  This
  6540.           gives rise to an interesting situation: present two characters,
  6541.           one weak, one strong.  If the player fights the weak character
  6542.           first, then drops the handicap, it is possible that the player
  6543.           will then have sufficient strength or magic to defeat the strong
  6544.           character, but the player must choose which to fight first.
  6545.  
  6546.  
  6547.           F.   Links
  6548.  
  6549.           Links were originally very simple: A was linked to B, that was
  6550.           it.  Now links include types and values which makes them
  6551.           significantly more complex to develop and track during play.  Our
  6552.           advice to beginners is to ignore the link type and value until
  6553.           your work grows to a point that needs to distinguish the link
  6554.           type.  A plain, vanilla, generic link is all you need for most
  6555.           tasks.
  6556.  
  6557.           You can have links to as many as 32 objects, unless you have set
  6558.           the limit attribute to less.  Restricting links in this way
  6559.           causes certain effects.  For example, you may not want people to
  6560.           load a container too full.  Characters with low link limits will
  6561.           refuse things that are given to them.
  6562.  
  6563.           Figment will not let you exceed the link limit set for an object. 
  6564.           The most likely objects to exceed their limits are the player,
  6565.           any scene, and any container.  The commands "put", "take",
  6566.           "drop", and "give" are designed to insulate objects against
  6567.           exceeding their limits, but there is no guarantee you will like
  6568.           the way it is done.  For example, when you drop an object and
  6569.           exceed the scene's limit, you get the message "You drop the
  6570.           <object>...and it disappears!".  This is really a statement of
  6571.           last resort, because players tend to function like hyperactive
  6572.           pack rats grabbing everything that isn't nailed down and dumping
  6573.           them in some convenient scene.  Therefore setting a low link
  6574.           limit on a scene makes it a very inhospitable place for orphaned
  6575.           objects.
  6576.  
  6577.  
  6578.                                                                         105
  6579.  
  6580.  
  6581.  
  6582.  
  6583.  
  6584.  
  6585.  
  6586.           Story Design                                 Figment User's Guide
  6587.  
  6588.           The executional function, "link", cannot be so subtle.  If this
  6589.           function encounters a limit during play, it prints a nasty error
  6590.           message to the command line.  This message is really aimed at
  6591.           you, the developer, not the end user.  If you have designed your
  6592.           story and tested it well, you should not see this message during
  6593.           normal play.
  6594.  
  6595.           Avoid duplicate links.  They are fairly harmless, but you should
  6596.           avoid them anyway.  The second link would be ignored until the
  6597.           first one was removed.  The executional function, "link", will
  6598.           not make a duplicate link; it just changes the value when the
  6599.           intended link duplicates an existing link.
  6600.  
  6601.           There is nothing to say that an object cannot be linked into many
  6602.           different scenes.  Often, this might be a standard feature so
  6603.           there will not be any confusion if the player should attempt to
  6604.           take the object, but it does not have to be a feature.
  6605.  
  6606.           Containers greatly expand your capacity.  An object can be linked
  6607.           to 32 objects which in turn can be linked to 32 objects which in
  6608.           turn....well, there is almost no limit.  Thus if the player has a
  6609.           container, the container can have its own container, etc.  The
  6610.           player has to load these in sequence:
  6611.  
  6612.                >take ball
  6613.                >put ball in box
  6614.                  <repeat up to 31 more objects>
  6615.                >take box
  6616.                >put box in bag
  6617.                  <repeat up to 31 more objects>
  6618.                >take bag
  6619.  
  6620.           but at least it is possible to nest objects several levels down. 
  6621.           These nested objects would have to be unloaded in reverse order
  6622.           with the take-from command:
  6623.  
  6624.                >take box from bag
  6625.                >take ball from box
  6626.  
  6627.           See also the additional discussion on containers later in this
  6628.           section.
  6629.  
  6630.  
  6631.           G.   Controlling the Random Number Generator
  6632.  
  6633.           Figment's random number generator gives you the ability to
  6634.           control it so that you can predict its behavior for debugging or
  6635.           training purposes.
  6636.  
  6637.  
  6638.  
  6639.           106
  6640.  
  6641.  
  6642.  
  6643.  
  6644.  
  6645.  
  6646.  
  6647.           Figment User's Guide                                 Story Design
  6648.  
  6649.           Computer random number generators require an initial starting
  6650.           number called a seed.  Once this seed number is supplied, the
  6651.           routine can return an endless list of random numbers.  The
  6652.           sequence is random, but the seed is not, hence the term "Pseudo-
  6653.           random".  Indeed, for the same seed, you will get the same
  6654.           sequence.
  6655.  
  6656.           Figment supplies a new seed number each time you start so that
  6657.           the sequences will always be different.  This is probably what
  6658.           you want during playback, but it is certainly not what you want
  6659.           when you are debugging stories, for example with log files. 
  6660.           Therefore, Figment allows you to specify the seed when you start. 
  6661.           Thus the command from DOS:
  6662.  
  6663.                figment <story_name> <seed_number>
  6664.  
  6665.           will start Figment with the specified seed number.  The number is
  6666.           any integer between 0 and 32767.  The number you choose is not
  6667.           important.  So long as you use the same number every time, you
  6668.           will get consistent results when your log files encounter
  6669.           conflicts.
  6670.  
  6671.           This procedure is also useful for beginners and young players who
  6672.           want to simplify the conflicts.
  6673.  
  6674.  
  6675.           H.   Potions and the Drink Function 
  6676.  
  6677.           The drink function tests to see if the object sub-type attribute
  6678.           is set to "Potion".  If not, the command fails.
  6679.  
  6680.           When the player drinks a potion, the potion's strength, health,
  6681.           and magic attributes are added to those of the player.  This is a
  6682.           good place to use negative attributes.  Potions can be a mixture
  6683.           of some good qualities and some bad qualities.  For example, a
  6684.           potion that increases strength might reduce health.
  6685.  
  6686.           If the player does not have the potion, but the scene does, then
  6687.           Figment performs an automatic "take" command.  This take command
  6688.           is a fully legal take operation: any rules you have waiting for a
  6689.           take operation will fire, and anything that causes it to fail
  6690.           will cause the drink command to fail.  The move count is
  6691.           incremented twice if taking is required.  The post-command rules
  6692.           are also processed.
  6693.  
  6694.           A potion must be opened in order to be drunk.  If the potion is
  6695.           not open, Figment will not open it automatically.
  6696.  
  6697.           The potion's limit attribute indicates how many times the potion
  6698.           can be drunk.
  6699.  
  6700.                                                                         107
  6701.  
  6702.  
  6703.  
  6704.  
  6705.  
  6706.  
  6707.  
  6708.           Story Design                                 Figment User's Guide
  6709.  
  6710.  
  6711.  
  6712.           I.   Weighty Matters 
  6713.  
  6714.           The weight attribute is another way to limit the player's
  6715.           possessions besides the limit attribute.  It indicates how much
  6716.           the player can carry on the basis of weight, whereas the limit
  6717.           attribute indicates the quantity on the basis of count.  If the
  6718.           player wants to take an object, that object's weight attribute
  6719.           cannot exceed the player's weight attribute (less the sum of the
  6720.           weights for any objects that the player is already carrying).
  6721.  
  6722.           You are not required to specify an object's weight; it can be
  6723.           weightless.  This means you can ignore weight early in the story
  6724.           design and add it later to add another dimension to the story.
  6725.  
  6726.           Weight really only applies to objects of type "Thing" and varies
  6727.           from -127 to 127.  Objects with negative weights are, in effect,
  6728.           lighter than air.  Their negative value reduces the sum and allow
  6729.           the player to carry more weight:
  6730.  
  6731.                >take the helium balloon
  6732.                You feel lighter.
  6733.  
  6734.  
  6735.           J.   Size and Containers 
  6736.  
  6737.           The size attribute is used with containers in much the same way
  6738.           that the weight attribute limits the player object.  The size of
  6739.           an object to be added to a container cannot exceed the
  6740.           container's size as indicated by its size attribute (less the sum
  6741.           of the sizes of any objects already in the container).
  6742.  
  6743.           As with weight, you are not obliged to specify an objects's size. 
  6744.           The player never is concerned with an object's size, only its
  6745.           weight.
  6746.  
  6747.           Containers can be somewhat magical in the sense that you can
  6748.           place many objects in the container and then specify an arbitrary
  6749.           weight for the container (even zero weight if you like)
  6750.           completely independent of the object weights.  In addition,
  6751.           containers count as only one object so they greatly enlarge the
  6752.           player's carrying capacity.
  6753.  
  6754.           Size really only applies to objects of type "Thing" and varies
  6755.           from -127 to 127.  Objects with negative size, when added to a
  6756.           container, have the ability to fit more objects in the container
  6757.           than would be possible without them.
  6758.  
  6759.  
  6760.  
  6761.           108
  6762.  
  6763.  
  6764.  
  6765.  
  6766.  
  6767.  
  6768.  
  6769.           Figment User's Guide                                 Story Design
  6770.  
  6771.           K.   Waving the Flags 
  6772.  
  6773.           Figment now provides a number of different flags with controls on
  6774.           their use and functions designed to test them.  The Lock and Open
  6775.           flags seem obvious.  Actually, the lock flag can be used on many
  6776.           things as a general-purpose permission flag:
  6777.  
  6778.                > Take the cannonball.
  6779.                     No.
  6780.                > Take the cannonball.
  6781.                     It's heavy.
  6782.                > Take the cannonball.
  6783.                     You might hurt yourself.
  6784.                > Take the cannonball.
  6785.                     Oh, all right.
  6786.                     You take the cannonball.
  6787.  
  6788.           1.   Lock Flags and Lock-Enable Flags
  6789.  
  6790.           Technically speaking, any object can be locked, but when applied
  6791.           to story situations, it would not make much sense if the player
  6792.           went around locking and unlocking or opening and closing
  6793.           everything in sight.  (Which he or she could do, by the way, if
  6794.           the permission flags are not set.  The default permission is
  6795.           therefore "NO" which requires you to specify which objects the
  6796.           player can lock or open.)  Since most objects will have access to
  6797.           their flags denied to the player, their flags are available for
  6798.           use in your rules.
  6799.  
  6800.           We use the Lock flag often in our rules.  When the right
  6801.           conditions are met, we change the flag.  Many other events are
  6802.           testing this flag, and when it changes, it triggers these events. 
  6803.           You will see many rules in the Pre- and Post-command Rule Bases
  6804.           testing this flag.
  6805.  
  6806.           The executional functions, "Open" and "Close" are more powerful
  6807.           than the forms of these commands that the player uses.  Notably,
  6808.           the Open executional function does not test the Lock flag.  Hence
  6809.           objects can be opened or closed regardless of the status of their
  6810.           Lock flag.  This makes the Open flag a free switch for you to use
  6811.           just like the Lock flag, for example for characters to indicate
  6812.           they will take an object if you give it.
  6813.  
  6814.           2.   User-Defined Object Flags
  6815.  
  6816.           User-Defined Flags can be used as simple flags for general
  6817.           purpose use.  They can also get very complex as the following
  6818.           example shows.  Do not feel you have to make them complex if you
  6819.           do not want to.  Use them at whatever level you feel comfortable.
  6820.  
  6821.  
  6822.                                                                         109
  6823.  
  6824.  
  6825.  
  6826.  
  6827.  
  6828.  
  6829.  
  6830.           Story Design                                 Figment User's Guide
  6831.  
  6832.           Function for use in your rules are provided to access user flags. 
  6833.           This, along with their associated probability assignment is what
  6834.           gives them their power.  The conditional function "is_true" tests
  6835.           user flags, and the executional function "set" changes them:
  6836.  
  6837.                If {
  6838.                     User-flag 3  is true  on Jack
  6839.                } Then {
  6840.                     set  Bob's  user-flag 4  TRUE
  6841.                } etc.
  6842.  
  6843.           When some important event has occurred, you can test for it and
  6844.           set a flag on some object.  Many scenes later, you may need to
  6845.           know if that event occurred.  You can test that flag and know if
  6846.           the event occurred.
  6847.  
  6848.           The executional function "clear-usr-flags" can erase all flags on
  6849.           up to three objects:
  6850.  
  6851.                If {
  6852.                } Then {
  6853.                     clear user flags on  Jack  Bob  Elmer
  6854.                } etc.
  6855.  
  6856.           A set of four user-definable probability values is also provided
  6857.           for use with the higher-level functions that access the flags. 
  6858.           Currently, only the executional function "print_msg_choice" uses
  6859.           them.  The rest of this discussion is deferred to the registered
  6860.           user's manual.
  6861.  
  6862.  
  6863.           L.   Reading Scrolls 
  6864.  
  6865.           Scrolls just produce nice gibberish when they are read.  You
  6866.           disable this by writing a pre-command rule that tests for the
  6867.           read function and disables it so you can substitute your message
  6868.           when the appropriate conditions are met.
  6869.  
  6870.           Since scrolls are defined by a sub-type attribute, objects can be
  6871.           things, features, and even characters and still qualify as
  6872.           scrolls.  This means the player can read signs, inscriptions,
  6873.           monuments, documents etc.
  6874.  
  6875.  
  6876.           M.   Strategic Weapons 
  6877.  
  6878.           A strategic weapon is any weapon that functions at a distance. 
  6879.           More specifically, it is an object whose sub-type attribute is
  6880.           set to read "Strategic".  Their advantage should be obvious since
  6881.           they allow you to dispatch an opponent without risking a fight. 
  6882.  
  6883.           110
  6884.  
  6885.  
  6886.  
  6887.  
  6888.  
  6889.  
  6890.  
  6891.           Figment User's Guide                                 Story Design
  6892.  
  6893.           This luxury does not come free however.  You might be risking all
  6894.           since your shot is governed by a random process which could come
  6895.           up heavily against you.
  6896.  
  6897.           Strategic weapons come in two parts: the weapon itself and its
  6898.           ammunition.  You must have both objects in order to shoot the
  6899.           weapon.  Create both objects in the Stuff Editor and link the
  6900.           weapon to its ammunition.  The limit attribute for the ammunition
  6901.           object determines how many times the weapon can be fired.  It is
  6902.           decremented each time the weapon is fired.
  6903.  
  6904.           Actually, the ammunition is contrived to be an ammunition holder,
  6905.           for example:
  6906.  
  6907.                     Weapon    Ammunition Holder
  6908.                     gun  clip, magazine, or chamber
  6909.                     bow  quiver
  6910.                     phaser    battery pack or power cell
  6911.  
  6912.           When the ammunition runs out, Figment reports, "Your <ammunition
  6913.           holder> is empty."  The type attribute for strategics and
  6914.           ammunition should be "Thing".  The sub-type attribute should be
  6915.           "Strategic" for the weapon and "Goody" for the ammunition holder.
  6916.  
  6917.           The player's skill largely determines the outcome which means
  6918.           that the lowest two skill levels should not use strategics.  The
  6919.           best a Novice can do is avoid a self-inflicted injury.  An
  6920.           Amateur can do better but cannot succeed in killing an opponent
  6921.           so there is little reason to try.  The next three classes have a
  6922.           low, medium and high chance of success respectively.
  6923.  
  6924.           Strategics are a high risk weapon.  Any skill level can still
  6925.           score so lowly with a strategic weapon that he or she dies of a
  6926.           self-inflicted wound.  When the player scores high, however, the
  6927.           opponent is quickly dispatched.
  6928.  
  6929.           It must be said that some Wizards are better than other Wizards
  6930.           since it is an unlimited class, you just get more (or less)
  6931.           Wizardly.  Therefore, when it comes to strategics, there can
  6932.           still be some surprisingly inept Wizards out there (You know who
  6933.           you are).
  6934.  
  6935.           Figment has some generic result messages for strategics that it
  6936.           will use, but you can write your own, more specific messages in a
  6937.           pre-command rule.  Figment will look for an active rule testing
  6938.           for the shoot function and defer to the messages therein.  This
  6939.           rule must be a "While" rule.  (This is very important.  Otherwise
  6940.           it will switch itself off and be skipped.)  It would look
  6941.           something like this:
  6942.  
  6943.  
  6944.                                                                         111
  6945.  
  6946.  
  6947.  
  6948.  
  6949.  
  6950.  
  6951.  
  6952.           Story Design                                 Figment User's Guide
  6953.  
  6954.                     Switched: On  Command: Enabled
  6955.                While {
  6956.                  Player  does shoot  bow
  6957.                  ...other conditions...
  6958.                } Then {
  6959.                  No executional expressions
  6960.                } Message  5 Total  Switched: OFF  Current Msg: 1
  6961.                1  <Disaster>
  6962.                2  <Bad but surviving>
  6963.                3  <Still missed>
  6964.                4  <Wounded opponent>
  6965.                5  <Successful hit>
  6966.  
  6967.           This special rule in no way prohibits you from writing other pre-
  6968.           command rules that will prevent the player from shooting, but
  6969.           those rules should appear after this special rule in the sequence
  6970.           (curious, but true).  Figment will take the first "shoot" rule
  6971.           that it finds when it wants messages.
  6972.  
  6973.           Figment weights the results of the random number generator
  6974.           according to the Player's skill and grids the results on a scale
  6975.           of 1 to 5 with 1 being disastrous.  It then reports the nth.
  6976.           message from your rule or its generic message list.
  6977.  
  6978.           A result of one is disastrous.  The player's health is set to
  6979.           zero.  This will kill the player, but it is subject to the
  6980.           aforementioned escape clause (see "Conflicts" above) so the
  6981.           player might survive severely wounded.
  6982.  
  6983.           Results of two and three are simply misses and only cost a move
  6984.           and the ammunition.
  6985.  
  6986.           A result of four results in wounding the opponent.  The opposing
  6987.           object's health is decremented by the amount of the ammunition's
  6988.           strength.  Remember to specify the health for the opposing
  6989.           object, otherwise this score will be equivalent to a successful
  6990.           hit regardless of the ammunition's strength.  Consider also the
  6991.           effect of negative attributes for the ammunition's strength; the
  6992.           opponent would get healthier the more it was "wounded":
  6993.  
  6994.                "Ooh.  Now you've made him very, very mad."
  6995.  
  6996.           Five is a successful hit.  The opponent object will be stripped
  6997.           of its possessions and removed from the scene.  The player's
  6998.           score will be incremented one point.  You can write a post-
  6999.           command rule that tests for the absence of the opponent to
  7000.           deliver whooping congratulations and further increment the
  7001.           Player's score if you like.  If your story line hinges around the
  7002.           opponent's corpse you may rename the late lamented object and
  7003.           reintroduce it with this same rule.
  7004.  
  7005.           112
  7006.  
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.           Figment User's Guide                                 Story Design
  7014.  
  7015.  
  7016.           Although you do want to specify your ammunition's strength, there
  7017.           is no need to specify strength or magic attributes for the
  7018.           strategic weapon itself.
  7019.  
  7020.  
  7021.           N.   Food 
  7022.  
  7023.           As mentioned under parameter editing, you can control Figment's
  7024.           behavior regarding food.  Depending on your settings, your player
  7025.           may be satisfied for days between rations or they may be forced 
  7026.           into a feeding frenzy.
  7027.  
  7028.           You also set the food value for the food item by setting the
  7029.           object's limit attribute up to its maximum (32).  Thus some foods
  7030.           may satisfy your craving while others are empty.  (Didn't your
  7031.           mother tell you this?)  The player's maximum gain from a food
  7032.           item is limited by his or her skill at the time the item is
  7033.           consumed so novices should conserve their rations while newly-
  7034.           anointed wizards might want to reward themselves with a pause for
  7035.           refreshment.
  7036.  
  7037.           You may also fortify your food with Strength, Magic and Health
  7038.           attributes since these will be added to the Player's when the
  7039.           food is consumed.  Negative attributes are allowed here as with
  7040.           potions.
  7041.  
  7042.           Guard your food.  Figment can be a bit piggish at times.  Bon
  7043.           appetit.
  7044.  
  7045.  
  7046.           O.   Characters as Containers 
  7047.  
  7048.           Ordinarily, the player cannot tell when a character has an
  7049.           object, but if you set the character's sub-type attribute to
  7050.           "Container", Figment will report the container-character's
  7051.           contents when the character's Open flag is set to "Open".  You
  7052.           can then write rules that manipulate the flag and hence display
  7053.           or not display the character's possessions at your whim.
  7054.  
  7055.  
  7056.           P.   Rules and Changing Scenes 
  7057.  
  7058.           From the nature of rule base processing as it was defined, you
  7059.           should understand how the rule bases perform when changing
  7060.           scenes.  The last rule base to be processed when exiting a scene
  7061.           will be that scene's Pre-command Rule Base.  The change-scene
  7062.           command will execute and the Post-command rules for the new scene
  7063.           will be processed.
  7064.  
  7065.  
  7066.                                                                         113
  7067.  
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.           Story Design                                 Figment User's Guide
  7075.  
  7076.           If you write rules fashioned as "If" rules and place them in the
  7077.           new scene's Post-command rule base, they can fire when the player
  7078.           arrives in the scene.  These rules then serve to initialize the
  7079.           scene.  Of course, these rules only function one time since "If"
  7080.           rules expire so the effect is lost when players repeatedly enter
  7081.           the same scene.
  7082.  
  7083.  
  7084.           Q.   User-definable Command Parser
  7085.  
  7086.           The user-definable command parser allows virtually any command in
  7087.           play mode to trigger pre-command rules.
  7088.  
  7089.           The executable function, "say_cmnd" parses the command line
  7090.           according to a specification given in the first message of a pre-
  7091.           command rule.  It looks like this:
  7092.  
  7093.                If { 
  7094.                  Player  does say_cmnd   
  7095.                } Then { 
  7096.                  add_to  Consulting Room  Johnson 
  7097.                  copy msg to  Player's view of  Watson's  Long Desc.
  7098.                  change_score     1
  7099.                } Message  2 Total   Switched: OFF  Current Msg: 2
  7100.                1.   (send or show)(him or Johnson)(in or up) or thank you
  7101.                     mrs hudson 
  7102.                2.   Watson prepares to take notes. 
  7103.  
  7104.           The first message of the rule is a specification for acceptable
  7105.           words or phrases on a command line.  The remaining messages are
  7106.           available for other uses.  Let's see how the specification works. 
  7107.           Imagine the situation:
  7108.  
  7109.                Your faithful housekeeper Mrs. Hudson announces your
  7110.                visitor.  "There's a Mr. Johnson to see you, Mr.
  7111.                Holmes."
  7112.  
  7113.           Your reply might be:
  7114.  
  7115.                >show him in please
  7116.                or
  7117.                >send him up
  7118.                or
  7119.                >thank you mrs hudson
  7120.  
  7121.           The specification in the pre-command rule reads:
  7122.  
  7123.                (send or show)(him or Johnson)(in or up) or thank you
  7124.                mrs hudson 
  7125.  
  7126.  
  7127.           114
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.           Figment User's Guide                                 Story Design
  7136.  
  7137.           The parentheses "()" serve to "AND" phrases while the keyword "
  7138.           or " serves as the boolean "OR" operator.  This example specifies
  7139.           several acceptable combinations of words and/or phrases which we
  7140.           can group as follows:
  7141.  
  7142.                send      him       in
  7143.                show      Johnson   up
  7144.  
  7145.           It also allows the phrase:
  7146.  
  7147.                thank you Mrs Hudson
  7148.  
  7149.           This is something like choosing from a Chinese menu.  Choose one
  7150.           from column A, one from column B, etc.  According to this
  7151.           example, you must choose one from each column, because the
  7152.           parentheses indicate they have all been AND'd together.  This
  7153.           yields a number of legal statements that the player might give:
  7154.  
  7155.                send him in
  7156.                send Johnson in
  7157.                send him up
  7158.                send Johnson up
  7159.                show him in
  7160.                show Johnson in
  7161.                show him up
  7162.                show Johnson up
  7163.                thank you Mrs Hudson
  7164.  
  7165.           Of course if the player gives extra words, Figment will ignore
  7166.           them:
  7167.  
  7168.                >send him in please Mrs Hudson
  7169.  
  7170.           The player must give the full phrase in order to trigger the
  7171.           rule:
  7172.  
  7173.                >thank you
  7174.  
  7175.           is not enough unless you modify the specification to allow it:
  7176.  
  7177.                (send or show)(him or Johnson)(in or up) or thank you
  7178.                mrs hudson or thank you
  7179.  
  7180.           Another legitimate specification to achieve the same end is:
  7181.  
  7182.                (send or show)(him or Johnson)(in or up) or (thank you)
  7183.                (mrs hudson or )
  7184.  
  7185.           A rule like this can be placed in any pre-command rule base
  7186.           either global or local.  Presumably most will be local.
  7187.  
  7188.                                                                         115
  7189.  
  7190.  
  7191.  
  7192.  
  7193.  
  7194.  
  7195.  
  7196.           Story Design                                 Figment User's Guide
  7197.  
  7198.  
  7199.           The user-definable parser is deliberately tolerant.  It will
  7200.           accept the legal phrases in any order.  All that is required is
  7201.           to give the requisite number of phrases.  The specification:
  7202.  
  7203.                (send or show)(him or Johnson)(in or up) or thank you
  7204.                mrs hudson 
  7205.  
  7206.           will accept "him in send", but not "Mrs Hudson thank you" while
  7207.           the specification:
  7208.  
  7209.                (send or show)(him or Johnson)(in or up) or (thank you)
  7210.                (mrs hudson or)
  7211.  
  7212.           will accept "Mrs Hudson thank you".
  7213.  
  7214.           The user-definable command parser can be negated.  This has the
  7215.           effect of firing the rule until the player gives the desired
  7216.           command.  For example:
  7217.  
  7218.                While { 
  7219.                  Player  does not say_cmnd   
  7220.                  Consulting Room  is linked to  Mrs. Hudson 
  7221.                } Then { 
  7222.                  No Executional Expressions. 
  7223.                } Message  2 Total   Switched: ON  Current Msg: 2
  7224.                 1.  (send or show)(him or Johnson)(in or up) or thank you 
  7225.                     mrs hudson 
  7226.                 2.  Mrs. Hudson discreetly clears her throat. 
  7227.  
  7228.           The negated rule will fire until the player gives the specified
  7229.           command.  You may wish to write negated command rules as "If" or
  7230.           "For" rules instead of "While" rules so that they can switch off
  7231.           after a few tries.  Otherwise, they can be very frustrating.
  7232.  
  7233.           The user-parser has the third highest precedence after the
  7234.           system-level commands (restart, save, toggle, etc.) and the
  7235.           synonym processing so that you can use any word or phrase even if
  7236.           it is similar to Figment's built-in functions.  Phrases like
  7237.           "take off" and "drop dead" can be used without triggering error
  7238.           messages: "There's no off here" or "You don't have a dead". 
  7239.           Negated user-defined commands will not interfere with system
  7240.           level commands, because they have lower precedence.
  7241.  
  7242.           Note that punctuation must be avoided.  Punctuation has special
  7243.           meaning to the command parser.  The comma (,) means make a series
  7244.           operation as in "take bat, ball, glove".  Similarly, the period
  7245.           (.) means end the command or separate commands.  If the player
  7246.           gives the command:
  7247.  
  7248.  
  7249.           116
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.  
  7257.           Figment User's Guide                                 Story Design
  7258.  
  7259.                Thank you, Mrs. Hudson.
  7260.  
  7261.           Figment will interpret this as:
  7262.  
  7263.                Thank you ;"I don't understand the command `Thank'".
  7264.                Thank Mrs ;"I don't understand the command `Thank'".
  7265.                Hudson    ;"I don't understand the command `Hudson'".
  7266.  
  7267.           The player must simply ignore punctuation except where it is used
  7268.           to signal series operation or command termination.  Upper/lower
  7269.           case distinctions are of course ignored.
  7270.  
  7271.           There are words that will defeat your desired statement.  You
  7272.           will want to exclude any statement that uses them.  For example,
  7273.           the statement "send him in" would be defeated if the player used
  7274.           "do not" as in "do not send him in" or "don't".  The phrase
  7275.           "Thank you Mrs Hudson" would be defeated if the player said "No
  7276.           thank you Mrs Hudson".  You want to specify these negative words,
  7277.           and you can do that by enclosing them in square brackets "[]" as
  7278.           follows:
  7279.  
  7280.                [do not or dont](send or show)(him or Johnson)(in or up) 
  7281.                or [no](thank you)(mrs hudson or )
  7282.  
  7283.           The square brackets can be specified in any order.  The following
  7284.           example is equivalent to the previous example:
  7285.  
  7286.                (send or show)(him or Johnson)(in or up)[do not or dont] or
  7287.                (thank you)(mrs hudson or )[no]
  7288.  
  7289.           Note that the contraction "don't" was written as "dont" and that
  7290.           the abbreviation "Mrs." was written as "mrs".  Punctuation should
  7291.           not be included in the specification message, but upper/lower
  7292.           case distinctions do not matter.
  7293.  
  7294.  
  7295.           R.   The Actor in Rules
  7296.  
  7297.           You can use the term "Actor" in your expressions wherever you
  7298.           might use a character.  When you use the Actor, you are testing
  7299.           for "whomever might be speaking" as opposed to the Player which
  7300.           refers specifically to the object reserved for the user.
  7301.  
  7302.           Using the Actor in your conditional expressions has the advantage
  7303.           of flexibility since it is a more general term than "Player". 
  7304.           This asset turns into a liability when you use it in executional
  7305.           expressions.  It can produce chaos, because function destinations
  7306.           will be determined at run-time.  There is no telling where the
  7307.           following message might end up although it is a correct
  7308.           construction:
  7309.  
  7310.                                                                         117
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.           Story Design                                 Figment User's Guide
  7319.  
  7320.  
  7321.                copy msg to  Actor's view of  Actor's  Long Desc.
  7322.  
  7323.           Consider using the Actor instead of the Player when writing rules
  7324.           designed to restrict movement from a particular scene until the
  7325.           user has resolved some task.  If you do not test for the Actor,
  7326.           the user can change to another character and slip through to
  7327.           another scene and change back.  A pre-command rule to prevent
  7328.           this might look like this:
  7329.  
  7330.                Scene: X    Rule: 1 of n   Switched: ON  Disabled
  7331.  
  7332.                If {
  7333.                  Actor  does go  Anywhere
  7334.                  <scene name> is locked
  7335.                } Then {
  7336.                  No Executionals
  7337.                } Message 1 Total  Switched: ON  Current Message: 1
  7338.                1. Sorry.  You can't go yet.
  7339.  
  7340.           The Actor, by default is the Player object, but the operator can
  7341.           change this during play.  You can change the Actor object to
  7342.           another character object whenever that object is linked into the
  7343.           scene.  You will get an error message if you specify a character
  7344.           not present in the current scene.  You change the Actor by giving
  7345.           the character name followed by a colon.  You can also add the
  7346.           command for the character in the same command line, thus:
  7347.  
  7348.                Player: Mary: go north   ;change Actor to Mary and
  7349.                Mary:                    ;   depart northbound.
  7350.  
  7351.           The ready prompt changes to indicate the current Actor and the
  7352.           status and inventory displays change as well.  Only the Player
  7353.           object is scored however which affects skill.
  7354.  
  7355.           Actually, you need not spell the character's full name, but you
  7356.           will want to spell enough to be unique.  If the letter "y" in
  7357.           "Mary" is unique, meaning no other character name has a "y" in
  7358.           it, then the following is equivalent to the above example:
  7359.  
  7360.                Player: y: go north
  7361.                  You go north.
  7362.                Mary:
  7363.  
  7364.           A character can be linked into any number of scenes, but once the
  7365.           Actor is set to the character, Figment will remove that character
  7366.           link from all other scenes.  Thus you can be sure that the
  7367.           character is only found linked into the current scene.  This
  7368.           action is done at scene-change time so until you change scenes,
  7369.           your links will be unaffected.
  7370.  
  7371.           118
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.           Figment User's Guide                                 Story Design
  7380.  
  7381.  
  7382.           To change back to the Player object, you will probably have to
  7383.           return to the scene where you left the Player.  (Say "find
  7384.           Player".)
  7385.  
  7386.           The above applies now to the Player object as well.  At the start
  7387.           of play, the Actor is assigned to the Player object.  Thus the
  7388.           rule applies: the speaking character cannot be present in more
  7389.           than one scene at a time.  Rules can be written to make more
  7390.           links, but the links will be stripped out again as soon as the
  7391.           Actor changes scene.
  7392.  
  7393.  
  7394.           S.   The '@'-Words
  7395.  
  7396.           Special system names and words can be incorporated into your text
  7397.           using special names within your text string.  These special names
  7398.           are indicated by the at-symbol (@).  The names must be spelled
  7399.           exactly as you see them here, including the capital letters.
  7400.  
  7401.           Whenever your text is used, Figment substitutes the appropriate
  7402.           text for the special name.  Hence these special names function
  7403.           like text variables within your text.
  7404.  
  7405.           The words are:
  7406.  
  7407.                @Actor - Substitutes the current actor's name.
  7408.  
  7409.                @Player - Substitutes the current Player's name.  Typically
  7410.                this yields the User's first name, but during development
  7411.                and testing of your story, it would be the generic text
  7412.                "Player".
  7413.  
  7414.                @Scene - Substitutes the current scene name.
  7415.  
  7416.                @It - Substitutes the last object name used in the command
  7417.                line.
  7418.  
  7419.                @Them - Substitutes the last series of object names used in
  7420.                the command line.
  7421.  
  7422.                @Full_name - Substitutes the user's full name.  This is the
  7423.                preferred form when you want the full name since it avoids
  7424.                problems with titles, middle names, four names, reversed
  7425.                names, etc.  @Full_name is loaded when "@Get_User" is
  7426.                inserted in the title message.  If "@Get_User" is omitted
  7427.                from the title message, "@Full_name" is empty.
  7428.  
  7429.                @User[n] - where n = 0 through 2.  Substitutes the User's
  7430.                first, middle or last name.  User[0] is reliably the user's
  7431.  
  7432.                                                                         119
  7433.  
  7434.  
  7435.  
  7436.  
  7437.  
  7438.  
  7439.  
  7440.           Story Design                                 Figment User's Guide
  7441.  
  7442.                first name.  User[1] is the middle name and is empty when
  7443.                less than three names are entered.  User[2] is the second
  7444.                name when two names are entered, otherwise it is the third
  7445.                name.  People with four names suffer.  Titles such as "Sr.,
  7446.                Jr., II, and III" are lost.  Many cultures place the family
  7447.                name first and the individual's name last.  There is no
  7448.                support for this.  @User is loaded by @Get_User during title
  7449.                message processing.
  7450.  
  7451.                @Command - Substitutes the current command sentence.  You
  7452.                can give commands consisting of several sentences, but they
  7453.                are processed one sentence at a time so this returns the
  7454.                current sentence.
  7455.  
  7456.                @Words[n] - where n = 0 to maximum words in command line. 
  7457.                Probably Words[0] is most useful since it is typically the
  7458.                verb.
  7459.  
  7460.                @Msg: n
  7461.  
  7462.  
  7463.           T.   Help Messages
  7464.  
  7465.           Help messages are defined for each map block.  These are separate
  7466.           text strings that you can edit in their own editing screen.  You
  7467.           can also revise them during play as the story progresses by
  7468.           copying new messages to them as rules fire.
  7469.  
  7470.           The player can just type "help" and the currently defined message
  7471.           appears.  This is usually something more than an examination
  7472.           message might do.
  7473.  
  7474.           A rule to change the help message might look like this:
  7475.  
  7476.                     If {
  7477.                          <conditional expressions>
  7478.                     } Then {
  7479.                          Copy_msg_to  Current Scene's Help Msg
  7480.                     } Messages 1 Total  Turned: OFF  Current: 1
  7481.                     1.   Be patient.  Sometimes the answer just comes to
  7482.                          you.
  7483.  
  7484.                This might imply that the player should simply use the
  7485.                "wait" command until some time-bomb you have prepared fires.
  7486.  
  7487.           As the scene progresses, you can trigger more rules to update the
  7488.           help message.  This action can be combined as part of existing
  7489.           rules so help message maintenance only costs a few expressions
  7490.           plus one message.
  7491.  
  7492.  
  7493.           120
  7494.  
  7495.  
  7496.  
  7497.  
  7498.  
  7499.  
  7500.  
  7501.           Figment User's Guide                                 Story Design
  7502.  
  7503.           Whenever no help message is defined for a scene, the player gets
  7504.           a gentle rebuff when requesting help.
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.  
  7521.  
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.  
  7529.  
  7530.  
  7531.  
  7532.  
  7533.  
  7534.  
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.  
  7552.  
  7553.  
  7554.                                                                         121
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.  
  7561.  
  7562.           Story Design                                 Figment User's Guide
  7563.  
  7564.                                         Index
  7565.  
  7566.           +  31, 33, 46, 57                   Conclusions  104
  7567.           @-Words  119                        design notes  103
  7568.           @Actor  119                       Containers  16, 77, 106
  7569.           @Command  120                       link limit  105
  7570.           @Full_name  86, 119                 reporting contents of  35
  7571.           @Get_User  86                     Copy_Msg_To  77
  7572.           @It  119                          Cursor Control Keys  29
  7573.           @Player  119                      Cut  26, 30, 58
  7574.           @Scene  119                         Expressions  65
  7575.           @Them  119                          rules  57, 58
  7576.           @User[n]  119                       Test Messages  66
  7577.           @Words[n]  120                      Text  26
  7578.           Actor                             Data Set Files  98
  7579.             during playback  9              Debugging Tips  99
  7580.             in rules  117                   Delete  31, 58
  7581.             viewpoints  39                    Player object  34
  7582.           Advance  29                         rules  57
  7583.           Alphabetizing objects  34           with objects  33
  7584.           Alt-F7  27, 30, 58, 65, 66        Directions
  7585.           Armor  35                           during play  15
  7586.           Articles                          Display
  7587.             in commands  7                    switch  4
  7588.           Assign_User_Type  76              Does_Action  70
  7589.           Attributes                        Does_Fit_Profile  71
  7590.             as arguments  64                Does_Have_Attribute  71
  7591.             editing operations  35          Drink  12, 107
  7592.             failure to specify  99          Drop  12
  7593.             in scenes  43                   Eat  12
  7594.             negative  104                   Editing Operations
  7595.             with food  113                    summary of  29
  7596.             with potions  107               Error Messages
  7597.           Change User-Attribute               in editor  26
  7598.             executional function  76        Examination Message  38, 101
  7599.           change_health  102                  victory message  104
  7600.           change_score  101                 Examine  12
  7601.           Characters                          message design  101
  7602.             as containers  113              Executional
  7603.           Charm  12                           clause  51
  7604.           Close  12, 77                     Executional Function
  7605.           Comma Operator                        Reference  76
  7606.             in commands  8                  Expression  62
  7607.           Command Parser                      editing  61
  7608.             User-definable  114               modifier  63, 68
  7609.           Command Reference  12               negation  62, 63
  7610.           Command Window  5                 F1 - Enter Editor  12, 28
  7611.           Conditional clause  51              also exit from editor  30
  7612.             types of  51                    F10 - DOS Shell  13, 31
  7613.           Conflicts                           in editor  29
  7614.  
  7615.           122
  7616.  
  7617.  
  7618.  
  7619.  
  7620.  
  7621.  
  7622.  
  7623.           Figment User's Guide                                 Story Design
  7624.  
  7625.           F2  30                            Insert  26, 31, 58
  7626.             read a file  29                 Interrupt
  7627.           F3                                  log files  17
  7628.             write a file  29, 30            Inventory
  7629.           F4 - Listing  30                    changes w/actor  10
  7630.             objects  32                     Is_dead  71
  7631.             rule bases  60                  Is_linked_to  72
  7632.           F5 - Alphabetize Objects  30      Is_locked  72
  7633.           F6  67                            Is_open  73
  7634.           F6 - Text Editor  30              Is_type  73
  7635.           F7  26, 30, 58, 65, 66            Is_wizard  73
  7636.           F9  19                            it  8
  7637.           F9 - Step a log file  13          Kill  80
  7638.           Figglu  3                         Labels  41
  7639.           Fight  13, 103                      user types  37
  7640.           Figlet  1                         Limit
  7641.           File                                ammunition  111
  7642.             input/output  28                  editing  35
  7643.             management  95                    food value  113
  7644.             naming convention  95           Link_to  80
  7645.           Find  14                          Links
  7646.           Flags  34, 36, 43                   design notes  105
  7647.           Food  36, 102, 104                  editing operations  42
  7648.             design notes  113                 in scenes  43
  7649.             limited by skill  101, 113        type labels  90
  7650.             parameter editing  87           Listing
  7651.             sub-type attribute  35            objects  32
  7652.           FOR  51, 55, 78                     rule bases  60
  7653.           Full-Screen Text Editor           Lock  16, 52, 81
  7654.             description of  94                editing  109
  7655.           Give  14                          Log  7, 107
  7656.           Global Rule Bases  60               play a log file  17
  7657.           Go  15, 16, 64, 69, 79              step a log file  13
  7658.           Go_to_Map_Block  78               Logic Programming  48
  7659.           Goody                             Magic  103
  7660.             sub-type attribute  35            editing  35
  7661.           Have_Attribute  71                Message
  7662.           Health  13, 101                     editing  66
  7663.             design notes  102                 pointer  56, 75, 79, 81
  7664.             editing  35                     Method of Editing  23
  7665.             recovery  14                    Move count  15, 18
  7666.           Help Message  89                  Msg_to_name  81
  7667.           Hex  16, 103                      Negating rules  69
  7668.           Hit  16                           Negative Attributes
  7669.           Home key  31, 62, 63                in conflicts  104
  7670.           IF  51                            Objects
  7671.             delayed execution  56             creating them  33
  7672.           Inc_moves  79                       definition of  31
  7673.           Inc_msg  79                         deleting  33, 98
  7674.           Inc_score  77                       names  32
  7675.  
  7676.                                                                         123
  7677.  
  7678.  
  7679.  
  7680.  
  7681.  
  7682.  
  7683.  
  7684.           Story Design                                 Figment User's Guide
  7685.  
  7686.             User Types  37                    rules and changing  113
  7687.           On_skill  81, 101                 Screen Display  5
  7688.           Open  16, 35, 43, 73, 81          Scrolling  24, 29
  7689.           Page-Down  29                     Scrolls  35, 110
  7690.           Parameter                         Series  8
  7691.             editing  86                     Shift-F2
  7692.           Paste  26, 27, 58                   read save file  30
  7693.           Pause  17                         Shift-F3
  7694.           Period Operator                     write save file  30
  7695.             in commands  7                  Shift-F4 - Write Full Listing 
  7696.           Play  17                              30
  7697.           Player Map  84                    Shift-F7  27
  7698.           Player Object  34                 Shoot  19
  7699.           Potions                           Size  35, 108
  7700.             design notes  107               Skill
  7701.           Pre-Command                         design notes  101
  7702.             explanation of  67                levels  101
  7703.           Presentation Environment  4         on-skill  81
  7704.           Probable Event  73                  when shooting  19
  7705.           Profiles  90                      Standard Messages  91
  7706.           Pronouns  65                      Starting
  7707.           Put  17                             existing story  4
  7708.           Quit  18                            new story  96
  7709.           Random Number Generator           Status
  7710.             controlling  106                  editing  88
  7711.           Read  18                            Indicator  5
  7712.           Remove_User_Type  82              Step  19
  7713.           Restart  18                       story
  7714.           Restore  17, 18                     restarting  18
  7715.           Rules                               story editor  21
  7716.             adding/deleting  57               story elements  28
  7717.             changing scenes via  113        Story Design  101
  7718.             copying  57                     Story Editor  21
  7719.             current message  54             Story Map  15, 78, 85
  7720.             definition of  51                 Complex maps  46
  7721.             editing  56                       editing  44
  7722.             expression editing  62            path  45
  7723.             negating  69                      restricts scene change  59
  7724.             re-ordering  57                   Simple Maps  45
  7725.           Save  13, 18, 30, 95, 96, 98      Strategic Weapons  110
  7726.           Say_cmnd  74                      Strength  13, 103
  7727.           Scene Description  44, 54           design notes  102
  7728.             highlights changes  5             editing  35
  7729.             with Actor change  10           Stuff  31
  7730.           Scene Editor  43                    names  32
  7731.           Scene-change  45                    objects  31
  7732.           Scenes                            Stuff Editor  31
  7733.             changing in editor  59          Sub-type attribute  35
  7734.             entry scene  46                 Synonym  85
  7735.             objects  31                     Syntax
  7736.  
  7737.           124
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.  
  7745.           Figment User's Guide                                 Story Design
  7746.  
  7747.             explanation of symbols  12
  7748.           Take  19
  7749.           Take_from  82
  7750.           Text
  7751.             changing it  24
  7752.             erasing  25
  7753.             length of  25
  7754.           Text editor  24, 31
  7755.             invoking  94
  7756.             key definition summary  94
  7757.           them  9
  7758.           Toggle  20
  7759.           Toggle_lock  82
  7760.           Toggle_open  83
  7761.           Top Level Editor
  7762.             description of  27
  7763.           Type attribute  35, 44
  7764.           Unlock  20, 83
  7765.           User Types  37
  7766.             defining labels  89
  7767.           User-Definable Attributes
  7768.             defining labels  90
  7769.             editing  40
  7770.           User-definable Command
  7771.               Parser  114
  7772.           Viewpoints
  7773.             editing  39
  7774.           Wager  14
  7775.           Wait  20
  7776.           Weapon  35
  7777.           Weight  35, 108
  7778.           WHILE  51
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.  
  7785.  
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.  
  7793.  
  7794.  
  7795.  
  7796.  
  7797.  
  7798.                                                                         125
  7799.