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
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Thu Dec 18, 2008 10:28 pm   

#FIND questions
 
I use an Fkey to fire #Find. Frequently I must hit it 2 or 3 times for it to find the room I'm in. As near as I can tell with observation, when #find issues the LOOK command, if the room name is on the same line as the prompt, #find fails, and if the room name is on the next line, #find succeeds. I want it to work every time, the first time. Is there a way to tweak the configuration to eliminate the #find failures? I've only used autoconfigure to configure the mapper. The room name is a specific color. Can #TAG fix this problem?

Can anyone help me fix this, or point me in the right direction to fix the map config, or code a better, more reliable #find?

Here is an example of mud output.

* R HP:Battered SP:Fading MV:Winded > The Caemlyn Road
Grassy fields cover the hills about the road, offering a wide view of
the surrounding lands until the nearby hills obscure the view of the
countyside and the farms which lie scattered along the road. Far off to
the west the hills appear to become more dense, closing in on the road
as it runs toward Caemlyn.
[ obvious exits: N E W ]
A gray palfrey prances skittishly nearby, being ridden by you.
A badger is rummaging about, looking for stuff to eat.

* R HP:Battered SP:Fading MV:Winded > n
The Caemlyn Road
Small hills rise around the road, obscuring view of the surrounding land as
the road meanders through the low valleys on its way towards the capital of
Andor. Deep wagon ruts and packed dirt proclaim the volume of traffic this
highway sees every day. A simple dirt lane leads off to the south.
[ obvious exits: N E S W ]
A gray palfrey prances skittishly nearby, being ridden by you.

* R HP:Battered SP:Fading MV:Winded > e
e
Amongst the Rolling Hills
Lightly covered with sparse grasses, these low hills border and guide the road
to Caemlyn, which lies to the south. The hills extend to the east, beyond which
the walls of Caemlyn stand, and seem to become more dense towards the west.
[ obvious exits: E S W ]
A gray palfrey prances skittishly nearby, being ridden by you.

e
e
* R HP:Battered SP:Fading MV:Winded > On Top of a Hill Overlooking the Caemlyn Road
This grassy hilltop offers a view of the majesty of Caemlyn to the east, in
addition to a clear view of the road to the south. The hills extend to the
east and west, bordering the road, and a large grove of trees blocks any
passage to the north.
[ obvious exits: E S W ]
A gray palfrey prances skittishly nearby, being ridden by you.

Can anyone help me fix this, or help me code a better, more reliable #find?

Thanks
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Mon Jan 05, 2009 9:44 pm   
 
Ok I've been stewing on this one for a while now. It looks to me like I must use #tag, because sometimes the room name is on its own line, and sometimes its on the prompt line.
If I use #TAG, must I use it for everything? Prompt, name, desc, exit?

The prompt always starts with either an * or o, and the room name is always the same color(but that color is also used for other things).

So I'm thinking this covers the prompt I think:
#trigger {^{~* |o }HP:*~>} {#TAG prompt}
But is there a way to add the ansi if its there?? hmm I'm going to play with this with #CW first to see if it works the way that it should-- I'll post findings.
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Mon Jan 05, 2009 10:25 pm   
 
No, you don't have to use tag for everything if you use it for some things. In fact, you (probably) don't have to use it for every instance of the room name, just the ones that aren't matching.

BUT if you're only having problems when moving around, rather than in map mode, you might try just unticking the "room name at beginning of line" box in the mapper preferences.
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Tue Jan 06, 2009 12:48 am   
 
I currently have it configured to look for room name at end of line, which seemed to fit the situation- but I'll uncheck both and see what that does.
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Tue Jan 06, 2009 1:29 am   
 
ok I'm baffled. I've got an ansi trigger on room name.
In the following example the first room name triggers the #echo, the second doesn't.
Here's raw data. Any thoughts?

#trigger {%e[36m(*)%e[0m} {#echo %1}
Along a Stream
A small stream flows quickly down some hills from the east, meandering over

rocks, and whirling into small eddies. It flows onward to the north, where

the hills seem to level out somewhat. To the southeast, the Peaks of Tamika

