Open Game Source: Bt Builder

Looking for Adventure

Maybe the release of Dungeons and Dragons 3rd Edition caused a feedback
loop or perhaps the eternally delayed Lunar 2: Eternal Blue is the
source of the problem. For whatever reason role-playing games (RPGs) have
been foremost in my thoughts. Searches into the open source RPGs has
been somewhat disappointing, although not that surprising.

Computer RPGs immerse the player in a world of mystery
slowly revealing a more or less linear plot. The entertainment comes
mainly from exploring the world and uncovering the storyline. Since
knowing the the storyline and world reduces the entertainment, it does
not benefit as greatly from open source methodology. In order
to capture one's imagination for hours, an immense amount of content is
required. Still, open source could be used to develop the core game
engine behind the games.

Unfortunately developers seem fixated with massive online role-playing
games. Of the single player games I looked at, two stand out.
Adonthell is a very
promising entry but still early in development. The stable codebase
demonstrates the graphics engine and movement. Development source has
a dialogue system using Python but it disagreed with the provided data
files when I tried it. Kwirk looks
like another candidate, but requires ClanLib which I have not installed
yet. Since none of the open source projects managed to quench my thirst,
I turned to other suppliers.

Building an Adventure

In the early 90s, Interplay released the Bard's Tale Construction Set (BTCS).
It is one of several game construction sets that were
produced at the time. While the Bard's Tale series is a classic, the
Construction Set didn't fare so well. In fact, finding even a single
game created with the set is a difficult task. So I decided to design
a game with it.

For the storyline, I borrowed a fairly standard plot for a role-playing
game. After a relic is stolen, the characters set off to retrieve the
artifact. They discover that an evil cult is attempting to summon their
master and that only a counterspell with the artifact can stop it. The
counterspell is actually a trick to release the demon since it must be
cast by a good wizard. If the characters seek out a knowledgeable sage
or priest, they can discover the truth and hide the artifact to ensure
the creature remains locked away. Of course, if the fools rush in, all
hell breaks lose.

Before I could really start developing, I needed a better idea of what
the Bard's Tale Construction Set could do so I tested various features.
Like the first game, the only place to save your characters is at the
Adventurer's Guild. Since the player must restart from the beginning
every time, it is best that all important locations be relatively close.
Unfortunately they also do not save the global flags that can be used
for the scripts. With this limitation, there is no reliable way to know
that an event has occurred. The best alternative seemed to be checking for
the existance of an item. For my adventure, the characters will need to
continue carrying the artifact after retrieving it.

Level construction has several hinderances as well. When designing a
map only a single type of wall and door tile can be created. In order
to keep the player from getting lost in the town, you need to construct
areas with memorable features. To make matters worse you have to account
for the phase door spell which could be used to bypass an obstacle. The
biggest frustration in developing a map, however, is the scripting of
special events.

Without specials, the Bard's Tale Construction Set would be
nothing more than a combat system. The specials allow you to tell
stories, plan encounters, purchase items, and other tasks. The
atrocious interface makes seemingly simple tasks complex. The commands
are arranged in an arbitrary order making it difficult to find the
appropriate command. The Draw Picture command selects
the picture by number. The only way to see the picture is to run the
game or with the monster editor. The manual for the game has some
sample specials that include an encounter with the king where:

Print "King Oswald wishes you well on your quests."

The interface cannot even enter the sample script that way because
Print can only handle 16 characters(1).
Ideally, the user should be able to edit the entire line as one and have
the program expand it into multiple commands. Granted conveying the
limit of twenty commands to the user would be much more difficult. The
available set of commands is another issue.

Initially, I was extremely disappointed with the scripting commands.
I tried to implement Roscoe's Energy Emporium, which is a shop that
restores magic points. If you look at the sample game that comes with
BTCS, they have an implementation of the shop as:

...
7. IF answer to "REVITALIZATION?" is yes
THEN set local flag 3
ELSE nothing
8. IF local flag 3 is set
THEN cast Magic Restore for 30 gold
ELSE nothing
9. IF local flag 3 is set
THEN regenerate 5 spell points
ELSE nothing
...

First it asks, do you want revitalization, yes or no. If you answer yes,
local flag 3 is set. You are then asked who wants Magic Restore and if
you will pay. A no response will still continue the special and
regenerate the 5 spell points. They even forgot to clear the local flag
at the end. In addition to Cast $X for $# Gold, the manual
lists a Sell $I for $# Gold but no convenient way to sell
anything else(2). Apparently Interplay found this problem
and added Can Take $# Gold from Party and Take $# Gold
from Party in version 1.2. Several other commands were introduced
as well that facilitate game creation.

The scripting system lacks almost any sort of expression capability
(3). To implement Roscoe's and healing temple as they
appear in the other games, you would need to determine the number of spell
points or hit points to restore and multiply that by some cost. For the
casino, I would have liked to have the ability to specify your wager but
there is no input number function. You could allow a restricted set of
wagers and simply check which option they choose but this requires a
couple of commands to achieve. Overall the specials are fairly flexible
but require a large number of commands to do anything which is a problem.

Fitting complicated scripts into the 20 command scripts is quite a
challenge. A simple rock, scissors, and paper casino(4)
easily reached the maximum and it did not even validate input or display
the rules of the game. The limit of 20 commands is a half-truth because an
if statement has both a then and an
else clause. You can even chain specials together using the
Do Special $S in $# Minutes. But these solutions are
complicated to implement and in the latter case use another special slot.

In learning the capabilities of the BTCS, I discovered that many of
my initial thoughts will need reworking. For example, I wanted to give
thieves a bonus at the casino but ran out of space. The unfinished
initial city is available here.

A New Beginning

Considering all the difficulty in developing a game you might wonder why
I choose to work with a poorly received builder. I purchased BTCS when
it came out and have never completed a game using it, so I knew some of
what I was getting into. There are certainly many more sites with
Forgotten Realms Unlimited Adventures information which I could have used
instead. Bard's Tale does have more sentimental value to me than the
computer Dungeons and Dragons games but there was another reason behind
my decision.

When BTCS was first released, the editor could print out the spells but
items, monsters, and maps were not available. I was disappointed by
this and figured out the file format for items and monsters so that I
could print out the information. With that in mind it shouldn't be too
hard to write an editor and eventually the game itself. Unfortunately
my information on the file formats was lost but reconstructing the
data did not take too long.

Bt Builder isn't much to look at yet. The source code is available
here. It is just a collection of class
files that can load the data files. I have not looked into the character
files, pictures or sound. These files could simply be dropped and use a
new format but I would like to support them if possible. At this point,
construction of the editor interface can begin. The BTCS interface is
usable and familiar but could stand for an overhaul.

Simply building an open source implementation of the Construction Set
is not entirely what I have in mind. There is no reason why we can't
fix the flaws in the system. The limit of 20 commands per special could
be eliminated. Garth's could be changed to sell more than the first ten
items and resell the items you've sold. Bender's Bank and the Apport
Arcane spell should be available for use. Eventually you should be able to
implement the entire Bard's Tale series in the environment.

Footnotes

(1) The manual incorrectly claims up to 25 characters can
be used but even that wouldn't work.

(2) As a work around, Matt Sullivan suggested selling an
item. You can then check for the item's existence, perform the desired
task and take back the item.

(3) There are a couple of commands that work on a counter
but they are extremely limited.

(4) The game is called fire, wood, and water but gameplay
and rules are equivalent to rock, scissors, and paper.