You can provide up to three different 'Graphic Sets' for each of the 27
different types of monsters in the game. Changing the graphics
for a monster does not change its behaviour in any way; it only changes
the graphics. Each such set of graphics is described in a section
of the CSBgraphics.dat file. The CSBgraphics.dat 'ID' is equal to
the numeric Monster Type
multiplied by three plus the 'Alternate Graphic Number' minus 1.
For example, Alternate Graphics 1, 2, and 3 for a Screamer will be
contained in CSBgraphics.dat ID numbers 18, 19, and 20. Each such
graphic ID contains several structures which are patterned after the
runtime internal structures (in order to lessen the confusion
somewhat). Many of the fields in these structures are not needed
by the Alternate Graphics capability but should be set to zero to allow
for possible future enhancements. Each ID has this structure:
// relative to graphic
The member 'graphic' is actually all of the required graphics for
the creature and will, of course, be much greater than four bytes in
length. You cannot display even a single pixel with only four
The member 'graphicOffsets' contains the byte offsets of the
required graphics for the creature such as Front View, Side View,
etc. Not all the graphics need to be present. Only the
Front view is necessary. The flags in MONSTERDESC (see below)
tell which graphics are actually present. If a view is missing
the Front view is used.
The graphics offsets are specified in the order:
- Front (non-attacking)
If a view is missing then the associated offset is omitted. If,
for example, a monster has no 'Back Graphic' then the offsets would be:
- -1 (or anything---it is ignored)
Why is there provision for ten graphics rather than four? I don't
know. It appears that there might be a way to allow for mirror
images. Perhaps for non-symmetrical monsters. If such
a thing is needed, we will look into it.
uByte0; //Not Used. Must be zero.
//Not Used. Must be zero.
word2; //flags describing the
monster. Not Used. Must be zero.
//Flags describing monster and graphics
uByte6; // Not used. Must be zero.
- Flag 0x0008 = Side View
- Flag 0x0010 = Back View
- Flag 0x0020 = Attack View
- All other bits should be set to zero.
- This information is redundant. The 'graphicOffsets' provide
the same information. They should agree.
uByte7; // Not used. Must be zero.
ui8 uByte8; //
Not used. Must be zero.
word14; // Not used. Must be zero
word16; // Not Used. Must be zero.
word18; // Not used. Must be zero.
word20; // Not used. Must be zero.
ui8 uByte22; // Not
Used. Must be zero.
You can see that very little of this structure is used. Only the
flags saying which graphics exist.
i16 ITEM12_word0; // The
base graphic number. Not used. Must be zero.
i16 ITEM12_word2; // The
first derived graphic. Not used. Must be zero.
ui8 frontRearByteWidth; //
Width in bytes of the front and rear graphics.
frontRearHeight; // Height of the front and rear
sideByteWidth; // Width in bytes of the
sideHeight; // Height
of the Side graphic
attackByteWidth; // Width in bytes of the Attack
attackHeight; // Height of the
// bits 0-3 = transparent color
// Other bits not used and must be zero.
// Not used. Must be zero.
//Pairs of bytes...for each position in cell
by relative cell number 0-10
The ITEM110 structure tells the x- and y-offsets within the
viewport where the monster's graphic should be drawn for each of the 10 possible relative
cell numbers (relative to the party) and for each of the five possible
positions within each of these cells .
And that is all you ned to know except how to draw a
graphic. And I don't know that either.