|
aluminum_zmud Newbie
Joined: 12 Sep 2007 Posts: 3
|
Posted: 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. |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: 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?
|
|
|
|
aluminum_zmud Newbie
Joined: 12 Sep 2007 Posts: 3
|
Posted: 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.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
|
Seb Wizard
Joined: 14 Aug 2004 Posts: 1269
|
Posted: 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...
|
|
|
|
|
|
|
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
|
|