Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ On races and classes....
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Tseris
(98 posts) Bio
|
| Date
| Sun 14 Oct 2007 02:13 AM (UTC) |
| Message
| No, Im not going to ask how to make new races and classes :) This is more of a design theory question. Im making a mud where the tables are turned, and players play the monsters instead of the heroes. Its roughly classless in the sense that if youre a Werewolf, you have werewolf abilities, not "werewolf warrior" abilities, etc. But I dont want to delete classes from the game as I still want to be able to use them for the goodly mobs, and Im of the opinion that the less I remove, the better chance there is of me not removing the wrong thing. Now I have two ideas as to how to go about this:
Option 1: I remove class selection from character creation, and all characters of a particular race are automatically given the one "class" that I assign to that race which has all of the skills/spells I want that race to have. But I remove all reference to that class in anything the player can see. Its only there for code purposes. This has the advantage that should I decide in the future to expand and allow different classes in a race I can, i.e. you can be a Werewolf Hunter, or a Werewolf Shaman.
Option 2: I do the opposite. Remove any reference to race in character creation and score, and all characters are of the same unnamed "race" that only the code is aware of, then I make a Werewolf class, Zombie class, etc. Though of course I dont call it a "class". I just ask what type of creature they want to be. This has the advantage that I can just use the stock Vampire class and not have to change that code since its pretty well developed.
I had a third option in mind a couple days ago but somewhere along the line I forgot it :) Heh, anyone have any thoughts about all of this? And what do I need to modify to change the options players have at character creation? | | Top |
|
| Posted by
| David Haley
USA (3,881 posts) Bio
|
| Date
| Reply #1 on Sun 14 Oct 2007 02:26 AM (UTC) |
| Message
| Option 1 seems simpler and with more potential in the future for growth. If you make race generic and make class "werewolf", then when you want to have specialized werewolves, you're in something of a pickle. Option 1 doesn't have that problem.
You'd want to change the nanny function, which is what controls the options given to players as they create their character. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | | Top |
|
| Posted by
| Tseris
(98 posts) Bio
|
| Date
| Reply #2 on Sun 14 Oct 2007 02:35 AM (UTC) |
| Message
| | Okay sounds good, but any ideas as to how I resolve the vampire issue? I want to keep the vampire code that is in stock, but will the game allow me to have players make a character that is race Vampire and class Vampire? Ive noticed that in the race file vampire is typed as _Vampire, which makes me think that using the word for both race and class causes problems. | | Top |
|
| Posted by
| Conner
USA (381 posts) Bio
|
| Date
| Reply #3 on Sun 14 Oct 2007 04:05 AM (UTC) |
| Message
| | It can be used almost as is, in my mud a player can be vampire as both race & class. The biggest thing you have to do is change the part of the function nanny to allow vampire as a racial selection, then set up the vampire race. |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | | Top |
|
| Posted by
| Tseris
(98 posts) Bio
|
| Date
| Reply #4 on Sun 14 Oct 2007 04:45 AM (UTC) |
| Message
| Heres the part that concerns me:
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;
}
void nanny_get_new_race( DESCRIPTOR_DATA * d, char *argument )
{
CHAR_DATA *ch;
char arg[MAX_STRING_LENGTH];
int iRace;
ch = d->character;
argument = one_argument( argument, arg );
if( !str_cmp( arg, "help" ) )
{
for( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if( toupper( argument[0] ) == toupper( race_table[iRace]->race_name[0] )
&& !str_prefix( argument, race_table[iRace]->race_name ) )
{
do_help( ch, argument );
write_to_buffer( d, "Please choose a race: ", 0 );
return;
}
}
write_to_buffer( d, "No help on that topic. Please choose a race: ", 0 );
return;
}
for( iRace = 0; iRace < MAX_PC_RACE; iRace++ )
{
if( toupper( arg[0] ) == toupper( race_table[iRace]->race_name[0] )
&& !str_prefix( arg, race_table[iRace]->race_name ) )
{
ch->race = iRace;
break;
}
}
if( iRace == MAX_PC_RACE
|| !race_table[iRace]->race_name || race_table[iRace]->race_name[0] == '\0'
|| iRace == RACE_VAMPIRE
|| IS_SET( race_table[iRace]->class_restriction, 1 << ch->Class )
|| !str_cmp( race_table[iRace]->race_name, "unused" ) )
{
write_to_buffer( d, "That's not a race.\r\nWhat IS your race? ", 0 );
return;
}
Why all the checks for RACE_VAMPIRE? This still being stock SmaugFuss 1.8, I know you cant start as a vampire race, so Im not sure whats going on here. | | Top |
|
| Posted by
| Conner
USA (381 posts) Bio
|
| Date
| Reply #5 on Sun 14 Oct 2007 08:27 PM (UTC) |
| Message
| | Those checks are there so that you can't play a vampire as your race in stock SmaugFUSS 1.8, but you already knew that was the case before you started this, no? |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | | Top |
|
| Posted by
| Tseris
(98 posts) Bio
|
| Date
| Reply #6 on Sun 14 Oct 2007 09:44 PM (UTC) |
| Message
| | Yes I knew this, but also knew I that a vampire race is crucial to my game, so what I decided to do what leave the stock code alone and basically ignore the _Vampire_ race which is #5 on the race slots and gives so many people on here so many problems, and just setrace Vampire, to create a whole new race (which happens to be #20 on my mud) and go from there. | | Top |
|
| Posted by
| Conner
USA (381 posts) Bio
|
| Date
| Reply #7 on Sun 14 Oct 2007 11:55 PM (UTC) |
| Message
| | That probably is the easy way, but race _vampire, #5, isn't that hard to use either. *shrug* |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
27,164 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top