23 Feb, 2008, Vladaar wrote in the 1st comment:
Votes: 0
I have a problem with my mapping function. We used an automapper like style to do our wilderness code. Thus my wilderness is one big hairy 5000 vnum area. Automapper generates the maps, and another function generates the room names and brief descriptions.

My problem is when I connect an area to my wilderness unless I connect it on the edge of the wilderness the automapper tries to map the sector types of the area that is connecting to the wilderness. Thus I end up with some crazy look maps where areas connect to wilderness.

I thought of 2 ways that may solve that one I know would, the other I'm not sure.

1) Make an enter exit command for wilderness and keep zones seperate from wilderness. Thus no sector type conflicts. I know that would work, but I think it doesn't look the greatest. Also, with my limited coding ability would be an ugly function like player uses enter command if in this room then send char to this room.

2) Not sure if this would solve it, but was thinking if I make my sectors extended bits, I could keep sector flags different from the wilderness sector flags, maybe putting a W in front of the names of my wilderness sector flags, and some how only having function look_map or draw_map only check wilderness sectors and ignore others? Or will the automapper end up putting blank spaces where it knows a room from another zone is there?

Any suggestions?

Vladaar
23 Feb, 2008, drrck wrote in the 2nd comment:
Votes: 0
If I understand your problem correctly, you could just put a check in your automapping function to only map sectors of rooms in the 5000 vnum range.
23 Feb, 2008, Vladaar wrote in the 3rd comment:
Votes: 0
I thought that too, but using this in draw_map, the map wanted to generate blank spaces for connected area sector types.

with my define from mud.h
#define IN_WILDERNESS(ch) ((ch)->in_room->vnum >= WILDERNESS_MIN_VNUM && (ch)->in_room->vnum <= WILDERNESS_MAX_VNUM)

I placed this at top of draw_map function
if (!IN_WILDERNESS(ch))
{
return;
}

Example of output with this change:

TTTTTTTTTTTT@TTTT
TTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTT
@————-
TTTTTTTT@TTTTT
TTTTTTTTTTTTT
TTTTTTT*TT
~~~~~~~~~~~
~~~~~~~~~~~~
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~
23 Feb, 2008, Guest wrote in the 4th comment:
Votes: 0
If I'm understanding your problem correctly, entrances to areas in the middle of the wilderness cause the automapper to "see" into the area when you don't want it to, and it plots part of that over where the wilderness should be?

If that's the case, you might be able to flag an entrance passage with a flag that the automapper will not process behind. I avoided problems like this in my own wilderness by making zone entrances another symbol on the map that you walk onto and automatically enter the zone.
23 Feb, 2008, Vladaar wrote in the 5th comment:
Votes: 0
Hrm,

Wouldn't a room flag have the same affect leaving blank spaces as the check I tried?

Vladaar
23 Feb, 2008, Guest wrote in the 6th comment:
Votes: 0
I'm not sure what kind of affect it would have on your map system. On mine, an exit has its own sector symbol that is displayed. It's just another part of the map. When you attempt to walk onto it, the code checks a list of exists, and sends you to where that exit is pointed. Either on another map somewhere else, or into a zone by vnum.
23 Feb, 2008, drrck wrote in the 7th comment:
Votes: 0
Vladaar said:
I thought that too, but using this in draw_map, the map wanted to generate blank spaces for connected area sector types.

with my define from mud.h
#define IN_WILDERNESS(ch) ((ch)->in_room->vnum >= WILDERNESS_MIN_VNUM && (ch)->in_room->vnum <= WILDERNESS_MAX_VNUM)

I placed this at top of draw_map function
if (!IN_WILDERNESS(ch))
{
return;
}


Wouldn't you need to actually draw the "correct" sector symbol instead of just returning? Maybe that's why it's producing blanks. I'm really rather clueless here because I can't see any of your code.
23 Feb, 2008, Vladaar wrote in the 8th comment:
Votes: 0
void draw_map(CHAR_DATA *ch, unsigned short int map[50][50])
{
int x,y;
char *sect;


for (y=1;y<= MapDiameter;++y)
{
for (x=1;x<=MapDiameter;++x)
{
switch(map[x][y])
{
default:
sect = ".";
break;
case SECT_INSIDE:
sect = "&w_";
break;
case SECT_ROAD:
sect = "&O_";
break;
case SECT_JUNGLE:
sect = "&g&&";
break;
case SECT_VROAD:
sect = "&O|";
break;
case SECT_HROAD:
sect = "&O-";
break;
case SECT_CAMPSITE:
sect = "&Rx";
break;
case SECT_DOCK:
sect = "&w0";
break;
case (SECT_MAX+1):
sect = " ";
break;
}

if(x==center && y==center)
sect = "&R*";

send_to_char_color(sect, ch);
}
send_to_char("\n\r",ch);
}
return;
}
23 Feb, 2008, drrck wrote in the 9th comment:
Votes: 0
If you're getting blank spaces where your areas are supposed to be, then obviously wherever you're mapping areas to map[][], all of the sector types are somehow being set to ( SECT_MAX + 1 ). You should paste that part of the code as well.

(Unrelated) Also, you should strcat() a single buffer throughout the loops and only call send_to_char_color() once per draw_map() to reduce quite a bit of overhead.
0.0/9