Classic Computer Magazine Archive ANTIC VOL. 2, NO. 8 / NOVEMBER 1983



CASTING CHARACTERISTICS
More ways to lold your minions
by BOB ALBRECHT and GEORGE FIREDRAKE


DragonSmoke poses problems for you to ponder, questions for you to answer, programs for you to write, and whatever other mischief we might cunningly contrive. As time goes on, and as issue follows issue, we will answer some of the problems we create. Better yet, you answer.

FANTASY ROLE PLAYING GAMES

Millions of people are playing fantasy role playing games. A role playing game is a game in which one or more players create and control characters (adventurers) who live their imaginary lives in a specially made game world. The game world is created, managed, and operated by a GameMaster (GM), also called a referee, adventure master, or dungeon master (DM).

If you want to play, instead of just watch, you must create a character, an adventurer whom you guide in the Game-Master’s world. In "GameMaster’s Apprentice," we will show you how to create characters for RuneQuest, Worlds of Wonder, and Adventurer’s Handbook: A Beginners Guide to Role Playing Games.

Your character begins with seven basic characteristics: Strength (STR), Constitution (CON), Size (SIZ), Intelligence (INT), Power (POW), Dexterity (DEX), and Charisma (CHA). These characteristics are similar to the characteristics in other game systems, such as Dungeons & Dragons or Tunnels and Trolls. The following table shows approximate equivalents.
 
 
Adventurer’s Handbook, 
RuneQuest, or  
Worlds of Wonder 
Strength (STR) 
Constitution (CON) 
Size (SIZ) 
Intelligence (INT) 
Power (POW) 
Dexterity (DEX) 
Charisma (CHA)
Dungeons & Dragons (D&D) 
Strength (STR) 
Constitution (CON) 
Done Differently 
Intelligence (INT) 
Wisdom (WIS) 
Dexterity (DEX) 
Charisma (CHA)
Tunnels & Trolls (T&T) 
Strength (STR) 
Constitution (CON) 
Done Differently 
Intelligence (INT) 
Luck (LK) 
Dexterity (DEX) 
Charisma (CHA)
 
 

You create a character by rolling three six-sided dice for each characteristic. If you have been reading "DragonSmoke," you know we use the abbreviation "3D6" to mean "three six-sided dice."

Oh, you don’t have 3D6. Never mind... use your friendly ATARI to roll up a character and display the numbers on the screen.

CREATE A CHARACTER

In the May, 1983 issue we showed you a simple program to roll a character. There is always another way! So this time we will show you several ways to do the same thing: create a character. We begin with a program suggested by Keith Tacia. Thanks, Keith.

100 REM ** CREATE A CHARACTER
105 REM ** SUGGESTED BY KEITH TACIA
110 DIM TRAIT$(3)
200 REM ** GET READY
210 RESTORE 220 PRINT CHR$(125)
300 REM ** ROLE & DISPLAY CHARACTER
320 FOR K = 1 TO 7
330 READ TRAIT$
340 GOSUB 910
350 PRINT TRAIT$, DICE
360 NEXT K
370 DATA STR, CON, SIZ, INT, POW, DEX, CHA

500 REM ** TELL HOW TO DO AGAIN
510 PRINT
520 PRINT "TO DO AGAIN, PRESS SPACE"
530 OPEN #1,4,0,"K:"
540 GET #1,KEY
550 IF KEY<>ASC(" ") THEN 540
560 CLOSE #1
570 GOTO 210

900 REM ** DICE SUBROUTINE
910 D1 = INT(6*RND(0))+1
920 D2=INT(6*RND(0))+1
930 D3=INT(6*RND(0))+1
940 DICE = D1+ D2+ D3
950 RETURN

It’s easy to modify this program for D&D or T&T. Change only lines 320 and 370. To make it even easier, include the number of traits (characteristics) in the DATA statement. For our program, make these changes:

310 READ NT
320 FOR K = 1 TO NT
370 DATA 7,STR,CON,SIZ,INT,POW,DEX,CHA

Now for D&D or T&T, change only line 370.
There’s always another way, Change only block 300 as follows:

300 REM ** ROLL & DISPLAY CHARACTER
310 READ TRAIT$
320 IF TRAIT$ = "ZZZ" THEN 510
330 GOSUB 910
340 PRINT TRAIT$,DICE
350 GOTO 310
360 NEXT K
370 DATA STR,CON,SIZ,INT,POW,DEX,CHA,ZZZ
399 REM

There’s always another way. Instead of storing the characteristic abbreviation in a DATA statement, pack them into a string. In our first program, rewrite blocks 100, 200, and 300 as follows:

100 REM ** CREATE A CMARACTER
110 DIM ABBR$(21),TRAIT$(3)
120 ABBR$ = "STRCONSIZINTPOWDEXCHA"

200 REM ** GET READY
210 PRINT CHR$(125)

300 REM ** ROLL & DISPLAY CHARACTER
310 FOR K=1 TO 7
320 TRAIT$ = ABBR$(3* (K – 1) + 1,3*K)
330 GOSUB 910
340 PRINT TRAITS,DICE
350 NEXT K
370 DATA STR,CON,SIZ,INT,POW,DEX,CHA,ZZZ

For D&D or T&T, change only lines l20 and 310.

D&D    120 ABBR$ = "STRCONINTWISDEXCHA"
T&T    120 ABBR$ = "STRCONIQ_LK_DEXCHK’

Again, to make changes even easier, rewrite line 310 like this:

310 FOR K = 1 TO LEN(ABBR$)/3

There’s always another way. We suggest two for you to write.

1. Suppose we write block 100 as follows:

