|
doomfyre Apprentice
Joined: 03 Jan 2002 Posts: 152 Location: USA
|
Posted: Sun Jan 12, 2003 6:29 pm
Materia Magica Mapping Part Deux |
It's my understanding that this problem has been dealt with and solved before, but sadly, the post is missing. If anyone doesn't mind giving it another try, i'd greatly appreciate it.
First, some output:
The South Road NW N NE
(-------------------------------------------------) W <---(M)---> E
SW S SE
Ok, here's a trigger, and it works fine for capturing the directions:
#TR {^ (%*)%s({NW|- |# })&5({N|-|#})&5({NE| -| #})$~(-------------------------------------------------~)&5({W|-|#}) <-({U|-|#})-~(M~)-({D|-|#})-> ({E|-|#})$%s({SW|- |# })&5({S|-|#})&5({SE| -| #})}
And this is the code i found elsewhere, that doesnt work for me:
#loop 2,11 {#var exit %trim( %param( %i)) #var exits {@exits%if( @exit = "-", "", %if( @exit = "#", "", @exit))}
#var exits {%trim( @exits)" "}}
#var exits %trim( @exits)
#TAG name,exit {%1} {@exits}
What this is supposed to do is place the room name in %1, loop through %2 through %11 and pass any directions found there to @exits, while stripping out any - or #'s.
I think it's trying to use @exit to store things initially, do the mojo to it, then pass whats left to @exits. None of these things happen, however.
I know the trigger itself works because i tested it by making individual variables for %2 - %11. It did a fine job of displaying either a direction, - or # in those variables.
Oh, and since theres a #TAG in there, i know i should mention my prompt, also known as "a whole new can of worms". I have read plenty of times here how its important to #TAG your prompt if it's not standard. Mine isn't, so im sorta at a loss as to how to tag it. Right now, it looks like this:
[AWAY][*]<693hp 435sp 680st>
If i decide to start playing again, and i go visible, it will look like:
<693hp 435sp 680st>
And if i am in a group, and someone else is tanking, it will look something like:
[Tankdude}{83%]<693hp 435sp 680st>
So, that presents a whole new problem, at least for me.
Well, thanks for reading my mini-novel. As always, any help is greatly appreciated.
v6.26 still, btw |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Jan 12, 2003 9:10 pm |
Actually, you do appear to have a standard prompt. It seems to always end the same.
#TR {~<(%n)hp (%n)sp (%n)st~>} {#TAG prompt;#VAR hp %1;#VAR sp %2;#VAR st %3}
The biggest problem in your trigger appears to be a missing ; between the two #VAR commands in the #LOOP. It would probably be better to just skip the loop though. Also, unless you have some reason to think room titles will include special characters it would be safer to just use * instead of %* (a much overused wildcard). Testing (without the mapper) indicates the # needs a ~ before it in the pattern.
#TR {^ (*)%s({NW|- |~# })&5({N|-|~#})&5({NE| -| ~#})$~(-------------------------------------------------~)&5({W|-|~#}) ~<-({U|-|~#})-~(M~)-({D|-|~#})-> ({E|-|~#})$%s({SW|- |~# })&5({S|-|~#})&5({SE| -| ~#})} {#VAR exits {%2|%3|%4|%5|%6|%7|%8|%9|%10|%11};#DELITEM exits "-";#DELITEM exits "#";#DELITEM exits "- ";#DELITEM exits "# ";#DELITEM exits " -";#DELITEM exits " #";#TAG name,exit {%1} {%trim(%replace(@exits, "|", " "))}}
I'm not much good with the mapper, and I haven't tested this on it. Hopefully, someone else will speak up if they see an error or have a better idea.
LightBulb
Senior Member |
|
|
|
doomfyre Apprentice
Joined: 03 Jan 2002 Posts: 152 Location: USA
|
Posted: Sun Jan 12, 2003 11:26 pm |
Ok, that works quite well. It's capturing the room name and assigning it to the rooms properly, and the exits are going to the variable just right. One minor curiosity (that i can definitely live with, incidentally) is that it's not showing the 'stubs' for the exits when i move around. Any thoughts why? The only reason it's even remotely an issue is when it comes to door creation. (Doors show up on the compass as # btw)
Again, i'm extremely happy with it the way it is, just wondering if there's something really easy wrong that i missed that's not letting it show the stubs.
*Update*
After messing around in the map options, it will now show the sw s se stubs, but no others. The configuration picks those up too (shows them in red).
I see in the tag line that you're trying to strip out the pipe symbol and replace it with a space, right? It's not doing it. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jan 13, 2003 1:09 am |
As I said, I'm not very knowledgeable with the mapper. At a guess, the mapper Configuration Wizard only recognizes that the last line has exit info, and therefore it only colors the exits on that line. But as long as the exits are being properly detected, I'd ignore that.
Functions don't actually change variables, they just return a modified value. So the #TAG should be seeing @exits with the pipes stripped, but the variable will still have them.
LightBulb
Senior Member
Added 01/12/2003 21:42:27
It shouldn't be necessary, but if you prefer to actually remove the pipes from the variable, use this after the final #DELITEM instead of the existing #TAG command:
#VAR exits {%trim(%replace(@exits, "|", " "))};#TAG name,exit {%1} {@exits} |
|
|
|
Dragnox Newbie
Joined: 10 Jun 2004 Posts: 7
|
Posted: Sat Jun 12, 2004 8:06 am |
Thank you very much.
|
|
|
|
sylvaer Newbie
Joined: 12 Jun 2004 Posts: 1 Location: Australia
|
Posted: Sat Jun 12, 2004 11:27 am |
Dragnox,
I managed to create a config file for the mapper that seems to work about 80% of the time with no other triggers or scripting aside from config settings. It doesn't pick up doors but it is easy enough to put these in manually.
I will get Vassago to put it up soon on the MM website with the map database I am doing for Sepharia (Has all Sepharian towns and wild paths to the towns) in one zone.
Sylv |
|
|
|
Dragnox Newbie
Joined: 10 Jun 2004 Posts: 7
|
Posted: Sat Jun 12, 2004 5:57 pm |
Great. I got those triggers to map it nicely, except it has trouble following in some cases and still places random doors, but those are easy to manage. I'll be looking forward to the config file. :)
|
|
|
|
|
|
|
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
|
|