New 'trigger' fixes are worse..

Posted by Shadowfyr on Thu 31 Oct 2002 02:54 AM — 22 posts, 62,199 views.

USA #0
The following are a set of lines from playing and appropriate comments:

-------------------------------------------
You feel older and wiser all of a sudden! <-- should trigger in a plugin, but fails to match.
[Ww-Hb-Mb-Bc-Sp-Sh-Ar-In-Sg-Sl-Pn] <-- Timer generated. The Ww 'should' have been set in the prior trigger, but since it didn't happen...
Your Godshield slowly loses energy and ebbs into non-existence. <-- normal line, no coloring
xxXX Godshield XXxx <-- generated by trigger for previous line.
[Ww-Hb-Mb-Bc-Sp-Sh-Ar-In-Sg-Sl-Pn] <-- Timer again
summon animal <-- command
You begin concentrating. <-- trigger colored.
Thu Oct 31 06:00:46 2002 Ex = 8479814> <-- Normal
[Ww-Hb-Mb-Bc-Sp-Sh-Ar-In-Sg-Sl-Pn] <-- Timer
HP: [1303/1303] CONC: [2552/2581] <-- Hitbar plugin
You have finished concentrating on the skill. <-- This is a color trigger, no match, so it ends up Gray?? (the last trigger used that as last color).
You summon a familiar. <-- Normal
[Ww-Hb-Mb-Bc-Sp-Sh-Ar-In-Sg-Sl-Pn] <-- Timer
godshield <-- command
You place your hand on your chest and start to pray. <-- Normal
Thu Oct 31 06:01:04 2002 Ex = 8479814> <-- Normal
[gossip]: Fyxen nuzzles sparhawk gratefully. <-- Normal
[Ww-Hb-Mb-Bc-Sp-Sh-Ar-In-Sg-Sl-Pn] <-- Timer
Your prayer is answered and you sense Gods hand surround you, creating a <-- Normal
shield against your foe. <-- Normal
xxXX Godshield Up XXxx <-- Generated by trigger from last line.
-------------------------------------------

Later>

-------------------------------------------
You missed Giant. <-- color triggered pinkish red
You missed Giant. <-- color triggered pinkish red
You smash Giant's body with a great blow. <-- color triggered light green
HP: [1303/1303] CONC: [2581/2581] OPPONENT: blood flowing freely <-- generated by plugin
Giant devastated your entire being with the force of the blow. <-- colored gray (no match)
Giant devastated your entire being with the force of the blow. <-- trigger colored orange
Giant devastated your entire being with the force of the blow. <-- trigger colored orange
Giant missed you. <-- trigger colored green
Giant pulverized your body into an unrecognizable mess. <-- trigger colored red
You have finished concentrating on the spell. <-- same as above, but this time colored peach.
You call a lightning to strike Giant. <-- normal line, no trigger
-------------------------------------------

While your fix does correctly help triggers to match that previously failed do to breaks caused by commands, it now fails on others where the line follows any world.send, tell, colourtell, coloursend, etc. This is far worse than the prior situtation imho, since it fails nearly 10 times as often.
Amended on Thu 31 Oct 2002 03:03 AM by Shadowfyr
Australia Forum Administrator #1
I can't reproduce that, so there must be something in your setup that is different from mine.

I am testing using a regular expression trigger to match on a partial line, colouring the matching words to confirm the match.

I have tried sending to myself such a line, directly after a command, timer fire, and world.tell etc. and in each case the trigger fires.

Perhaps email me your world file, tell me which trigger concerns you and what happens immediately before, and I'll try to reproduce it here.
USA #2
It may be tied to plugins. All failures happen immediately following a line generated by my Hitbar plugin. I can't be sure if it is linked indirectly to the other plugin that generates the [Ww-Hb-Mb... line, but the only specific thing I can think of is that it is gray due to the Hitbar line terminating with world.colournote "#C0C0C0","Black"," ". This is to prevent lines like the prompt which don't correctly set the color before display (it assumes I believe that the color has been reset to default by the prior line), show up in the correct color.

So the problem is probably with plugins and would not show up with just normal world file based color triggers. I'll email you a zip of all the relate files I am using.
USA #3
Hmm. I sent you the files.. However on consideration you might over look them, since the email address may be set to 'selliot@redrivernet.com' and The name in the plugins is the japanese form of my screen name 'Kagehi'. lol
Australia Forum Administrator #4
I got them thanks.

What would help would be if you could reproduce it in a small test case.

ie. take an empty world and just add in enough triggers (say, one) to reproduce it. Running traces on large quantities of triggers and plugins can obscure the real problem with a lot of code that isn't making any difference.

