thinBasic Adventure Builder (TAB)

Text Adventure Tutorial


     

Part Four: Adding More Data

 
     

Now it is time to enter some more locations for the "dragoria" game:

Reload your game using 'Open Adventure' if necessary...

Select the Location Editor and type in the following locations ensuring you click the 'Accept' button after each one

Location 2.
You are on a difficult and time consuming path, brushing through dense undergrowth and tangled creepers.
Brief description: FOREST PATH.
Exits: east to 3 ; west to 1

Location 3.
You are at a small, dimly lit clearing. In the centre stands a small wooden hut. The ground here is quite soft.
Brief description: DIMLY LIT CLEARING.
Exits: west to 2 ; in to 4

Location 4
You are inside a dilapidated ancient hut. The place is uninhabited and a musty, obnoxious smell permeates the atmosphere.
Brief Description: RAMSHACKLE HUT.
Exits: out to 3

Check each entry carefully and then click on the 'Back' button to exit the Locations.

Select "Test Adventure" to start your game in the TAB Player.

You should now see the first location, make sure the connections, east and west are showing. Enter 'e' or 'east' or 'go east' and you should end up in location 2, the forest path. Try out the exit directions to make sure the connections are working right through to Location 4 and back to Location 1.
When you are satisfied all is as it should be then QUIT the player by typing 'quit' or closing the Player dialog window to get back to the Editor.

We will now enter some objects into our game. Objects can be static or dynamic. (You can also have 'hidden' objects - but more on that later)
Click the 'Objects' button to reveal the Object Editor and carefully enter all the objects in the game as follows:-

Object 1:
Description = an egg sandwich.
Message = The egg sandwich looks quite appetizing.
Noun = /sandwich/
Start Room = 5
Weight = 1
Size = 1

DO NOT FORGET TO 'ACCEPT' THE ENTRY or it will not be inserted into the database.
Now enter and accept the following Objects:

Object 2.
Description = a small silver key.
Message = The silver key is very old. I wonder what it unlocks!
Noun = /key/
Start Room = 0 (will not initially exist in game)
Weight = 1
Size = 1

Object 3.
Description = a spade.
Message = The spade is a useful digging implement.
Noun = /spade/
Start Room = 0
Weight = 4
Size = 4.

Object 4.
Description = a sharp knife.
Message = The knife is a handy weapon and is slightly bloodstained.
Noun = /knife/
Start Room = 6
Weight = 2
Size = 2

Object 5.
Description = a canvas rucksack.
Message = The rucksack is a canvas bag with two arm straps. It is quite roomy.
Noun = /rucksack/sack/bag/
Start Room = 502 (special location for player WORN objects)
Weight = 4
Size=3
Check it as Wearable
Check it as a Container.

Object 6.
Description = a wooden chest.
Message = The chest is very large and has a small keyhole in front.
Noun = /chest/
Start Room = 4
Weight = 11
Size = 10
Check it as a Container

Notice we have constructed two container objects, a rucksack (which can also be worn) and a wooden chest (which will prove too heavy to carry because it exceeds the player strength rating of 7 entered earlier...)
Now there is a special rule with container objects. The rule is that an object container must use the corresponding location number as its "inside". This means that you cannot use those locations for normal room descriptions in the game. Our containers, Objects 5 and 6 will therefore use Locations 5 and 6 respectively as their 'contents location'. Locations 5 and 6 are unused locations in this mini-game so that is OK.

When you're happy with your entered objects click the 'Back' Button to exit to the Main window again.
Just before carrying on, go to the Location Editor and in the large object examine message editbox for Locations 5 and 6 type in "Inside of rucksack" and "Inside of chest". This will merely serve as a reminder that these locations are the 'insides' of the corresponding 'container objects'.

Get to the Editor Main Window again.

Select 'Vocabulary'

You will see the Lists of Verbs, Nouns, Object Nouns, Character Nouns, Prepositions and Deletions. You will notice that the Object Noun list contains the noun names of your objects, if it does not then you may have forgotten to click on the 'Accept' button, so you will have to go back to the Object Editor and re-enter any missing object details.

