Skip to content

Dungeon Generation

Carmina16 edited this page Feb 18, 2018 · 4 revisions

Named dungeon seed

Each main quest dungeon and 14 province dungeons in each province have their seed:

getLocSeed(province, dunId) <-
   X, Y <- getDungeonXY(province, dunId) # 16 last entries in CITYDATA.0x
   seed <- (Y << 16) + X + province
   return (~rol32(seed, 5)) & 0xFFFFFFFF

Main quest dungeons

Main quest dungeons have unique MIF files. Their names are generated as follows:

s <- String(seed)
mif <- s[:8] + ".MIF"

Other dungeons

(to do)

Named dungeons

The 14 named dungeons in each province have the width of 2 blocks and height of 1.

Wilderness dungeons

Wilderness dungeons use the following seed and have the width and height of 2 blocks.

getWildernessSeed(cityId, wildBlockX, wildBlockY) <-
   (to do)
Clone this wiki locally