When a character's status is about to be displayed, we call Special Ability scripts named CharDisplayStatus. These scripts can provide text to be printed. There are two circumstances:
During Combat when a combatant is highlighted as the active combatant or the target of some action. Only a 'description' of the status is printed.
In the Character 'View/Display' page. A 'level' and 'description' are printed.
When the scripts are executed, hookParameter[5 ] is set to either “COMBAT” or “DISPLAY” so that the script may provide different status information in the two cases. Scripts should not modify hookParameter[5] because, if there are multiple scripts to be processed, the modified value will be received by subsequent scripts.
There are two places that we search for these scripts:
Each character has a list of active spell effects. This list is built by the engine and contains an entry for each spell cast on the character that has a duration and which has not expired. The default text includes the 'level' of the spell and the name of the spell.
In each Character's (and, in the case of combat, in each combatant's) list of Special Abilities. Only a description can be provided. No 'level' information is printed.
The list of active spell effects is processed first, followed by the Special Abilities attached to the character/combatant. Below is an explanation of how the scripts are processed in each of these two cases.
Active Spell Effects
Each active spell effect is processed as follows:
The Special Abilities attached to the spell are searched for scripts named 'CharDisplayStatus'.
Each script is executed.
For each script that returns a non-empty string, a status line will be printed using hookParameter[6] and hookParameter[7] as the 'level' and 'description' of the status. If both parameters are empty, then no line will be printed.
If no scripts exist, or if all scripts return an empty string, then a status line will be printed using the level and the name of the spell.
Therefore, to suppress the printing completely, a script should return a non-empty string after setting hookParameter[6] and [7] to empty strings.
To print an empty line, a script should return a non-empty string and set hookParameter[7] to a string of one or more blanks.
Character's (and Combatant's) Special Abilities
The Special Abilities are searched for scripts named 'CharDisplayStatus'. Scripts attached to the character are run before scripts attached to the combatant. For each script that returns a non-empty string, a status line is printed using hookParameter[6] as the 'level' and hookParameter[7] as the 'description'. If, for example, there are two such scripts and the first returns “gtfr” with hookParameter[7] = “Stoned” and the second returns “8765.” with hookParameter[7] = “Sleeping, then the following status lines will be displayed:
Character
Combatant (only in the combat case, of course)
Spell (only in the case of Active Spell Effect, of course)
hookParameter[5] equals either “COMBAT” or “DISPLAY”
hookParameter[6] should be set to the 'level' to be displayed. See discussion above.
HookParameter[7] should be set to the 'description' of the status. See discussion above.