---------------------------------- Mike Singleton's LORDS OF MIDNIGHT ---------------------------------- "Hacked" by EINAR GATTONI SAUKAS ---------------------------------- This file provides some technical information about LORDS OF MIDNIGHT, considered the best strategy game ever produced for the ZX-Spectrum. =============== 1. THE CONTROLS =============== 8 1 2 7 * 3 DIRECTIONS 6 5 4 Q MOVE E LOOK R THINK T CHOOSE U NIGHT S SAVE D LOAD G YES J NO Z COPY M SELECT C LUXOR THE MOONPRINCE (01) [12,41] V MORKIN (02) [12,41] B CORLETH THE FEY (03) [12,41] N RORTHRON THE WISE (04) [12,41] 1 THE LORD OF GARD (05) [10,56] 2 THE LORD OF MARAKITH (06) [43,33] 3 THE LORD OF XAJORKITH (07) [45,60] 4 THE LORD OF GLOOM (08) [08,01] 5 THE LORD OF SHIMERIL (09) [28,43] 6 THE LORD OF KUMAR (10) [57,30] 7 THE LORD OF ITHRORN (11) [57,16] 8 THE LORD OF DAWN (12) [44,46] 9 THE LORD OF DREAMS (13) [42,17] 0 THE LORD OF DREGRIM (14) [59,44] Q THIMRATH THE FEY (15) [33,61] W THE LORD OF WHISPERS (16) [57,21] E THE LORD OF SHADOWS (17) [11,38] R THE LORD OF LOTHORIL (18) [11,11] T KORINEL THE FEY (19) [23,22] Y THE LORD OF THRALL (20) [33,39] U LORD BRITH (21) [21,50] I LORD RORATH (22) [23,61] O LORD TRORN (23) [54,51] P THE LORD OF MORNING (24) [39,52] A LORD ATHORIL (25) [54,39] S LORD BLOOD (26) [21,37] D LORD HERATH (27) [45,27] F LORD MITHARG (28) [29,47] G THE UTARG OF UTARG (29) [59,35] H FAWKRIN THE SKULKRIN (30) [01,11] J LORGRIM THE WISE (31) [62,01] K FARFLAME THE DRAGONLORD (32) [12,24] ============ 2. THE LORDS ============ There are 32 different "Lords". The information about them is stored in memory addresses 27648 to 28671, using 32 bytes to describe each "Lord". The most important information is stored according to this table: -------------------------------------------------------------------------- OFFSET DESCRIPTION -------------------------------------------------------------------------- 00 Column position (0..63) 01 Row position (1..61) 02 Direction (0=N, 1=NE, 2=E, 3=SE, 4=S, 5=SW, 6=W, 7=NW) 03 Remaining hours of the day (2 units = 1 hour) 06 Flag "recruited?" (0=no, 1=yes) 08 Number of riders (1 unit = 5 riders) 10 Number of warriors (1 unit = 5 warriors) 30 Weapon (0=nothing, 12="sword Wolfslayer", 13="sword Dragonslayer", 15="Moon Ring") -------------------------------------------------------------------------- Use "PEEK (27648+(LORD-1)*32+OFFSET)" to obtain a "Lord" information. ========== 3. THE MAP ========== The map has 61 rows of 64 columns, thus a total of 3904 positions. The surrounding positions (not explicitly described in the map) are considered "Frozen Wastes" by default. The description is stored in two separate tables: =========================== 3.1 - THE TABLE OF TERRAINS =========================== This table occupies the memory addresses 28672 to 32575 and contains one byte for each map position. Bits 0-3 of each byte indicate the type of terrain: -------------------------- BYTE DESCRIPTION -------------------------- '00' Mountains of * '01' Citadel of * '02' Forest of * '03' *henge '04' Tower of * '05' Village of * '06' Downs of * '07' Keep of * '08' Snowhall of * '09' Lake * '0A' Frozen Wastes '0B' Ruin of * '0C' Lith of * '0D' Cavern of * '0E' (Doomdark army) '0F' Plains of * -------------------------- Bits 4-7 of each byte indicate the "object" stored in the position: -------------------------- BYTE DESCRIPTION -------------------------- '00' nothing '10' Wolves '20' Dragons '30' Ice trolls '40' Skulkrin '50' Wild horses '60' Shelter '70' Guidance '80' Shadows of Death '90' Waters of Life 'A0' Hand of the Dark 'B0' Cup of Dreams 'C0' Sword Wolfslayer 'D0' Sword Dragonslayer 'E0' Ice Crown 'F0' Moon Ring -------------------------- Use "PEEK (28672+(ROW-1)*64+COL)" to obtain a terrain information. ========================== 3.2 - THE TABLE OF DOMAINS ========================== This table occupies the memory addresses 32576 to 36479 and also contains one byte for each map position. Bits 0-5 of each byte indicate the domain name of the position: -------------------------- BYTE DESCRIPTION -------------------------- '00' Frozen Wastes '01' Lothoril '02' Gloom '03' Moon '04' Mirrow '05' Glorim '06' Korkith '07' the Lost '08' Dead '09' Weird '0A' Ugrak '0B' Death '0C' Doom '0D' Despair '0E' Vorgath '0F' Ushgarak '10' Ugrorn '11' Kor '12' Toomog '13' Ogrim '14' Dodrak '15' Gorgrath '16' Valethor '17' Coroth '18' Ashimar '19' Ithril '1A' Shadows '1B' Blood '1C' Thrall '1D' Torkren '1E' Gard '1F' Mitharg '20' the Moon '21' Iserath '22' Shimeril '23' Odrark '24' Ishmalay '25' Brith '26' Silence '27' Elenil '28' Rorath '29' Morning '2A' Thimrath '2B' Corelay '2C' Rathrorn '2D' Lorgrim '2E' Lor '2F' Fadrath '30' Droon '31' Grarg '32' Dreams '33' Ithrorn '34' Whispers '35' Xajorkith '36' Herath '37' Kumar '38' Marakith '39' the Targ '3A' Utarg '3B' Athoril '3C' Dregrim '3D' Dawn '3E' Trorn '3F' Coom -------------------------- Bit 6 indicates which separator should be used between the terrain type and the domain name: -------------------------- BYTE DESCRIPTION -------------------------- '00' "of" '40' "in the domain of" -------------------------- Bit 7 is only used temporarily during night processing to mark map positions that contain "Lord" armies, so AI routines have a quick reference to see if anything interesting is at a location when it is processing Doomdark armies. [Thanks to Chris Wild for this information.] Use "PEEK (32576+(ROW-1)*64+COL)" to obtain a domain information. ==================== 4. THE SAVEGAME FILE ==================== The "SAVE" option just stores on tape a part of the memory area. It corresponds to a command like "SAVE CODE 26478,6290", but creating a headerless file. This file contains information about the several armies (memory addresses 26478 to 27647), the "Lords" (memory addresses 27648 to 28671), the "Table of Terrains" (memory addresses 28672 to 32575) and the first 3 rows of the "Table of Domains" (memory addresses 32576 to 32767). Actually the "Table of Domains" only contains information that is never changed. The game map was originally 64x64, but when the author got short on memory he trimmed 3 rows of locations off the map thus reducing it to 61x64. However he never changed the save and load code and therefore saves info that is not required. [Thanks to Chris Wild for this information.] ============== 5. THE EXAMPLE ============== The MORKIN number is 02 (see chapter 1), the column offset is 00 and the row offset is 01 (see chapter 2): COL = PEEK (27648+(02-1)*32+00) = PEEK 27680 = 12 ROW = PEEK (27648+(02-1)*32+01) = PEEK 27681 = 41 It means that his initial position is [12,41] (see chapter 1). The bytes corresponding to this position are: TERRAIN = PEEK (28672+(41-1)*64+12) = PEEK 31244 = 116 ( = '74' ) DOMAIN = PEEK (32576+(41-1)*64+12) = PEEK 35148 = 32 ( = '20' ) It means that his initial position is called "Tower of the Moon" and a command "Seek" will find "Guidance" (see chapter 3). ========== 6. THE END ========== The program LORDS OF MIDNIGHT is (probably) copyright "Beyond Software" blah blah blah... This file was originally uploaded to ftp.nvg.unit.no in February 1997 and the information described here can be freely distributed (just give me the credit for this!) I can be contacted by e-mail at "einar@ime.usp.br". Adzubla! Einar