8.8. Testing Triggers

You can test your triggers to see how they would react to text coming from the MUD. To do so, select the InputTest Triggers menu item, or press the Test Triggers button from the Trigger section of the World Editor.

You will see a dialog like this:

Figure 8.4. The test triggers window
The test triggers window.

In the first entry box, enter some text to be matched against the triggers that are defined. This line will be matched as if it came from the MUD. Then press the Send button to try the triggers. Matching is done exactly for lines that come from the server: only enabled triggers are tried, rewriter triggers are tried first and change the line, the keep executing flag is verified, and so on.

After pressing Send, the results are shown in the second half of the window. The number of triggers that matched is displayed, and also all the commands that would be processed if that line came from the mud (if any). The line that would be printed to the main window is also displayed. If any gag trigger matched, that box will be empty indicating that no line will be printed. If no gag triggers matched, the line could be different because a rewriter trigger changed it. However, in most cases the line printed will be the same as the line received. Finally, you are told if the line would be written in the log file. If any gag log trigger matched the line, then it would be omitted.

You can try the triggers against other lines, just enter them and press Send. Any changes you make to the triggers are used instantly, just press Send again to try the same line against the new or changed triggers.