|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Sun Nov 16, 2003 5:08 am
how best to tag room names and exits |
(Edit: I use "" as my escape character. I've also tried this with the default "~" and get the same results.)
Okay, I still occasionally have problems with the mapper and I want to clear it up once and for all. Here is a sample room:
Code: |
A Shadowy Alleyway [EW]
A narrow, small alley twines its way between small crumbling buildings
made of mudbrick, their aging bulk casting long shadows across the
hard-packed, sandy dirt which surfaces it. Thick with shadows, it smells of
decay and urine. A multitude of noises from the bustling outside filter
into its confines, resounding against the ancient, timeworn bricks.
To the west, the looming mass of the outer walls of Allanak
overshadows the broader expanse of Wall Road.
<92/92hp 114/114sa 97/97mn 86/86su - 11/15/03 09:31PM>
|
This SHOULD be pretty simple to get the room name and exits from. I have a trigger with the patter "^(%w*) [(%w)]". This provides me with Room Name in %1 and Room Exits in %2. Currently, they are in the format "NSEWUD". I've already written a loop that can reformat them as "N,S,E,W,U,D" if that will help the mapper.
Now, given that I have this, how should I write the #TAGs? I've already tried this in the body of the trigger:
Code: |
#TAG name {%1}
#TAG exit {%2} |
This should tell the map EXACTLY what should go in the room name and exit, right? Well, I Reconfigure, as the help file says but the mapper then colors the whole "A Shadowy Alleyway [EW]" line red as the room name. It then colors the room desc green and the prompt teal. I tell it to reload the room info for the room I'm in and it doesn't even get the room name. I'm confused.
Is there some better way to do this tagging?
(Edit: Ignore the following. I figured it out later in the thread.)
Aside: In the help file, it says you can put multiple fields on the #TAG command like so:
Code: |
#TAG name,exit,vnum {%1} {%2} {%3} |
However, whenever I put this into the editor and hit save, it changes it to:
Code: |
#TAG vnum {%1} {%2} {%3} |
Why? |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Nov 16, 2003 7:12 pm |
I have no idea. My trigger editor screen accepts #TAG name,exit,vnum {%1} {%2} {%3}. This was true regardless of my choices on the Options menu in the Editor. I tried it with and without Check syntax while typing, with and without Command Help while typing, and with Pretty Print, with Convert to one line commands, and with neither of the last two. I tried several different combinations and couldn't find one that would strip the name,exit, from it. It may have something to do with your nonstandard preferences.
However, since your editor won't accept it I'd recommend you just go ahead and make your trigger from the command line.
#TR {(%w*) [(*)]} {#TAG name,exit {%1} {%2}}
I also have no idea why you have vnum in your tag since the line doesn't appear to include vnum information and you don't have a %3. I've assumed this was a typo and left it out.
Since you choose to use NON-DEFAULT special characters, it's important to start every question by REMINDING people that you use instead of ~. After all, there may well be someone who hasn't read any or your previous posts and won't know this at all. Without this information, your scripts won't make sense.
Actually, it would be even better if you converted your scripts to default special-characters before posting and converted the solutions back to your preferred special characters when adding them to your scripts, so we wouldn't have to know. It's really your responsibility, since you're the one with the non-standard preferences, to account for the changes you prefer. |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sun Nov 16, 2003 8:24 pm |
I've been fiddling with this in offline mode for about three hours now. I get the same results you get and I don't think it has anything to do with your choice of escape characters. I tested with tilde only.
No matter how I try to configure the mapper, zmud only wants to recognize that first line as a single element. I've configured the mapper for quite a few more-difficult-seeming muds, but this has got me going in circles. For some reason, it seems that the mapper doesn't want to recognize 'NSEWUD' as short exits AND have them on the same line as the roomname. I've never been able to figure out how to modify the mud output before the mapper grabs it, but I think maybe if you can get commas and spaces between those exits before it's parsed for the mapper, it might be worth a try without using the #TAG.
I'll keep trying, but this may be something Vijilante would need to look at. Some of his mapper scripting would definitely work.
One more thing, what is the addy for this mud? I'd like to try this again while connected. |
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Sun Nov 16, 2003 9:22 pm |
Lightbulb: Easy buddy, I normally do remind people. I just forgot that there was a in the trigger pattern. Cut me some slack
The reason I had vnum in there is that I was showing that this was an example from the helpfile and I wanted to be sure I wasn't doing anything that I didn't understand that was screwing it up.
I figured out what it was. Somehow I had accidentally set the class separator character to "," instead of "/". Not sure how that happened. Anyway, I changed it back and it had no effect on the problem.
mr_kent: I've done a lot of work on it, never with satisfactory results. I've already tried this code:
Code: |
#TAG name {%1}
#TAG exit {%2}
#LOOP %len( %2)-1 {exits = %concat( @exits, %copy( %2, %i, 1), ",")}
exits = %concat( @exits, %copy( %2, %len( %2), 1))
#SUBSTITUTE {%1%cr"Exits: "@exits}
|
I thought that would make it happy because the result is:
Code: |
A Shadowy Alleyway
Exits: E,W
A narrow, small alley twines its way between small crumbling buildings
made of mudbrick, their aging bulk casting long shadows across the
hard-packed, sandy dirt which surfaces it. Thick with shadows, it smells of
decay and urine. A multitude of noises from the bustling outside filter
into its confines, resounding against the ancient, timeworn bricks.
To the west, the looming mass of the outer walls of Allanak
overshadows the broader expanse of Wall Road.
<92/92hp 114/114sa 97/97mn 86/86su - 11/16/03 01:36PM>
|
But when I do this and do a reconfigure using offline setup (using the original text at the very top the way it comes from the mud), it shows this at the end of the wizard:
Code: |
<font color="red">Exits: E,W</font id="red">
<font color="green"> A narrow, small alley twines its way between small crumbling buildings
made of mudbrick, their aging bulk casting long shadows across the
hard-packed, sandy dirt which surfaces it. Thick with shadows, it smells of
decay and urine. A multitude of noises from the bustling outside filter
into its confines, resounding against the ancient, timeworn bricks.
To the west, the looming mass of the outer walls of Allanak
overshadows the broader expanse of Wall Road.</font id="green">
<font color="teal"><92/92hp 114/114sa 97/97mn 86/86su - 11/16/03 01:36PM></font id="teal">
|
Notice the lack of the room name. Is it bad to substitute in the way I did? I've tried several different things with #echo and #show but none of it worked for me. I've tried this:
Code: |
#SUBSTITUTE {%1}
#ECHO "Exits: "@exits
|
Run reconfigure, offline setup:
Code: |
A Shadowy Alleyway
<font color="red">Exits: E,W</font id="red">
<font color="green"> A narrow, small alley twines its way between small crumbling buildings
made of mudbrick, their aging bulk casting long shadows across the
hard-packed, sandy dirt which surfaces it. Thick with shadows, it smells of
decay and urine. A multitude of noises from the bustling outside filter
into its confines, resounding against the ancient, timeworn bricks.
To the west, the looming mass of the outer walls of Allanak
overshadows the broader expanse of Wall Road.</font id="green">
<font color="teal"><92/92hp 114/114sa 97/97mn 86/86su - 11/16/03 01:36PM></font id="teal">
|
Note that it colors the exits red, but not the roomname blue.
I've also tried moving the "#TAG exit {%2}" to the bottom and changing it to "#TAG exit {@exits}" so that it would get the "E,W" format.
This is mainly why I'm asking here on what would be the best way. I keep thinking I would have something zMUD would like, but for reasons unknown to me it doesn't like it.
I've tried all of this in a new mud connection so none of my other triggers could be confusing it. I used the default ~ quote character and changed my pattern to use ~ instead. Even in this scratch setup, it did exactly as above. I don't understand when I FORCE it to know the room name using "#TAG name {%1}" why it still can't see it. |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sun Nov 16, 2003 9:24 pm |
Got it to work! See if I can guide you through it now...
First, delete that #TAG trigger.
Okay, this was done in offline mode, shouldn't matter, but it seems to work great so maybe you should be in offline mode too.
1. I copied the output you gave to zmud editor to preserve formatting.
2. Opened mapper and clicked on mapping button as opposed to follow.
3. Click ConfigConfiguration Settings...tickbox before configurationRoom Name
3a. Room Name and Match Room Name at End of line should be checked, and nothing else should be. 0,0 for Paragraph and Start Line.
4. Click Room Description in the tree window.
4a. Both check boxes should be checked. 0,1 for Paragraph and Start Line.
5. Click Room Exits in the tree window.
5a. Room Exits, Exit in Room Name, and Single character exits should be checked. 0,0 for Paragraph and Start Line.
6. Click MUD Prompt in the tree window.
6a. Auto Prompt detect, Complex prompt, and Allow string> prompts should be checked. '<' Should be in the Prompt char: edit box.
7. Close Map Preferences window.
8. From the editor window, click 'send'.
9. Highlight the text in the main window.
10. In the mapper, click ConfigNew Configuration.
11. In the Automapper Setup Wizard window, click 'Offline Setup' (it's next to the text 'Automatic Setup').
12. Click in the text box, then click 'Paste', nextnextnextfinish.
13. If you lose the last char of the Room Name, or the closing brace gets included in the dirs, you can configreconfigure.
Hope that works for you. |
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Sun Nov 16, 2003 9:59 pm |
mr_kent: Thanks for your ongoing efforts. That's basically what I had before, but it stopped working reliably for me.
Anyway, I set it all up like you said and it highlighted it like this:
Code: |
<font color="blue">A Shadowy Alleyway [EW]</font id="blue">
<font color="green"> A narrow, small alley twines its way between small crumbling buildings
made of mudbrick, their aging bulk casting long shadows across the
hard-packed, sandy dirt which surfaces it. Thick with shadows, it smells of
decay and urine. A multitude of noises from the bustling outside filter
into its confines, resounding against the ancient, timeworn bricks. </font id="green">
To the <font color="red">west, the looming mass of the outer walls of Allanak</font id="red">
overshadows the broader expanse of Wall Road.
<font color="teal"><92/92hp 114/114sa 97/97mn 86/86su - 11/15/03 09:31PM></font id="teal">
|
Okay, after messing with this for quite some time (heh, shouldn't I be MUDDING?), I figured out what screws zMUD up.
1) Created brand new connection to ThunderDome (just needed another mud so that it wouldn't read my Armag prefs).
2) Followed the steps you gave. This showed everything highlighted properly.
3) Go to View->Preferences->General then change to the MUD Prompt preference. Set Text that MUD prompt starts with: to <
4) Repeat step 2. Note that now, it shows it incorrectly parsed as at the top of this post.
5) Go back and remove < as MUD prompt and repeat step 2.
It STILL shows up incorrectly. Somehow, this hoses the auto-configuration. This is part of why I got so frustrated and was trying another solution. At first it worked fine, then I must have dinked with my mud prompt and got it in this bad state.
Any clue on how to get it fixed other than deleting everything and starting over? |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sun Nov 16, 2003 10:14 pm |
quote: Originally posted by Cuttlefish
3) Go to View->Preferences->General then change to the MUD Prompt preference. Set Text that MUD prompt starts with: to <
Heh! I had problems with that prompt box a long time ago, and stopped using it because it messed with my mapper!
It was a bit faster (more efficient) using that box, but now I've gone to triggering my prompt and catching the variables with the &var_name syntax. With the new trigger optimizations, this method might be quite quick enough.
If you need a working .zfg file for the snippet you posted, I can email it to you.
If you insist on getting zmud to recognize your prompt vars from the preferences window, I have no suggestions. |
|
|
|
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Sun Nov 16, 2003 10:23 pm |
quote: Originally posted by Cuttlefish
Any clue on how to get it fixed other than deleting everything and starting over?
Exporting your settings, creating a new zmud char and importing the settings would be much better than deleting and starting over, providing you have a good number of settings. |
|
|
|
Cuttlefish Apprentice
Joined: 28 Oct 2003 Posts: 164
|
Posted: Sun Nov 16, 2003 10:36 pm |
Nah, I don't need the MUD Prompt thing. Now that I know how to write a trigger, is should be a piece of cake. I just wish turning it off would fix whatever the mapper is having a problem with without having to go through exporting and reimporting everything.
|
|
|
|
|
|
|
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
|
|