Powers and Perils

Computer Character Generation for Powers and Perils

Powers & Perils is perhaps the most comprehensive fantasy roiepiaying system yet to hit the market. Once you have finished creating a character, you have a complete person on your hands. A complete estimation of what he or she is capable of and a good estimation of their chance of success at any endeavor, from the most mundane to the completely bizarre.

The big complaints with Powers & Perils are the editing of the rule books, which can make it hard to generate characters, and the complexity of creating a Powers & Perils character.

The program that follows addresses the second problem. It takes you from the initial inception of a character through to the point where you assign Initial Increase Points. All die rolls and special modifiers are handled by the computer. By using the program, you can determine a character’s Characteristics, Age, Size, Race, Social Standing and Initial Increase Points with relative ease.

Entering the Program

The program listing contains a few symbols that are not entered as they are shown. The first ofthese is (C/UP) and (C/DN). (C/UP) is entered by hitting the shift/cursor. (C/DN) uses the unshifted cursor.

From time to time you come across a number in brackets. The number, in these cases. is the number of blank spaces entered at that point of the program on that line. Enter these spaces using the spacebar.

You will also find statements which are abbreviations for var- ious colors in parentheses. These might be (BLK) or (YELO). The number keys at the top of youi keyboard have a color printed on the front face of each key. Where the program requests a color, it is implemented by holding down the CONTROL key and hitting the number for that color. In the case of (BLK), this is CONTROL and then 1. The character that appears on the screen when this is done may not have any apparent connection to the program. It is correct just the same.

Running the Program