100 REM ** CREATE A CHARACTER
110 DIM ABBR$(24), TRAIT$(3)
120 ABBR$ = "STRCONSIZINTPOWDEXCHAZZZ"

We want you to use that ZZZ in your rewrite of block 300, but don’t use a FOR-NEXT loop.

2. Write a program that lets the user select which game to roll for. It might begin like this:

I CAN ROLL A CHARACTER FOR:
    DUNGONS & DRAGONS (D)
    RUNEQUEST (R)
    TUNNELS & TROLLS (T)
WHICH GAME (D, R, OR T)?

If you press D, R, or T, you get a character using the abbreviations for that game. To go again, press the space key.
THE CAREFULLY CONTRIVED CHARACTER

Instead of asking you to use dice to roll up a character, a GameMaster might give you a certain number of points to "spend" on the seven characteristics. You may assign 3 to 18 points for any one characteristic, but the total must add up to the number given you by the GM. We have written a primitive worksheet program to help you do this. When you run it, first you see this:

1 STR    0
2 CON    0
3 SIZ    0
4 INT    0
5 POW    0
6 DEX    0
7 CHA    0
TOTAL POINTS: 0
CHANGE (1 TO 7)?

You may select which characteristic to change by pressing a number key from 1 to 7. The computer then asks:

NEW VALUE?

Type the new value and press [RETURN]. The new value appears on screen along with a new TOTAL POINTS.  You can select a characteristic and enter a new value as many times as you want until you get just the character you want, with exactly the number of TOTAL POINTS the GM said you could have.

When the computer asks: CHANGE (1 TO 7)?, you may start over by pressing the zero [0] key.

Next time, we will show you our program. In the meantime, write your own.  We suggest you store the values of the characteristics in an array.  Here is an outline for our program.

100 REM ** CONTRIVE A CHARACTER
200 REM ** SET ARRAY TO ZERO
300 REM ** SET TOTAL POINTS TO ZERO
400 REM ** DISPLAY WORKSHEET
500 REM ** CHANGE WHICH ONE
600 REM ** NEW VALUE
700 REM ** COMPILE TOTAL POINTS
800 REM ** GO AROUND AGAIN

THE CHARACTER FILE
Last time, we challenged you to write two programs, one to look up a character record and one to scan the entire character file. We have written both programs so they can be in memory at the same time.

· CHARACTER FINDER begins at line 1000. To run it, type RUN and press [RETURN].
· SCAN CHARACTER FILE begins at line 2000. To run it, type GOTO 2000 and press [RETURN]
· To stop either program, press [BREAK]
· The programs use three subroutines, located at line 10000, 11000, and 12000.
· Both programs use a common data base, beginning, at line 30000.

This time, we show you our CHARACTER FINDER program, the three subroutines, and the data base of charactcr records. Try your hand at writing the SCAN CHARACTER FILE program. Use our three subroutines to make your task easier.

1000 REM ** CHARACTER FINDER
1010 DIM NAME$(30),WHO$(30)
1100 REM ** ASK FOR NAMR, WHO$
1110 PRINT CHR$(125)
1120 PRINT "NAME OF CHARACTER";
1130 INPUT WHO$
1200 REM ** LOOK FOR WHO$
1210 RESTORE
1220 GOSUB 11010:REM GET A RECORD
1230 IF NAME$<> WHO$ THEN 1310
1240 GOSUB 12010:REM DISPLAY RECORD
1250 GOTO 1410

1300 REM ** CHECK FOR EOF (ENDFILE)
1310 IF NAME$<> "ENDFILE" THEN 1220
1320 PRINT "I DON’T KNOW "; WHO$
1400 REM ** TELL HOW TO DO AGAIN
1410 GOSUB 10010: REM DO AGAIN SUBR.
1420 GOTO 1110

2000 REM ** SCAN CHARACTER FILE

You write the SCAN CHARACTER FILE program. Use our subroutines and data base, below.

10000 REM ** DO AGAIN SUBROUTINE
10010 PRINT
10020 ? "TO DO AGAIN, PRESS SPACE"
10030 OPEN #1,4,0,"K:"
10040 GET #1, KEY
10050 IF KEY <> ASC(" ") THEN 10040
10060 CLOSE #1: RETURN

11000 REM ** GET RECORD SUBROUTINE
11010 READ NAME$
11020 READ STR,CON,SIZ,INQ,POW,DEX,CHA
11030 RETURN

12000 REM ** DISPLAY RECORD SUBROUTINE
12010 PRINT CHR$(125)
12020 PRINT NAME$:PRINT
12030 PRINT "STR",STR
12040 PRINT "CON",CON
12050 PRINT "SIZ",SIZ
12060 PRINT "INT",INT
12070 PRINT "POW",POW
12080 PRINT "DEX",DEX
12090 PRINT "CHA",CHA:RETURN

30000 REM ** DATA BASE
30010 DATA ALOYSIOUS
30011 DATA 10,11,10,12,10,12,9
30020 DATA BAROSTAN
30021 DATA 17,17,13,8,7,15,6
30030 DATA BRIDLA
30031 DATA 11,12, 10, 15,6,11, 16
30040 DATA DERNFARA
30041 DATA 13,13,8,13,4,17,6
30050 DATA JOLEEN
30051 DATA l3,11,7,13,8,17,13
30060 DATA ROKANA
30061 DATA 9,9,9,17,18,9,10
30070 DATA ENDFILE
30071 DATA 0,0,0,0,0,0,0


Copyright @ 1983 by DragonQuest, P.O. Box 310, Menlo Park, CA 94025. Portions of "GameMasters Apprentice" are from book-in-progress called Adventurer’s Handbook: A Beginner’s Guide to Role Playing Games.