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
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Mon Oct 10, 2005 11:23 pm   

Nonstandard Room Exit Types not working with Mapper
 
I can't seem to get these Exits to be recognized properly with the automapper. Manually linking a mud of 10,000+ rooms is just not going to happen. Can anyone give me a starting point for where to configure this type of problem?



My mud's exit lines look like this:

[Exits: north east south west]

Doors:

[Exits: north [east] south west]

"Flying" required exits:

[Exits: north east south west <up> <down>]

And the one that's giving me the most headaches, water:

[Exits: /north\ east /south\ west]
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Oct 11, 2005 5:34 pm   
 
Sounds like you'll need to do a custom trigger. Here's something that should help you get started. I'm assuming other then being indicators that '/', '\', '<', '>' aren't required for mapping.

Code:
#TR {"Exits" ^~[Exits: (*)~]} {#VAR Exits %replace( %trim("%1"), " ", "|");  #FORALL @Exits  {#NOOP %match("%i","*(%w)*",CurExit);#TAG exit @CurExit}}


This is rough swag off the top of my head, but it should be enough to get you started. Note that in the FORALL statement you can do additional checks and logic with '/', '\', '<', '>' if you want or need to.
_________________
Asati di tempari!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Oct 11, 2005 8:59 pm   
 
Triggers should not really be required to recognize the presense of those exits for the mapper. I would suggest turnging off "Allow [] for evaluation" and "Allow <> for expansion" in the Preferences|Script Parser section to start. Next you want to use triggers to detect the exits types and automatically insert the proper word (swim) or series of commands, like making sure you are flying, before allowing the exit to be traversed. This can become rather complicated, so be prepared to spend a large amount of time just testing.

It is also strongly reccommended that you help the mapper by making sure the configuration has the "Exitline contains key" checked and the "Keyword" field is filled in with, in this case, "Exits:"
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Wed Oct 12, 2005 10:38 pm   
 
Tech wrote:
Sounds like you'll need to do a custom trigger. Here's something that should help you get started. I'm assuming other then being indicators that '/', '\', '<', '>' aren't required for mapping.

Code:
#TR {"Exits" ^~[Exits: (*)~]} {#VAR Exits %replace( %trim("%1"), " ", "|");  #FORALL @Exits  {#NOOP %match("%i","*(%w)*",CurExit);#TAG exit @CurExit}}


This is rough swag off the top of my head, but it should be enough to get you started. Note that in the FORALL statement you can do additional checks and logic with '/', '\', '<', '>' if you want or need to.



This appears to be what I'm looking to do - I don't mind the doors or special directions (I can enter those by hand), I'm just looking to get zMUD to recognize the map while I walk around.

I tried your script however, and ran into a few problems. Here's some sample output of the following code while I tested:

Code:

For the trigger:

^ ~[Exits: (*)~]

Execute this code:

#VAR myExits %replace( %trim( "%1"), " ", " | ")
#FORALL @myExits {
  #NOOP %match( "%i", "*(%w)*", CurExit)
  #TAG exit @CurExit
  }


Here's the output when I look around in a room:

You walk east.
North Vlamirnov Street [Overcast]
You are walking on the northern road of Vlamirnov. This road is well paved
and it seems to be made for easy travelling. This road leads to the north
gate of Vlamirnov. To the east and west lie the recovery rooms of Vlamirnov.
[Exits: north east south west]
exit h
exit t
You begin to track...

(1382/1382)H (234/234[AW])M (/) (362/363)V (70:8278496) >exit h
exit t

It looks like your %match function is getting only the last character of each item in the list.. Furthermore, it appears that the #FORALL isn't executing all at once, rather, it does another item per line received from the mud.. which I couldn't find any documentation explaining.

Lastly, I tried just playing with the #TAG command, and I couldn't get it to "do" anything when I manually entered something in. I tried creating a new room, setting my position to that room, then typing:

Code:

#TAG exit north
#TAG exit "north east south west"


Neither of which did anything.

Help?
Reply with quote
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Thu Oct 13, 2005 1:16 am   
 
Hm... I played around a bit and came up with the following:

Code:

#VAR myExits %replace( %trim( "%1"), " ", "|")
#FORALL @myExits {
  #IF (%match( %i, "*north*")=1) {#TAG exit north}
  #IF (%match( %i, "*south*")=1) {#TAG exit south}
  #IF (%match( %i, "*east*")=1) {#TAG exit east}
  #IF (%match( %i, "*west*")=1) {#TAG exit west}
  #IF (%match( %i, "*up*")=1) {#TAG exit up}
  #IF (%match( %i, "*down*")=1) {#TAG exit down}
  }


Which generally seems to do what I want.. Problem is if something happens to trigger something near/around the place the exits appear, zMUD locks up on me. Any ideas?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Oct 13, 2005 2:39 am   
 
When using #TAG triggers, you have to run the reconfiguration wizard after creating or modifying the #TAG triggers so that ZMud can start using them. That's why you couldn't get #TAG to do anything.
_________________
EDIT: I didn't like my old signature
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Oct 13, 2005 3:43 am   
 
Hi ChrisD, sorry about the initial errors with the code but I'm glad you get something going. It was done off the top of my head and there was a serious flaw in the match. * can match mutliple characters so instead of match the sympbols like '\' or '<' it could possibly match 'nor' 't' 'h'. A better match pattern would have been somthing like
Code:
#NOOP %match("%i","[~<~/](%w)[~>~\]",CurExit)


But either way you've got it working so continued luck.
_________________
Asati di tempari!
Reply with quote
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Fri Oct 14, 2005 8:46 pm   
 
Any hints on why zMUD might be locking up if there's any text around the "Exits" line? Also, if I move twice before letting the room text come in (or if the server lags any), zMUD locks up.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Oct 15, 2005 3:41 am   
 
I suspect it's because your trigger is specified to match [Exits] at the beginning fo the line.
_________________
Asati di tempari!
Reply with quote
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Mon Oct 17, 2005 10:49 pm   
 
It is..... but why would that cause zmud to hang?
Reply with quote
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Fri Dec 02, 2005 1:02 pm   
 
I still haven't figured this one out. Any clues or ideas?
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: Fri Dec 02, 2005 4:09 pm   
 
What mud is this?
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
ChrisD
Beginner


Joined: 18 Oct 2000
Posts: 18

PostPosted: Fri Dec 02, 2005 5:53 pm   
 
Slaem wrote:
What mud is this?


Rage of Vengeance - vengeance.its-s.tudelft.nl 5000
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