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


Joined: 31 Aug 2004
Posts: 5

PostPosted: Sat May 05, 2007 1:18 am   

Automapper & #TAG Problems w/ Armageddon MUD
 
When I try to autoconfigure from default, it picks up the directions but not the name of the room. Any attempt to tag anything just makes the automapper perform worse. I've tried many things, but the below is an example of the trigger I use and the text received from the MUD. After creating the trigger I try reconfiguring and it neither detects the exits nor the room name.

Please someone tell me how to tag or otherwise map something in this format?

Code:

>Hp:100/100 St:97/97 Vt:111/113 Pos:standing Spd:walking unarmed riding: none
look
The Sun King's Sanctuary [NESWUD]
   A polished, white marble floor covers the ground of this expansive
room, gleaming under the light of a large glass chandelier that hangs
overhead.  A semi-circular bar, made of hard-grained wood painted a deep
black, extends from the eastern wall, several high-backed barstools sitting
around it.  The walls of this room are brightly decorated, with several
elaborate paintings placed carefully for unobstructed view, and shelves
holding many exotic potted plants, blooming with bright red and white
flowers.  Two large stained-glass windows, decorated with elaborate sun
symbols, adorn the northwest and southeast corners of the room. 
   Several decoratively carved tables fill this room, while a polished
leather couch nearly ten cords in length sprawls along the northern wall.  A
stately spiral staircase sits in the center of the room, winding upwards
toward the common rooms of the second floor.  The sounds of laughter and
music can be heard from a doorway along the western wall, while the scents
of cooked meat waft in from the east.  A small, straight stairway sits along
the northern wall, ending at a slightly raised loft and a large carven
baobab door sits in the southern wall, leading out onto the North Road
outside. 
The Tuluk bulletin board is here propped up on a stand.
The azure-eyed man is sitting at a highly polished table.
The pearl-haired, azure-eyed man is sitting at a black-painted bar.
The long-haired, middle-aged man stands behind the counter.
The gaunt, black-haired man is here, leaning on the bar.
The tall, well-groomed man sits here on a plush couch.
The short haired, heavy-set man stands here mug in-hand.
The plump, tawny-skinned woman sits on a stool, strumming on her mandolin.

>Hp:100/100 St:97/97 Vt:111/113 Pos:standing Spd:walking unarmed riding: none


#trig {^(*) ~[(%w)*~]$} {#tag name,exit {%1} {%2}}

Note: I use (%w)* because if its a quittable room it will be [NS Quit]
Reply with quote
Warclone
Newbie


Joined: 31 Aug 2004
Posts: 5

PostPosted: Tue May 08, 2007 5:22 pm   
 
Come on I know some of you whiz kids can shed some light on why I'm getting shafted by ZMud.

Only YOU have the power to radically help this man's gaming experience. Fell the power course through your veins, you prodigy, you. Now brandish your might!
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue May 08, 2007 9:42 pm   
 
This was a strange problem. But here you go.
Code:
#TRIGGER {^(*)%s~[(%x){| Quit}~]$} {#tag name %1;#var exits %subchar( %exec( "%rightback( %2, 1);#loop %len( %2)-1 {%rightback( %leftback( %2, %i), 1)}"), "|", ", ");#tag exit @exits}
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue May 08, 2007 11:03 pm   
 
The tag command likes its exits in a comma delimited string.

That being the case it would ignore the string that you sent it. Thus it would sometimes capture the name of the room but not the exits.

The mapper has some native ability to parse a string of exits like the game was sending but it did not know what to do with the extra word.
Quit? "Quit", is not an exit!!! Laughing
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Warclone
Newbie


Joined: 31 Aug 2004
Posts: 5

PostPosted: Wed May 09, 2007 12:31 am   
 
Thanks! This works, and the fact that #tag exits wants a comma dilineated string is what I was missing.

My trigger did compensate for the quit as an exit, however, because I included a * after it captures the first word of the string between the [ ]s.

I.E. [NSEW Quit] triggers on ~[(%w)*~]
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed May 09, 2007 1:19 pm   
 
Well, I know it won't make sense to you, it did not to me at least, but the auto mapper was giving up on the string you had sent it and trying to parse the exits on its own. If quit was not there it would actually get the exits right. If quit was there it messed up.

I had to scratch my head on this one before I figured out what was going on. So I changed the trigger pattern to be more exact. Yes your pattern works it is just slightly less exact than mine. I was hunting for answers and changing things as I went. You got the end result.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
VgWizard14
Beginner


Joined: 30 Nov 2008
Posts: 14

PostPosted: Thu Dec 04, 2008 2:00 pm   
 
Sorry to dig up an old thread, but this helped IMMENSELY. Thank you poster!
Reply with quote
VgWizard14
Beginner


Joined: 30 Nov 2008
Posts: 14

PostPosted: Mon Dec 08, 2008 6:52 am   
 
