thinBasic Adventure
Builder (TAB)Text Adventure Tutorial |
||||
|
Part Seven: Tricks and Tips
|
|||
USING SYNONYMS AND DELETIONS >get the green bottle out of the red box might be understood. The words 'the', 'green', 'of' and 'red' should be present in the 'Deletions' List. Also it would be nice to have plenty of acceptable phrases which the player can type to accomplish the desired action by using the forward slash symbol (/) in the initial Response 'words condition' if at all possible eg: [start]unscrew panel/open panel/unscrew panel with screwdriver/use screwdriver on panel/open panel with screwdriver#........ [start]tie rope/tie rope to tree/tie rope round tree/tie rope around tree#...... Ensure the words you use are KEYWORDS and exist in the Vocabulary. It would be handy, too, to give suitable replies to player actions which are quite reasonable but not actually required to solve the game eg: [start]listen[acts]cmessYou listen but hear nothing out of the ordinary.[end] [start]jump[acts]cmessYou jump off the ground. Whee! That was fun.[end] More descriptive text can only enhance a game. MULTIPLE
CHOICE ADVENTURES These sorts
of games can be created in TAB very easily. Location
Description (Room 1): I am in the
dark, dingy basement. There is a low tunnel to the east. A. Examine
the table and chair Please type
in your decision: A, B, C, or D. >b
In games like
these the only inputs required by the game are the
letters (or numbers) of the respective choices, so most
of the standard default Response entries will probably
not be required, except maybe 'save', 'load', 'look',
'quit' 'score' and 'restart'. You could allow the player
to type 'look' to redescribe their surroundings.
Example Response
entries: [start]a#room=1#flag20=0[acts]cmessYou carefully examine the table and chair and find a small golden key!#flag20=1[end] rem: set flag 20 to 1 when key found. [start]a#room=1#flag20=1[acts]cmessYou`ve already done that![end] [start]b#room=1[acts]cmessYou enter the dark tunnel.#room=2#desc[end] rem: move player into room 2 when option 'B' selected [start]c#room=1[acts]cmessHermit: "Beware the giant spider."[end] [start]d#room=1[acts]cmessYou attack the hermit. The hermit whips out a concealed dagger and stabs you through the heart. You are dead!#gameover[end] CHARACTER
MESSAGES 'The dog
barks in delight and wags his tail furiously.' The first one could be printed when the player performed a correct action, whereas the second shown each time the player made a stupid error or mistake... Character messages could also be output on a specific turn of the game eg Tabletwo entry: [start]turns=5#charpresent1[acts]cmessThe dog looks at you with interest awaiting your next move.[end] [start]turns=12#charpresent1[acts]cmessThe dog sniffs the ground trying to catch a scent.[end] USEFUL
VERBS AND SYNONYMS If you enter prepositions such as 'under' and 'behind' together with their synonyms you can make the player inspect things more thoroughly eg: 'look behind painting' ; 'look under staircase' Similarly 'on' and 'through' can be utilised: 'look on table' ; 'look through window' And how about 'over' and 'across': 'jump over river' ; 'jump across lake' ASKING AND
ANSWERING QUESTIONS >ask <character> about <object/character> Response example: [start]ask butler about maid#charpresent2[acts]mess301[end] A character could also ask a question to the player, cooperating with him if it received a correct reply. To implement this requires use of the 'ask' action and the 'answer=' and answer<>' conditions and a flag usually. Response entry: [start]ask goblin about ring#charpresent1#flag20=0[acts]cmessThe goblin screeches: "If you want my help, What`s the password?"#flag20=1#ask[end] 2 Script 2 entries: [start]flag20=1#answer<>grunch[acts]cmessGoblin: "That`s not the password!"#flag20=0[end] [start]flag20=1#answer=grunch[acts]cmessGoblin: "Correct! The gold ring lies in a wooden tree trunk."#flag20=2[end] See how if
the player gets the answer wrong he is able to ask the
goblin for another try. The correct answer supplies the
hint/clue and flag 20 is set to 2. USING THE
'timeout=x' ACTION Script 2 entries, in order: [start]flag50=1[acts]cmessClouds of poisonous gas billow from vents high up in the wall. You struggle frantically, choking and gasping as the gas takes its lethal effect.... You are dead!#pause5#gameover[end] [start]flag50=0#room=6[acts]cmessSensors in the floor activate an alarm and trigger an intruder warning. A staccato mechanical voice booms: SECURITY ALERT! DEFENCE SYSTEMS ACTIVATED! YOU HAVE 15 SECONDS TO GAS RELEASE!!!#flag50=1#timeout=15[end] Response entries: switch on neutracom/switch neutracom on#flag50=1#here4[acts]cmessYou use the neutracom. The intruder defence mechanism has now been safely deactivated!#score+5#flag50=2#timeout=0[end] [start]switch on neutracom/switch neutracom on#flag50<>1#here4[acts]cmessNothing happens. You switch it off again.[end] The second
Script 2 entry will be done when the player enters room 6
for the first time. The warning message is given and
timeout set to 15 seconds. Flag 50 is set to equal 1. CHANGING
STRENGTH AND CARRYABLE VALUES Two things that should always be checked are: 1) That the number of initially carried objects at the start of the game does not exceed the Carryable value inserted in the 'Game Settings Editor'. 2)That the total weight of the initially carried objects at the start of the game does not exceed the Strength Rating as entered in the 'Game Settings Editor'. This is only sensible after all and will prevent any problems with object weights. The action commands for changing strength are: strength=x The action command for increasing object carryable status is: carrylimit+x where 'x' is a valid number. These are useful if you are going to progressively increase the values as a reward for finding 'energy boosters' such as a talisman, crystal, tonic or swimming in a sacred pool etc. There are action commands for changing the individual weight of an object: weightx=y weightobjn1=X Problems could occur if you INCREASE the weight of an object which is carried or which may be inside a container object that is carried or worn. It could cause problems with the Strength and Carryable reporting system messages. You can, however, safely change weight values of objects which are not held, worn or owned in the player`s inventory. No such problems will occur if you are REDUCING the weight of an object. This can be done at any time without the above problem. eg: a 'bucket' might weigh 5: [start]empty bucket#here5#flag23=0[acts]cmessBucket - emptied!#flag23=1#weight5=1[end] A TAB CLOCK Here`s how to
implement a 24 hour game 'clock' in TAB that increases by
a minute each turn of the game. It only requires a few
short, simple entries. [start]turns=0[acts]flag60=12#flag61=0[end] [start]turns>0[acts]incflag61,1[end] [start]flag61=60[acts]flag61=0#incflag60,1[end] EXIT LISTING Example: Location 1: >go east >A forcefield prevents your passage eastward! Here the
player is informed that a valid exit leads east, but is
unable to travel that way just yet because of a
'forcefield'. [start]go east#room=1#flag20=0[acts]cmessA forcefield prevents your passage eastward![end] When the player has solved the 'forcefield puzzle' it is a simple matter to set flag 20 to a value greater than zero to now allow the player freedom of movement to the east from location 1 eg: [start]pull lever#room=3#flag20=0[acts]cmessYou pull the rusty lever. There is a crackling noise in the distance as the forcefield is turned off.#flag20=1[end] Notice how
flag 20 is set to 1 so that the normal default 'go
%directn1%' entry will now be done when the player tries
to go east. To reveal a
new exit in a location requires use of the 'connect'
action and use of a flag generally. [start]press button#room=5#flag30=0[acts]cmessThere is a whirring noise as a panel slides up to reveal a passageway in the northwest corner of the library...#connect5=nwto18#flag30=1[end] Flag 31 controls whether the button has been pressed or not. When its pressed for the first time the new exit is revealed. This will now be listed as an exit when the player redescribes the location, or subsequently revisits the location (5). The new exit northwest leads to location 18 in the example. Remember to use direction noun abbreviation synonyms within the 'connect' action (except 'in' or 'out' which must be typed in full) A further 'press button' entry might be inserted in Response: [start]press
button#room=5#flag30=1[acts]cmessNothing happens.[end] To remove a
visible listed exit from a location again requires use of
the 'connect' action and use of a flag. [start]press button#room=5#flag30=1[acts]cmessThere is a whirring noise as the panel slides down closing the passsageway to the northwest...#connect5=nwto0#flag30=0[end] The action "connect5=nwto0" in the above entry removes the exit leading northwest from location 5. Flag 30 is reset to 0 to show this has been done. STATIC
OBJECTS/HIDDEN OBJECTS Example: Locations 10 to 14 and Location 21 are 'forest' location descriptions Object 5 text
description: 'a tree.' Now some entries in the Script 1 Editor: [start]room>9#room<15[acts]objloc5=room[end] [start]room=21[acts]objloc5=room[end] These entries create and put the static oak tree (Object 5) into the locations 10 to 14 and location 21 whenever the player visits those particular locations. An 'oak tree object' will always be present in these locations! Now example RESPONSE EDITOR entries: [start]climb tree#objloc5=room#room=21[acts]cmessThis oak is quite gnarled and is easy to climb. You climb up to the topmost branches...#room=30#desc[end] [start]climb tree#objloc5=room#room<>21[acts]cmessThe bark on the oak tree is too slippery, making it impossible to climb![end] Only the tree at location 21 can be climbed out of the 6 tree locations. Location 30 would be the description for the top of the tree where there might be a useful object secreted eg: Location 30: You sit in
the high branches of a tall oak tree. A majestic,
panoramic view of the surrounding countryside greets you. You can also
see: Although in the example only the tree at location 21 can be climbed, the other 5 'tree objects' might have Response entries assigned to them for different actions eg: [start]shake tree#room=10#flag20=0[acts]cmessYou shake the oak tree violently. Something drops to the ground...#objloc40=room#flag20=1[end] rem: create Object 40 when tree shook and set flag 20 to 1. [start]shake tree#objloc5=room[acts]cmessYou shake the oak tree. Nothing happens.[end] rem: deals with any further shaking or shaking 'tree object' at other locations. [start]search tree#room=13#flag25=0[acts]cmessYou find a note in one of the lower branches of the tree. You pick it up.#objloc16=501#flag25=1[end] rem: note found if tree searched in room 13. [start]search
tree#objloc5=room[acts]cmessYou carefully search the tree,
but find nothing of importance.[end] Further Static Object example: Object 4 text
description: 'a wooden sign.' SCRIPT 1 ENTRIES: [start]room=20[acts]objloc4=20[end] [start]room=52[acts]objloc4=52[end] These entries create and place the 'sign' (object 4) to locations 20 and 52 if the player goes there. RESPONSE ENTRIES: [start]read sign#room=20[acts]cmessThe signs says: 'BEWARE OF THE DOG".[end] [start] read sign#room=52[acts]cmessPainted on the sign are the words ABANDON HOPE ALL YE WHO ENTER HERE![end] Theoretically it would of course be possible to have a 'sign object' like this in every single one of the games locations!!! eg: SCRIPT 1ENTRY [start]room>0#room<501[acts]objloc4=room[end] rem: have a sign in all 500 locations!!! Thus you can see there are some clever things which can be done with STATIC objects which are not container objects. You could code a similar effect by an even easier method! If the noun word 'sign' or 'tree' was placed in the Vocabulary ORDINARY Noun list (ie not a true object entered in the Object Editor) then you could simply mention the sign or the tree as part of the location description itself (hidden object) and make Response entries for them.... Location 10 (one of the 'tree' locations): You are in a
shady glade encompassed by a vast tract of woodland. The
sound of running water can be heard in the distance. A
tall tree stands in the midst of small bushes and thorny
undergrowth. You can smell the scent of azaleas and
primroses. The wood seems thicker to the north through
the hazy mist. If the 'tree' were a true static object then it would be listed under the 'You can also see:' System Message thus alerting the player to the fact it held some special significance in the game and deserved some further inspection. By 'hiding' or 'masking' it within the confines of the location text description no undue attention is drawn to it. Cleverly disguising things, articles and items important to the game within the location text OR within messages can make a game more interesting and less 'easier' to solve. The player has to proceed cautiously and try more inputs in case anything is missed... In this instance tree or sign 'objects' wouldn`t come into the equation at all. There would be no need to insert the Script 1 entries for moving the tree or sign either. The Response conditions would just need to check the location numbers and flag values to carry out the Response entries. Here are amended Response entries for the 'tree' example above which produce identical results. Notice that 'room' conditions are used instead. RESPONSE ENTRIES: [start]examine tree#room>9#room<15[acts]cmessThe tree is a large oak.[end] [start]examine tree#room=21[acts]cmessThe tree is a large oak.[end] [start]climb tree#room=21[acts]cmessThis oak is quite gnarled and is easy to climb. You climb up to the topmost branches...#room=30#desc[end] [start]climb tree#room<>21[acts]cmessThe bark on the oak tree is too slippery, making it impossible to climb![end] [start]shake tree#room=10#flag20=0[acts]cmessYou shake the oak tree violently. Something drops to the ground...#objloc40=room#flag20=1[end] rem: create Object 40 when tree shook and set flag 20 to 1. [start]shake tree#room>9#room<15[acts]cmessYou shake the oak tree. Nothing happens.[end] rem: deals with any further shaking or shaking 'tree object' at other locations. [start]shake tree#room=21[acts]cmessYou shake the oak tree. Nothing happens.[end] rem: deals with any further shaking or shaking 'tree object' at other locations. [start]search tree#room=13#flag25=0[acts]cmessYou find a note in one of the lower branches of the tree. You pick it up.#objloc16=254#flag25=1[end] rem: note found if tree searched in room 13 [start]search tree#room>9#room<15[acts]cmessYou carefully search the tree, but find nothing of importance.[end] [start]search tree#room=21[acts]cmessYou carefully search the tree, but find nothing of importance.[end] If you use 'hidden objects' in your adventures the player will tend to want to examine all things which are mentioned in a location text that he/she thinks just might throw up a clue or have some bearing on the game. You should consider having Responses for most things they might conceivably interact with. For example entries might be constructed for the 'azaleas', 'primroses' and 'bushes' mentioned in Location 10. Vocabulary Ordinary Nouns required: 'azaleas' ; 'primroses' ; 'bushes' RESPONSE ENTRIES: [startexamine azaleas/smell azaleas#room=10[acts]The azaleas smell lovely but make you sneeze![end] [start]examine primroses/smell primroses#room=10[acts]The primroses smell so lovely. The heady, aromatic fragrance makes you dizzy for a moment...[end] [start]examine bushes#room=10[acts]cmessA casual inpection reveals nothing out of the ordinary.[end] [start]search bushes#room=10#flag24=0[acts]cmessA more careful forage in the bushes unearths a glittering emerald which you happily pick up.#objloc6=501#flag24=1[end] [start]search
bushes#room=10#flag24=1[acts]cmessA thorough search of
the bushes for anything further reveals nothing else at
all.[end] AUTO
DECREMENT/INCREMENT FLAGS incflagx,y
- increase flag x by y These useful
actions allow the creator to increase or reduce the value
of a particular flag by a specified number value. They
can be made to do this on each 'turn' of the game. rem: set flag
21 to 50 moves. Entry only done once. rem: decrease
or subtract flag 21 by 1 each turn rem: message
appears when flag 21 has decreased to 15. The player
dies when flag 21 equals 1 and the game ends. RANDOM
NUMBERS IN FLAGS randomizeflagX,Y (X=flag number ; Y=maximum numerical value) Inserts a
random number from 1 to Y into flag X. eg: randomizeflag15,20 would cause flag 15 to hold a random number in the range 1 to 20. EXAMPLE SCRIPT 2 ENTRIES: [start]f30=0#room=5[acts]randomizeflag40,36[end] rem: flag 40 set to random number (1-36) each turn of game when player in location number 5. [start]flag40=10#notcarr12#room=5[acts]cmessA deadly dwarf jumps from the bushes, and in a surprise attack viciously stabs you dead!#pause5#score#gameover[end] Here there is a 35 to 1 chance of the player being killed in location 5 each turn he is there (ie when random number=10) unless he`s carrying object 12 as protection. (a sword, perhaps) [start]flag40=10#carried12#room=5[acts]cmessA deadly dwarf jumps from the bushes in a surprise attack. Observing you are armed with the silver sword, it hastily backs away and disappears into the bushes...[end] If the player
IS carrying suitable armoury, there is the same 35
to 1 chance this message will be printed instead. (when
flag 40 equals 10) As you can see it is purely by chance that
these messages will appear during the game, if at all. This is just a simple example, but I am sure you will be able to think of many more ingenious ideas for using flags in conjunction with random numbers that will give your players the sense that new and unexpected occurrences can take place during your adventure. Impromptu events like this may add a touch of realism to your plot scenarios.
Copyright catventure © 2006 , All Rights Reserved. |
||||