Register forum user name Search FAQ

Gammon Forum

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 ➜ Any takers to review my Snippet?

Any takers to review my Snippet?

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by Nargsbrood   (54 posts)  Bio
Date Wed 17 Oct 2007 05:55 AM (UTC)

Amended on Wed 17 Oct 2007 09:38 PM (UTC) by Nargsbrood

Message
It is an automapper snippet using recursive function calling.

Beside automapping the area, It maps the room sector types also which makes for a colorful detailed map.

I would love to have someone(s) test it for me and give input on it as well as any other possible ideas to enhance it.

I originally wrote it in FUSS 1.6 and set it up in 1.7
version without any problems.

I plan to rewrite it for fuss 1.8 to clean the code up a lot and because I am bored.

Anyone willing to take a look at it?

edit:

screenprints - http://ss-pb.com/screens.html
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Wed 17 Oct 2007 07:06 AM (UTC)
Message
Do you have a place to post the snippet? (You could use the paste bin at MudBytes, for instance.) That way, you could get lots of people to look at it and provide opinions. I don't really have time to test something in detail unfortunately but I'd be happy to read through some code.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #2 on Wed 17 Oct 2007 08:09 PM (UTC)
Message
For anyone interested, its just a quick drop in for FUSS 1.6 and 1.7, maybe earlier versions. For standard smaug 1.4 or 1.8 or FUSS 1.8, it will require a bit of reworking... probably nothing too intense.

Here are the appropriate steps to add it to FUSS 1.6/7:

Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #3 on Wed 17 Oct 2007 08:13 PM (UTC)
Message
add the following to act_move.c at the very bottom:


void do_map ( CHAR_DATA * ch, char *argument )
{
	int plotted[500]; 
	int i, j;//, x;
	maptype map;
	char page_buf[200];
	bool is_error = FALSE;
	if (IS_SET( ch->in_room->room_flags, ROOM_NOMAP ) )
	{
		pager_printf_color( ch, "\n\r    &O This location is not on the map.\n\r" );
		return;	
	}
	
	for ( i = 0; i < 500; i++ ) //initialize plotted vnums tracker
	{
		plotted = 0;
	}
	for (i = 0; i < 35; i++ ) //initialize map
	{
		for (j = 0; j < 35; j++ )
		{
			map[j] = malloc(sizeof(char));
			*map[j] = ' ';
		}
	}
	plot_map ( ch, ch->in_room->vnum, 17, 17, 0, plotted, map );  //map it out!
	pager_printf_color( ch, "\n\r\n\r    &O -----------------------------------\n\r" );

	for (i = 0; i < 35; i++ )   //loop to print it all out to ch
	{
		page_buf[35] = '\0';
		for (j = 0; j < 35; j++ )
		{
			if ( *map[j] == '?' )
				is_error = TRUE;
			page_buf[j] = *map[j];
		}
		if ( i == 17 )  // change color 17 / 17 to red
		{
			add_mcolor( page_buf, 17, 'R' );
		}
		decode_mchar(page_buf);
		pager_printf_color( ch, "    &O|&W%s&O|\n\r", page_buf );
	}
	pager_printf_color( ch, "    &O -----------------------------------\n\r\n\r" );

	if ( is_error )
		pager_printf_color( ch, "\n\r    &z This map is impossible to read!\n\r\n\r" );

	return;
}

void add_mcolor ( char * page_buf, int which, char color )
{		//this func is used to add the desired color and then change it directly back to default color after the character
	int i;
	int size_buf = strlen( page_buf );
	for (i = size_buf + 3; i >= which + 5; i--)
		page_buf = page_buf[i - 4];
	page_buf[which + 2] = page_buf[which];
	page_buf[which] = '&';
	page_buf[which + 1] = color;
	page_buf[which + 3] = '&';
	page_buf[which + 4] = 'W';  // &W = white map
	page_buf[size_buf + 4] = '\0';
	return;
}