After you enter the program by typing it in and save it to disk or tape (see the appropriate instructions in your owner's manual) you can run it by typing the command RUN and hitting RETURN.

The program starts by asking you to name the character, select his country of origin and choose an occupation. After that, you select the character’s race and sex. This done, the next screen comes on after a short delay.

The second screen displays the new character’s native ability at the top and asks you to allocate Maximum Ability modifiers for the first characteristic. Enter a number from 1.5 to 4, in increments of .5 only, and hit RETURN. When this is done the screen will display the Native Ability, Multiplier used, Maximum Ability and the Balance of Multiplier points remaining to be assigned. It then proceeds to the next characteristic. You repeat this procedure until all eight modifiers have been assigned. If you exceed the number of multipliers available, the computer will clear the multipliers assigned to that point and start you over at Strength.

When all of the multipliers have been entered the computer will ask if the numbers entered are correct. If you enter "N", it starts you over at Strength. On a "Y" it will display the information generated for the character on a new screen and ask if you would like to send that information to your printer. After you respond to this, and the printout is complete if one is requested, it will ask if you would like to create another character. If you enter "Y" you are returned to the beginning of the program. If you enter "N" the program will end.

Those of you who would like to modify this program will find:

  1. Lines 1-4 Initialize the data array that holds the various modifiers.
  2. Lines 5 - 19 are the lines that contain the Main Program.
  3. Lines 19- 22 restart the main loop or exit the program.
  4. All subroutines are labeled in the program at the point where they are called from.

The only modification to the system is in the determination of age. The difference between the game’s age distribution curve and random age generation turned out to be negligible. I did not feel the difference was worth the additional code that its simulation would require.

In the future I hope to publish a Skills and Expertise Editor to simplify this process as well. Any one wishing to convert this program to other machines should feel free to do so. You could even submit it to HEROES if you wanted to.

1 POKE53280,8:POKE 53281,8:POKE 646,7
2 PRINT "(Clr)":POKE 141,PEEK(53266)
3 ON CR(28,8)
4 GOSUB276:REM-Load Modifiers into the Array
5 GOSUB23:REM-Get character info from user
6 GOSUB36:REM-Init the X value for the Array
7 GOSUB45:REM-Retrieve char modifiers
8 GOSUB65:REM-Compute Characteristics
9 GOSUB82:REM-Compute Constitution
10 GOSUB101:REM-Compute Appearance
11 GOSUB135:REM-Compute Total Char Multipliers
12 GOSUB63:REM-Compute Age
13 GOSUB138:REM-Compute Station
14 GOSUB148:REM-Compute Height
15 GOSUB151:REM-Compute Weight
16 GOSUB183:REM-Assign Char Multipliers
17 GOSUB113:GOSUB273:REM-Display complete char and ask for printout 
18 GOSUB246:REM-Printer Option
19 PRINT"MAKE A NEW CHARACTER?<Y/N>"
20 GET ZB$:IFZB$<>"Y"ANDZB$<>"N"THEN20
21 IF ZB$="Y" THEN5
22 END
23 INPUT"(CLR)CHARACTER’S NAME[1]";N$
24 INPUT"COUNTRY OF ORIGIN[1]";ST$
25 INPUT"OCCUPATION[1]";TD$
26 PRINT"(C/DN)(C/DN)(C/DN)(C/DN)(C/DN)(C/DN)(C/DN)(C/DN)SELECT A RACE-"
27 PRINT"[8]1-HUMAN"
28 PRINT"[8]2-ELVEN"
29 PRINT"[8]3-FEARIE"
30 PRINT"[8]4-DWARVEN"
31 GET X$:IF X$<"1"ORX$>"4"THEN 31
32 X = ASC(X$)-49
33 PRINT"SEX (M/F)"
34 GET S$:IF S$<>"M"AND S$<>"F"THEN34
35 PRINT"HANG ON A SECOND":RETURN
36 IF X=0 THEN R$="HUMAN"
37 IF X=1 THEN R$="ELVEN" 
38 IF X=2 THEN R$="FAERIE"
39 IF X=3 THEN R$="DWARVEN"
40 X=X*2
41 IF S$="M" THEN S$="MALE"
42 IF S$="F" THEN S$="FEMALE"
43 XR=X:X=X+XM
44 RETURN
45 SR=CR(0,X)
46 SM=CR(1,X)
47 DX=CR(2,X)
48 AG=CR(3,X)
49 IN=CR(4,X)
50 WI=CR(5,X)
51 EL=CR(6,X)
52 EM=CR(7,X)
53 CN=CR(8,X)
54 AP=CR(9,X)
57 RA=INT(RND(1)*10)+INT(RND(1)*10):IF RA<2 THEN57
58 RETURN
59 RB=INT(RND(1)*10):IF RB=0 THEN 59
60 RETURN
61 RC=INT(RND(1)*6)+INT(RND(1)*6):IF RC<2 THEN61
62 RETURN
63 RD=INT(RND(1)*13)+17:IF RD=0 THEN63
64 RETURN
65 GOSUB57
66 SR=SR+RA:IF SR<1 THEN SR=1
67 GOSUB57
68 SM=SM+RA:IF SM<1 THEN SM=1
69 GOSU857
70 DX=DX+RA:IF DX<1 THEN DX=1
71 GOSUB57
72 IN=IN+RA:IF IN<1 THEN IN=1
73 GOSUB57
74 WI=WI+RA:IF WI<1 THEN WI=1
75 GOSUB57
76 EL=EL+RA:IF EL<1 THEN EL=1
77 GOSUB57
78 EM=EM+RA:IF EM<1 THEN EM=1
79 GOSUB57
80 AG=AG+RA:IF EM<1 THEN AG=1
81 RETURN
82 GOSUB57
83 CN=CN+RA
84 IF X=1 THEN X=0
85 IF X=2 THEN X=1
86 IF X=3 THEN X=1
87 IF X=4 THEN X=2
88 IF X=5 THEN X=2
89 IF X=6 THEN X=3
90 IF X=7 THEN X=3
91 N=23
92 GOSUB59
93 IF RB=1 THEN RB=N
94 IF RB>1 AND RB<4 THEN RB=1+N
95 IF RB>3 AND RB<8 THEN RB=2+N
96 IF RB>7 AND RB<10 THEN RB=2+N
97 IF RB=10 THEN RB=N+5
98 CN=CN*CR(RB,X):IF CN<1 THEN CN=1
99 IF CN>INT(CN) THEN CN=INT(CN)+1
100 RESTORE:RETURN
101 GOSUB57
102 X=X+4
103 AP=AP+RA
104 GOSUB59
105 IF RB=1 THEN RB=N
106 IF RB>1 AND RB<4 THEN RB=1+N
107 IF RB>4 AND RB<8 THEN RB=2+N
108 IF RB>7 AND RB<10 THEN RB=2+N
109 IF RB=10 THEN RB=N+5
110 AP=AP*CR(RB,X):IF AP<1 THEN AP=1
111 IF AP>INT(AP) THEN AP=INT(AP)+1
112 RESTORE:RETURN
113 PRINT "(CLR)NAME[3]";N$
114 PRINT "FROM[3]";ST$
115 PRINT TD$
116 PRINT R$"[1]"S$
117 PRINT "(C/DN)[17]NATIVE[3]MAX"
118 PRINT "STRENGTH[8]"SR"[2]"TR
119 PRINT "STAMINA[9]"SM"[2]"TM
120 PRINT "DEXTERITY[7]"DX"[2]"EX
121 PRINT "AGILITY[9]"AG"[2]"BG
122 PRINT "INTELLIGENCE[4]"IN"[2]"JN
123 PRINT "WILL[12]"WI"[2]"XI
124 PRINT "ELOQUENCE[7]"EL"[2]"FL
125 PRINT "EMPATHY[9]"EM"[2]"FM
126 PRINT "CONSTITUTION[4]";CN
127 PRINT "APPEARANCE[6]";AP
128 PRINT "SOCIAL STANDING[1]";SO
129 GOSUB57:IC=(RD*2)+SO+RA
130 PRINT"(C/DN)AGE IS[1]"RD"[1]YEARS"
131 PRINT"(C/DN)"[1]HT"[1]INCHES TALL"
132 PRINT WT"[1]Pounds"
133 PRINT "AND HAS[1]"IC"[1]INCREASE POINTS"
134 RETURN
135 GOSUB61
136 ML=RC+14
137 RETURN
138 REM****COMPUTE STATION****
139 PO=INT(RND(1)*100)
140 IF PO>0 AND PO<21 THEN SO=0
141 IF PO>20 AND PO<51 THEN SO=1
142 IF PO>50 AND PO<76 THEN SO=2
143 IF PO>75 AND PO<91 THEN SO=3
144 IF PO>90 AND PO<97 THEN SO=4
145 IF PO>96 AND PO<100 THEN SO=6
146 IF PO=100 THEN SO=10
147 RETURN
148 REM****HEIGHT****
149 HT=SR+SM+CR(10,XR)
150 RESTORE:RETURN
151 IF XR<2 THEN153
152 IF XR>1THEN167
153 REM****HUMAN WEIGHT COMPUTE****
154 N=11
155 GOSUBS9
156 IF RB=1 THEN RB=N
157 IF RB>1 AND RB<4 THEN RB=1+N
158 IF RB>3 AND RB<8 THEN RB=2+N
159 IF RB>7 AND RB<1O THEN RB=2+N
160 IF RB=1O THEN RB=N+5
161 IF HT<60 THEN XR=O
162 IF HT>59 AND HT<71 THEN XR=2
163 IF HT>70 AND HT<81 THEN XR=4
164 IF HT>80 THEN XR=6
165 XF=XM+XR;WT=CR(RB,XF)*HT
166 IF WT>INT(WT) THEN WT=INT(WT)+1
167 REM****NON - HUMAN WEIGHT COMPUTE****
168 N=16
169 GOSUB59
170 RM=0
171 IF HT<40 THEN RM=-1
172 IF HT>71 THEN RM=3
173 RB=RB+RM
174 IF RB=0 THEN RB=N
175 IF RB=1 THEN RB=1+N
176 IF RB>1 AND RB<4 THEN RB=2+N
177 IF RB>3 AND RB<8 THEN RB=3+N
178 IF RB>7 AND RB<10 THEN RB=5+N
179 IF RB=10 THEN RB=N+6
180 XF=XR+XM~2
181 WT=CR(RB.XF)*HT
182 RESTORE:RETURN
183 REM****ALLOCATE MAX ABILITY MODIFIERS****
184 PRINT"(BLK)(CLR)YOU HAVE[1]"ML"[1]POINTS TO ALLOCATE"
185 PRINT"(WHT)STR="SR"[1]STA="SM"[1]DEX="DX"[1]AG="AG
186 PRINT"INT="IN"[1]WIL="WI"[1]ELQ="EL"[1]EMP="EM
187 PRINT"(YELO)[9]NATIVE[4]MULT[3]MAX[4]BAL."
188 TU=0:TT=0:PRINT "STRENGTH[5]"SR:INPUT"[18](C/UP);MP:GOSUB239
189 NL=ML-MP:TR=SR*MP
190 IF TT=1 THEN188
191 IF TR>INT(TR) THEN TR=INT(TR)+1
192 PRINT"[26](C/UP)"TR"[3]"NL
193 IF NL<=0 THEN183
194 TU=0:TT=0:PRINT "STAMINA[6]"SM:INPUT"[18](C/UP)";MP:GOSU8239
195 NL=NL-MP:TM=SM*MP
196 IF TT=1 THEN194 
197 IF TM>INT(TM) THEN TM=INT(TM)+1 
198 PRINT"[26](C/UP)"TR"[3]"NL
199 IF NL<=0 THEN183
200 TU=0:TT=0:PRINT "DEXTERITY[4]"DX:INPUT"[18](C/UP)";MP:GOSUB239
201 NL=NL-MP:EX=DX*MP
202 IF TT=1 THEN200
203 IF EX>INT(EX) THEN EX=INT(EX)+1
204 PRINT"[26](C/UP)"EX"[3]"NL
205 IF NL<=0 THEN183
206 TU=0:TT=0:PRINT "AGILITY[6]"AG:INPUT"[18](C/UP)";MP:GOSUB239
207 NL=NL-MP:BG=AG-MP
208 IF TT=1 THEN206
209 IF BG>INT(BG) THEN BG=INT(BG)+1
210 PRINT"[26](C/UP)"BG"[3]"NL
211 IF NL<=0 THEN183
212 TU=0:TT=0:PRINT"INTELLIGENCE[1]"IN:INPUT"[18](C/UP)";MP:GOSUB239
213 NL=NL-MP:JN=IN*MP
214 IF TT=1 THEN212
215 IF JN>INT(JN) THEN JN=INT(JN)+1
216 PRINT"[26](C/UP)"JN"[3]"NL
217 IF NL<=0 THEN183
218 TU=0:TT=0:PRINT "WILL[9]"WI:INPUT"[18](C/UP)";MP:GOSU8239
219 NL=NL- MP:XI=WI*MP
220 IF TT=1 THEN218
221 IF XI>INT(XI) THEN XI=INT(XI)+1
222 PRINT"[26](C/UP)"XI"[3]"NL
223 IF NL<=0 THEN183
224 TU=0:TT=0:PRINT "ELOQUENCE[4]"EL:INPUT"[18](C/UP)";MP:GOSUB239
225 NL=NL-MP:FL=EL*MP
226 IF TT=1 THEN224
227 IF FL>INT(FL) THEN FL=INT(FL)+1
228 PRINT"[26](C/UP)"FL"[3]"NL
229 IF NL<=0 THEN183
230 TU=0:TT=0:PRINT "EMPATHY[6]"EM:INPUT"[18](C/UP)";MP:GOSU8239
231 NL=NL-MP:FM=EM*MP
232 IF TT=1 THEN230
233 IF FM>INT(FM) THEN FM=INT(FM)+1
234 PRINT"[26](C/UP)"FM"[3]"NL
235 IF NL<=0 THEN183
236 PRINT"  IS THIS OK (Y/N)"
237 GETZA$:IFZA$<>"Y"ANDZA$<>"N" THEN237
238 IF ZA$="N" THEN184:IF ZA$="Y" THEN RETURN
239 VT=/.5:UT=INT(VT):IF VT=UT THEN241
240 IF VT<>UT THEN242
241 IF MP>=1.5 AND MP<=4 THEN245
242 PRINT"NUMBER OUT OF RANGE, TRY AGAIN"
243 TT=1
244 GET ZZ$:IF ZZ$="[1]" THEN244
245 RETURN
246 IF IT$="N"THEN RETURN
247 OPEN 4,4
248 PRINT#4,""
249 PRINT#4,"(CLR)NAME[1]";N$
250 FRINT#4, "FROM[1]":ST$
251 PRINT#4,TD$
252 PRINT#4,R$"[1]"S$
253 PRINT#4,""
254 PRINT#4, "[13]NATIVE[3]MAX"
255 PRINT#4, "STRENGTH[8]"SR"[2]"TR
256 PRINT#4, "STAMINA[9]"SM"[2]"TM
257 FRINTIM, "DEXTERITY[7]"DX"[2]"EX
258 PRINTIM, "AGILITY[9]"AG"[2]"BG
259 PRINTIM, "INTELLIGENCE[4]"IN"[2]"JN
260 PRINT#4, "WILL[12]"WI"[2]"XI
261 PRINT#4, "ELOQUENCE[7]"EL"[2]"FL
262 PRINTIM, "EMPATHY[9]"EM"[2]"FM
263 PRINT#4, "CONSTITUTION[4]";CN
264 PRINT#4, "APPEARANCE[6]";AP
265 PRINT#4, "SOCIAL STANDING[1]";SO
266 GOSUB57: IC=(RD*2)+SO+RA
267 PRINT#4, "(C/DN)AGE IS[1]"RD"[1]YEARS"
268 PRINT#4, "(C/DN)"[1]HT"[1]INCHES TALL"
269 PRINT#4, WT"[1]POUNDS"
270 PRINT#4, "AND HAS[1]"IC"[1]INCREASE POINTS"
271 CLOSE 4
272 RETURN
273 PRINT"PRRNT THIS CHARACTER?(Y/N)"
274 GET IT$:IF IT$<>"Y"ANDIT$<>"N" THEN274
275 RETURN
276 REM****LOAD VARIABLES INTO ARRAY****
277 FOR I=0TO27:FOR J=0TO7
278 READ VR:CR(I,J)=VR
279 NEXT:NEXT
280 RETURN
281 DATA 3,-1,-2,-3,-4,-6,1,0
282 DATA 0,1,-3,-2,-2,-3,2,2
283 DATA -1,0,1,2,2,3,-1,-2
284 DATA -1,1,2,2,3,3,-2,-1
285 DATA 2,0,3,2,4,2,0,0
286 DATA 0,2,0,2,1,3.2,1
287 DATA 0,0,3,2,2,2,-2,-2
288 DATA -3,-1,0,1,1,2,-2,-2
289 DATA 0,1,-1,-1,-2,-2,1,2
290 DATA 0,0,1,2,2,4,-1,-2
291 DATA 46,42,45,42,28,28,35,32
292 DATA 1.6,1.4,2,1.6,2.2,1.7,2.4.1.8
293 DATA 1.7,1.5,2.2,1.7,2.4,1.8,2.7,1.9
294 DATA 1.8,1.6,2.4,1.8,2.6,1.9,3,2
295 DATA 2,1.7,2.6,2,2.9,2.1,3.3,2.2
296 DATA 2.2,1.8,2.8,2.2,3.2,2.3,3.5,2.5
297 DATA 0,0,1.2,1,2.4,2.3,0,0
298 DATA 1.7,1.5,1.2,1.1,2.6,2.5,0,0
299 DATA 1.8,1.6,1.3,1.2,2.8,2.6,0.0
300 DATA 1.9,1.7,1.4,1.3,3,2.7,0,0 
301 DATA 2,1.8,1.5,1.3,3.2,2.8,0,0 
302 DATA 2.1,1.9,1.6,1.4,3.5,3,0.0
303 DATA 2.2,2,0,0,0,0,0,0
304 DATA 1,1,1,2,1,2,2,5.1
305 DATA 1,1,1.5,3,2,3,1.5,1.5
306 DATA 3,2,2,4,3,4,4,2
307 DATA 4,3,2.5,5,4,5,6,2.5
308 DATA 5,4,3,6,5,6,8,3

John Huff
Heroes Vol. II, No. 3

Download:

Computer Character Generation for Powers and Perils

Scans of the original article.

Design: Wout Broere