How to add a new continent to the Overland
------------------------------------------
Modified by Kilroy of The Obsidian Palace 5/9/2002
part 2.2 Contibuted to by Kilroy of OP & Dwip of Alsherok 5/9/2002

Keep in mind that adding an additional continent will increase your
RAM and disk usage. You should check to see that your site quotas
will allow you to do this before beginning.

1. Perhaps the most time consuming step - create a graphic image of
the new continent using colors for terrain that conform to the table
in RGB.txt. This will no doubt require ALOT of time, patience, and
effort. Once done, follow the proceedure to convert it into a .raw file.

2. In overland.h 

2.1 In the Definitions at the top add
#define OVERLAND_XXXXXXX VNUM
under the other #definitions
where XXXXXXX is the name of the continent, and VNUM is the 1st VNUM assigned
in your continent.are file

2.2 Under #define MAP_FILE3 "alatia.raw", add a line like so:

#define MAP_FILE4 "mapname.raw"

mapname.raw would be the name of the new .raw file you generated in step 1.

2.3 Then just below that, in this enum:

typedef enum
{
   MAP_ALSHEROK, MAP_ELETAR, MAP_ALATIA, MAP_MAX
} map_types;

Add MAP_something to the listing, before MAP_MAX.

"something" should be a code identifier that you will be able to remember.

3. In overland.c 

3.1: In these lists:

char *	const map_names[] =
{
  "Alsherok", "Eletar", "Alatia"
};

char *	const map_name[] =
{
  "alsherok", "eletar", "alatia"
};

Add your new continent's name to them.

3.2:  Find:

/* As it implies, loads the third continent map from the graphic file */
void load_continent_three( void )

And copy that entire section right down to the

   FCLOSE( fp );
   return;
}  

And paste the entire section directly below itself.
Then go through it and change the three (or whatever number you are at) to the new number.
And the MAP_ALATIA to the MAP_YOURNEWMAP where YOURNEWMAP is the name of the map listed.

3.3: Then in load_maps, below this section:

   /* Change the names of the continents here to match your world */
   log_string( "Loading continent of Alsherok...." );
   load_continent_one();

   log_string( "Loading continent of Eletar...." );
   load_continent_two();

   log_string( "Loading continent of Alatia...." );
   load_continent_three();

Add another load_continent_X call to load your new continent.

Then, using load_continent_three as a guide, duplicate it, and
name it load_continent_X and make sure you change the MAP_ALATIA
and MAP_FILE3 variables to match those you created for the new
continent in step 2.

3.4: In void do_setexit

Find the Following:
        if( !str_cmp( arg2, "eletar" ) )
           map = ACON_ELETAR;

And add below that 
        if( !str_cmp( arg2, "xxxxxxx" ) )
           map = ACON_XXXXXX;

Where xxxxxx = your continnent name & XXXXXX = the ACON that you defined in overland.h

3.5: Further down in void_mapreset find:

            case MAP_ALATIA:
                toroom = get_room_index( OVERLAND_ALATIA );

And add another for your new continent you will also have to add the break:
so it should look like this:

            case MAP_ALATIA:
                toroom = get_room_index( OVERLAND_ALATIA );
                break;
            case MAP_MAINLAND:
                toroom = get_room_index( OVERLAND_MAINLAND );
            default:
                bug( "mapreset: Bad overland map in resets.", 0 );
                continue;
        }

3.6: In void enter_map (approximately line 3180)
Find:
void enter_map( CHAR_DATA *ch, EXIT_DATA *pexit, int x, int y, int continent )
{
    ROOM_INDEX_DATA *maproom = NULL, *original;
    
    if ( continent < 0 ) /* -1 means you came in from a regular area exit */
       maproom = find_continent( ch, ch->in_room );
         
    else /* Means you are either an immortal using the goto command, or a mortal who teleported */
    {
        switch( continent )
        {
           case ACON_ALSHEROK:
                maproom = get_room_index( OVERLAND_ALSHEROK );
                ch->map = MAP_ALSHEROK;
                break;
           case ACON_ELETAR:
                maproom = get_room_index( OVERLAND_ELETAR );
                ch->map = MAP_ELETAR;
                break;
           case ACON_ALATIA:
                maproom = get_room_index( OVERLAND_ALATIA );
                ch->map = MAP_ALATIA;
                break;

And Change it to look like:
void enter_map( CHAR_DATA *ch, EXIT_DATA *pexit, int x, int y, int continent )
{
    ROOM_INDEX_DATA *maproom = NULL, *original;
    
    if ( continent < 0 ) /* -1 means you came in from a regular area exit */
       maproom = find_continent( ch, ch->in_room );
         
    else /* Means you are either an immortal using the goto command, or a mortal who teleported */
    {
        switch( continent )
        {
           case ACON_ALSHEROK:
                maproom = get_room_index( OVERLAND_ALSHEROK );
                ch->map = MAP_ALSHEROK;
                break;
           case ACON_ELETAR:
                maproom = get_room_index( OVERLAND_ELETAR );
                ch->map = MAP_ELETAR;
                break;
           case ACON_ALATIA:
                maproom = get_room_index( OVERLAND_ALATIA );
                ch->map = MAP_ALATIA;
                break;
          case ACON_XXXXX:
                maproom = get_room_index( OVERLAND_XXXXXX );
                ch->map = MAP_XXXXXX;
                break;

Where XXXXXX is the name of your new Continent:

3.7: Find void reload_map( CHAR_DATA *ch )
And add the 
        
   if( ch->map == MAP_XXXXXX )
   {
   send_to_pager( "Loading continent of Xxxxxx....\n\r", ch );
   load_continent_yyyy();
   return;
   }

Where xxxx is the continents name , and y is the continent number ie. four


3.8: At Approximately line 3672
you will need to add another section just like the others for your new continent.


4. In build.c:

4.1 Beneath this section:

      if( !str_cmp( arg1, "alsherok" ) )
	   map = ACON_ALSHEROK;

      if( !str_cmp( arg1, "alatia" ) )
	   map = ACON_ALATIA;

	if( !str_cmp( arg1, "eletar" ) )
	   map = ACON_ELETAR;

Add another check for your new continent's values.

5. In afk.h, in this section:

/* New continent and plane support - Samson 3-28-98
 * Name of continent or plane is followed by the recall and death zone.
 * Area continent flags for continent and plane system, revised format - Samson 8-8-98
 */
typedef enum
{
  ACON_ALSHEROK, ACON_ELETAR, ACON_ALATIA, ACON_UNUSED1, ACON_UNUSED2,
  ACON_UNUSED3, ACON_UNUSED4, ACON_UNUSED5, ACON_ASTRAL, ACON_PAST,
  ACON_IMMORTAL, ACON_VARSIS, ACON_MAX
} acon_types;

Change one of the ACON_UNUSED values to reflect your new continent, or add it before
ACON_MAX if you've used them all up already.

6. In olc.c look near the bottom and you will see the continents listed there,
you will also see r1, change that to your new continent's name.

7. Make clean, recompile. With any luck you should now have yourself a nice shiny new continent :)
