|
rozdwojeniejazni Wanderer
Joined: 13 Aug 2011 Posts: 74
|
Posted: Thu Jan 10, 2013 7:39 pm
Fixing the #nodir |
Hello, fellow cmudders. I know already you can sometimes come up with great ideas. Maybe you can think of something that could overcome that #nodir bug.
You see the problem happens very often in situations like this. SLOW map mode, you are going from south to north, but on marked location you pressed quickly wrong dir first, then the proper one.
Quote: |
Country road.
Exits: nw, s.
> n
nw
You can see no path going north. [*]
> Long country road.
Exits: nw, s.
> |
Line marked with [*] triggered a #nodir and here because of the bug both directions disappeared from the queue. This way marker stayed in the same place and I get lost and it requires manual correction and it's so annoying and takes so much time and...
Don't you have the same problem? I wonder why no one is complaining about this. For a long time i thought it's a problem somewhere in my config.
Anyway... Any ideas how to avoid this problem? |
|
Last edited by rozdwojeniejazni on Thu Jan 10, 2013 9:05 pm; edited 1 time in total |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Thu Jan 10, 2013 8:32 pm |
Just guessing, I'm not too familiar with mapper commands, but what if you made your "You can see no path" trigger send #ok instead of #nodir? I'd imagine that would take the last item out of the queue, but not actually move you since there is no north exit on the map to move to.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Thu Jan 10, 2013 8:47 pm |
That would be a bad idea. If you happened to be in Mapping mode, that would cause it to create a new room in that direction.
I don't know what bug is being described in the original post. Are you using a #NODIR trigger?
Are you certain that it is firing? Could you post the trigger script here? #NODIR works fine for me. |
|
|
|
rozdwojeniejazni Wanderer
Joined: 13 Aug 2011 Posts: 74
|
Posted: Thu Jan 10, 2013 9:15 pm |
#ok instead of #nodir is of course not an option, because I need this to prevent a step if there would be a room there.
Rahab: the same problem you can see also here, it wasn't recognised as a bug yet.
I'm sure it's firing, it can be seen by using #cw for example. The code is naturally (raw as I use it, so no translation)
Code: |
<trigger priority="1620" id="91">
<pattern>^{> |}Nie widzisz zadnego wyjscia prowadzacego na *.$</pattern>
<value>#nodir</value>
</trigger> |
The problem is actually that #nodir removes both directions from queue, Zugg explains it. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Thu Jan 10, 2013 10:28 pm |
rozdwojeniejazni wrote: |
#ok instead of #nodir is of course not an option, because I need this to prevent a step if there would be a room there. |
Assuming your map has your location in the right position, there shouldn't be a room there if this trigger is firing, because there isn't one. If it really isn't an option though (as I said, not too familiar with mapper commands), could you just do something like this?
Code: |
$destroom = %destroom()
#nodir 1
#queue %walk($destroom) |
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Jan 11, 2013 8:46 pm |
I think %destroom only works for speedwalks, not for directions typed in at the command line.
|
|
|
|
rozdwojeniejazni Wanderer
Joined: 13 Aug 2011 Posts: 74
|
Posted: Sat Jan 12, 2013 11:45 am |
Rahab it appears that %destroom works here as well.
Daern: Thank you, your idea solves this problem in typical cases and it's probably is as good as it gets.
I'll just give you an example, where there is a room and still you need #nodir to work. From current location in mountains north goes a second path, but currently "This path is blocked by an avalanche." although usually its available. So i end up in location to nw, not n;nw but mapper should recognize it well due to #nodir. Also this is the case where your solution fails. |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sat Jan 12, 2013 7:07 pm |
Hmm. This would be a lot easier if there was a way to retrieve the current mapper queue somehow, but as far as I can tell, there isn't. The only solution for that that I can think of is maintaining your own queue, using aliases to add directions to it as you enter them and triggers on a room name or something to %pop it. Then if your avalanche trigger fired, you could do something like %pop(directions), #nodir 1, #queue @directions. But that might be more complex than you want to get into.
|
|
|
|
|
|