Skip to content

Interiors

Allofich edited this page May 1, 2020 · 8 revisions

Block menu indices

In cities

0  store
1  tavern
2  mages' guild
3  temple
4  house
5  house
6  house
7  wilderness
8  wilderness
9  noble house
10 (no action)
11 palace
12 palace
13 palace

In wilderness

0  no action
1  crypt
2  house
3  tavern
4  temple
5  tower
6  city
7  city
8  dungeon
9  dungeon

In dungeons, all menus are a way outside.

  • To activate a menu block, the player should be no further than 220 units from its top right corner (i.e. origin).

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 << 1)
   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

Interior type

The original game tracks the current interior type, which is used for various things including checking holiday effects.
Palace	        1
Home	        2
Manor?	        3
Tavern	        4
Temple	        5
EquipStore	6
MagesGuild	7
Dungeon?	8
Dungeon?	11
Clone this wiki locally