Q: What do you get when you cross a
Dungeon Master with a computer?
A: Programmed character creation --
without human hesitation!
Article and program by Joseph C. Spann
 
- - - - -
1st Edition AD&D - Dragon #74 - Dragon magazine

It cannot be simply coincidental that there are so many roleplaying
game enthusiasts among our nation's rapidly growing
number of "computer hackers." Or perhaps it would be more
accurate to say "so many computer hackers among the ranks of
RPG players," as evidenced by the presence of computer-oriented
columns and information in gaming magazines like this one. At
any rate, the balance of this commentary consists of some speculations
concerning this commonality of interests.

While the advantages of computer technology seem to hold a
great deal of promise for utilization in our kinds of games, the
exact manner of its implementation is unclear, and several false
starts have already been made.

Perhaps some insight might be gained by examining what it is
that attracts so many people to both role-playing games and
computers. Certainly, an active mind is required for both of these
activities. How tempting it would be to flatter ourselves and
attribute this combination of interests to a high order of intellectual
capacity.

Unfortunately, this notion won't stand up under close scrutiny.
We all know very intelligent individuals who have absolutely
no patience for role-playing games, or anything else they
view as impractical or "silly and childish." By the same token,
we also know people with average mental attributes who nonetheless
enjoy and succeed at hacking and conjuring their way out
of the dungeon that lies deep beneath the citadel.

Intelligence, by itself, is also no touchstone for success in
computer programming. One may have an encyclopedic knowledge
of all the commands and functions of a programming language,
but without the imagination to envision how a problem
can be expressed and solved using that language, the knowledge
is useless.

No great amount of intelligence or education is needed for a
game player to understand that a rapidly approaching hobgoblin
must be dealt with promptly and thoroughly; but unless the
weight of the shield and the slick oak of the spear shaft can be
felt, role-playing gaming is a pretty dull exercise in dice rolling
and will be only a diversion instead of a regular pastime. From
the player?s standpoint, one?s imagination needs to be working
on a full-time basis to get the most out of a role-playing game.

Imagination can be more than a way of setting a mental mood,
as it should be and often is used in role-playing games. Imagination
is used constructively by a gamer, or a computer programmer
? the way more commonly known as ?using your
head.? Many a good carpenter has asked ?what if . . .?? and then
built a building in a better way. In the last game I refereed, I saw
two students from the local university (one in accounting and
the other in art), a welder, a shop foreman, an auto parts clerk,
and a high-school student all immersed in solving a problem
that could not exist in any known universe. Yet, in their imaginations,
they saw a peril nearer and clearer than nuclear
holocaust. And, by using their imaginations, they solved it.

This reasoning obviously leads to the point that possession of
a good, active imagination is the common link between those
who enjoy both computer programming and fantasy roleplaying
games. Assuming this thesis is correct, let?s see if any of
the insights we seek flow from it.

Industrial automation, the incredible exploits of NASA, the
revolution in all phases of business and governmental recordkeeping,
and even the way this article was drafted have all
depended upon the availability of computers. As amazing as all
of these advances have been, not a single one of the many enormously
sophisticated mainframe computers used to effect these
wonders has ever shown the slightest trace of any imaginative
thought!

Little wonder, then, that efforts to use computers in our gaming
environment of bizarre beasts, colorful architecture, and
mostly non-group-centered behavior have been less than successful.
Those of us with enough years behind us to clearly
remember the heyday of radio can see a certain parallel with the
advent of television. In our mind?s eye, we had no difficulty
observing the perilous descent of Buck Rogers? space ship, described
on radio as it threaded its way down through the craggy
mountains of Venus in a blinding mist. This same scene, when
viewed on the seven-inch screen, was far more likely to provoke
youthful giggles and speculations regarding whether the show?s
producer had blown his whole budget on five pounds of dry ice
or was simply puffing cigar smoke at the toy space ship, held up
by wires that glinted off the spotlights.

Using all of our mental senses in a role-playing game, with
the help of a skilled Dungeon Master or module writer, we can
smell the rank odors from the nearby swamp, hear the dry scrape
of the dead leaves as they blow across the stones of the courtyard
in the cold wind, see the eerie glow of the torches as the procession
draws nearer and nearer through the yellow fog. Computer
graphics can be great fun, but they really can do little more than
suggest this kind of detail. . . . Excuse me for a moment while I
pull my cloak a little closer.

