|
ToyMage Apprentice
Joined: 01 Sep 2005 Posts: 120
|
Posted: Fri Dec 16, 2005 9:59 am
COMBINING Triggers? |
Hi
I was thinking of combining all similar triggers, but I'm not sure if it is advicable or will it slow down my P3 computer.
For example
#TR {You are hungry|You are thirsty|The sun sets in the west|...} #NOMAP
There are about 50 triggers together. Should I merge all trigger into one?
Toy |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Fri Dec 16, 2005 2:08 pm |
#VAR nomap {item1|item2|ect}
#TR {{@nomap}} {#NOMAP} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Fri Dec 16, 2005 5:07 pm |
I would just leave them all in a class together, I don't see a real reason for combining them.
|
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Fri Dec 16, 2005 5:49 pm |
shalimar's got the right idea.
tho i have to ask, why would you #nomap being hungry, thirsty or seeing the sun set? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Dec 16, 2005 8:58 pm |
It probably wouldn't hurt to combine a few, but having to expand a trigger 50 times on every single line probably will show a much more noticeable performance hit. As for why you'd #NOMAP them, it'd be for when you are mapping. All of those are game messages that appear at set intervals and it's possible that sometimes they'd coincide with when ZMud is looking for room information.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Fri Dec 16, 2005 9:25 pm |
So is it easier for it to check 50 different triggers the an a single trigger off an array of 50? (numbers subject to change)
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Dec 16, 2005 11:39 pm |
The difference in speed is that all 50 triggers are preregistered and can be eliminated very rapidly. When using a variable list the trigger has to be expanded and registered each time it is checked. List elimination is nearly equal in speed to multiple trigger elimination in most REGEX implementations. So if your are looking for both speed and ease of use I would reccommend a few fixed triggers that group the messages, then dump them in the System|Automapper class so they are only active when you are mapping.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Vitae Enchanter
Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Sat Dec 17, 2005 4:27 pm |
MattLofton wrote: |
As for why you'd #NOMAP them, it'd be for when you are mapping. All of those are game messages that appear at set intervals and it's possible that sometimes they'd coincide with when ZMud is looking for room information. |
Ah, didn't think of it that way. Thanks Matt :) |
|
|
|
|
|