When playing the game the player may use different words to describe the object he/she sees, like 'box' for 'chest', or 'sack' for 'rucksack'. So that is why we sometimes must enter some synonyms along with the keyword nouns...
So in the Object Noun Listbox DOUBLECLICK on '/chest/', and it will appear in the Edit Vocabulary Field below. Amend the entry to read '/chest/box/' and click 'Accept' to update the list.

At this stage we may as well enter some Deletions words. You have an 'egg sandwich' but the object Noun is only called '/sandwich/'
To cover the possibility of the player referring to an object in this way we must inform TAB to disregard the adjective 'egg' and indeed any adjectives associated with any of the objects in the game.
So you can enter the word 'egg' into the deletions list, and that means that when you play the game, you can input things like 'give the egg sandwich to ????' and it will work ok, but if 'egg' was not in the deletions list it would say 'That's not possible!'
Doubleclick some blank entries in the Deletion listbox and add/accept the following words to the list:

egg
wooden
canvas
small
silver
sharp

Go 'Back' to the Main Editor.

Now it is time to design a couple of NPC's. (non-player characters)
Click on 'Characters'
Ensure you are looking at Character number 1.

The first edit box is the 'Character Announcement Text' so enter in that box:

Joseph the farmer is here.

In the larger Character 'examine textbox enter:

Joseph the farmer is a local yokel, and is a very strong, hefty looking man.

In the Character Noun box enter:

/farmer/joseph/

The Start Location for Character 1 should be set to 3

In the 'Name' editbox enter:

"Joseph the farmer" (without the quotes)

This textbox is specially for any alternative name text that will be used by the Character movement messages. For instance when a character enters or leaves a room or when it follows the player. By default the 'name' text can be set to 'The <noun>' where <noun> is the current noun KEYWORD for the Character. By changing this to "Joseph the farmer" it will ensure that TAB prints system messages like "Joseph the farmer goes east." instead of "The farmer goes east."

Click the 'male' Character Gender radiobutton to establish the sex of the Character.

We will make a walk pattern that farmer will follow; so click the 'Walk' radiobutton and type it in the walk pattern editbox VERY carefully. It should read as follows:

walk=4,3,p,2,1,2,p,3

(Note carefully the commas)

The 'p' in the above entry will cause the character to pause/wait a turn at its current location.

This walk pattern means at the start of the game the farmer will be in location 3. He will move in to location 4, will go out to location 3, pause a move, move west to location 2, west again to location 1, and then move east to location 2, pause a move, and finally move east to location 3 which was his starting room in the first place!
On the next turn the character will set off on the entire pattern again and will continue his travels ad infinitum.
Notice how a pattern was devised so that the character arrived back at location 3. (Character Start Room) When designing a walk pattern you must take into account the logical and valid directions which exist between locations... The responsibility rests with the author to implement a sensible pattern because TAB does not check to see if you are typing the right location numbers.

'Accept' the Character 1 data and move to edit Character 2.

Announcement text = A cat sits close by.
Message = The cat is a scraggy moggy, but looks quite friendly.
Noun = /cat/
Start Room = 2
Name Text = "The cat" (without quote marks)
Click the 'random' radiobutton. (The cat will move randomly)
Click the 'it' radiobutton. (The cat is a creature and not a male or female human)

'Accept' the character 2 data.

Exit Characters and Test Adventure again.

Check that the farmer and cat show up and move around. Examine them. Try entering 'follow farmer' or 'follow cat' when they're around. Type 'inventory', 'inv' or 'i' to check you are wearing the rucksack. You should be able to remove, drop, get and wear it and also look in it... See if you can take the sandwich out of the rucksack and put the sandwich into the rucksack ok. Check that the wooden chest is visible in the old hut in the clearing.
The knife should be in the chest. Later we will cover locking/unlocking the chest and constructing a few puzzles and problems for the player.

If all is satisfactory, exit the TAB Player and save your updated "dragoria" adventure.

In the next part I will discuss the importance of the Response, Script 1 and Script 2 Editors which have so far not been mentioned.

GO TO PART FIVE



Copyright catventure © 2006 , All Rights Reserved.