Remort Version 0.1      (*grin* I get to put a version number!)
September 1st, 1996     (Heheh... yeah.  Remember that date.  :-P)
-------------------

This file describes how to install the remort code to ROM 2.4.  I guess 
it'd work under ROM 2.3, but I don't feel like trying it.  ;-)  I'd write 
a lengthy introduction, but I see no need for that so let's cut to the 
chase.  ;-)


First, pop open your Makefile and add remort.o to the O_FILES section.

Next, open up comm.c.  Here we're going to make the bulk of the changes.  
Skip down to nanny(), and in the "big switch", make these changes:

In "case CON_CONFIRM_NEW_PASSWORD":

Change this:

	    write_to_buffer(d,race_table[race].name,0);
	    write_to_buffer(d," ",1);

To:

	    if ( !race_table[race].remort_race ||
	       (race_table[race].remort_race && IS_SET(ch->act,PLR_REMORT)))
	    {
		write_to_buffer(d,race_table[race].name,0));
		write_to_buffer(d," ",1);
	    }

In CON_GET_NEW_RACE, same thing:

	    write_to_buffer(d,race_table[race].name,0);
	    write_to_buffer(d," ",1);

To:

	    if ( !race_table[race].remort_race ||
	       (race_table[race].remort_race && IS_SET(ch->act,PLR_REMORT)))
	    {
		write_to_buffer(d,race_table[race].name,0));
		write_to_buffer(d," ",1);
	    }

In CON_GET_NEW_SEX:

	    if( iClass > 0 )
		strcat( buf, " " );
	    strcat( buf, class_table[iClass].name );

To:

	    if (!class_table[iClass].remort_class ||
	       (class_table[iClass].remort_class && IS_SET(ch->act,PLR_REMORT)))
	    {
		if ( iClass > 0 )
		    strcat( buf, " " );
		strcat( buf, class_table[iClass].name );
	    }

In CON_GET_NEW_CLASS:

	if ( iClass == -1 )

To:

	if ( iClass == -1 ||
	   ( class_table[iClass].remort_class && !IS_SET(ch->act,PLR_REMORT)))

Before CON_READ_IMOTD (Or at least that's where I put it):

    case CON_BEGIN_REMORT:
	write_to_buffer( d, "Now beginning the remorting process.\n\r\n\r", 0 );
	write_to_buffer( d, "The following races are available:\n\r  ", 0 );
	for ( race = 1; race_table[race].name != NULL; race++ )
	{
	    if (!race_table[race].pc_race)
		break;
	    write_to_buffer(d,race_table[race].name,0);
	    write_to_buffer(d," ",1);
	}
	write_to_buffer(d,"\n\r",0);
	write_to_buffer(d,"What is your race (help for more information)? ",0);
	d->connected = CON_GET_NEW_RACE;
	break;

Okay, now open up const.c, and skip down to the race_table.  I won't go 
into detail about this, just give you the idea:  For each race, stick 
another FALSE on the end.  For example, the entry for human (assuming 
it's unmodified) now looks like this:

	"human",                TRUE,
	0,              0,              0,
	0,              0,              0,
	A|H|M|V,        A|B|C|D|E|F|G|H|I|J|K,  FALSE

Now, down to the class_table.  Do the same thing, stick another FALSE on 
the end.  Mage's new entry:

	"mage", "Mag",  STAT_INT,  OBJ_VNUM_SCHOOL_DAGGER,
	{ 3018, 9618 },  75,  20, 6,  6,  8, TRUE,
	"mage basics", "mage default", FALSE

Now interp.c, in the command table.  Add entries for do_remort and 
do_remor which look like this:

    { "remor",		do_remor,	POS_DEAD,	0,  LOG_ALWAYS, 0 },
    { "remort",		do_remort,	POS_STANDING,	0,  LOG_ALWAYS, 1 },

MAKE SURE THAT REMOR IS BEFORE REMORT.  :-)

In interp.h, among the DECLARE_DO_FUN's:

DECLARE_DO_FUN(	do_remor	);
DECLARE_DO_FUN(	do_remort	);

In merc.h, among the CON_BLAH definitions:

#define CON_BEGIN_REMORT		16

(The 16 above is assuming you are running stock ROM 2.4b4.  Use a 
different number if you need to.)

Now in struct class_type, add this to the end:

    bool	remort_class;		/* is a remort class		*/

In struct race_type, on the end:

    bool	remort_race;		/* is a remort_race */

In the PLR flags:

#define PLR_REMORT		(bb)

(bb) can be replaced with a free bit, of course.

Now to save.c, among all the player stuff, before "/* write alias */":

	fprintf( fp, "Incr %d\n",
	    ch->pcdata->incarnations );

In load_char_obj(), right under the ch->pcdata->condition stuff:

    ch->pcdata->incarnations		= 1;

And finally, in fread_char, under "case 'I'":

	KEY( "Incr",	ch->pcdata->incarnations, fread_number(fp) );

--
Well, that should be it.  If you have any problems, e-mail me at 
aprocter@mail.coin.missouri.edu... and please, be nice.  ;-)

--Dribble
