|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Fri Nov 27, 2009 5:30 pm
How to Map Random Exits? |
Hey All,
One of the areas on my mud assign the 8 cardnal directions a different name like crazyway, notthisexit, etc. I was hoping to automap this after I had determined what cardinal directions the words stood for. This words stand for different directions each reboot. I was thinking about a database with the crazyway, notthisexit, etc that would then have the cardinal direction for it. Then when my #TAG trigger got hit, if I was in the zone for that area, I would remap all of the exits before I called #TAG. Or perhaps better is to do a bunch of >crazyway>e after I tag it to assign all the exits.
Anyone dealt with this issue and have a good system? I am using the latest CMUD Pro 3.12. The description is like so:
Insanity (notthisexit,crazyway,backwards,hardpath,longway,insaneexit)
Thanks! |
|
|
|
DanteX Apprentice
Joined: 13 Aug 2007 Posts: 166
|
Posted: Fri Nov 27, 2009 6:10 pm |
Well, you could use the "other" exit type, combined with an alias maybe.
Probably also some triggers on the names of the rooms you arrive to. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Nov 27, 2009 7:06 pm |
Properties of the maze in question? From what I can see, you have exit renames that change their exit orientations. You don't mention a thing about the rooms they dump into, though, so I don't know if the room that "notthisway" leads to changes or not. Nor do I know if the maze has multiple rooms with the same name and description (which is of particular importance for any script or piece of mapper code designed to figure out where you are.)
Without the maze definition, we can't really help you much. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Fri Nov 27, 2009 7:21 pm |
Almost all rooms have the same description, but the area isn't a box, so it is possible to determine how the directions map. Also for example that room there only has 6 of the 8 cardinal directions, so one knows by elimination the 2 not listed are one of 2 types, etc. The entrance room has a different description, so you know when you enter that, but that maybe the only room close to the entrance that has a unique description.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Nov 30, 2009 1:40 pm |
This is going to be tricky. Tell me if I am understanding you. You have maze with a consistent set of exits. In Room 1, say there are exits north, east, and south. They always lead north, east and south, but they don't have the names north, east and south. Instead, during one reboot, they are named notthisexit, crazyway, and backwards. Throught the maze, every exit that goes north is named notthisexit, every exit that goes east is named crazyway, etc. After the next reboot, the names are changed. Every exit that goes north is now named hardpath, every exit that goes east is named notthisexit, and so on. Is this what you mean?
[Edited]
There are several things you need to deal with to try to map the maze. One is to tell the mapper what directions the room exits go in, when it creates a new room. Another is to tell the mapper what direction you are moving when you move. Using #tag is a way to deal with the first problem, but the second is much trickier.
After some thought (my second thoughts, actually ), I think the way to deal with it is an alternate set of Cmud Directions. When you determine that "notthisway" means "north", do the command:
Code: |
#dir ab "notthisway" n |
Now, the mapper will know the command 'notthisway' is the direction 'a', which gets mapped as a north exit, and the opposite direction is 'b'. Set up direction 'b' the same way:
Code: |
#dir ba "backwards" s |
When you get a reboot, disable these directions until you figure out what direction each one means and change them appropriately. If you do this, you don't have to do the #tag at all--the map will mark these exits as the special exits 'a', 'b', etc., and know what direction to map them to. |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Wed Dec 02, 2009 12:59 am |
Yeah, I was thinking about if additional directions could be added, but didn't actually look it up. I have been busy determining the best ways of determining the actual directions and been having great progress on that side by dropping a number of bread crumbs to mark room numbers, and then figure out the directions from that.
What about #DIR ns "n|north|notthisway" n? I may try that as then I don't get any additional map dirs, but either way sounds like a good solution. Thanks a lot Rahab! |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Dec 02, 2009 1:38 pm |
Yes, that would work, but you'd have to change the directions twice each reboot--one time to remove "notthisway" right after reboot, so you can move around in normal rooms, and once after you figure out which direction "notthisway" actually points to. To see your default directions, click Settings. In the Package Editor, click View|Show Default Packages. In the tabs, click English Directions. Click View|Show|Directions. By default, Directions are not visible, to avoid cluttering up the screen with advanced stuff most people don't want to see. There are two classes in the English Directions module, one for the basic cardinal directions, and one for the diagonals. You can edit the directions within the Package Editor, including adding and deleting aliases.
A couple other notes. All directions for the mapper have a one-letter abbreviation, used for paths. It is those one-letter abbreviations you are specifying in the first parameter of the #DIR command. In addition to newsdu, the diagonal directions are hjkl. If you are going to make new directions, be careful not to reuse those letters. Another unfortunate issue is that capitalization makes no difference--N is the same as n. So you are limited to 16 new directions. |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Wed Dec 02, 2009 3:13 pm |
So I first tried out binding n/s/e/w/etc with also the new words. Didn't work so well as speedwalking still tried to send n. So then I tried setting the directions to new letters. Worked pretty well, only a few things don't work like moving with the number keypad. However I still have to unbind those dirs when I leave the area. Not a big deal I think, as I probably can setup an alias that executes when I enter the zone to add the dirs, and an alias that executes when I enter the room where you just are outside of the zones.
I did notice some fairly strange reactions when I went to view, directions, and tried to add the new directions there. Sometimes the new directions I added would disappear, etc. Seemed buggy to me. #DIR and #UNDIR worked fine however. |
|
|
|
chris-74269 Magician
Joined: 23 Nov 2004 Posts: 364
|
Posted: Thu Dec 03, 2009 1:36 am |
Are you trying to map hell on 3kingdoms? If so, the question is this: how can you script to orient yourself in a 3x3 cube. The problem is with this setup the directions themselves become relative to a perspective.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Dec 03, 2009 1:31 pm |
No, I don't think need to unbind those directions when you leave the area. As long as those direction names aren't used elsewhere in the mud in a way that looks like exits, you should be fine leaving the directions enabled.
Chris, are you suggesting that directions in this zone depend on what direction you entered a room from? So that, say, 'backwards' always points to where you came from, and say 'crazyway' always points forward? Yuck. That would be nasty to map with the mapper. There's probably a way to do it, let me think a bit. |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Thu Dec 03, 2009 3:08 pm |
I had to unbind them or when I speed walk with the map outside of the zone, I still send the revised directions.
So if the area is a perfect cube, you can't actually determine what is north/south/etc but only what are the reverse directions. You can also determine diagonals. However if the area is a symmetrical cube there is no need to know which is south/north/east/west/etc as it doesn't actually matter. If there are some non-symmetrical parts, then those would be used to determine the directions. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Dec 03, 2009 9:38 pm |
Robert, if you have a direction defined like this:
Code: |
#dir ab "notthisway" n |
you do not have to disable it, because the mapper will never think that 'n' means "notthisway". If you define it as:
Code: |
#dir ab "notthisway|n" n |
you will have to disable it. But there is no reason to define it this way.
On the other hand, if chris-74269 is correct about the nature of the zone, then this method will not work, because the exit "notthisway" will take you to a different room depending on what direction you previously arrived from. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Dec 03, 2009 9:49 pm |
You should be able to include a variable in the #direction definition. As long as you can figure out which way is which, you can then just change the variables and just like a trigger pattern or button caption the direction will instantly update. You can even include a stand-down routine that blanks everything out so that you don't go anywhere on accident.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
robert Wanderer
Joined: 25 Feb 2004 Posts: 98
|
Posted: Fri Dec 04, 2009 7:55 pm |
It definitely messed up my mapper speedwalking on areas outside even when defined like you said Rahab. Perhaps this is a bug in CMUD 3.12, but the help on #DIR isn't very complete on what this commands results should actually be so I am not sure myself. When I do it, speedwalking with .nsew etc works fine I think, but speedwalking with the map will send the new directions and also if I look at those rooms the exits all say notthisway and such.
I haven't tried a variable with a #DIR, but so far the strings are working well, so may just stick with that.
What Chris is talking about is the nature of the rooms themselves. Lets take a 3x3 cube example in which you start out at the center. You can guess what north, south, etc is by running into one of the walls, and do the other exits until the original direction is available again. Once it is available again you do that direction again, and the expect reverse. If the direction is removed from the rooms exit list, and then re-added again, you got the reverse. Repeat for all exit types, and you get all orthogonal exit types. However do not actually know if that is north, south, etc or not as the area is symmetric. If the area is entirely symmetric such as no different descriptions, mobs, etc, it doesn't actually matter that you don't know what north truly is, with the reversed directions you can still get back to the exit which is all that matters.
If that area isn't truly symmetric however, you would then use the non-symmetric part whatever it is to determine what you have previously defined as north/south/etc actually is. You won't actually know what is true north, but only what is the same north as what you defined before. It could be that is actually down, or east, or whatever in the coders mind unless there is some hint in the non-symmetrical part.
For example, lets say the area is a 5x5x5 with entry at 3,3,3 so that everything is symmetric. There is a non symmetric part that is what was considered 1 down 2 south. After determining all of the reverse directions, you would then go through each combination of 1 direction, and 2 of another until you got to that non-symmetrical part. If you didn't get to the non-symmetrical part you would do the reversal of those directions and try again. You could then determine what was down, up, south, and north.
Now depending on the area, if the walls and such are not flat, it can be more difficult to determine reversals such that dropping items, or marking rooms may make it more accurate/easier. Something like putting x item on the ground, entering a direction, putting y item on the ground entering a different direction and seeing if you are back in the room with x item. If not, repeat in various ways such as drop an x item again, move again, if x item is there pick it up and drop y item, try a reversal. Basically you need a system to keep track of each direction and the reverse directions that have been attempted. This should all be scriptable, and a lot faster and more accurate if scripted correctly than trying to accomplish the same by hand. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Dec 04, 2009 9:47 pm |
Okay. I did once see a mud which used relative directions. You could 'turn right' and change your orientation within a room, or "walk left" which would change your orientation and move you relative to your previous orientation, and so on. There was no way to independantly identify compass directions. I didn't actually play that mud, but mapping that would have been...interesting. I'm half tempted to work out a procedure for it in cmud just for fun.
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|