Computers, with all their grand capabilities, simply cannot
substitute for quality modules and referees. True enough, some
computer games are available which are basically narrative. An
objective judgement of these games will reveal that they are not
the equal of a good printed D&D® or AD&D? scenario. They
have only novelty to offer, and that at a very high price. They are
limited in the number of players who can participate, and are
almost invariably of the ?enter the room ? fight the monster ?
get the treasure ? find the way out? type of adventure, which is
of interest only to those who have never fought and thought
their way through a really well-conceived scenario.

In fairness, an individual who really badly wanted to play a
fantasy role-playing game and did not know a qualified DM or
any other possible players might enjoy this kind of game in
computer format. Beggars can?t be choosers. If cost were absolutely
no object and programmers who were very well versed in
the techniques of role-playing adventuring were utilized, it
might be possible to adapt some of the artificial intelligence
methods to produce a reasonable imitation of a well-run game.
The main problem with this concept is that the things that the
computer does well, it is not asked to do, and vice versa.

Well, surely there must be some way to use our expensive and
generally very useful electronic friends in the furtherance of our
fantasy role-playing interests. Of course there is! Read on:

All of the fears of our society notwithstanding, modern computers
have taken over only those tasks which are too dull and
repetitive or benefit from superhuman speed, strength, or
patience. It seems only logical to computerize tasks which are
not fun but have to be done with regularity. This applies to a
D&D campaign just as it does to the other aspects of our lives.
For instance, it doesn?t take too long for the fun to evaporate
from the seemingly endless dice rolling and arithmetic required
to generate a party of adventurers. Also, scrabbling around
through the charts and rules to determine a character?s saving
throws, special abilities, and so forth, is of limited appeal after
you?ve done it for a year or two. This is the kind of activity that
needs a helping hand from Silicon Valley.

As an illustration of what this helping hand might look like,
included with this article is a program that has been a great time
saver for me in working up parties of adventurers.

The ?Dungeon Master?s Personnel Service? provides ready-touse
adventurers, lacking only names (which are provided by the
operator). It has also proven extremely useful for working up
non-player characters.

Briefly described, the program makes all the 3d6 rolls needed
to determine player ability scores; makes all the adjustments arising
directly from them (number of retainers, adjustments to
armor class based on dexterity, etc.); and prints the character?s
basic abilities on the screen so that the player or DM may decide
to keep or discard the character. Each character paraded by for
inspection is numbered so that a player who is choosing his own
character knows how many chances he has left. If players are
operating the program to generate their own characters, I give
them the option of looking at a certain number of characters as
they unfold on the screen. Once rejected, a character is gone
forever. The counting function built into the program simply
tells players how many chances they have left.

If the decision is made that a character is viable, and the player
or DM wants to use it, the program will ask the operator to
input data regarding the character?s race and/or class, sex, and
name, plus the experience level at which the character will
begin. Based on this information, the program then calculates
hit dice, hit points (adjusted for constitution), saving throws,
and skill levels for cleric and thief abilities, and prints this
information to the screen. It is not difficult to modify the program
to direct the output to a printer, if you have one. By doing
so, a great deal of time can be saved by not having to manually
copy the material.

The data provided by the program is presented for review and
manual copying one more time before the operator is queried
regarding his desire for another character. All of these calculations
are made in strict accordance with the methods described in
the D&D rule books ? with one exception. The computer?s
speed is harnessed to eliminate a problem that has irritated me
since I began playing this game. This difficulty arises when the
dice describe a player with a strength of 17 and a constitution of
4. Strength and endurance are closely enough interrelated that
this sort of thing is absurd. It is just as bad when constitution is
very high and strength very low, or when a similarly disproportionate
relationship exists between intelligence and wisdom. It is
not practical to attempt to do anything about this situation
when dice are being used. To roll these abilities, compare them,
roll again, etc., would mean an enormous waste of time in developing
most characters. However, it is a simple operation to
insert a checking algorithm in the program to be sure that these
factors are in a rational relationship. If the computer produces a
constitution score that is less than two-thirds of the strength
score or more than one and one-half times as great as the
strength score, it is instructed to try again and keep on trying
until the conditions are met. The process is repeated with the
intelligence/wisdom relationship. What would take a great deal
of time to perform manually usually requires only a fraction of a
second in the computer. Only rarely is any delay even
perceptible.

