|
Blue5Moon Newbie
Joined: 17 Nov 2002 Posts: 2
|
Posted: Mon Nov 18, 2002 9:18 am
Achaea mapping |
A few problems here... I can get the mapper configured pretty well with it scanning for room name, description, and exits, works pretty good. Until, that is, day/night phase changes, because in Achaea, the text in between room name and the exits changes greatly with the daytime. I can map an area fairly easily, only to have the mapper fail to recognize ANYTHING after the sun goes down simply because the room descriptions don't match anymore.
If I turn off scanning of room descriptions, the mapper sets the room name as the last line before the exits line, period, no matter what other settings I change. My first fix was to #tag the room names using a color recongition trigger, but there's a snag. Here's a sample room/desc/exits from a quicklook...
540h, 500m ex-n
The Sarcophagus.
There are two monolith sigils here. Casually causing electricity to dance
across the iron gauntlet worn on her right hand, a War Witch of Ashtan smirks
here haughtily in tight red leather. The body of a dead baby rat lies here.
There are two corpses of a young rat here. You see a sign here instructing you
that WARES is the command to see what is for sale.
You see exits leading north (open door), south (open door), and down (closed
door).
"The Sarcophagus." Is in orange, and exit lines/phrases are sent in blue, which will make them easy to #tag with triggers later if need be. My main problem ATM is the "You see a sign here instructing you that WARES is the commnd to see what is for sale." That line is always orange, same as room names. It shows up in any room which has a vendor. Room descriptions are bluegreen, and any players are usually light blue.
What I can't figure out is how to set a pattern match for the WARES phrase. Since it begins inside the room description, a line break can exist anywhere within the phrase itself. How do you set a trigger to fire on a phrase regardless of how it is broken up? My pattern of {You see a sign here instructing you etc.} almost never fires because zmud actually receives "You see a sign here instructing you $that..."
I'm assuming the #nomap argument will keep the mapper from using any of that phrase for its purposes once I can trigger it properly. (If the #nomap scraps the rest of the text on any included lines that's ok, room exits always begin their own line.) If there's something I should be using instead of #nomap let me know.
One last minute brainstorm that I don't have time to test before I leave... would this pattern work? {You*see*a*sign*here*instructing*you*that*wares*is*the*command*to*see*what*is*for*sale.} Will the * account for any number of spaces as well as newlines? A problem would be that it could pick up a 'You' from anywhere and match it to the WARES phrase, thereby borking everything in between. The use of so many wildcards also seems impractical, like I said, last minute brainstorm. Any related info for Achaea would be useful as well, it's making a real pain out of itself when it comes to definite patterns. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Nov 18, 2002 6:05 pm |
Probably the simplest way is to modify your exits string. In the mapper window, go to Config/Configuration Settings.../Configuration/Room Exits. On the right you'll see a text-entry field labeled Exit line keyword. Change it from "exit" to "You see exits". This may give you problems with single-exit and no-exit rooms, but there aren't nearly as many of them.
LightBulb
Senior Member |
|
|
|
Blue5Moon Newbie
Joined: 17 Nov 2002 Posts: 2
|
Posted: Tue Nov 19, 2002 3:45 am |
The exits code works fine. The problem is that the room name is detected incorrectly if room descriptions are not scanned. If I could pattern match the WARES line no matter where it's line break was, then I could gag/stow it away properly, and then color match the room names and tag them manually.
Translation: How do you pattern match a phrase that will be broken across two lines, but not always in the same spot?
Appreciated. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Nov 19, 2002 7:13 am |
My mistake, I misread the earlier post.
Pattern matching a phrase with a random line-break is difficult. The simplest method is to just make a complete set of triggers with each possible line break:
#TR {You see a sign here instructing you
that WARES is the command to see what is for sale.} {#NOMAP}
#TR {You see a sign here instructing you
that WARES is the command to see what is for$sale.} {#NOMAP}
#TR {You see a sign here instructing you
that WARES is the command to see what is$for sale.} {#NOMAP}
etc.
An easier solution would be to change the colors you use in Achaea so that you don't have duplication. This can be done with the Config Color command, and Room Title is one of the things you can change.
LightBulb
Senior Member |
|
|
|
keeper Newbie
Joined: 28 Nov 2002 Posts: 8 Location: Australia
|
Posted: Fri Nov 29, 2002 3:00 am |
I had the same problem. Here is a rough solution.
The format of the mud output is
room name (newline)
description
exits
Let room name be a 'yellow' line.
Every time you look in a room the first 'yellow' line you see will be the 'room name'. Right?
So, if a 'yellow' line comes AFTER the first line AND BEFORE or ON the 'exits' line it is NOT a 'room name'.
Thus write something like this:
***************************************
#TRIGGER {(*.)} {#AD yellowlinenumber 1;#IF (@yellowlinenumber = 1) { #TAG name %1}} "" {line='yellow'} ie. if first line then tag as room name
#TRIGGER {exit} {yellowlinenumber = 0} reset namecounter ready for next 'look'
*****************************************
You will need to change the script above to suit yourself, but you can probably see what's happening here.
I hope this helps you.
Keeper. |
|
|
|
|
|
|
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
|
|