Map
The world base level terrain is stored inside of map.mul.
Base level is the ground, mountains, streets and the ocean.
All other things like houses, bridges, etc. are static data.
This is in example the center of britain with map data only:
One basic principle of UO almost everybody has quite certainly already noticed even during
normal gameplay, is the cell division of the world. The whole world is constructed out of cells.
(The are almost easiest to see on stone pavor, where each stone is a cell). If a creatures does a
single step, it walks one cell.
The whole UO-world is 6144 cells width and has an height of 4096 cells.
(To note, this quite huge! .. it are 25.165.824 cells in sum)
(and it's now even likely to grow more (UO:3D))
The world data is grouped in blocks by 8x8.
I know the format seems rather curious at first sight, and in many felt pestered it, since
getting the correct position of a certain cell is rather complicated.
However if you know how, you can use this blocking to your advantage. Arachnide in example now caches
data also it's in 8x8 blocks in memory, and thus today I even find the mul files very convinient in the way
they are.
Blocks are loaded top-to-bottom then left-to-right. Cells are loaded from blocks left-to-right then top-to-bottom.
However as usual a small picture says more than pages of text:
The small red letters are the position-ids in map.mul you have to search to find the cell.
Multiply the cell offset (red letters) by 3 to find it's position in the file.
As twisted the offsets are to get as simply the cell entries are:
UNSIGNED INT16 | tile ID |
SIGNED BYTE | height |
The tile ID matches to the ones from art, tiledata, radarcolor etc.
- finished