This article was originally written for Darren Hebden's RLNews
Section 1 : The Definition
[Note : I will be using C++ Class definitions]
So, let's pretend we have a nice endless dungeon filled with
vile demonic beasts, heaps of gold, and piles of flaming swords of instant
monster to magic item transmutation. Mabey we even have an engine to make
the ubiquitous '@' saunter around in this great dungeon.
Now, what we really need is some way to make that little '@' into
a daring adventurer, with Herculean strength and an intelligence to
rival Hawking (or perhaps the lack of the same...).
First off, we need to have some basic statistics and attributes.
perhaps we need a Name, a Race, and a Class... We also need some numbers
to represent the Hero's strength, and intelligence as well as his other
important attributes.
Now, in any RL, a player's Statistics are going to go up and
down during the course of play, whether it's from going up a level or
getting hit by a Lecherous Walking Carrot Of Charisma Sapping. So we should
really represent each score by two numbers, a current score and a base score:
class Stat
{
public:
int Base;
int Current;
}
All of our calculations done in the game should be based off of the
current score, but the base score will allow us to revert to the Player's
origional score or hit-point total after a magical-effect or damage wares
off.
Having the basic stat class, let's go ahead and derive a class to
contain a basic RL character:
class Player
{
public:
char Name[256]; // A String to hold the player's name
int Race; // let's say, 0=Human 1=Elf 2=Frog...
int Class; // hmm... 0=Fighter 1=Mage 2=Tourist...
Stat Str; // How Strong
Stat Int; // How Smart
Stat Dex; // How Fast
Stat Hlt; // How Healthy
Stat Cha; // How Well-Liked
Stat HP; // How much damage you can take
Stat AR; // Your armor-rating
Stat SP; // Spell-points... How many kobold you can toast
};
That should be a good starting point for developing a unique character
representation for your RL...
Section 2 : The Creation
The actual creation of the character is accomplished by somehow
assigning a score to each of the stats... There are two main ways
to accomplish this; Random Rolling and Point Distribution.
Random Rolling would display all of the statistics, and allow
the player to hit a key to "Roll" (or randomly assign numbers, say between
1 and 100) to each main statistic. The player would then continue rolling
until they have a set of numbers that is agreeable to them.
Point Distribution would give the player's a number of points, say
100, and allow them to distribute those points to their attributes in any
way they wish; Thus allowing the player to design a character that they want
to play.
Usually, the player's chosen race affects the statistics in some way.
For instance if our player picked:
A Human - No change; Humans should be pretty standard fare.
An Elf - +2 Dex, -2 Str; Elfs are quick, but weaker than humans
A Frog - +2 Int, -2 Cha; Frogs are obviously intelligent, but ugly...
Classes are generally restricted by attributes...
Fighters - No basics; Everyone can pick up a stick and hit something...
Mage - At least a 12 Int; A Mage has to read, at least...
Tourist - At least a 12 Dex; You have to move fast, only 36 days left of
vacation...
The player might be given some basic equipment based on his class, and
that's about it... That '@' has everything it needs to thump some Kobolds!
The Author:
Brian Bucklew, 18
bbucklew@inteletek.com
Current RL Project : Dungeon or "This game needs a new name"... :)
Projected Beta Release : Early 98
|