home *** CD-ROM | disk | FTP | other *** search
- This is a demo version of the DEGAS Conversation Scripter; for possible
- inclusion in the Re-Rehack project.
- The source code is Turbo-Pascal (v7.0) without any use of objects.
-
- For simplicity's sake in this demo; I'm storing all the textual data as
- simple string[80] read for standard Text files. SCRIPT.MSC is the character
- messages; SCRIPT.LNC is the player's messages. I've taken all encryption,
- run-time modification, and formatting out of the loop, as that is controlled
- by a totally separate set of procedures.
-
- The heart of the Scripter is the SCRIPT.SCC file. This takes the following
- format :-
-
- word 0 - The number of Scripts stored in the file (N)
- words 1-N - Offset pointers to the start of each individual
- Script stored
- Note that offsets start from word N=0
- words N+1 --> - The Script data
-
- Script Data is in the format :-
-
- word 0 - Number of possible Lines for this Script (S)
- words 1-S - Offset pointers to the start of each
- individual Line stored
- words S+1 --> - The Line data
-
- Line Data is in the format :-
-
- word 0 - Number of Conditions to test (to
- decide if this Line will be used)
- [words 1-C - Condition Tests]
- word C+1 - The Line of text to display if the
- conditions are met
- word C+2 - The Message to display for the
- Character's response to the Player
- selection (if it is this selection
- that is chosen). If this is 0, then
- the Player will not respond
- word C+3 - New Script number for the Thread
- if bit 15 is set; that signals end
- of conversation
- word C+4 - The number of Actions to execute (if
- the Player selects this response)
- words C+5 --> - Actions to execute
-
- For simplicity's sake; I've limited the conditions to testing if a flag is
- ON, and the actions to turning a flag ON. This allows extra options to
- appear as part of the script if certain other responses are made, but does
- not allow messages to be suppressed (because it does not check if a flag is
- OFF). A full version will allow this. Once I upload the Script Editor, you
- can try playing around making your own Scripts to test: in the meanwhile,
- I've written a little 3-Script demo to go with this program (with apologies
- to any fans of the DragonLance stories).
-