Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
gamesover
Novice


Joined: 06 Jun 2007
Posts: 30

PostPosted: 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?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: 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.
Reply with quote
gamesover
Novice


Joined: 06 Jun 2007
Posts: 30

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: 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.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: 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
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Apr 05, 2010 1:11 pm   
 
Ah, sorry.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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