TWIGZ Verb
Files (".vrb"):
Whenever
the Ego interacts with an object (or actor) the engine accesses
the ".vrb" file for that room and says the appropriate
dialogue. Below is the basic outline for a verb (".vrb")
file:
"Open"
10
1,1,1,"I can't open a stick",0
4,4,-1,"It's locked",0
4,5,-1,"I'm gunna open this here gate",0
8,6,1,"Open this well cover?",0
8,6,-1,"It's already open",0
14,7,1,"I'll just slip in this here back door",0
14,7,-1,"It's already open",0
17,8,-1,"I will turn this knob and open the door",0
3001,0,0,"Ey, uh, Fred, uh ...~wanna go bowlin?",0
0,0,0,"I can't open that",0
"Close"
2
1,1,1,"",8
0,0,0,"I can't close that",0
"Pick Up"
4
1,1,1,"Ohhhh, a stick",3
2,2,-1,"I love rocks",4
3002,0,0,"I don't think he'd like that.",0
0,0,0,"I can't pick that up",0
"Look At"
3
3001,0,0,"That's Fred, he's a nice guy!",0
3002,0,0,"That's John, he can hold~his breath for
over~10 minutes!",0
0,0,0,"That's a nice thing",0
"Talk To"
2
3001,0,0,"Starting conversation . . .",0,1
0,0,0,"I really don't want to talk right now",0,0
"Use"
1
0,0,0,"I don't think I should",0
"Push"
1
0,0,0,"Not right now",0
"Pull"
1
0,0,0,"No pulling for me right now",0
"Walk To"
2
7,0,0,"I'm leaving the room now!",3
8,0,0,"",3 |
The
".vrb" file is separated into verbs. Each verb name
in quotation marks represents the start of the data for that
verb. After each verb name is the total number of statements
for that verb. Following that is the list of all the text
that will be said by the ego (we call these lines "statements").
Any statement that starts with all zeros, like the one below,
is the Default Statement for that verb.
Below
is an example of a Default Statement:
0,0,0,"I
don't think I should",0 |
What
do all those numbers mean?:
Each "statement" is preceded by three (3)
numbers and then followed by another (EXCEPT for "Talk
To" that ends with 2 Integers!). A verb statement
looks like this:
Object
(or Actor) ID, Bin Variable, Bin Var Required Status,
"Text", Script Number |
A "Talk To"
verb statement looks like this:
Object
(or Actor) ID, Bin Variable, Bin Var Required Status,
"Text", Script Number, Conversation
Number |
Notice
the extra integer that goes on the end, this represents the
CONVERSATION NUMBER to run. 0 mean no conversation.
When
a object, say Object ID 10, is clicked on with the "Open"
verb selected, the engine opens the appropriate verb file
(for room 1, it would be "1.vrb") and scans the
file until it reaches the "Open" verb. Then it searches
for the appropriate Object ID. If the Object ID is found then
the engine proceeds to check the appropriate Bin Variable's
status with the Required Status. If these two are the same
then the Ego will say the appropriate text and the script
number (if it is not 0) will be executed.
If
all criteria are not met then the Ego simply says the default
statement.
How do I create a verb file?:
All verb files can be written in your favorite, simple, MS-DOS
text editor (Windows Notepad works fine). Just make sure there
are no extra spaces (unless they are in between quotation
marks) between the commas separating the different parts of
a statement or at the end of a statement. When you are finished
save this as a ".vrb" file in your
"TWIGZ SDK\Verbs" folder. You can do this from notepad
by going to File, Save As, Choosing "All Files"
from the "Save as type" drop-down menu. And naming
the file "roomnumber.vrb" so if your room is room
number 5, then save the file as "5.vrb"
Why
is there a tilde ("~") between some of the text
in a statement?:
A tilde ("~") represents a new line in
a statement's text. Below is an example of a statement with
several new line characters:
3002,0,0,"That's
John, he can hold~his breath for over~10 minutes!",0 |
When the Ego says
the appropriate text it will appear on the screen as follows:
That's
John, he can
hold his breath for over
10 minutes! |
Where as, without
the new line characters it would appear as follows:
That's
John, he can hold his breath for over 10 minutes! |
Why are
some Object IDs above 3000 & 4000?:
Every
"object", whether it is an actor, object, or inventory
item, is given a unique Global ID Number. All object IDs go
from 1 to 3000, all actor IDs go from 3001 to 4000, and all
inventory items (once collected and stored in the inventory)
go from 4001 to 5000.
Note:
When developing an adventure game with the TWIGZ
SDK it is recommended that you keep track of which object
IDs represent which objects using some sort of database or
spreadsheet (Microsoft Excel works fine).
What characters
are supported by the TWIGZ Engine for verb files?:
All letters A-Z
and a-z, all digits 0-9, and the following special characters:
! $ * , . ? - " [to make
a quotation mark ( " )] use the carrot ( ^ ) symbol].
Below is the default font file that is loaded when the engine
starts:
Note:
When using the Level Editor (included in the TWIGZ SDK) objects,
actors and inventory objects can be named with ALL of the
above characters and the following additional characters:
/ # + ; and ©
(use the "at" (@) symbol to make the copyright symbol).

|
|