If the operator selects a character on the basis of race, class may
be entered later; the converse is also true. Fifth is the highest
?starting level? offered, but this seems a reasonable cutoff point
when we consider that ?new? characters are being created. Characters
of extremely high level don?t just ?pop up? in an adventure
or a campaign.

Using this program, it is not difficult to create a high-quality
party of six players with a good mix of classes in 20 minutes,
including the time necessary to copy the characters? data from
the screen. If a printer is used, 10 to 15 minutes will suffice.
These characters are ready to go, needing only to spend their
?starting money? ? the amount of which was also calculated for
them by the program.

This program was originally written in Microsoft?s BASIC
80?, a very complete version of the language. However, the
commands and functions used in this program are of the most
elementary sort, and will be included in any BASIC dialect
worthy of the name. The idea, of course, was to develop a program
that can be implemented on almost any computer as
written.

Screen display considerations were carefully considered, and
the decision was made not to exceed a width of 40 columns in
this version. There is a considerable amount of tabular material,
and it is just nearly impossible to get it in less than 40 columns.
This width will accommodate most Commodore PET, Commodore
64, Apple, Atari, and TRS-80 users. And of course, those
with Heathkit, IBM, or other 80-column CRT displays will have
no problem at all. Those of you with Commodore VIC-20?s and
other units with less than 40-column display capabilities can
perhaps use shorter abbreviations, or even break the tabular displays
up into two parts and display them consecutively. It is just
impossible to fit the peculiarities of every piece of hardware with
any useful program.

The existence of so many TRS-80 computers did pose one
problem which was solved with that type of computer in mind.
Although these machines use a 64-column line, which is good,
they only display 16 lines, whereas most displays have at least 24
lines available. Consequently, this program is written to display
a maximum of 16 lines at a time.

Although the program is rather long, it will fit into a 16K
memory with plenty to spare, if a few precautions are observed
when typing the program into your machine. First, do not
include anything before line 1140 or the REMarks. They are of
no use once the program is copied and debugged. Although you
will not be copying the REMarks, do not change the other line
numbers: simply skip the REM statements.

Some BASIC dialects require the RANDOMIZE operation and
others do not. Check your manual to see if you need to include
this operation to get a new random number seed. The only other
command or function which may vary from machine to
machine, so far as I can tell, is PRINT CHR$(12). This is simply
an instruction to clear the screen and home the cursor.

Copying a long program like this can be very tiring, and the
possibility of a mistake grows as fatigue increases. It would be
better to type it in over three or four sessions than to try getting
it done all at once.

Following is a brief description of the program:
1 . 1000-1130 Title block

2. 1140-1160 Dimensions array variable PS, gets new random
number, and clears screen.

3. 1170-1320 Screen title

4. 1360-1460 Rolls 3d6 and assigns scores to ability areas.

5. 1530-1640 Prints strength score and calculates and
    prints adjustments due to strength.

6. 1680-1720 After checking for balance with strength,
    repeats above procedure for constitution,
    except printing of adjustments is deferred.

7. 1760-2080 Prints intelligence score, calculates and
    prints adjustments due to intelligence.

8. 2120-2300 Process is repeated for dexterity.

9. 2340-2470 After checking for balance with intelligence,
    process is repeated for wisdom.

10. 2510-2610 Process is repeated for charisma.

11. 2650-2920 Race/class choice is made and screened for
    consistency with ability levels.

12. 2960-3040 Number of sides for hit dice is assigned,
    based on class.

13. 3090-3240 Character level is input, and hit dice and hit
    points are calculated and printed.

14. 3280-3460 Cleric skills assigned based on level.

15. 3500-3670 Thief skills assigned based on level.

16. 3720-3790 Characters are counted, count displayed, and
    selection made to keep/reject the character.

17. 3830-3920 Character's name, class, race, gender input.

18. 3960-4010 Character's money is calculated.

19. 4060-4130 Switching operation to obtain printout of
    skills appropriate to each class/race.

20. 4180-4280 Program ends.

21. 4330-4470 Subroutine for calculating hit points, based
    on hit dice and constitution.

22. 4510----- Prints out data based on character's level,
    class, race, etc. in a recap format.  The balance
    is obvious.

Screen formats -- sample run:
Note: The small displays shown below are not intended to be
exact replicas of the manner in which text and inputs are displayed
on the screen, but they are essentially accurate. Characters
printed in italic type inside square brackets are operator inputs.

