Ultima Stones | Ultima IV Home | Development | File Details
CGA | CON | DNG | EGA | MAP | SAV | TLK | ULT


*.ULT File Specification

    This type defines both floors of Castle Britannia, the three keeps, the eight towns and the four villages. The file has a size 1280 (0x500) bytes. Table 1 is a schematic of the data layout.

00

01

02

03

04

05

06

07

08

09

0A

0B

0C

0D

0E

0F

10

11

12

13

14

15

16

17

18

19

1A

1B

1C

1D

1E

1F

000

020

040

060

080

0A0

0C0

0E0

100

120

140

160

180

1A0

1C0

1E0

A

200

220

240

260

280

2A0

2C0

2E0

300

320

340

360

380

3A0

3C0

3E0

400

B

420

C

440

D

460

E

480

F

4A0

G

4C0

H

4E0

I

Table 1: Schematic of an ULT File

    The 32 X 32 (1024) byte block at the beginning, denoted "A", is a left-to-right, top-to-bottom map block. The WORLD.MAP file is made up of an eight-by-eight pattern of similarly formatted blocks.

    The last eight regions are 32 item byte arrays with the following information:

  1. Tile display code one, index into the tile list for main display image, has a value of 0x00 if this entry is empty.
  2. Local X-coordinate one, the primary location X value (longitude) where this NPC is on the map, has a value of 0x00 if this entry is empty.
  3. Local Y-coordinate one, the primary location Y value (latitude) where this NPC is on the map, has a value of 0x00 if this entry is empty.
  4. Tile display code two, index into the tile list for flip display image (for the NPC animation), has a value of 0x00 if this entry is empty.
  5. Local X-coordinate two, the secondary X value, this value is always the same as the primary X, has a value of 0x00 if this entry is empty.
  6. Local Y-coordinate two, the secondary Y value, this value is always the same as the primary Y, has a value of 0x00 if this entry is empty.
  7. Motion flags: 0x00 indicates a stationary NPC. 0x01 are for those that move about the map randomly. 0x80 is a chase NPC, generally shopkeepers, they attempt to get as close to the player as possible. 0xFF is for a hostile character, will chase and attack the party as those outide the buildings.
  8. Talk file index, the value is a one-based index into the talk file list (*.TLK). A value of 0x00 indicates that the engine will supply conversation information, as in the case of Lord British, Hawkwind and merchants.

    This arrangement allows for 32 NPC’s on each map. The data for a character is aligned by index across each of the arrays. Note that the talk files only contain 16 conversations so even with a full compliment of characters in the place you will only ever hear 16 distinct conversations not including the merchants and others supplied by the game engine.

    Of a special note, the character that joins the player is the 32nd entry in the list for each town.