Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
stormbarrier
Beginner


Joined: 09 Jul 2012
Posts: 11

PostPosted: Mon Jul 09, 2012 3:02 am   

Mapper: Almost all commands appear in direction queue
 
I have a problem where most of the text that I type through the command input gets inserted into the direction queue. I can traverse properly using the keypad and the mapper will (for the most part) correctly map the rooms I encounter. However, if I were to issue a simple command, such as 'talk person', it gets inserted into the Direction Queue. Here is an example:

Code:
<291/291hp 39/91m 286/305mv>look

Pawn Shop
Just a typical pawn shop.  The traditional 3-sphere symbol is painted on its
front window, so even the illiterate know where to get a bit of cash for
thier worldly goods.
Just step up to the counter and ding the little bell for service.

A shady looking character hovers about.
[Exits: east ]

<291/291hp 39/91m 290/305mv>talk shady

You try to strike up a conversation with Silver...

<291/291hp 39/91m 292/305mv>
Silver says, 'buy... sell... whatever...'

<291/291hp 39/91m 293/305mv>


At this point, I have 'talk shady' in my Direction Queue. This has only recently been the case and this happens with almost anything I type, but not everything. For example, typing 'look shady' doesn't cause a Direction Queue problem:

Code:
<291/291hp 78/91m 305/305mv>look shady

Wearing a cocky grin, Slick Silver lounges half in and half out of the
shadows, watching everything going on around him.
Silver is in excellent condition.

Silver is obviously carrying:
a magical lantern
a bundle of chopped wood

<291/291hp 91/91m 305/305mv>


But 'pickpocket shady' DOES cause a Direction Queue problem:
Code:
<291/291hp 91/91m 305/305mv>pickpocket shady

Silver catches you with your hands in his pockets!
Silver accuses you of being a pickpocket!

<291/291hp 91/91m 297/305mv>


To force the mapper to correctly identify room names, I created a trigger that tags rooms based on lines that start with one of a couple different ANSI colors. This seems to have worked fine for a bit, but I definitely didn't notice this issue before I made this change (a couple days ago, for example). I've tried turning off all of my triggers via the trigger button near the command input. I get the exact same issue even though triggers are disabled. In case it is applicable, here is the trigger I created. It is using RegEx matching instead of zScript pattern matching:

