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
Toad
Newbie


Joined: 31 May 2002
Posts: 7

PostPosted: Fri May 31, 2002 7:10 am   

Problem with name tagging in mapper.
 
Ok first off I mud on 3 kingdoms which is lp and is darned near impossible to map.

But I managed to make it map by simply creating my own trigger to echo the parts of the mud that match.

It works perfectly unless. Unless there are wierd charaters in the room name.

A room (ne)

works fine.

A room that looks like.

-= Wichita, Kansas =- (n,w,s,ne)

and I try to tag the "-= Wichita, Kansas =-"

In which case the mapper catches only the first "-" and skips the rest.

These rooms don't comprise much of the mud but I'd like to resolve it before I go spending hours and hours mapping tons of mud.

Is there any way to make it tag the name explicitly without looking at the characters? I've seen it done but I don't know how he did it.
Reply with quote
GiriFox
Wanderer


Joined: 25 Sep 2001
Posts: 59
Location: Australia

PostPosted: Sat Jun 01, 2002 6:19 am   
 
If you wanted to fiddle a bit, try the new Beta version, its mapping is greatly improved. (Of course, back up your settings etc).

The answer to the problem you've described I think has to do with providing a better definition of where the room name appears. Is it in colour perhaps, or has any unique repeatable characteristic that the mapper could look for?
Reply with quote
Toad
Newbie


Joined: 31 May 2002
Posts: 7

PostPosted: Sat Jun 01, 2002 7:26 pm   
 
The room is in plain non colored text

-= Blah blah blah =-

Another it screws up is

-={@ Entrance to the Cathedral of All Gods @}=-

This one actually causes it to insert brackets in the code which spews a bunch of crap out.

#tag name %1
#tag name {%1}
and
#tag name {"%1"}

None of those work.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sat Jun 01, 2002 8:12 pm   
 
Try:
#TAG name {%quote(%1)}

Also, remember to always reconfigure the mapper after you make a change to an existing trigger that uses #TAG or create a new trigger that uses #TAG.

Kjata
Reply with quote
Toad
Newbie


Joined: 31 May 2002
Posts: 7

PostPosted: Mon Jun 03, 2002 4:42 am   
 
I tried the quote thing, sounded promising but alas it didn't work.

It just tagged the %quote explicitely and set the name with the %quote code.

Oh well, it was worth a try.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Jun 03, 2002 5:46 am   
 
In the case of the cathedral it wouldn't matter. The mapper operates by creating trigger when trying to follow. Those triggers would be incapable of matching the text. It might match it from your tag trigger, if you ever got it just right, but it would look horrible on the map display.

I would suggest you try to strip all the decorations away and send that to the TAG.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon Jun 03, 2002 2:14 pm   
 
Oops, I forgot, #TAG doesn't do any evaluating unless its argument is just a variable. Try it this way:
#VAR title %quote(%1);#TAG name {@title}

Kjata
Reply with quote
Toad
Newbie


Joined: 31 May 2002
Posts: 7

PostPosted: Sat Jun 08, 2002 11:31 pm   
 
Was worth a try but didn't work.

Guess the mapper just can't do it.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Jun 09, 2002 9:09 pm   
 
I don't think I have ever gotten a 75% solution on mapping most lp muds to date.

The 3 lp muds I have played on and off for the past few years has made me complacent
to using the mapper for them. I'm just hoping someone with fresh insight will
make sense of them

TonDiening
Beta Upgrading to 6.26
Reply with quote
Daagar
Magician


Joined: 25 Oct 2000
Posts: 461
Location: USA

PostPosted: Sat Aug 17, 2002 4:56 pm   
 

The trick for 3k is to simply take a slightly different tactic.



#TRIGGER "GlanceColor" {%*~(*~)} {#COLOR yellow;#GAGON} "System|Automapper" {line=7}
#COND "GlanceColor" {^>} {look;#GAGOFF} {nocr|prompt}


Yes, this may be a bit of overkill, but you get the added advantage of it working 100% :)

