Map (ZQuest)

From ZCWiki
Jump to: navigation, search

A map, also known as an area map, is an area on which screens of a quest are plotted. In ZQuest, maps are 16x8 screens in dimension, with an additional eight screens used for various utility purposes. Dmaps are used to divide up maps into smaller sections.

Screen Addresses

In ZQuest each screen in a map has an address, which is just a unique number. You use these addresses to designate warp exits, continue points, and so forth. The screen at the top left corner of the map has an address of 0. The screen to the right has an address of 1, and so on until the end of the row is reached. Addressing then resumes at the left-most screen in the next row. See the figure below (elipses "..." indicate that some screen rows and columns are skipped).

00 01 02 ... 15
16 17 18 ... 31
... ... ... ... ...
112 113 114 ... 127

You'll notice, however, that ZQuest displays screen addresses differently than how they appear above. This is because ZQuest displays the screen's address using hexadecimal (base 16) numbers. Hexadecimal numbers, instead of ranging from 0 to 9 as we're used to, range from 0 to F, where A through F are the equivalent of 10 to 15 (0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F). Modifying the above figure to show the screen addresses in hexadecimal yeilds:

00 01 02 ... 0F
10 11 12 ... 1F
... ... ... ... ...
70 71 72 ... 7F

Since a map is 16 screens wide, it just happens to work out that the first digit in the address is the row (a total of 8 rows being numbered from 0 to 7) while the second digit is the column (a total of 16 columns numbered from 0 to F). Therefore, "00" would be the top-leftmost screen on the map. Screen 30 would be three screens below Screen 00, while Screen 0A would be ten screens to the right of Screen 00.

Using either system (decimal or hexadecimal) to specify a screen address will work when using the screen address in a script function (see Link->PitWarp, for instance). Remember that you can indicate hexadecimal numbers in ZScript by prefixing them with a "0x" (for example, 0x1F).

Special Screens

ZQuest uses an extra row of screens (numbered from 80 to 87 in hexadecimal) for special purposes. You cannot warp or scroll to them directly through regular gameplay. These screens are for use as certain room templates.

Screen 80 is used for all Item Cellars and Caves on this map. Screen 81 is used for Passageways.