(# 1)
RANDOM NUMBER SEED (-32768 to 32767)?

(# 2)
DM'S PERSONNEL SERVICE
PRODUCES CHARACTER ABILITY SCORES
FOR DUNGEONS & DRAGONS(R)
IF YOU ARE READY FOR THE 1ST
CHARACTER, ENTER A ONE? [1]

(# 3)
CHARACTER'S STRENGTH IS 13
*ADD 1 TO ROLLS TO HIT, DAMAGE, OPEN DOORS
CONSTITUTION SCORE IS 13
CHARACTER?S INTELLIGENCE 12
*LITERATE IN NATIVE TONGUE
*45% TO KNOW SPELL ? MIN/MAX PER LVL: 5/7
CHARACTER?S DEXTERITY IS 11
CHARACTER?S WISDOM IS 11
CHARACTER?S CHARISMA IS 11
*CAN HAVE 4 RETAINERS WITH MORALE OF 4
IF YOU HAVE THIS DATA AND ARE READY TO
PROCEED, ENTER A ONE? [1]

(# 4)
CLASS/RACE LIST
(1) FIGHTER (4) HALFLING
(2) MAGIC USER (5) ELF
(3) CLERIC (6) DWARF
(7) THIEF

SELECT THE RACE/CLASS THAT YOU WISH
YOUR CHARACTER TO HAVE AND ENTER THE
NUMBER FROM THE TABLE ABOVE? [1]

(# 5)
(Same as #4, plus:)
CHARACTER LEVEL RANGE... ONE (1) TO FIVE (5)
AT WHICH LEVEL WILL CHARACTER START? [4]

(# 6)
YOUR CHARACTER HAS 4 HIT DICE
YOUR CHARACTER WOULD HAVE 19 HIT POINTS
THIS IS CHARACTER # ( 1 )
DO YOU WANT THIS CHARACTER (Y/N)? [Y]

(# 7)
WHAT IS CHARACTER'S NAME? [OTHO THE FIERCE]

(#8)
(Same as # 7, plus:)
WHAT IS CHARACTER'S RACE? [HUMAN]

(# 9)
(Same as # 7 and # 8, plus:)
WHAT IS CHARACTER'S GENDER? [MALE]

(# 10)
(Same as # 7, # 8, and # 9, plus:)
WHAT IS CHARACTER'S CLASS? [FIGHTER]

(# 11)
RECAP OF CHARACTER ABILITIES
NAME OTHO THE FIERCE
RACE HUMAN HIT DICE: 4
GENDER MALE
CLASS FIGHTER HIT POINTS: 19
LEVEL 4
NOTE!! COPY THIS AND THE INFORMATION THAT
FOLLOWS TO THE CHARACTER RECORD
SHEET NOW. IT WILL NOT BE AVAILABLE AGAIN!

TO CONTINUE, ENTER A ONE? [1]

(# 12)
OTHO THE FIERCE'S STRENGTH IS 13
*ADD 1 TO ROLL TO HIT, DAMAGE, OPEN DOORS
OTHO THE FIERCE?S CONSTITUTION IS 13
*LITERATE IN NATIVE TONGUE
OTHO THE FIERCE?S DEXTERITY IS 11
OTHO THE FIERCE?S WISDOM IS 11
OTHO THE FIERCE?S CHARISMA IS 11
*CHARACTER MAY HAVE 4 RETAINERS, MORALE OF 4
TO CONTINUE, ENTER A ONE? (1)

(# 13)
SAVING THROW TABLE
DEATH PARALYSIS RODS
RAY OR MAGIC OR TURN DRAGON STAVES
POISON WANDS TO STONE BREATH OR SPELLS
10 11 12 13 14
MAY WEAR ANY ARMOR AND USE SHIELD
MAY USE ANY WEAPON
NO SPELLS, BUT MAY USE MAGIC ARTICLE
THIS CHARACTER HAS 110 GOLD PIECES
ANOTHER CHARACTER (Y/N)? [N]

The character used for this sample run is the first one that
turned up when I ran the program; no attempt was made to find
a more interesting one. If the character had been generated with
ability scores appropriate to a thief or a cleric, and this role had
been chosen for him or her, then we would have seen a printout
of a chart showing the cleric?s table of rolls needed to turn the
undead, or the thief?s special skill roll requirements.

JUNE 1983