|Since most people at the moment are writing RPG's,
here's just a little article explianing a few
of the dos and do nots or RPG creating....
Aside from many peoples idea of what an RPG is
(my opinion is that it doesn't have to have
Another thing that makes QB rpgs interesting is
the amount of non-hardcoded'ness that
If anyone remembers the late-great Milo's The
RPG, they might have seen a few NPC files
|Now Nekro (Dave) and, exclusively, myself, have
gone and taken that idea a few steps
furthur. Dave has his ETX format which I am only vaguely familiar with, because of that, I
will discuss my engine's counterpart, the TLK format.
Again, TLK (talk) is just a simple script format, thus, it is not compiled (I would have no
reason to teach my interpreter a whole different way to read the same thing)
and it uses many different commands to make different things happen. I'll give an example of
something HARDCODED and then it's TLK SOFTCODED counterpart....
lets say I wanted my diologue box to be 30,30,150,90
filled with blue, and have an NPC say
|Okay, so it's a very basic and not very interesting
example. Well, in TLK format, we set
things ahead of time, we know that our box is going to be a certain size and the text is going
to start in the box, so we can do these commands outside the engine file....
/SAY Hello, Welcome!
|/RST is a command that makes the box and resets
the cursor position; /SAY takes the text
after it and prints is; /SLP waits for a keypress; and /END ends the file releasing control back
to the game's engine....
Now with this example, you may find it easy to
change things around, so you may wonder,
Now, some of you may be wondering, "hmm, looks
good, but how the hell do I make the
For the box shower, you want to allow a color
parameter, the printer, you want to allow
Now, this is how I would do it, it's not nessecarily the best or only way, but this is how I would parse the file...
I would set out to make the commands themselves,
a certain length, so I always know what
So make the following set....
|The "|" is the distinguisher, and the commands
themselves are 3 characters each, making it
Now for the box: You want to have a color parameter,
so I would just have it read in the
The printer is a little more interesting, we don't
know where the text will end, but we do know
The sleeper (Hold) would just read in a number,
and if it was 0, then just wait for the key
Beep, same deal...
So you have a subroutine or something that has
the interpretor in it, so you would being it like
|open talkfile$ as input as #1 'talkfile
being the script file to open
DO WHILE NOT EOF(1)
comd$ = ucase$(mid$(parseit$, 1, 4)) 'get the first 4 chars, the command...
if comd$ = "|BOX" then
elseif comd = "|HLD" then
elseif comd$ = "|BEP" then
|The most complex of these is the PRT command,
and how we get those MID$ will be
shown here, lets say we wanted to print HELLO WORLD! in color 15, at coords 15 and
20, here it would be...
|PRT 15 20 015 HELLO WORLD
As you can see, the first coord starts at 6 and
has 2 chars, and the next coord starts at 9 is 2
WOS's engine does things slightly differently,
instead of doing the parsing, its commands just
|Since it knows it needs one line for the coords,
1 for the color and 1 for the string, of course,
this can be done a number of ways, just choose the one that suits you best.
Coming next month...