//background color instead of foreground
void add_mcolorb ( char * page_buf, int which, char color )
{		//this func is used to add the desired color and then change it directly back to default color after the character
	int i;
	int size_buf = strlen( page_buf );
	for (i = size_buf + 3; i >= which + 5; i--)
		page_buf = page_buf[i - 4];
	page_buf[which + 2] = page_buf[which];
	page_buf[which] = '^';
	page_buf[which + 1] = color;
	page_buf[which + 3] = '^';
	page_buf[which + 4] = 'x';  // &W = white map
	page_buf[size_buf + 4] = '\0';
	return;
}




void add_scolor ( char * page_buf, int which, char color )
{		//this func is used to add the single color desired - does not change the color afterwards to the default
	int i;		//this is used to cut down on the number of times colors are changed when map is decoded.
	int size_buf = strlen( page_buf );
	for (i = size_buf + 1; i >= which + 2; i--)
		page_buf = page_buf[i - 2];
	page_buf[which] = '&';
	page_buf[which + 1] = color;
	page_buf[size_buf + 2] = '\0';
	return;
}


void decode_mchar ( char * page_buf )
{
	int i;
	int x, start, end;
	char filler;
	char mdoor = 'O';
	for (i = 0; i < strlen( page_buf ); i++)
	{
		switch (page_buf)
		{
			case 'a':
				page_buf = '|';
				add_mcolorb (page_buf, i, mdoor);
				i += 4;
				break;
			case 'b':
				page_buf = '/';
				add_mcolorb (page_buf, i, mdoor);
				i += 4;
				break;
			case 'c':
				page_buf = '-';
				add_mcolorb (page_buf, i, mdoor);
				i += 4;
				break;
			case 'd':
				page_buf = '\';
				add_mcolorb (page_buf, i, mdoor);
				i += 4;
				break;
		}
	}
	for (x = 0; page_buf[x] != '\0'; x++)
	{
		if ( page_buf[x] < 'ñ' || page_buf[x] > 'û' )
			 continue;
		start = x;
		end = 0;
		if ( page_buf[x + 1] >= 'ñ' && page_buf[x + 1] <= 'û' )
		{
			for ( i = start; page_buf == page_buf[i + 1]; i++ );
			end = i;
		}
		else
			end = start;
		switch (page_buf[x])		//set color of the terrain
		{
			case 'ñ'://indoor
				filler = 'z';				break;
			case 'ò'://city  
				filler = 'W';				break;
			case 'ó'://mountain
				filler = 'z';				break;
			case 'ô'://hills
				filler = 'O';				break;
			case 'õ'://forest
				filler = 'g';				break;
			case 'ö'://field
				filler = 'G';				break;
			case '÷'://desert
				filler = 'Y';				break;
			case 'ø'://lava
				filler = 'R';				break;
			case 'ù'://swamp
				filler = 'c';				break;
			case 'ú'://water
				filler = 'B';				break;
			case 'û'://air
				filler = 'C';				break;
		}
		if ( page_buf[x + 1] >= 'ñ' && page_buf[x + 1] <= 'û' )
		{
			add_scolor ( page_buf, start, filler );
			x += 2;
		}
		else if ( end == start )
		{
			add_mcolor ( page_buf, start, filler );
			x += 4;
		}
		else
		{
			add_scolor ( page_buf, start, filler );
			add_scolor ( page_buf, end + 1, 'W' );
			x += 4;
		}
	}
	for (x = 0; page_buf[x] != '\0'; x++)
	{
		switch (page_buf[x])
		{
			case 'ñ':
				page_buf[x] = '¬';break; //indoor
			case 'ò':
				page_buf[x] = '.';break; //city
			case 'ó':
				page_buf[x] = 'A';break; //mountain
			case 'ô':
				page_buf[x] = 'n';break; //hills
			case 'õ':
				page_buf[x] = '¥';break; //forest
			case 'ö':
				page_buf[x] = '¯';break; //field
			case '÷':
				page_buf[x] = '"';break; // desert
			case 'ø':
				page_buf[x] = '§';break; //lava
			case 'ù':
				page_buf[x] = '~';break; //swamp
			case 'ú':
				page_buf[x] = '~';break; //water
			case 'û':
				page_buf[x] = 'º';break; //air
		}
	}
	return;
}