You must be in brief mode, and with the above triggers be using the default ansi color scheme (you can alter this of course). What this set of triggers will do is scan for room names of the form 'Room name (exits)', in the default grey color. The line will get colored yellow (3k won't let you set the color of the room line in brief mode...grr). We then start gagging all further output (objects/npcs in the room) until we see the prompt '>'. We then stop gagging and do a normal 'look'. Notice that I use %* for capturing the room name! This gets around the problem of scrwey characters in the room name.

So, now when you configure the mapper it captures the room name, exits, _and_ long description all in one shot! Granted, if you have no need for the room description you can simplify the above triggers. The triggers as is will display a very nicely formatted room like the following:

Room Name (exits)
Long Description
Items in room
>

Now the caveats: You must be in brief mode. The above triggers use the default ansi colors. The overhead is slightly high because it is doing a 'glance' and a 'look' each time you move.. so I use it only when mapping. The worst problem is that the pattern %*~(*~) comes up a _lot_ on the mud. So when you are mapping, you just have to be a bit careful. Fingering a person will fail because the triggers will catch things like (Oracle) or (High Mortal) status. Some signs you can't read, etc. So you just switch back to follow mode :) This is the main reason the triggers are in the System|Automapper class folder. Sorry for the delayed response. Hope this helps.
Reply with quote
Daagar
Magician


Joined: 25 Oct 2000
Posts: 461
Location: USA

PostPosted: Sat Aug 17, 2002 5:04 pm   
 

Heh, guess what! It isn't even necessary to do anything this complex anymore. It seems 3k enable an 'EXIT_GRAPHIC' option. While the compass isn't useful for mapping, it _does_ cause the room name to be displayed with the long description. A slight change of the triggers should make things work as expected. Whee!
Reply with quote
Toad
Newbie


Joined: 31 May 2002
Posts: 7

PostPosted: Sat Aug 17, 2002 11:48 pm   
 
Looking over my last posts I seem like a hapless newbie who is probably doing something basic. So to dispel that myth, I'm going to put down what I do have, which almost works.

#CLASS {mapper} {disable}
#VAR roomreached {false} {true}
#VAR exittypes {w|n|s|e|ne|sw|nw|se|out|portal|leave|chaos|science|fantasy|u|d}
#TRIGGER {(*) ~(([a-z,,])~)$} {
#loop %numwords( "%2", ",") {#if %ismember( %word( %replace( "%2", ",", "|"), %i, "|"), @exittypes) {roomreached=true}}
#if @roomreached="true" {
#echo ROOMNAME: %1
#echo ROOMEXITS: %2
}
roomreached=false
}
#TRIGGER {^ROOMEXITS: (*)$} {#tag exits {%1}}
#TRIGGER {^ROOMNAME: (*)$} {#TAG name {%1}}
#CLASS 0


When I move it looks something like this:

--,-@ w
The Center of Town (e,w,s,n,jump,omp)
ROOMNAME: The Center of Town
ROOMEXITS: e,w,s,n,jump,omp
Strong Fortress.
The 3-K Kill List.
A Statue of Cancer the King.
A tall street light.
--,-@ n
North of Center (e,w,s,n)
ROOMNAME: North of Center
ROOMEXITS: e,w,s,n
A broken cup.
Johney the little boy (Pinnacle).
A tall street light.
--,-@ w
North lane (e,w,n)
ROOMNAME: North lane
ROOMEXITS: e,w,n
Cold Tiro has a Halibut by the tail! [scratched].
--,-@ e
e
e
North of Center (e,w,s,n)
ROOMNAME: North of Center
ROOMEXITS: e,w,s,n
A broken cup.
Johney the little boy (Pinnacle).
A tall street light.
--,-@ North lane. (e,w,n)
ROOMNAME: North lane.
ROOMEXITS: e,w,n
A tall street light.
--,-@ East run (e,w,s,n)
ROOMNAME: East run
ROOMEXITS: e,w,s,n
--,-@

Ahem, so as you can see the prompt makes no difference whatsoever (my prompt is the --,-@) I have no idea why it doesn't get echoed in the ROOMNAME line but its immaterial as at that point its doing the right thing. In any case it'd be easy to strip any >'s by using the %remove(">",%1) from the tag. Or an #if (%pos(">",%1)=1) {#tag {%remove(>,%1)}} Which would only remove the first character if it was >.

This also gracefully solves the problem of players walking in, chatlines, shoutlines, etc. Note Johnny the little Boy (Pinnacle) doesn't set off the trigger. Nothing that isn't a room desc or a really good forgery will ever be caught. I didn't set it to only trigger on (default color) but I could have. And it works in all cases that I know of even a single exit, as long as its in one of the @exittypes.

The only reason I can't map every area I want to is those complex room names. I'm afraid I may have to take the advice of vijilante and just strip out all the crap. I don't want to but I probably will anyways.

Feel free to experiment.
Reply with quote
Castaway
GURU


Joined: 10 Oct 2000
Posts: 793
Location: Swindon, England

PostPosted: Sun Aug 18, 2002 6:17 pm   
 
quote:

I don't think I have ever gotten a 75% solution on mapping most lp muds to date.



Which LP-Muds do you mean? I don't have any problems at all, unless you count not being able to capture room names in brief mode ;) (Which hasn't worked since 4.62.. hinthint Zugg ;)

I'm even mapping German LPMuds without (many) hiccups..

Lady C.

(PS: I don't see why the problem is just with LP, what makes them different from others?)
Reply with quote
Toad
Newbie


Joined: 31 May 2002
Posts: 7

PostPosted: Sun Aug 18, 2002 8:06 pm   
 
LP muds don't terminate their prompts with a carriage return. The effect being when several commands are typed in quick sucession, the prompt ends up inserted at the beginning of the first line of text. Most have ways of putting a carriage return in but this one doesn't.

The part that is getting me is that room names aren't standardized (nor should they be) and they contain wierd characters that just play havoc with triggers that deal with strings. In this case refer to my first post.

Interestingly enough tinyfugue has no problem with the prompts and the only and I mean only reason I don't just convert to it is that it is missing the mapper, and it is missing ansi triggers (triggering on a specific color text). Frankly that's it. I've considered attempting to code those functionalities into it myself, just to see if I could do it.
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