Wiki

Clone wiki

ultima-exodus / U3_Maps_File_Format

There are thirteen files that are used to construct maps in the game:

  • SOSARIA.ULT - Overworld of Sosaria
  • BRITISH.ULT - Castle of Lord British
  • EXODUS.ULT - Castle of Death
  • LCB.ULT - Britain
  • YEW.ULT - Yew
  • MOON.ULT - Moon
  • GREY.ULT - Grey
  • DEVIL.ULT - Devil Guard
  • MONTOR_E.ULT - Montor East
  • MONTOR_W.ULT - Montor West
  • DEATH.ULT - Death Gulch
  • DAWN.ULT - Dawn
  • AMBROSIA.ULT - Ambrosia

Which are composed of the following sections:

0x0000-0x0FFF - map data
0x1000-0x100F - talk index table
0x1010-0x110D - talk data
0x110E-0x117F - ????
0x1180-0x11DF - NPC data
0x11E0-0x121F - ????
0x1220-0x1223 - whirlpool coordinates (sosaria.ult only)
0x1224-0x1227 - moon state (sosaria.ult only)

Map Data

A map consists of a 64x64 array of tiles. Each byte in the map data is a multiple of 4 and represents a tile in a SHAPES file. In order to determine the tile it references, it must be divided by 4 (or bit shifted twice to the right). The resulting value is the tile index.

For example, a byte in the file with value 08 is divided by 4 to equal 02 and thus references the "brush" tile.

Data is organized by row, which each successive row following the previous. With each byte indexed sequentially, the mapping would look as follows:

row 0 - 00 01 02 03 04 ... 3D 3E 3F
row 1 - 40 41 42 43 44 ... 7D 7E 7F
...

Talk Index Table

This is 16 byte section that contains a series of 8 16-bit offsets to message strings (talk data) used on the map. The offsets are relative to the start of the talk index table.

Note that in SOSARIA.ULT this section is empty (all zeroes).

Talk Data

This is a 253 byte section that contains all the message strings (talk data) used on the map.

Note that in SOSARIA.ULT this section is empty (all zeroes).

NPC Data

This is a 96 byte section that describes the type of location of each NPC on the map. There can be a maximum of 32 NPCs on each map. The section is broken down into 3 sub-sections of 32 bytes in length:

  • 0x1180 = 32 entries with the tile index "under" the NPC
  • 0x11A0 = 32 entries for x coordinates
  • 0x11C0 = 32 entries for y coordinates

Whirlpool Location

Only applies to SOSARIA.ULT. Not used in other map files.

  • 0x1220 = x coordinate
  • 0x1221 = y coordinate
  • 0x1222 = 0x0c (?)
  • 0x1223 = 0x04 (?)

Moon State

Only applies to SOSARIA.ULT. Not used in other map files.

  • 0x1224 = trammel state (00-07)
  • 0x1225 = felucca state (00-07)
  • 0x1226 = trammel next phase counter (00-0c)
  • 0x1227 = felucca next phase counter (00-04)

Updated