CharDisplayStatus



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:

  1. 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.

  2. 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:

  1. 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.

  2. 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:

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:

Stoned
Sleeping

Context

Parameters