/*   here are special characters if you want to change the map symbols - copy and paste or use alt+0140 or alt+0169 etc..  you have to type the numbers using the numberpad.
&O €ƒ„…†‡ˆ‰Š‹  
140:ŒŽ‘’“”•  
150:–—˜™š›œžŸ 
160:¡¢£¤¥¦§¨© 
170:ª«¬­®¯°±²³ 
180:´µ¶·¸¹º»¼½ 
190:¾¿ÀÁÂÃÄÅÆÇ
 
200:
ÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ

*/

Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #4 on Wed 17 Oct 2007 08:15 PM (UTC)
Message
add this to the bottom of act_move.c again:


void plot_map ( CHAR_DATA * ch, int vnum, int xcoord, int ycoord, int tier, int * plotted, maptype map)   
{
	// this is a recursive function that calls itself over and over mapping the contents of an area
	//passed pointer to ch in case it is later needed.
	ROOM_INDEX_DATA *rm = get_room_index( vnum );
    EXIT_DATA *pexit;
	int i, j;
	char tmp, terrain;

	if ( IS_SET( rm->room_flags, ROOM_NOMAP ) ) return;

	if ( tier > 400 ) return;  //cannot extend more than 400 rooms out from current player location

	// add this vnum to the list of already mapped vnums
	for ( i = 0; i < 500; i++ )
	{
		if ( plotted == vnum ) return;
		if ( plotted == 0 )
		{
			plotted = vnum;
			break;
		}
	}

	if ( xcoord >= 0 && xcoord <= 34 && ycoord >= 0 && ycoord <= 34 )
	{
		
		if ( *map[xcoord][ycoord] != ' ' && *map[xcoord][ycoord] < 101 && *map[xcoord][ycoord] > 111)
			*map[xcoord][ycoord]   = '?';
		else
		{
			switch (rm->sector_type)
			{
				case SECT_INSIDE:
					terrain = 'ñ';
					break;
				case SECT_CITY:
					terrain = 'ò';
					break;
				case SECT_MOUNTAIN:
					terrain = 'ó';
					break;
				case SECT_HILLS:
					terrain = 'ô';
					break;
				case SECT_FOREST:
					terrain = 'õ';
					break;
				case SECT_FIELD:
					terrain = 'ö';
					break;
				case SECT_DESERT:
					terrain = '÷';
					break;
				case SECT_LAVA:
					terrain = 'ø';
					break;
				case SECT_SWAMP:
					terrain = 'ù';
					break;
				case SECT_WATER_SWIM:
				case SECT_WATER_NOSWIM:
				case SECT_OCEANFLOOR:
				case SECT_UNDERWATER:
					terrain = 'ú';
					break;
				case SECT_AIR:
					terrain = 'û';
					break;
			}
			int surround;
	
			//add the terrain info around the current map coord
			if (terrain >= 'ó' && terrain <= 'û')
				surround = 2; //5 square terrain around current map coord
			else
				surround = 1; //3 square terrain around current map coord
			for (j = surround * -1; j <= surround ; j++)
			{
				for (i = surround * -1; i <= surround; i++)
				{
					if (  xcoord + i >= 0 && xcoord + i <= 34 && ycoord + j >= 0 && ycoord + j <= 34 &&
						  *map[xcoord+i][ycoord+j] != 'O'  &&   
						  *map[xcoord+i][ycoord+j] != 'Õ'  && 
						  *map[xcoord+i][ycoord+j] != 'Q'  && 
						  *map[xcoord+i][ycoord+j] != 'Ø'  && 
						  *map[xcoord+i][ycoord+j] != '©'  &&   
						  *map[xcoord+i][ycoord+j] != '\' && 
						  *map[xcoord+i][ycoord+j] != '/'  &&
						  *map[xcoord+i][ycoord+j] != '|'  &&
						  *map[xcoord+i][ycoord+j] != '-'  &&  // the below takes the order of presedence into consid (the less the terrain, the higher the presidence)
						  ( terrain < *map[xcoord+i][ycoord+j] || *map[xcoord+i][ycoord+j] == ' ' )
						  )								 	   
						*map[xcoord+i][ycoord+j] = terrain;
				}
			}

//add this block if you want it to mark rooms with pc/npc's in it
//maybe make a seer skill that uses this block - or spell that grants you the ability
//to divine where creatures are at. 
/*
			if ( rm->first_person )  //if room has someone in it
				*map[xcoord][ycoord]   = '©';
			else //*/
				*map[xcoord][ycoord]   = 'O';

		}	

	// add lines for exits leaving this room on the char buffer grid
	// | - 
		for ( pexit = rm->first_exit; pexit; pexit = pexit->next )
		{
			if (IS_SET( pexit->exit_info, EX_DIG) ||
				IS_SET( pexit->exit_info, EX_SECRET) ||
				IS_SET( pexit->exit_info, EX_HIDDEN) ||
				IS_SET( pexit->exit_info, EX_WINDOW) ||
				IS_SET( pexit->exit_info, EX_xENTER) ||
				IS_SET( pexit->exit_info, EX_xLEAVE) ||
				IS_SET( pexit->exit_info, EX_xSEARCHABLE) ) 
				continue;


Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #5 on Wed 17 Oct 2007 08:16 PM (UTC)
Message
add this directly below what you just added in act_move.c (it is the other half of the function that wouldnt fit in the previous post:



			tmp = 0;
			if ( *map [xcoord][ycoord] == '?' )
				tmp = '?';
			if ( pexit->vdir == DIR_NORTH && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord][ycoord-1]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'a': '|';
			else if ( pexit->vdir == DIR_NORTHEAST && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord+1][ycoord-1]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'b': '/';
			else if ( pexit->vdir == DIR_EAST && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord+1][ycoord]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'c': '-';
			else if ( pexit->vdir == DIR_SOUTHEAST && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord+1][ycoord+1]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'd': '\';
			else if ( pexit->vdir == DIR_SOUTH && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord][ycoord+1]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'a': '|';
			else if ( pexit->vdir == DIR_SOUTHWEST && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord-1][ycoord+1]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'b': '/';
			else if ( pexit->vdir == DIR_WEST && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord-1][ycoord]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'c': '-';
			else if ( pexit->vdir == DIR_NORTHWEST && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord-1][ycoord-1]   = tmp?'?':IS_SET( pexit->exit_info, EX_ISDOOR)||IS_SET( pexit->exit_info, EX_HIDDEN)? 'd': '\';
			else if ( pexit->vdir == DIR_UP && *map[xcoord][ycoord] == 'O' && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord][ycoord]   = 'Õ';
			else if ( pexit->vdir == DIR_DOWN && *map[xcoord][ycoord] == 'O' && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord][ycoord]   = 'Q';
			else if ( pexit->vdir == DIR_UP && *map[xcoord][ycoord] == 'Q' && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord][ycoord]   = 'Ø';
			else if ( pexit->vdir == DIR_DOWN && *map[xcoord][ycoord] == 'Õ' && !IS_SET( pexit->exit_info, EX_NOMAP ) )
				*map[xcoord][ycoord]   = 'Ø';
		}
	}

	// check:  n, ne, e, se, s, sw, w, nw, u, d and call this function again for that next room
    for ( pexit = rm->first_exit; pexit; pexit = pexit->next )
	{
		if (    IS_SET( pexit->exit_info, EX_DIG) ||
				IS_SET( pexit->exit_info, EX_SECRET) ||
				IS_SET( pexit->exit_info, EX_HIDDEN) ||
				//IS_SET( pexit->exit_info, EX_WINDOW) ||  //this was removed to allow the mapper to continue through a window.  the exit for window flag are not plotted though.
				IS_SET( pexit->exit_info, EX_xENTER) ||
				IS_SET( pexit->exit_info, EX_NOMAP)  || 
				IS_SET( pexit->exit_info, EX_xLEAVE) ||
				IS_SET( pexit->exit_info, EX_xSEARCHABLE) )
			continue;
        if ( pexit->vdir == DIR_NORTH && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord, ycoord - 2, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_NORTH && rm->area != get_room_index( pexit->vnum )->area && xcoord > 0 && xcoord < 34 && ycoord-2 > 0 )
			*map[xcoord][ycoord-2] = '¶';
        if ( pexit->vdir == DIR_EAST && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord + 2, ycoord, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_EAST && rm->area != get_room_index( pexit->vnum )->area && xcoord+2 < 34 && ycoord > 0 && ycoord < 34 )
			*map[xcoord+2][ycoord] = '¶';
        if ( pexit->vdir == DIR_SOUTH && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord, ycoord + 2, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_SOUTH && rm->area != get_room_index( pexit->vnum )->area && xcoord > 0 && xcoord < 34 && ycoord+2 < 34 )
			*map[xcoord][ycoord+2] = '¶';
        if ( pexit->vdir == DIR_WEST && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord - 2, ycoord, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_WEST && rm->area != get_room_index( pexit->vnum )->area && xcoord-2 > 0 && xcoord > 0 && xcoord < 34 )
			*map[xcoord-2][ycoord] = '¶';
        if ( pexit->vdir == DIR_NORTHEAST && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord + 2, ycoord - 2, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_NORTHEAST && rm->area != get_room_index( pexit->vnum )->area && xcoord+2 < 34 && ycoord-2 > 0)
			*map[xcoord+2][ycoord-2] = '¶';
        if ( pexit->vdir == DIR_SOUTHEAST && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord + 2, ycoord + 2, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_SOUTHEAST && rm->area != get_room_index( pexit->vnum )->area && xcoord+2 < 34 && ycoord+2 < 34)
			*map[xcoord+2][ycoord+2] = '¶';
        if ( pexit->vdir == DIR_SOUTHWEST && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord - 2, ycoord + 2, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_SOUTHWEST && rm->area != get_room_index( pexit->vnum )->area && xcoord-2 > 0 && ycoord+2 < 34)
			*map[xcoord-2][ycoord+2] = '¶';
        if ( pexit->vdir == DIR_NORTHWEST && rm->area == get_room_index( pexit->vnum )->area )
			plot_map ( ch, pexit->vnum, xcoord - 2, ycoord - 2, tier + 1, plotted, map );
		else if ( pexit->vdir == DIR_NORTHWEST && rm->area != get_room_index( pexit->vnum )->area && xcoord-2 > 0 && ycoord-2 > 0 )
			*map[xcoord-2][ycoord-2] = '¶';
	}
    return;
}
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #6 on Wed 17 Oct 2007 08:21 PM (UTC)
Message
add to mud.h the following:



Add it near some other typedef you see or in a good organizational spot:

typedef char * maptype [35][35] ;  //mapping system   carlin oct/6/06
								   //produces a map size 9x9

=======================================================

Search for ROOM_LAWFUL and replace it with ROOM_NOMAP - smaugfuss1.7 does not use ROOM_LAWFUL except the declaration, not needed.

ROOM_NOMAP


=======================================================

add these function declarations below text /* act_move.c */ in mud.h

void decode_mchar args ( ( char * page_buf ) );
void add_mcolor args ( ( char * page_buf, int which, char color ) );
void add_mcolorb args ( ( char * page_buf, int which, char color ) );
void add_scolor args ( ( char * page_buf, int which, char color ) );
void plot_map args ( ( CHAR_DATA * ch, int vnum, int xcoord, int ycoord, int tier, int * plotted, char * map [35][35]) );

=======================================================

find EX_ISDOOR and add this #define apropriately to the bottom of the EX_ list.

#define EX_NOMAP          BV29

and change increment the max of exit types on the line right below the one you change.

=======================================================

find statement "DECLARE_DO_FUN( do_makewizlist );" - add this below that line:

DECLARE_DO_FUN( do_map );


Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #7 on Wed 17 Oct 2007 08:24 PM (UTC)
Message
add the following to build.c


1 or 2 pages down into the file, find where it says "char *const r_flags[] = {" make sure you place it in this list in the same order you placed it in the #define statement in the previous step. for instance, if you stuck it at the very end of the ROOM_ list, put the following in the verly last spot in the room_flags[] array.

"nomap"

ie:

char *const r_flags[] = {
   "dark", "death", "nomob", "indoors", "lawful", "neutral", "chaotic",
   "nomagic", "tunnel", "private", "safe", "solitary", "petshop", "norecall",
   "donation", "nodropall", "silence", "logspeech", "nodrop", "clanstoreroom",
   "nosummon", "noastral", "teleport", "teleshowdesc", "nofloor",
   "nosupplicate", "arena", "nomissile", "r4", "r5", "prototype", "dnd", "bfs_mark", "nomap"
};








1 or 2 pages down into the file, find where it says "char *const ex_flags[] = {" make sure you place it in this list in the same order you placed it in the #define statement in the previous step. for instance, if you stuck it at the very end of the EX_ list, put the following in the very last spot in the ex_flags[] array.

"nomap"

ie:

char *const ex_flags[] = {
   "isdoor", "closed", "locked", "secret", "swim", "pickproof", "fly", "climb",
   "dig", "eatkey", "nopassdoor", "hidden", "passage", "portal", "r1", "r2",
   "can_climb", "can_enter", "can_leave", "auto", "noflee", "searchable",
   "bashed", "bashproof", "nomob", "window", "can_look", "isbolt", "bolted", "nomap"
};


Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #8 on Wed 17 Oct 2007 08:25 PM (UTC)
Message
if NEEDED, dont forget to add the following to tables.c

ADD to TABLES.C - find statement " return do_makewizlist; " - add this below that line:

         if( !str_cmp( name, "do_map" ) )
            return do_map;



ADD to TABLES.C - find statement " return "do_makewizlist"; " - add this below that line:

   if( skill == do_map )
      return "do_map";

Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #9 on Wed 17 Oct 2007 08:28 PM (UTC)
Message
do a clean make. the code may look a bit sloppy but this is my first "project" coding in C/C++ and so my objective was to just make it work.

Any suggestions would much appreciated.

Thanks
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #10 on Wed 17 Oct 2007 08:42 PM (UTC)

Amended on Wed 17 Oct 2007 09:15 PM (UTC) by Nargsbrood

Message
i am working on getting screenshots of the map in use... be a few minutes

edit:

http://ss-pb.com/screens.html

is the page you can see the screenprints on. the thumbs are in jpg but the actual screenshot is in bmp to reserve the colors since paint likes to blend things together and make the colors more dull when converting bmp to jpg.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #11 on Thu 18 Oct 2007 03:43 AM (UTC)
Message
If you want to compare your code to something similar, there's a map snippet that does almost the same thing (except it doesn't have lines to connect rooms).

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #12 on Thu 18 Oct 2007 03:56 AM (UTC)
Message
Are you talking about the afkmapper? or another mapper?

