Mudlet package: CONFIG AFFMESSAGES ON lines

by Unknown

Back to Project L.

Unknown2010-03-16 02:21:01
I'm feeling charitable and have decided to try and compile a mudlet package that includes nothing but alphabetized folders containing all of the relevant affliction, diag and cure messages for afflictions. Note that this profile contains no scripts! It simply has the messages.

Or it will, as it progresses... it's a work on progress and will be updated as I work on it content.gif If anyone feels like helping out with it let me know so that we don't end up both doing the same thing.

Also, depending on how you want to build your system, you might not need all of these messages, as you could just do "You are afflicted with (\\w+)." --> "affadd(matches)". If you decide to take this approach then you should still be able to do this, since these are blank triggers which do not do anything, and you should be able to just delete the messages that you don't want. Personally, I am a mediocre programmer (and not the only one!) and I would like having it split up, so my goal is to provide them all.

30 Affliction folders with the aff messages put in so far smile.gif

"Save as" on this link to get the .xml file, otherwise it won't work
Vadi2010-03-20 19:38:53
Great start, definitely should help people. A small note though - I'd use 'exact match' instead of 'begin of line' where you need an exact match. I tend to play it safe, so that'd be my recommendation.

If you'll be changing them, do it in bulk by running search&replace on the xml file.
Unknown2010-03-20 21:57:46
You honor me with your post, great Vadi.

I chose begin of line though because mudlet said it was fastest... while it's true someone could illusion "You are afflicted with pain. LOL NEWB" it's kind of like, they could just illusion the normal version too if they know your system that well, or just illusion the normal version anyway. Would it really provide any security then to do exact match?

While I'm sure the speed difference is de minimis (I see what I did there), I like to go for max speed on principle biggrin.gif
Vadi2010-03-20 22:33:54
I think we should make a graph of these, but the diff between begin and exact is very small compared to regex and others.

It's not so much illusions (which could be embarrassing) as the lines appearing elsewhere in the text... of course the chance is much small than if you used 'substring', but can still happen.
Unknown2010-04-09 16:42:58
To chime in on this, I don't think a begin of line substring which contains the entire line you're trying to match is measurably faster than an exact match for the same line. What makes begin of line substring fastest is:

a: it only has to search from the beginning of the line. if it doesn't match the first letter, it stops checking all of those.
b: if you don't put the whole line in, it doesn't have to check as many characters as an exact match


So exact match and begin of line substring for an entire line are going to be about the same speed, but the exact match is going to be a bit safer to use.

Also, as Vadi said, the actual big jump is between the substring type triggers and the other types (though I believe the line spacer and color match triggers are pretty quick)
Vesar2010-05-26 12:20:37
As I note, I put in the FirstAid affliction messages to supplement my normal affliction triggers. This way, if my normal triggers don't catch the affliction, the FirstAid trigger (you are afflicted with (w\\+).$) catches it. The only thing is is that your system must use the official lusternia names of afflictions.

Luckily, these are easily found in the FirstAid curing database, so I had to go back through and replace certain affliction names. But overall, it works pretty well.