While it was significantly helpful, it still didn't come through for me. Right now I'm at the point where I just want to play the game, and not spend half of that potential playtime learning a new scripting language.

My code so far:

Code:

#NOMAP {Saving Xagon.}
#NOMAP {Saving at the gate of Tuluk.}
#NOMAP {Sparse sands blow across your path.}
#NOMAP {Stinging sand swirls around you.}
#NOMAP {The area is enveloped in darkness.}
#NOMAP {The area is filled with a yellow light.}
#NOMAP {Your torch flickers weakly, about to go out.}

#TRIGGER {^(*)%s~[(%w)*~]$} {#tag name %1;#var exits %subchar( %exec( "%rightback( %2, 1);#loop %len( %2)-1 {%rightback( %leftback( %2, %i), 1)}"), "|", ", ");#tag exit @exits}

Quote:

The area is filled with a yellow light.
A Warm Crimson Bedchamber [NSEW Quit Save]
A deep, warm crimson has been... (more description)

| 535/535hp 407/500st 302/336 sa standing walking unarmed -->


Removing 'Quit' and 'Exit' we get..
Quote:

The area is filled with a yellow light.
A Warm Crimson Bedchamber [NSEW]
A deep, warm crimson has been... (more description)

| 535/535hp 407/500st 302/336 sa standing walking unarmed -->



Those are the results with that snippet of code. If I understand right, "{^(*)%s~[(%w)*~]$}" is perfect syntax for the exit brackets.

Help?
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Wed Dec 10, 2008 3:51 pm   
 
I haven't tested this but if the above code came so close to working this should do the trick for you.
Code:
#TRIGGER {^(*)%s~[(%x){| Quit| Save}~]$} {#tag name %1;#var exits %subchar( %exec( "%rightback( %2, 1);#loop %len( %2)-1 {%rightback( %leftback( %2, %i), 1)}"), "|", ", ");#tag exit @exits}
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
VgWizard14
Beginner


Joined: 30 Nov 2008
Posts: 14

PostPosted: Sat Dec 13, 2008 1:05 am   
 
Code:
#TRIGGER {^(*)%s~[(%x){| Quit| Save}~]$} {#tag name %1;#var exits %subchar( %exec( "%rightback( %2, 1);#loop %len( %2)-1 {%rightback( %leftback( %2, %i), 1)}"), "|", ", ");#tag exit @exits}


It looks like it'd be correct, but it's not. Works for NESWUD, doesn't for Quit, Save, or Leave (the third possible word.)

Alas, the mystery remains.
Reply with quote
Ghedemonas
Novice


Joined: 15 Aug 2007
Posts: 39

PostPosted: Tue Dec 16, 2008 8:44 pm   
 
The following two alternatives work:

#TR {^&Mapper.Roomname%s~[&%x{Mapper.Roomexits}{| (*)}~]{|%s}$}
OR
#TR {^&Mapper.Roomname%s~[&%x{Mapper.Roomexits}{| Quit| Save| Leave}{| Quit| Save| Leave}{| Quit| Save| Leave}~]{|%s}$}
Reply with quote
VgWizard14
Beginner


Joined: 30 Nov 2008
Posts: 14

PostPosted: Tue Dec 30, 2008 10:12 am   
 
Quote:

The following two alternatives work:

#TR {^&Mapper.Roomname%s~[&%x{Mapper.Roomexits}{| (*)}~]{|%s}$}
OR
#TR {^&Mapper.Roomname%s~[&%x{Mapper.Roomexits}{| Quit| Save| Leave}{| Quit| Save| Leave}{| Quit| Save| Leave}~]{|%s}$}


This seems to work perfectly so far (haven't tested it completely) But one thing still remains.

I'm not sure how to set it from not displaying diagonals, which don't exist in the MUD at all. I'll post if I discover how.
Reply with quote
VgWizard14
Beginner


Joined: 30 Nov 2008
Posts: 14

PostPosted: Tue Dec 30, 2008 10:11 pm   
 
I -think- I've found the end of my problem.

After Zero cups of coffee and staying up way past daybreak, I discovered that it may very well have been a fault on my part. ArmageddonMUD requires liberal use of the tilde (~) key. When I first got zMUD, I turned off in the "Special Characters" area in the Preferences menu. It was a "Set it and forget it" type of deal.

I decided to randomly view those preferences in an attempt to fix the [NWS] showing as Northwest and South, and stumbled upon it. 20 minutes, and an epiphany later, the following code seemed to work:

Code:
#TRIGGER {^(*)%s~[(%x)~]$} {#tag name %1;#var exits %subchar(
%exec( "%rightback( %2, 1);#loop %len( %2)-1 {%rightback( %leftback( %2, %i), 1)}"), "|", ", ");#tag exit @exits}


I only tested it in a couple rooms and in the zMUD tester itself as of yet, but it seems to be working. I have no time to ascertain its perfection, so please (at least for now) treat this thread as unfinished. I should have a response back within 6 hours.
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