Pattern:
Code:
^\033\[(1|1;36)m([^<].*)\033\[0m$

Commands:
Code:
roomname = %2;#TAG name @roomname


The MUD I'm on is "Alter Aeon" @ alteraeon.com:3000.

Anyone have a clue where I completely screwed this up? I figured if I turned off my triggers, I couldn't possibly have the issue any more, but that certainly isn't the case.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jul 09, 2012 1:20 pm   
 
This has been the case for a long time. Cmud can't be sure that any particular command is _not_ an alias for movement until it is sure that you aren't moving. You should never trust the direction queue to contain only direction commands. It will instead contain everything that _might_ be a direction command. However, it should still work just fine despite that. Are you actually having problems with movement? Or are you simply disturbed to see things like "talk shady" in your direction queue?
Reply with quote
stormbarrier
Beginner


Joined: 09 Jul 2012
Posts: 11

PostPosted: Mon Jul 09, 2012 2:19 pm   
 
I could care less what actually appears in the queue, I just don't recall that being the case before and now the mapper gets hung up. I walk into the room that I listed in the example (and other rooms, but lets use this one), I'll attempt to talk to the guy, then I have to manually clear the queue before I leave the room or "talk shady" remains in my queue. When I use my keypad directions, I can traverse the MUD, but if I don't clear that queue, my mapper isn't centered on my location (i.e., thinks I'm still in the Pawn Shop).

But, based on your description, wouldn't Cmud know I wasn't moving once I got back to my prompt after the "talk shady" command? No exit lines (or room names) appear after I've typed that. I'd think Cmud would see information between 2 prompts that didn't match room information and dump the queue for you. Isn't that what happens when I type "look shady"?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4786
Location: Pensacola, FL, USA

PostPosted: Mon Jul 09, 2012 3:39 pm   
 
One alternative i find helpful... make a trigger on the exits line that does #OK, that tends to keep the queue updated
_________________
Discord server
Reply with quote
stormbarrier
Beginner


Joined: 09 Jul 2012
Posts: 11

PostPosted: Mon Jul 09, 2012 4:12 pm   
 
Good call, shalimar. I'll toss that in for good measure. I still feel like I'm missing something easy/obvious to keep this mapper in line.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4786
Location: Pensacola, FL, USA

PostPosted: Mon Jul 09, 2012 4:28 pm   
 
#TAGs? #NODIR and #NOMAP?
_________________
Discord server
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Jul 09, 2012 4:39 pm   
 
Most of the time it really doesn't matter what other commands end up in the queue. Are you actually having problems with miscreated rooms or having your location change inaccurately, or are you just bothered by not seeing the "none" in the command queue?

To prevent it, you could set up a command input trigger that matches on everything. This trigger would have an #IF command that checks a stringlist containing the known commands for movement. If it's not in that stringlist, the trigger would issue a #NODIR.

Code:
#oninput {(*)} {
  #if (!%ismember(%1,@movementcommands)) {#NODIR}
}
_________________
EDIT: I didn't like my old signature
Reply with quote
stormbarrier
Beginner


Joined: 09 Jul 2012
Posts: 11

PostPosted: Mon Jul 09, 2012 5:31 pm   
 
MattLofton wrote:
Most of the time it really doesn't matter what other commands end up in the queue. Are you actually having problems with miscreated rooms or having your location change inaccurately, or are you just bothered by not seeing the "none" in the command queue?


Perhaps I haven't explained my problem appropriately. I truly don't care what appears in the direction queue (if it comes out by itself). My problem is that what I would consider to be "normal" commands (e.g., talk xyz, say xyz, "l window", etc..), get stuck in the direction queue and they don't come out unless I click on it to clear it. I have created triggers and tags for the Room Name and the Room Exits. Normal traversal and mapping works well (after I got the tags worked out). I have a few triggers to pop out a #NODIR if I move in an invalid direction.

I assume I can make #NOMAP or #NODIR triggers for every command I want to type in, but I don't recall the client having this problem before. I use to be able to type "trip" in a fight or talk to a shopkeep without that command being "stuck" in the direction queue. The only reason I know this to be true is because, for example, if I talked to a shopkeep and then started traversing the map, the mapper would correctly follow me around. But now it is the case that if I'm in the pawn shop and type "talk shady" and then move east 2-3 times, the mapper shows that I'm still in the pawn shop. I assume the mapper doesn't follow me because "talk shady" (or something to that extent) is stuck in the direction queue. I don't care that "talk shady" appears in the queue, but I feel like it use to pop into the queue and back out without me having to do anything manually - as did most all of my other commands.

One more thing that is strange, if I'm in follow mode, I don't have this issue. If I'm in mapping mode, I do have this issue - even if I'm in rooms that the mapper has already created. EDIT: To clarify, if I have follow mode enabled and I walk into the pawn shop and type "talk shady", I can then walk east out of the pawn shop and the mapper follows me (direction queue says 'none'). If I have mapping mode enabled and I walk into the pawn shop and type "talk shady", I walk east out of the pawn shop, the mapper does *not* follow me (still marks me as in the Pawn Shop) and "talk shady" is still in my Direction Queue. I don't care that it appears in the queue, it just seems to be what is preventing the mapper from following me.

Sorry to be a hassle, I thought this would be something easy that I've overlooked.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jul 09, 2012 7:59 pm   
 
What we are saying is that having "normal" commands stuck in your direction queue usually doesn't matter--normally, the mapper will still follow you correctly. Having normal commands in your direction queue is normal. What we were asking was whether the mapper was actually following you correctly. This may not even have anything to do with your direction queue.

You have clarified that you _are_ having troubles with the mapper not following you in Mapping mode. Have you by chance made some changes to triggers that affect the mapper? In particular triggers containing #TAG or #OK commands, or perhaps #NOMAP? If you haven't reconfigured the mapper after that, it could lead to this problem. I would try reconfiguring the mapper to see if it clears up the problem. If not, it could indeed be something odd to do with the direction queue, though as I said that doesn't usually happen. If reconfiguring the mapper doesn't help, we can try the #NODIR trick Matt mentioned.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jul 09, 2012 8:07 pm   
 
As an aside, the reason Follow mode is probably acting differently from Mapping mode is that in Follow mode, the mapper automatically sets up a trigger based on the name of the room it expects you to enter; when that trigger fires, it sends an #OK. This does not require the mapper to recognize the entire room name/description/exits pattern like Mapping mode does.
Reply with quote
stormbarrier
Beginner


Joined: 09 Jul 2012
Posts: 11

PostPosted: Mon Jul 09, 2012 9:08 pm   
 
Ok. That makes sense. I'm not worried that they go into the queue, I just assumed that was causing the issue where the mapper doesn't follow me.

The most recent stuff I created were the two #TAG's that come off triggers for the room name and room exits. I did reconfigure the mapper a couple times after I did that. I don't have any #NOMAP or #OK triggers, currently. I have a few #NODIR triggers for invalid input (my MUD responds "Huh?" on an unknown command or "Alas, you cannot go that way." for an invalid directional command).

After reading what you guys have described about the queue, I'm starting to get the feeling my trigger/tag combo is screwing something up and the reason it isn't fixed when I turn off my triggers is because room names wouldn't be getting tagged (i.e., I would need to reconfigure the mapper with my triggers off). I'll toy around a bit and report back.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4786
Location: Pensacola, FL, USA

PostPosted: Tue Jul 10, 2012 12:33 am   
 
did you reconfigure the mapper after making your tag triggers? if not, go ahead and do so.
_________________
Discord server
Reply with quote
stormbarrier
Beginner


Joined: 09 Jul 2012
Posts: 11

PostPosted: Tue Jul 10, 2012 1:18 am   
 
I had reconfigured the mapper after making those tag triggers, but still saw this issue.

Matt's trigger did inspire me to create something a little bit different to filter out some false positives that my trigger may be pulling in. I made a multistate trigger that waits for a movement command once it successfully receives the movement command, it advances to the next state which is a pattern trigger for the ANSI colored room names which then get the #TAG treatment. This multistate setup would prevent lines that are not room names, but have similar ANSI colors, from being #TAGged (which I'm now guessing was my issue). After this change and another run through the reconfigure process, so far so good. I'm colorblind, so I'm betteing there were some colors in other text that were inadvertently #TAGgged.

Now I can see stuff hitting my Direction Queue and I can still traverse while the mapper follows me, which is what I'd expect. Thank you all for your help.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Jul 10, 2012 1:44 pm   
 
Glad that worked!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net