|
gamesover Novice
Joined: 06 Jun 2007 Posts: 30
|
Posted: Sun Apr 04, 2010 1:14 pm
how to capture an entire paragraph as room description? |
I try to draw my mud's map by command #tag.
The following is a typical descrition.
Code: |
RoomName -
This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.This is room descritpion.
Room's exits is east, west, north. |
as you may see, it is very easy to capture Room name and exits. But how to capture such a long room descrption? |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Sun Apr 04, 2010 4:07 pm |
It should automatically grab anything between the roomname and the room exits as the description. If you open up the mapper, and run New Configuration, and go through that. Then after it captures the room data, it highlights what it believes is the room desc/name/exit data. You are then able to change this if it grabs the wrong data.
|
|
|
|
gamesover Novice
Joined: 06 Jun 2007 Posts: 30
|
Posted: Sun Apr 04, 2010 4:41 pm |
yes, you are right. The auto-mapper can capture room descritpion correctly sometimes. But it cannot work correctly sometimes as well.
That's why I want to use trigger to capture a paragraph as room description. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Apr 04, 2010 8:23 pm |
Code: |
#trigger {^(%w) -$} {}
#condition {^([%w%s.])$} {}
#condition {^%sRoom's exits is ([%w%s,]).} {
#tag name %t1
#tag desc %t2
#tag exit %1
}
|
The above trigger matches your example perfectly. As you will no doubt soon find out, it's always best to use actual data for your examples rather than paraphrasing it yourself. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Apr 05, 2010 1:07 am |
Another thing you could check is whether your mud allows you to turn off line-wrapping from the mud. Cmud can handle line-wrapping itself for display, while reading in the entire thing as a single line if the mud sends it that way.
If you make any change like this, or by adding a #tag trigger as Matt suggested, be sure to reconfigure the mapper so that it works on the new arrangement. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Apr 05, 2010 1:53 am |
I accounted for that, Rahab. The line doesn't hardwrap from the game, it's just how the forum wraps it.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Mon Apr 05, 2010 1:11 pm |
Ah, sorry.
|
|
|
|
|
|