Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Addrace.txt - more than 20 ra...
Forum Rules | Mark all | Recent Posts

Addrace.txt - more than 20 races
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Oct 4, 2003, 8:53 pm   Last edited Nov 24, 2007, 3:48 pm by Samson
Go to the top of the page
Go to the bottom of the page

Snowleaf

GroupMembers
Posts12
JoinedApr 13, 2003

I've been going over addrace.txt in areadocs and it gives details about adding a race. My question is what to do if I want more than 20 races. Right now I intend on adding 8 races to bring the total up to 27.

Normally you would change an existing race to create a new one, but I want to keep the existing races and just not make them available for picking in entry.are. An example of why.
I'm creating 5 races of humans which have one or two stat pluses compared to stock humans, depending on the background info given in my mud. Due to their culture and lifestyle they receive a basic attribute advantage, and also class restriction. To break it down simply, I have 5 human races representing 5 human civilizations. A hierarch group who are religous zealots, a semi-primative tribesmen type race, a race of simple folk who are largely farmer types, a race who mainly focus on scholarly pursuits, and a race who have embraced sea travel/trade/etc. Based on this, each race will have a set of classes available to them based on their race, splitting all available classes (which stock humans get) across the 5 races of humans.

Now the purpose of leaving the stock human race in the game is so that I can assign it to NPCs as a generic human, and yet have players pick a race of human if they want to be human. I've done this with other races, Several races of Elves, Dwarves, etc.
It also gives me the ability in entry.are for players to pick Human, Elf, Dwarf and be taken into a series of rooms that tell them about the various difference races of Humans, Elves and Dwarves where they will be transformed again into a High-Elf, Wood-Elf, Half-Elf, Drow, Mountain Dwarf, Hill Dwarf, Duergar, etc.
Anyway what other parts in the source will need changing if I want to have more than 20 races? I'm guess that I'll either need to rearrange this portion of mud.h

/* NPC Races */
#define RACE_HALFBREED 20
#define RACE_REPTILE  21


and start at 28 to 169. change MAX_RACE like it states in addrace.txt. Is there any other areas I would have to change like olc or mud_prog or skill.c that might have hardcoded racial stuff? Or have you cleaned up the code and removed most of the hardcoded racial stuff?
       
Post is unread #2 Oct 5, 2003, 1:56 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

There shouldn't be any hardcoded race or class checks left, though I can't be 100% sure of that until that portion of the current code cleanup is done. There may be a few stragglers here and there like I've found with some leftover hardcoded level checks that have been found.

If you're going to go above the usual 20, yes, you need to bump that nasty looking list up to move them out of your way. I really need to do something about that thing. Probably about time it got turned into an enum of it's own.
       
Post is unread #3 Oct 7, 2003, 1:47 pm
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

One thing that would be a plus in my book is to get rid of the (IMO, artificial) distinction between player and NPC races. It may be that you don't want players to choose RACE_DRAGON at character creation time, but I don't see any reason the code should make a distinction other than at character creation time.

IOW, perhaps have an array (or struct) to show which races are available to PC's, and perhaps at what levels (in case someone wants a remort system).

Someday, we might be able to merge the PC and NPC data structures so that saving NPC's, or allowing PC's to log out and be taken over by an AI, or seamless reincarnation/polymorph/etc would be simple. Maybe after that world peace thing...
       
Post is unread #4 Oct 7, 2003, 2:01 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Probably not a bad idea I suppose. At least this way you could just add races to the end of the list and not have to worry about bumping into these limitations. Perhaps a toggle for PC_ALLOWED or something, in the form of a bool. Although I'm smoewhat concerned with how much ram a race_table with that many entries would consume.
       
Pages:<< prev 1 next >>