home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
frp
/
rolemaster
/
chargen
next >
Wrap
Text File
|
1994-03-29
|
5KB
|
204 lines
Path: usenet.ee.pdx.edu!cs.uoregon.edu!sgiblab!sdd.hp.com!math.ohio-state.edu!cs.utexas.edu!uunet!not-for-mail
From: ej345@cleveland.Freenet.Edu (Stephen C. Harvey)
Newsgroups: rec.games.frp.archives
Subject: RESOURCE: Rolemaster char. generator
Followup-To: rec.games.frp.misc
Date: 28 Mar 1994 07:58:01 -0500
Organization: UUNET Technologies, Inc.
Lines: 190
Sender: smm@uunet.uu.net
Approved: smm@uunet.uu.net
Message-ID: <2n6k8p$cj@rodan.UU.NET>
NNTP-Posting-Host: rodan.uu.net
This is the initial module of a program I am writing to generate
Rolemaster characters. Right now, all it does is rolls the temp and
potential stats for each attribute, and determines % bonus and dev.
points for each. However, even so, it reduces this aspect of character
generation from ten minutes to about 3 seconds.
I've compiled this successfully on both an Atari STe running Sozobon
C, and an Ultrix system running GCC. The only mod you might have to
make is to put a srand statement in (the Atari doesn't need it, but most
mainframes willl, to seed random numbers).
Anyway, I'd love to hear email feedback for what features people would
like to see in a program of this sort; the next addions are going to be
options to figure racial bonsuses, and to allow the computer to advance
levels for you, to make it easier to roll up high-level NPC's. I don't
know if I'm going to implement skills or not...
This program is freeware; share it, but just leave my name on it
somewhere. Enjoy!
/* ROLEMASTER Character Generator */
/* copyright Steve Harvey, 1994 */
char stat[10], statpot[10];
int rawbonus[10], racebonus[10]; /* rawbonus is the unmodified % stat
bonus; racebonus is not changed
once levels are gained */
int devpoints[5];
static char *stname[10] = {"Constitution", "Self-Discipline", "Agility",
"Memory ", "Reasoning", "Strength ", "Quickness", "Presence",
"Intuition",
"Empathy "};
static char potentials[38][11] = {
{10, 25, 00, 00, 00, 00, 00, 00, 00, 00, 00},
{20, 30, 00, 00, 00, 00, 00, 00, 00, 00, 00},
{30, 35, 39, 00, 00, 00, 00, 00, 00, 00, 00},
{35, 38, 42, 59, 00, 00, 00, 00, 00, 00, 00},
{40, 40, 45, 62, 00, 00, 00, 00, 00, 00, 00},
{45, 42, 47, 64, 00, 00, 00, 00, 00, 00, 00},
{49, 44, 49, 66, 00, 00, 00, 00, 00, 00, 00},
{51, 46, 51, 68, 00, 00, 00, 00, 00, 00, 00},
{53, 48, 53, 70, 00, 00, 00, 00, 00, 00, 00},
{55, 50, 55, 71, 00, 00, 00, 00, 00, 00, 00},
{57, 52, 57, 72, 74, 84, 00, 00, 00, 00, 00},
{59, 54, 59, 73, 75, 85, 00, 00, 00, 00, 00},
{61, 56, 61, 74, 76, 86, 00, 00, 00, 00, 00},
{63, 58, 63, 75, 77, 87, 00, 00, 00, 00, 00},
{65, 60, 65, 76, 78, 88, 00, 00, 00, 00, 00},
{67, 62, 67, 77, 79, 88, 89, 00, 00, 00, 00},
{69, 64, 69, 89, 80, 89, 89, 00, 00, 00, 00},
{71, 66, 71, 79, 81, 89, 90, 00, 00, 00, 00},
{73, 68, 73, 80, 82, 90, 90, 00, 00, 00, 00},
{75, 70, 75, 81, 83, 90, 91, 00, 00, 00, 00},
{77, 72, 77, 82, 84, 91, 91, 00, 00, 00, 00},
{79, 74, 79, 83, 85, 91, 92, 00, 00, 00, 00},
{81, 76, 81, 84, 86, 92, 92, 00, 00, 00, 00},
{83, 78, 83, 85, 87, 92, 93, 00, 00, 00, 00},
{85, 80, 85, 86, 88, 93, 93, 94, 00, 00, 00},
{87, 82, 86, 87, 89, 93, 94, 94, 00, 00, 00},
{89, 84, 87, 88, 90, 94, 94, 95, 00, 00, 00},
{90, 86, 88, 89, 91, 94, 95, 95, 97, 00, 00},
{91, 88, 89, 90, 92, 95, 95, 96, 97, 00, 00},
{92, 90, 90, 91, 93, 95, 96, 96, 97, 00, 00},
{93, 91, 91, 92, 94, 96, 96, 97, 98, 00, 00},
{94, 92, 92, 93, 95, 96, 97, 97, 98, 99, 00},
{95, 93, 93, 94, 96, 97, 97, 98, 98, 99, 00},
{96, 94, 94, 95, 97, 97, 98, 98, 99, 99, 00},
{97, 95, 95, 96, 97, 98, 98, 99, 99, 99, 00},
{98, 96, 96, 97, 98, 98, 99, 99, 99,100, 00},
{99, 97, 98, 98, 99, 99,100,100,100,100, 00},
{100,98, 98, 99, 99, 99,100,100,100,100,101}
};
static int bonuses[17][4] = {
102,35,11,4,
101,30,10,3,
100,25,10,3,
98,20,9,2,
95,15,9,2,
90,10,8,1,
85,5,8,1,
75,5,7,1,
60,0,6,0,
40,0,5,0,
25,0,4,0,
15,-5,3,0,
10,-5,3,0,
5,-10,2,0,
3,-15,1,0,
2,-20,1,0,
1,-25,1,0}; /* stat, bonus, devpoints, powerpoints */
struct race {
cjar
main()
{
char flag;
roll();
display_stat();
}
roll()
{
char i;
for ( i = 0; i < 10; i++) /* initial stat rolls */
stat[i] = rand()%100 + 1;
roll_pots();
get_bonus();
}
display_stat()
{
char i;
printf("\t\t\tTemp\tPot\tBonus\tDevelopment pts\n\n");
for ( i = 0; i < 10; i++)
{
printf("%s\t\t%d\t%d\t%d\t",stname[i],stat[i],
statpot[i],rawbonus[i]+racebonus[i]);
if ( i < 5 )
printf("%d",devpoints[i]);
printf("\n");
};
}
roll_pots()
{
char i,j,t; /* t is dieroll, j is counter */
for ( i = 0; i < 10; i++) /* determine potentials */
{
t = rand()%100 + 1;
j = 0;
while (potentials[j][0] < t)
j++;
if (stat[i] < 25)
statpot[i] = potentials[j][1];
else if (stat[i] < 39)
statpot[i] = potentials[j][2];
else if (stat[i] < 59)
statpot[i] = potentials[j][3];
else if (stat[i] < 74)
statpot[i] = potentials[j][4];
else if (stat[i] < 84)
statpot[i] = potentials[j][5];
else if (stat[i] < 89)
statpot[i] = potentials[j][6];
else if (stat[i] < 94)
statpot[i] = potentials[j][7];
else if (stat[i] < 97)
statpot[i] = potentials[j][8];
else if (stat[i] < 99)
statpot[i] = potentials[j][9];
else if (stat[i] == 100)
statpot[i] = potentials[j][10];
if (statpot[i] == 0)
statpot[i] = stat[i];
};
}
get_bonus()
{
char i,j;
for (i = 0; i < 10; i++ )
{
j = 0;
while (bonuses[j][0] > stat[i])
j++;
rawbonus[i] = bonuses[j][1];
if (i < 5)
devpoints[i] = bonuses[j][2];
};
}