Fixed Encounter Data

Go back to the Action Class index The fixed encounters are held in records which are 0Bh bytes in length. A fixed encounter is triggered by stepping into range of a map square which has a nibble value of 03. NOTE: The fixed encounters are limited to 3 groups of monsters, and each group is limited to 15 monsters each. The limit of 15 is due to the fact that the random encounters use the same code to run them, and the maximum random number of monsters is contained in a single nibble. The structure of a fixed encounter record is as follows:

BYTE 00
This byte is the distance in feet the sprite can be seen on the screen, also the distance that a encounter can be started. If you or the enemy moves beyond this range, the encounter ends.

BYTE 01
This is the maximum distance in feet you can be hit by the monster.

BYTE 02
This is the message that's displayed in the battle screen at the start of the battle. It appears to be a offset in the strings table.

BYTE 03
This is the monster type appearing in this group. Its a offset in the monster names list. If the high bit is set, it picks a random monster between 1 and the value of this byte stripped of its high bit.

BYTE 04
This is the number of monsters appearing in this group. If the high bit is set, it picks a random amount between 1 and the value of this byte stripped of its high bit.

BYTE 05 - 06
Second monster group as above

BYTE 07 - 08
Third monster group as above

BYTE 09
This is a bitmap of flags as follows:


 * Bit 0


 * SET: Use monster proper name in battle, i.e. Brat, Bobby.
 * CLEAR: Use general description of monster in battle, i.e. Animal, Humanoid (this is contained in byte 6 of the monster record)
 * Bit 1


 * SET: Not hostile unless attacked first
 * CLEAR: Hostile, attack party on sight
 * Bit 2


 * SET: Monster will not move during combat
 * CLEAR: Monster will move if needed during combat
 * Bit 3


 * Appears to be unused


 * Bit 4 - 7


 * SET: This monster is a hireable NPC, this is the offset (times 2) in the npc pointer table, making a possible 15 npc's per map!
 * CLEAR: Not a NPC

BYTE 0A
This is the nibble data that the map square will be replaced with after the encounter has been won by the party.

BYTE 0B
This is the byte data that the map square will be replaced with after the encounter has been won by the party.

Graphical representation of data


This is an example of a fixed encounter record. Its the famous Red Ryder encounter in Highpool:

46 1E 1F 03 01 00 00 00 00 05 05 07
46h - Red starts off at 70' away, and the encounter starts when he comes within 70'

1Eh - Red can hit you from 30' away

1Fh - String at offset 1F is printed at the start of the encounter

03h - Monster type '3' from the map's monster table, which is Red Ryder

01h - How many Reds appear. 1 in this case

00h - Nobody else appears in this encounter, so second monster class = 0

00h - Since there's nobody in this class, number = 0

00h - Nobody else appears in this encounter, so third monster class = 0

00h - Since there's nobody in this class, number = 0

05h - Bits 0 and 2 are set (1+4 in binary math) -> Use Red's proper name, and will move if needed

05h - The tile that Red is standing on gets changed for Action class 5, which is a loot bag action

07h - Within Action class 5, there are a number of separate actions, which correspond to different loot bags. In this case, loot bag 7 is Red's loot bag