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


Joined: 25 May 2011
Posts: 3

PostPosted: Wed May 25, 2011 5:34 pm   

Mapper Help
 
Alright in order to solve some issues I'm having with the mapper and the Forgotten Kingdoms MUD I need to create some #TAG triggers that use the ANSI colors to create the room name and description. The rooms look like this:

Tower March
E-Tower March W-High Road
The street is clean and soldier patrol the streets on a regular
basis keeping it safe for its noble denizens. Lanterns hang
above doorways keeping the street well lit. The houses are large
and grand. Shops are few and far between, as are Taverns.

The sky is rainy and a warm southerly breeze blows.

<100%hp 50m 79%mv>

So I need it to recognize the green text as the room name and the gold text as the room description.

How would I go about doing this? I'm brand new to CMUD so dont hestitate to break it down for me, Thanks.
Reply with quote
Mixsel
Wanderer


Joined: 02 Feb 2003
Posts: 99
Location: Seattle, Wa

PostPosted: Thu May 26, 2011 2:10 am   
 
I'm not positive but if you want to capture the ansi code for the room name, just highlight it then make a new trigger, select ANSI trigger first then paste the line in the pattern field.
That would capture the ansi codes, just delete the actual text part so you just have the green ansi code at the begining.

test it with a #ECHO MATCH or something first and if it works #TAG name

not sure about the Exits, might be able to config the mapper to look in room description.

~<&{hp}~%hp would probably be good enough for #TAG prompt

hopefully someone else has some better skills in the mapper and can answer Cool
_________________
Spin
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4555
Location: Pensacola, FL, USA

PostPosted: Thu May 26, 2011 6:16 am   
 
you might want to give the name a condition to match the exit line....
something like...

Code:
#TR {the ansi pattern from above} {#TAG Name}
#COND {^{n|ne|e|se|s|sw|w|nw|u|d}-%x} {#TAG exit} {within|param=1}
_________________
Discord: Shalimar#3679
Reply with quote
Shipmate
Newbie


Joined: 25 May 2011
Posts: 3

PostPosted: Thu May 26, 2011 6:12 pm   
 
The only problem I'm having is with the room description. CMUD is including things that arnt part of the description (i.e. weather info, objects, guards, other players). All of these objects appear after the weather which is blue. Is there anyway to have CMUD recognize that the blue text and everything after it are not part of the room description? For example:

Ivory Street
N-Ivory Street S-Ivory Street
The road is heavily traversed and the cobblestones are worn smooth.
However for its careworn appearance the road is well maintained.
Many shops line the way with homes above them. The shops sell all
manner of wares, from food to armour. Interspersed between the shops
are the taverns that are so typical of Waterdeep.
The sky is cool sleeting and a cold northern gust blows.
A soldier of the Wyvern Company patrols here.

<100%hp 70m 96%mv>
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4555
Location: Pensacola, FL, USA

PostPosted: Thu May 26, 2011 6:20 pm   
 
#TR {The sky is cool sleeting and a cold northern gust blows.} {#NOMAP}

odds are you will want a pattern that captures more weather types

P.S. dont forget to reconfigure the mapper
_________________
Discord: Shalimar#3679
Reply with quote
Shipmate
Newbie


Joined: 25 May 2011
Posts: 3

PostPosted: Thu May 26, 2011 6:43 pm   
 
I would have to do that for every item, weather condition, and player in the game... Is there anyway to tell the mapper to ignore EVERYTHING below and including the blue line?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4555
Location: Pensacola, FL, USA

PostPosted: Thu May 26, 2011 7:22 pm   
 
from the two messages of weather you have shown...

#TR {The sky is * blows.} {#NOMAP}

Would hit both of them, but i cant be sure all the other messages would.

Something like this for mobs in the room:

#TR {{patrols|stands} here.} {#NOMAP}
_________________
Discord: Shalimar#3679
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Thu May 26, 2011 11:28 pm   
 
Shipmate wrote:
The only problem I'm having is with the room description. CMUD is including things that arnt part of the description (i.e. weather info, objects, guards, other players). All of these objects appear after the weather which is blue. Is there anyway to have CMUD recognize that the blue text and everything after it are not part of the room description? For example:

Ivory Street
N-Ivory Street S-Ivory Street
The road is heavily traversed and the cobblestones are worn smooth.
However for its careworn appearance the road is well maintained.
Many shops line the way with homes above them. The shops sell all
manner of wares, from food to armour. Interspersed between the shops
are the taverns that are so typical of Waterdeep.
The sky is cool sleeting and a cold northern gust blows.
A soldier of the Wyvern Company patrols here.

<100%hp 70m 96%mv>


You have it capture the blue line, and have the trigger turn off immediately upon firing.

Conditionals work here, but I would be tempted to simply have a trigger find out if we're in a room, have that turn on a new trigger. The new trigger checks for ansi blue, captures what you need in the line while turning itself off and turning your room finding trigger back on. Voila.
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri May 27, 2011 1:39 am   
 
Another possibility is to see whether your mud has an option to turn off internal linewraps. If it does, turn it off and see whether the description is all one line. If so, you can tell Cmud that the description will just be one line long.
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