-
Notifications
You must be signed in to change notification settings - Fork 68
Dungeon Generation
Carmina16 edited this page Feb 18, 2018
·
4 revisions
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 have unique MIF files. Their names are generated as follows:
s <- String(seed)
mif <- s[:8] + ".MIF"
(to do)
The 14 named dungeons in each province have the width of 2 blocks and height of 1.
Wilderness dungeons use the following seed and have the width and height of 2 blocks.
getWildernessSeed(cityId, wildBlockX, wildBlockY) <-
(to do)