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


Joined: 12 Sep 2007
Posts: 3

PostPosted: Wed Sep 12, 2007 4:58 pm   

How can i configure my automapper (in zmud 7.21)?
 
It has puzzled me for several days to configure automapper in zmud 7.21. I have just found a way to parse correct room names and exits with the command TAG. But I can't parse the multiline description with TAG. I also know that TAG has a parameter: descpara, but I can not find any document about usage of the parameter. Who can help me?

That's a sample of room in the mud (The language of the mud is Chinese, So it is just a sample).


String_of_Room_Name -
   This is a room. This is a room. This is a room. This is a room. This is a room.
This line is also description of the room. This line is also description of the room.
Still description ... ...
   Today is a clear day.
   Obviously exits: east, south and west. //In fact, there is no space between east and south in the real mud (language is Chinese), so I use "exits:\s(\S+)" in my trigger.
   NPC's Name (NPC's ID)
   Object's Name (Object's ID)
>


My trigger is: (The description length is from one to ten lines.)

#REGEX {^(\S+)\s-} {roomname=%1} "mymap"
#COND {^\s+(\S+)$} {roomdesc=%1} {regex}
#COND {exits:\s(\S+)\sand\s(\w+)|exit is\s(\w+)。} {#if (%len( %3)) {roomexit=%3} {roomexit=%concat( %replace( %1, "、", "|"), "|", %2)};#tag name,desc,exit {@roomname} {@roomdesc} {@roomexit}} {within|param=10|regex}



Now, I can only get room name, room exits and the first line of room description. But I want to get the full description (the full paragraph). How can I reach the aim? And how can I put the information of NPC and objects in the room into this room's database? Thanks.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Wed Sep 12, 2007 10:30 pm   
 
Have you tried reconfiguring the mapper now that you are tagging the name and exits (leave out the description if that is not being tagged properly)? It may just work... Otherwise try tweaking the map config manually via the GUI?
Reply with quote
aluminum_zmud
Newbie


Joined: 12 Sep 2007
Posts: 3

PostPosted: Fri Sep 14, 2007 1:47 pm   
 
The automapper works if I use #tag. What puzzles me is how to get room description which has multilines. Can anyone help me? Thanks.
Reply with quote
Tech
GURU


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

PostPosted: Fri Sep 14, 2007 5:12 pm   
 
Try this:

Code:

#REGEX {^(\S+)\s-} {roomname=%1;#T+ RoomDesc} "mymap"
#COND {exits:\s(\S+)\sand\s(\w+)|exit is\s(\w+)。} {#T- RoomDesc;#if (%len( %3)) {roomexit=%3} {roomexit=%concat( %replace( %1, "、", "|"), "|", %2)};#tag name,desc,exit {@roomname} {@roomdesc} {@roomexit}} {within|param=10|regex}

#REGEX "RoomDesc" {^\s+(\S+)$} {roomDesc=%concat(@roomDesc,%crlf,%1)}


Basically what I've done is call out the room description to a separate trigger that is enabled on the name and disabled on the exit. The RoomDesc trigger will keep concatenating the description line to the variable.

Alternatively you could have done
Code:
#REGEX {^(\S+)\s-} {roomname=%1} "mymap"
#COND {^\s+(\S+)$} {roomDesc=%concat(@roomDesc,%crlf,%1)} {looppat|param=5}{regex}
#COND {exits:\s(\S+)\sand\s(\w+)|exit is\s(\w+)。} {#if (%len( %3)) {roomexit=%3} {roomexit=%concat( %replace( %1, "、", "|"), "|", %2)};#tag name,desc,exit {@roomname} {@roomdesc} {@roomexit}} {within|param=10|regex}


This specifies that you loop through the second condition's pattern 5 times before going to the third condition.

The code's untested, but it should be close enough to give an idea of what I mean.
_________________
Asati di tempari!
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Fri Sep 14, 2007 11:06 pm   
 
Yes, yes, but have you reconfigured the mapper since using #TAG? Just because it 'works', doesn't mean it really works. Or you would be getting the room descriptions...
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