A while ago I looked everywhere(hours on google) for a high quality visually appealing, nice mapper but could never find one.

Where can I get info on the one you're talking about?
I'd love to take a look.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #13 on Thu 18 Oct 2007 04:07 AM (UTC)
Message
It's not the overworld with AFKMUD. I'll see if I can remember where I got it, although I have made heavy modifications to it.

This is how mine looks:
http://img.photobucket.com/albums/v123/rebirthseph/biyg_map.jpg

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Nargsbrood   (54 posts)  Bio
Date Reply #14 on Thu 18 Oct 2007 04:49 AM (UTC)
Message
I like they way it looks like a real map would look. I'd love to get a hold of a legend for it so I can understand it better. what is the address for your mud? It does look awsome. The green is a little intense but overall it looks like a real map. Does each spot plottd on the map represent a squre you can visit? Is it all mapped on the fly? or do you have to build a map when the area is being built?

I think the purpose of your map is very different from the purpose of mine.

Yours is to look as real as a text map can look(good job too) and give a general idea of the layout of the area. You can see a much larger area mapped out on your map than on mine(i believe).

Mine is more noob friendly imo as in you can tell at first glance what the majority of it means and the exact paths you can take(again at first glance) while giving you a feel for exactly what you're standing on without having to read the description.
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.


59,699 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.