Also read my post to Faolong, see if you can find out whether it mis-identifies output lines as note lines or vice-versa.
Amended on Fri 01 Nov 2002 01:11 AM by Nick Gammon
USA #5
Hmm. Doesn't look like the same problem, but it may be related. As for narrowing the triggers..

The problem only happens 'if' a color trigger immediately follows the line generated by the hitbar plugin, so you could simple disable everything except say this one:

<triggers>
<trigger
custom_colour="2"
enabled="y"
match="*You have finished c*"
sequence="25"
>
</trigger>
</triggers>

and the hitbar plugin. Then these lines 'should' cause it:


HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

A quick test using my echo proxy Phantom, only the above trigger and the hitbar plugin does (italics are the 'commands' being sent and echoed back by the proxy as new lines):

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Colored
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Colored
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Colored
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
USA #6
Hmm. Doesn't look like the same problem, but it may be related. With this single trigger:

<triggers>
<trigger
custom_colour="2"
enabled="y"
match="*You have finished c*"
sequence="25"
>
</trigger>
</triggers>

and the hitbar plugin, these lines 'should' cause it:


HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

A quick test using my echo proxy program Phantom and using only the above trigger and the hitbar plugin produces the following (bold lines are the 'commands' being sent and echoed back by the proxy as new lines):

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Colored
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Colored
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Colored
HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell. <-- Fail

NOTE: I am using the hitbar plugin with the 'hitbar:% inc3' command to set the mode. The default mode handles coloring using a less complex method, but seems to produce the same identical results. Also, I have confirmed that it is a match failure. i.e. No coloring, no sub calls, nothing when they fail.
Amended on Fri 01 Nov 2002 01:43 AM by Shadowfyr
Australia Forum Administrator #7
Do the failing lines show as note or output lines if you move the mouse over them with "show line info" enabled?

Also, did version 3.28 work for you, or 3.27?
Australia Forum Administrator #8
It's OK, I reproduced it. I had rather foolishly been sending two linefeeds, the second one reset the problem. Now to investigate.

BTW - it marks the problem line as a note line.
Australia Forum Administrator #9
OK, I've got it. No wonder it was hard to find.

The problem occurs if both lines appear in the same *packet* from the MUD. When I test slowly it isn't there. I have to send both lines together, then the "note" flag from the first line runs onto the second line, and the trigger isn't tested.

I've fixed that.
USA #10
Great! It seemed an odd thing to crop up. lol
Australia Forum Administrator #11
I took out one line which forced every line to be treated as the same type as the *last* character received. This covered up the other problem. However the line I removed was causing a problem, because a line like this:

<blah blah MUD prompt> my_command

... was treated as a command line because the last thing on the line was a command, thus the trigger wouldn't fire on it.

However the check for setting the line type was done on a packet basis, not a newline basis, that is how it slipped through.
USA #12
Yeah.. I can see that. Oops.. I was just saying it seemed a real odd glitch prior to knowing the source of it. ;)
Australia Forum Administrator #13
OK, it is ready to download. Hopefully your problems are solved.
USA #14
Hmm.. Nope.. It is still doing the same thing.... Umm. I got it from the FTP one. I'll try the HTTP site. :p
Amended on Fri 01 Nov 2002 03:29 AM by Shadowfyr
Australia Forum Administrator #15
Don't bother - one is a symbolic link to the other.
USA #16
Ok.. This is sort of a fun bug.. lol

Going to have to log off for the night, but hopefully you can find this thing. ;)
Amended on Fri 01 Nov 2002 03:37 AM by Shadowfyr
Australia Forum Administrator #17
You can test with a feature I put in for myself that I seem to have left activated...

Press Ctrl+Shift+F12

You should see a "debug simulated world input" window.

This lets you feed data into MUSHclient as if it came from the world, a bit like your proxy.

Now with your plugin active, and the extra trigger that picks up "*You have finished c*" active, cut and paste this:

------

HP: [465/465] CONC: [1560/1560]
You have finished concentrating on the spell.

-----

It colours it correctly for me. Previously it didn't.
Amended on Fri 01 Nov 2002 03:41 AM by Nick Gammon
Australia Forum Administrator #18
I am away for the next two days, I thought I had it fixed, but I can't look at it now until Sunday evening. Sorry.

I presume if you try my above test it will work. Your situation must be more complex, see if you can simulate it using the above technique.
Australia Forum Administrator #19
Check you got 3.30 downloaded and installed. Maybe it cached somewhere.
USA #20
Ah.. Right.. The download page was still showing 3.29 when I went to get it. :p

Works great now! :)
Amended on Fri 01 Nov 2002 07:16 PM by Shadowfyr
Australia Forum Administrator #21
Ah,excellent.