can be seen, reaching skyward as if to challenge the heavens. Directly

south, in the distance, Seandar is visible.

[ obvious exits: N E S W ]
The waters of a stream chatter as they run over the streambed here.

* HP:Healthy MV:Fresh > Along a Stream
A small stream flows quickly down some hills from the east, meandering over

rocks, and whirling into small eddies. It flows onward to the north, where

the hills seem to level out somewhat. To the southeast, the Peaks of Tamika

can be seen, reaching skyward as if to challenge the heavens. Directly

south, in the distance, Seandar is visible.

[ obvious exits: N E S W ]
The waters of a stream chatter as they run over the streambed here.

* HP:Healthy MV:Fresh >

------------------

out ( 6) 01/05/09 20:04:13:942 : look<CR><LF>
out ( 6) 01/05/09 20:04:13:976 : look<CR><LF>
in ( 487) 01/05/09 20:04:14:247 : <ESC>[36mAlong a Stream<ESC>[0m<CR><LF>
A small stream flows quickly down some hills from the east, meandering over<LF><CR>
rocks, and whirling into small eddies. It flows onward to the north, where<LF><CR>
the hills seem to level out somewhat. To the southeast, the Peaks of Tamika<LF><CR>
can be seen, reaching skyward as if to challenge the heavens. Directly<LF><CR>
south, in the distance, Seandar is visible. <LF><CR>
[ obvious exits: N E S W ]<CR><LF>
<ESC>[32mThe waters of a stream chatter as they run over the streambed here.<CR><LF>
<ESC>[33m<ESC>[0m<CR><LF>
in ( 24) 01/05/09 20:04:14:482 : * HP:Healthy MV:Fresh >
in ( 511) 01/05/09 20:04:14:709 : <ESC>[36mAlong a Stream<ESC>[0m<CR><LF>
A small stream flows quickly down some hills from the east, meandering over<LF><CR>
rocks, and whirling into small eddies. It flows onward to the north, where<LF><CR>
the hills seem to level out somewhat. To the southeast, the Peaks of Tamika<LF><CR>
can be seen, reaching skyward as if to challenge the heavens. Directly<LF><CR>
south, in the distance, Seandar is visible. <LF><CR>
[ obvious exits: N E S W ]<CR><LF>
<ESC>[32mThe waters of a stream chatter as they run over the streambed here.<CR><LF>
<ESC>[33m<ESC>[0m<CR><LF>
* HP:Healthy MV:Fresh >
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Tue Jan 06, 2009 3:49 am   
 
anybody know what else I can look at?
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Tue Jan 06, 2009 5:06 am   
 
Ok *doh*, the trigger for the prompt line has to have the trigger on prompt checkbox. Fixed that mystery- Now maybe after useing #TAG i can solve the #find problem
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Tue Jan 06, 2009 6:04 am   
 
If I use #tag for room name for each of the 2 situations above, and rerun the autoconfigure, #find stops working-- I'll test more.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Tue Jan 06, 2009 10:54 am   
 
Most likely a combination of different manual adjustments will work correctly.
The first being the name tagging trigger. If you have any triggers that do coloring on your mud prompt make sure they are set to a later priority then this trigger.
Code:
#REGEX "NameTag" {^(?:(?:\*|o) HP:\w+ MV:\w+ >)?\033\[36m(.*)$} {$Name=%stripansi(%1);#TAG name $Name} "" {ansi|case}

This trigger does not need to be set for prompt because we only want it to match when the name has been completely received.

Next is remove any other triggers you have and reconfigure. If things work perfectly at that point then you are done.

Assuming things did not work perfectly then we will have to tweak the configuration. The first thing to do here is to adjust the information in the Exits pages. Your Exit detection should have these values: Exitline contains key, checked, Exits after key, checked; Exit key, "[ obvious exits:"; Use single character exits, checked; Exit paragraph, 0; Exit line, 0; all other values should be empty and unchecked.

The configuration may have placed values in the room name and desctription detection that would no longer be valid after those adjustments to the exit detection. This can sometimes be corrected by running the configuration again. I personally find it easier to just set everything. For Description: Desc para, 1; Desc line, 1; Multiline desc, checked. For Name: Name para, 1; Name line, 0; everything else unchecked.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Wed Jan 07, 2009 3:07 am   
 
I implemented as noted, and added an #echo so i could see when the trigger fires. It doesn't fire when expected. So I'm looking at that.
I see {ansi|case} does that mean that the trigger should have the ansi check box checked? because case sensitive is checked, ansi isn't. checked ansi box, trigger still doesn't fire when expected.


Last edited by zannai on Wed Jan 07, 2009 4:48 am; edited 1 time in total
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Wed Jan 07, 2009 4:27 am   
 
I figure if I can consistently trap room name and first line of description, i could use mapquery to do Find on my own. The triggers above gave me room name every time- I'm not sure how to capture the 1st line of description that always follows room name. Within1 line ^*$
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Sat Jan 10, 2009 10:18 pm   UPDATE
 
Ok here's an update.

After more testing, a consistent problem or bug has become more clear. As I mentioned in previous posts, a trigger on room name will not fire on a prompt line. It turns out that its anything appearing after the prompt. A trigger will not fire on it. I've tried about all of the check boxes on a trigger to make it fire and cannot do it.

In the following example I have a trigger set to fire on "You are using:" I spam the equipment command twice. The first one fires, the second doesn't

out ( 4) 01/10/09 16:37:47:763 : eq<CR><LF>
out ( 4) 01/10/09 16:37:48:091 : eq<CR><LF>
in ( 886) 01/10/09 16:37:48:094 : You are using:<CR><LF>
<used as light> a lantern<CR><LF>
<worn on finger> an emerald ring <CR><LF>
<worn on finger> a gold ring delicately carved with ivy <CR><LF>
<worn on head> a camouflaged hood <CR><LF>
<worn around neck> a shimmering pendant of obsidian <CR><LF>
<worn around neck> a shimmering pendant of obsidian <CR><LF>
<worn on body> a bearskin tunic <CR><LF>
<worn about body> a dark, hooded cloak <CR><LF>
<slung on back> a backpack<CR><LF>
<worn on arms> a set of cloth sleeves <CR><LF>
<worn on hands> a pair of dark gloves <CR><LF>
<worn around wrist> an ivy bracelet <CR><LF>
<worn around wrist> a wide leather wristband <CR><LF>
<worn as shield> a silver etched shield <CR><LF>
<wielded> a dagger of green jade <CR><LF>
<worn about waist> a plain brown belt <CR><LF>
<worn on belt> a water skin<CR><LF>
<worn on legs> a pair of earthen colored breeches <CR><LF>
<worn on feet> a black pair of silver-tooled boots <CR><LF><CR><LF>
in ( 26) 01/10/09 16:37:48:132 : * R HP:Healthy MV:Fresh >
in ( 886) 01/10/09 16:37:48:667 : You are using:<CR><LF>

<used as light> a lantern<CR><LF>
<worn on finger> an emerald ring <CR><LF>
<worn on finger> a gold ring delicately carved with ivy <CR><LF>
<worn on head> a camouflaged hood <CR><LF>
<worn around neck> a shimmering pendant of obsidian <CR><LF>
<worn around neck> a shimmering pendant of obsidian <CR><LF>
<worn on body> a bearskin tunic <CR><LF>
<worn about body> a dark, hooded cloak <CR><LF>
<slung on back> a backpack<CR><LF>
<worn on arms> a set of cloth sleeves <CR><LF>
<worn on hands> a pair of dark gloves <CR><LF>
<worn around wrist> an ivy bracelet <CR><LF>
<worn around wrist> a wide leather wristband <CR><LF>
<worn as shield> a silver etched shield <CR><LF>
<wielded> a dagger of green jade <CR><LF>
<worn about waist> a plain brown belt <CR><LF>
<worn on belt> a water skin<CR><LF>
<worn on legs> a pair of earthen colored breeches <CR><LF>
<worn on feet> a black pair of silver-tooled boots <CR><LF><CR><LF>
in ( 26) 01/10/09 16:37:48:891 : * R HP:Healthy MV:Fresh >
in ( 47) 01/10/09 16:38:01:186 : <CR><LF>
A pretty bird has arrived from the south.<CR><LF><CR><LF>
in ( 26) 01/10/09 16:38:01:417 : * R HP:Healthy MV:Fresh >

Here is how it appears on the screen
You are using:
<used as light> a lantern
<worn on finger> an emerald ring
<worn on finger> a gold ring delicately carved with ivy
<worn on head> a camouflaged hood
<worn around neck> a shimmering pendant of obsidian
<worn around neck> a shimmering pendant of obsidian
<worn on body> a bearskin tunic
<worn about body> a dark, hooded cloak
<slung on back> a backpack
<worn on arms> a set of cloth sleeves
<worn on hands> a pair of dark gloves
<worn around wrist> an ivy bracelet
<worn around wrist> a wide leather wristband
<worn as shield> a silver etched shield
<wielded> a dagger of green jade
<worn about waist> a plain brown belt
<worn on belt> a water skin
<worn on legs> a pair of earthen colored breeches
<worn on feet> a black pair of silver-tooled boots


* R HP:Healthy MV:Fresh > You are using: <= This is the one that doesn't fire, even though trigger on prompt is set
<used as light> a lantern
<worn on finger> an emerald ring
<worn on finger> a gold ring delicately carved with ivy
<worn on head> a camouflaged hood
<worn around neck> a shimmering pendant of obsidian
<worn around neck> a shimmering pendant of obsidian
<worn on body> a bearskin tunic
<worn about body> a dark, hooded cloak
<slung on back> a backpack
<worn on arms> a set of cloth sleeves
<worn on hands> a pair of dark gloves
<worn around wrist> an ivy bracelet
<worn around wrist> a wide leather wristband
<worn as shield> a silver etched shield
<wielded> a dagger of green jade
<worn about waist> a plain brown belt
<worn on belt> a water skin
<worn on legs> a pair of earthen colored breeches
<worn on feet> a black pair of silver-tooled boots



I've tried many ways to trigger on the prompt line-- All triggers on the prompt itself work(colors, etc) if the pattern appears after the > in the prompt-- it fails. This one needs a genious. Help!


Last edited by zannai on Sat Jan 10, 2009 10:36 pm; edited 1 time in total
Reply with quote
jackwest
Novice


Joined: 01 Jan 2009
Posts: 35

PostPosted: Sat Jan 10, 2009 10:24 pm   
 
i had a similiar problem, mine being that i had to use newline to prevent trigger abuse, and occasionally the triggering event would occur on the prompt line and so it wouldnt fire... i cheated and built a newline into the end of my prompt.
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Sat Jan 10, 2009 10:39 pm   
 
jackwest wrote:
i had a similiar problem, mine being that i had to use newline to prevent trigger abuse, and occasionally the triggering event would occur on the prompt line and so it wouldnt fire... i cheated and built a newline into the end of my prompt.


Can you explain or give me a code example? Thanks!!
Reply with quote
jackwest
Novice


Joined: 01 Jan 2009
Posts: 35

PostPosted: Sat Jan 10, 2009 11:02 pm   
 
hmm. under the trigger options is the "trigger on newline" option selected?
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Sat Jan 10, 2009 11:24 pm   
 
jackwest wrote:
hmm. under the trigger options is the "trigger on newline" option selected?


yes-- I've tried with trigger on new line, on prompt and variations of both on and or off
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Sat Jan 10, 2009 11:28 pm   
 
I just created a trigger on the prompt, and the command it executes is #show, to force a new line after the prompt. It APPEARS to be working... I'm waiting to see if it is THE fix.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Jan 12, 2009 2:17 pm   
 
Could you post the exact trigger you are using?
Reply with quote
zannai
Novice


Joined: 21 Jul 2008
Posts: 41

PostPosted: Thu Jan 15, 2009 4:25 pm   
 
#trigger {^{~* |~o }*HP:*~>} {#show} Is the trigger I'm using. It has solved the problem.
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