home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / rehack / convers / scripter.txt < prev   
Encoding:
Text File  |  1993-06-09  |  3.0 KB  |  54 lines

  1. This is a demo version of the DEGAS Conversation Scripter; for possible
  2. inclusion in the Re-Rehack project.
  3. The source code is Turbo-Pascal (v7.0) without any use of objects.
  4.  
  5. For simplicity's sake in this demo; I'm storing all the textual data as
  6. simple string[80] read for standard Text files. SCRIPT.MSC is the character
  7. messages; SCRIPT.LNC is the player's messages. I've taken all encryption,
  8. run-time modification, and formatting out of the loop, as that is controlled
  9. by a totally separate set of procedures.
  10.  
  11. The heart of the Scripter is the SCRIPT.SCC file. This takes the following
  12. format :-
  13.  
  14.         word 0          - The number of Scripts stored in the file (N)
  15.         words 1-N       - Offset pointers to the start of each individual
  16.                           Script stored
  17.                           Note that offsets start from word N=0
  18.         words N+1 -->   - The Script data
  19.  
  20.         Script Data is in the format :-
  21.                 
  22.                 word 0          - Number of possible Lines for this Script (S)
  23.                 words 1-S       - Offset pointers to the start of each
  24.                                   individual Line stored
  25.                 words S+1 -->   - The Line data
  26.  
  27.                 Line Data is in the format :-
  28.  
  29.                         word 0          - Number of Conditions to test (to
  30.                                           decide if this Line will be used)
  31.                         [words 1-C      - Condition Tests]
  32.                         word C+1        - The Line of text to display if the
  33.                                           conditions are met
  34.                         word C+2        - The Message to display for the
  35.                                           Character's response to the Player
  36.                                           selection (if it is this selection
  37.                                           that is chosen). If this is 0, then
  38.                                           the Player will not respond
  39.                         word C+3        - New Script number for the Thread
  40.                                           if bit 15 is set; that signals end
  41.                                           of conversation
  42.                         word C+4        - The number of Actions to execute (if
  43.                                           the Player selects this response)
  44.                         words C+5 -->   - Actions to execute
  45.  
  46. For simplicity's sake; I've limited the conditions to testing if a flag is
  47. ON, and the actions to turning a flag ON. This allows extra options to
  48. appear as part of the script if certain other responses are made, but does
  49. not allow messages to be suppressed (because it does not check if a flag is
  50. OFF). A full version will allow this. Once I upload the Script Editor, you
  51. can try playing around making your own Scripts to test: in the meanwhile,
  52. I've written a little 3-Script demo to go with this program (with apologies
  53. to any fans of the DragonLance stories).
  54.