The Viewing Filter is called when the player places an object over the
Characters's 'Eye' to see how much it weighs, etc.
There are only three paramters. They can be fetched with the
- parameter 0 - A mask of the words (or phrases) to be
Referred to as the 'PhraseMask' later in in this note.
- parameter 1 - The objectID of the object being examined. If
this parameter is a negative 1 (0xffffffff) then no object is being
viewed. Instead, the character's current stats are about to be
displayed. In this case, parameter 0 (the Phrase Mask') is set to
zero and the filter is only being notified of the event. It can
do nothing to modify what is displayed. If this Object is a
scroll then the Phrase Mask is set to zero and the Filter can change
the objectID to be a different Scroll, so that perhaps different
memebers of the party see different words on the scroll.
- parameter 2 - The index of the character viewing the object
There are a total of eight phrases that can be printed:
Each of the eight phrases is printed only if the 'PhraseMask' has the
corresponding bit set. Bit zero for the first phrase, etc.
This mask can be manipulated with the &DESCRIBE operation.
The PhraseMask is initialized to print those phrases that apply to the
object. For example, an Apple is 'CONSUMABLE' so bit zero would
- The first six are placed in parentheses and are initially set to
"CONSUMABLE", "POISONED", "BROKEN", "CURSED", "", and "". Any of
the six can be replaced using the &DESCRIBE operation.
- The last two are placed on separate lines following the
parenthesised list. The first of these two is generally
initialized to the "WEIGHT x.x KG", and the second of these two is
initialized to the empty string. These may also be replaced with
the &DESCRIBE operation.
- index 0 - in parentheses - default = "CONSUMABLE"
- index 1 - in parentheses - default = "POINSONED"
- index 2 - in parentheses - default = "BROKEN"
- index 3 - in parentheses - default = "CURSED"
- index 4 - in parentheses - default = ""
- index 5 - in parentheses - default = ""
- index 6 - On separate line - default = ""
- index 7 - On separate line - default = ""
This DSA operation is used to manipulate the 'PhraseMask' and the text
associated with any of the eight phrases that can be printed when an
object is 'viewed'. The syntax is:
&DESCRIBE ( location index color. .
'index' is zero through seven.....which of the eight pharases is being
'location' can be one of three things:
'color' is the color that the text will appear. The parenthesized
list of phrases all will appear in the same color. There are six
possible phrases that can be printed within the paretheses. The
last of these that is actually printed will determine the color of the
entire list. The last two of the eight phrases ( Index 6 and
index 7 ) can each be set to its own individual color. So,
altogether, only three colors can appear at one time.
- minus 1 - This means that the pharase should be printed using the
current text. The appropriate bit in the PhraseMask will be set.
- minus 2 - This means that the phrase should be disabled.
appropriate bit in the PhraseMask will be cleared.
- a dungeon location (including the position within the
cell). This means that the text at that location and position in
the dungeon will be displayed. The approprieate bit in the
PhraseMask will be set.