16 Mar, 2010, Igabod wrote in the 1st comment:
Votes: 0
I'm wanting to completely remove race selection from char creation on smaugfuss and when I started the task I realized how not simple it is. I should have known it would be harder than I thought it was, messing around with nanny is never pretty. So, I'm wondering if anybody out there has already done this and has any tips for me. I'm not looking for a step-by-step instruction or anything, just a few hints on what not to do and what not to forget.
16 Mar, 2010, jurdendurden wrote in the 2nd comment:
Votes: 0
Remove this:

case CON_GET_NEW_RACE:
nanny_get_new_race( d, argument );
break;


Figure out what step you want to have nanny skip into (CON_GET_NEW_CLASS most likely), and change every instance of d->connected = CON_GET_NEW_RACE to whatever new connection state you want to be next in line.

Edit: Also have the game default every player's race.
18 Mar, 2010, Igabod wrote in the 3rd comment:
Votes: 0
For future reference for others who may wish to do the same, here's what I did.

In comm.c find void nanny_get_new_class and in that function find the following.

write_to_buffer( d, "\r\nYou may choose from the following races, or type help [race] to learn more:\r\n[", 0 );
buf[0] = '\0';
for( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if( iRace != RACE_VAMPIRE
&& race_table[iRace]->race_name && race_table[iRace]->race_name[0] != '\0'
&& !IS_SET( race_table[iRace]->class_restriction, 1 << ch->Class )
&& str_cmp( race_table[iRace]->race_name, "unused" ) )
{
if( iRace > 0 )
{
if( strlen( buf ) + strlen( race_table[iRace]->race_name ) > 77 )
{
mudstrlcat( buf, "\r\n", MAX_STRING_LENGTH );
write_to_buffer( d, buf, 0 );
buf[0] = '\0';
}
else
mudstrlcat( buf, " ", MAX_STRING_LENGTH );
}
mudstrlcat( buf, race_table[iRace]->race_name, MAX_STRING_LENGTH );
}
}
mudstrlcat( buf, "]\r\n: ", MAX_STRING_LENGTH );
write_to_buffer( d, buf, 0 );
d->connected = CON_GET_NEW_RACE;


and comment all of that out. below that you will need to add these three lines

ch->race = 0;
write_to_buffer( d, "\r\nWould you like RIP, ANSI or no graphic/color support, (R/A/N)? ", 0 );
d->connected = CON_GET_WANT_RIPANSI;


Also at the top you'll find this

void nanny_get_new_class( DESCRIPTOR_DATA * d, const char *argument )
{
CHAR_DATA *ch;
char buf[MAX_STRING_LENGTH];
char arg[MAX_STRING_LENGTH];
int iClass, iRace;


just change that to look like this

void nanny_get_new_class( DESCRIPTOR_DATA * d, const char *argument )
{
CHAR_DATA *ch;
// char buf[MAX_STRING_LENGTH];
char arg[MAX_STRING_LENGTH];
int iClass/*, iRace*/;


then in void nanny you would remove the case that was pointed out by jurdendurden above and voila you're good to go. this sets players to the default race of human. If you wish to remove races completely then you will have to figure that out on your own.
0.0/3