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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Wed Oct 29, 2003 3:03 am   

what is "Queue" in the mapper?
 
(FYI: I'm a programmer and know what a queue is, I'm just asking in relation to how zMUD maps things)

One thing I've found in the mapper is that if I issue a command other than a direction, it then shows up in the "Queue" in the mapper window. When I issue a command other than a direction and then enter a direction, automap creation stops functioning. Why this is, I don't know. What I've found is that if I type any command other than a direction (like "look" or "eat bread" or whatever), I MUST enter #move by itself to clear out that queue. If I do that, then when I move the automapper will follow. Otherwise, it just sticks, stubbornly refusing to continue mapping and showing the non-movement command ("look") in Queue. I then have to move back to the room, perform a #move to clear the queue, then start moving again. Very frustrating.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Oct 29, 2003 4:40 am   
 
I use a little thing in my prompt trigger to do this automatically. In any case, when in map mode the queue captures nearly everything sent to the mud, as anything might indicate a movement. Then when what looks like a room is detected the queue is examined to figure where that room should be created.

In follow mode only directions and valid other exit type commands are displayed in the queue.

Both modes clear the queue, to what is considered to have caused the movement, when a movement is detected, again I keep my queue clear of extraneous commands while mapping by use a trigger on my prompt. This checks that the %item(%lastdir,1) is a valid map direction (newsud) and if it isn't issues #NODIR to remove that command from the queue. Note %lastdir is not documented to return a list but does when the command is a defined #DIRECTION. You other post seemed to indicate that this tactic might be difficult, but it is definitely worth doing.

Zugg wrote all this before fuzzy logic really was a known thing. As with anything that works on such logic anything over 50% without help is good. Since such logic is hard to do it and it is never likely to be improved upon (human brains don't achieve much better, they just reevaluate more often) don't expect any changes to it ever.
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Wed Oct 29, 2003 6:39 am   
 
V: Regarding this thread and the other one, I think many of my problems are tied up in the same thing - the Queue problem. I believe I need to do what you're doing and autoflush my queue on anything other than a valid command. Now that I'm hyperaware about the queue, I have had much more success. I just compulsively clear my queue and it doesn't seem to lose track.

Of course, the one problem I did notice was that some rooms that are entered with "enter" don't have the [] exits section (oh, and no, there is no autoexits command). This confuses the mapper, but I can understand why so it's not a big deal. I tend not to map these places as separate room anyway since they have no exits other than back to the original room.

The frustrating thing is that the fuzziness is getting in the way in this case. Arm has a very strict format that can be defined as thus:

Possible room entry event here.
Room Name [NESWUD]
Descriptions lines + mob lines until you reach your prompt
Descriptions lines + mob lines until you reach your prompt
Descriptions lines + mob lines until you reach your prompt
Descriptions lines + mob lines until you reach your prompt
Descriptions lines + mob lines until you reach your prompt

<your custom prompt>

I wish I could just short out the fuziness in this case and give it a perl regexp.

^((?:[^[])+) [([NESWUD]+)]n
((?:.*n)+)
n
<your custom prompt>

Would work beautifully (except for the oddball no-exit rooms I talked about, which break it already anyway).

I'm seriously looking at building a plugin that lets me do something like this. We'll see how it goes.


All in all, once I do the queue-clearing I will be a much happier mudder. Don't suppose you could post that code here, could you? If it's too much to get together, that's okay. I think I could replicate it with a bit of work. Thanks for the help!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Oct 30, 2003 12:04 am   
 
It is actually a single line within all the stuff my prompt trigger does:
#IF (%ismember(%item(%lastdir,1),"n|e|s|w|u|d")=0) {#NODIR}

This might actually interfere with non-standard directions when in follow mode if you receive a prompt between issuing the command and receiving the room. I did nothing to handle this since the mud I play dosn't have any that I have found. You might want to add checking for mapper mode if this doesn't fit you.
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Thu Oct 30, 2003 12:12 am   
 
That definitely happens a lot on Arm. There are lots of actions that are triggered upon walking into a room. Unfortunately, it places these things above the room name. So far I've NOMAPped about a dozen different phrases. That's why I REALLY wish I could just tell it "look, don't worry about anything between the direction command and the room name, which will have [] in the name".

Maybe I'll eventually write a plugin or use the COM api to do it. That way I can bring perl to bear on the problem :)
Reply with quote
Cuttlefish
Apprentice


Joined: 28 Oct 2003
Posts: 164

PostPosted: Fri Oct 31, 2003 4:37 pm   
 
Just wanted to follow up here. The queue clearing trigger is working GREAT. I have been having a much more pleasant time playing Arm since I put that in. I have to give you a huge thanks again, Vijilante.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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