Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Sogou, Yahoo!

Members: 0
Guests: 11
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Gender-seperated Classes (At ...
Forum Rules | Mark all | Recent Posts

Gender-seperated Classes (At Char_gen)
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Nov 19, 2002, 6:26 am
Go to the top of the page
Go to the bottom of the page

Marek
New Member
GroupMembers
Posts3
JoinedNov 19, 2002

I'm trying to seperate classes based on what gender you choose at the character generation. For instance: If you were female, you could be a Thief or Ranger, but males could only be warriors.

It seems like all the char_gen stuff takes place in comm.c, and it uses a class_table that tables.c makes. I've tried messing with the class_table, and even duplicating it for both genders, to no avail.

Anyway, I've run out of logical ways to implement this idea; any suggestions?

Marek
       
Post is unread #2 Nov 19, 2002, 8:08 am
Go to the top of the page
Go to the bottom of the page

Cormac
New Member
GroupMembers
Posts2
JoinedNov 15, 2002

The way i would do it is like this.
First this modifies tables.c mud.h act_wiz.c and comm.c so make sure you back them up before modifing them :)
im pretty sure this will work

In tables.c
under
bool load_class_file( char *fname )
find case 'G':
add this under it
KEY ( "Gender" , fread_number( fp ));
under
void write_class_file( int cl )
add this
fprintf( fpout, "Gender %d\n", class->gender );
under
fprintf( fpout, "Guild %d\n", class->guild );

In act_wiz.c
under
void do_setclass( CHAR_DATA *ch, char *argument )
add gender to the arg1[0] ='\0' argument

then add
if ( !str_cmp(arg2,"gender";)
{
if ( !str_cmp (agrument[0], 'm')
{
class->gender =0;
}
else if (!str_cmp(argument[0],'f')
{
class->gender =1;
}
else
{
send_to_char ( "Options for class gender are male or female\n\r",ch);
return;
}
send_to_char (" Class Gender set",ch);
return;
}

you will need to add something in showclass too so that your imms will know which gender the class is for...

ok in comm.c
under
void nanny( DESCRIPTOR_DATA *d, char *argument )
there should be atleast one lines that read somethig like this
for ( iClass = 0; iClass < MAX_PC_CLASS; iClass++ )
it might be MAX_CLASS compare to MAX_PC_CLASS
right under that place this
if (class_table[iClass]->gender == ch->gender)

make clean and recompile and it should work, u will need to go through all your classes and set thier gender otherwise you wont be able to chose a class in char creation.....






       
Post is unread #3 Nov 25, 2002, 6:22 pm
Go to the top of the page
Go to the bottom of the page

Marek
New Member
GroupMembers
Posts3
JoinedNov 19, 2002

That's also going to work on multi-gender classes, right?

I'll try and imp that tomorrow (I think), got tons of homework to do tonight =/

Marek
       
Post is unread #4 Nov 26, 2002, 11:16 pm
Go to the top of the page
Go to the bottom of the page

Cormac
New Member
GroupMembers
Posts2
JoinedNov 15, 2002

just some changes so you can have multi gender classes
in the do_setclass stuff change

}
else
{
send_to_char ( "Options for class gender are male or female\n\r",ch);
return;
}
send_to_char (" Class Gender set",ch);
return;
}

to
}
else if ( !str_cmp (agrument[0], 'a')
{
class->gender =3;
}
else
{
send_to_char ( "Options for class gender are male or female\n\r",ch);
return;
}
send_to_char (" Class Gender set",ch);
return;
}

then change this part
if (class_table[iClass]->gender == ch->gender)
to
if (class_table[iClass]->gender == ch->gender || class_table[iClass]->gender == 3)

also i forgot this part in mud.h under the pcdata stuff around guild
add sh_int gender;

cheers cormac
       
Pages:<< prev 1 next >>