Parsing a random prefix/suffix generator.
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Overkill

I had this idea of creating a random name generator for my custom skill system. I have the idea pretty much figured out. I just don't know what functions to use to parse it.

The random generator looks for names within the specified "category", so that recovery spells, for example, only can be assigned random names that are related to recovery spells.

Here is my file for the prefix list:

2

CATEGORY RECOVERY 4
Heal
Recovery
Cure
Repair

CATEGORY FIRE 5
Fire
Flame
Pyro
Inferno
Burning


The first line contains the number of categories. The category stuff is figured out by: "CATEGORY [name] [number of choices]".

I have very few ideas on how to parse this. So, can anyone help me?

Posted on 2004-07-28 17:55:25 (last edited on 2004-07-28 17:57:06)

gannon

first line is the number of catigories
the word catigory is only usefull so it looks nice but is not needed
for storage
string fix[max number of choices][number of categories]
category categories[number of categories]
struct category{
int index;//into fix(category index)
string name;
int number of choices;
}
for all catigories
store name
store number of choices
for all choices//gotten from previous line
store name

that way you have all the categories with there own indexes
any questions or am I misunderstanding the question

Posted on 2004-07-28 19:23:21


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.