Ultima VII internal formats – SCHEDULE.DAT

From Ultima Codex
Jump to navigation Jump to search

The Ultima VII schedule file is "STATIC\SCHEDULE.DAT". It contains the different schedules that the non-player characters (NPCs) have in the game.

Header[edit]

Offset Length Description
00H 4 NPC number. 256 in both The Black Gate and Serpent Isle. (Next header item size is affected by this.)
04H NUM*2 Same as the SUM of each NPC's schedule amount. (Because NUM is 256 in Ultima VII, the size is 512 bytes.

Body[edit]

Each schedule is 4 bytes.

0xFF000000 0x00FF0000 0x0000FF00 0x000000FF
Schedule number & Match time X Coordinate in SuperChunk Y Coordinate in SuperChunk Superchunk Number

SuperChunk Data[edit]

SuperChunk Number = (Real-Y / 256) * 12 + (Real-X / 256)

X = (Real-X modulo 256)
Y = (Real-Y modulo 256)

Get them (SuperChunk Number, X, and Y) easily by hex. (See the real X, Y location in cheat mode.)

Schedule Data[edit]

The followings are about Schedule number & Match time byte.

Bit Number 7 6 5 4 3 2 1 0
Schedule Number Match Time
(5 bits) (3 bits)
Match Time[edit]
Match Time
000 = 0AM 100 = 0PM
001 = 3AM 101 = 3PM
010 = 6AM 110 = 6PM
011 = 9AM 111 = 9PM
Schedule Number[edit]
Schedule Number
0 = Combat 8 = Miner 16 = Major Sit 24 = Special
1 = Horizontal Pace 9 = Hound 17 = Graze 25 = Kid Games
2 = Vertical Pace 10 = Stand 18 = Bake 26 = Eat at Inn
3 = Talk 11 = Loiter 19 = Sew 27 = Duel
4 = Dance 12 = Wander 20 = Shy 28 = Preach
5 = Eat 13 = Blacksmith 21 = Lab 29 = Patrol
6 = Farm 14 = Sleep 22 = Thief 30 = Desk Work
7 = Tend Shop 15 = Wait 23 = Waiter 31 = Follow Avatar

The Avatar has no schedule, and each NPC must have at least one schedule. Eight is the max amount for one NPC.

To better understand the above information, run Ultima VII or Serpent Isle in cheat mode and check the NPC schedule.

References[edit]

DongHo, Byun. "Ultima 7 & 7.5 Schedule Structure." 13 July 1996. Web. 14 July 2015. <http://exult.cvs.sourceforge.net/viewvc/exult/exult/docs/schedule.txt?revision=1.1>.