Skip to content

Interiors

Carmina16 edited this page Mar 13, 2018 · 8 revisions

Interior locks

The lock level for an interior is defined as follows (X, Y are the coordinates of the door block on the city map corresponding to it.

getIntLockLevel() <-
   offset <- (Y << 8) + (X << 2)
   seed <- offset + (offset << 16)
   srand(seed)
   return random(10) + 1 # 0..9 + 1

Interior variants

For the interiors other than palace, the formula is as follows (see offset definition above): var <- (ror(offset,4) ^ offset) mod 8

For palaces: var <- ((rulerSeed >> 8) & 0xFFFF) mod 3

Clone this wiki locally