@kayahr/wastelib
    Preparing search index...

    Class MapInfo

    Various additional information about a game map.

    The map info block is located directly after the Central MSQ Directory. So for 64x64 maps its located at offset 0x182A (0x1830 with the MSQ header) and for 32x32 maps its located at offset 0x062A (0x0630 with MSQ header). The block is always 50 bytes long.

    Index

    Methods

    • Returns the tile with which the frame around the map is filled. For the world map this is 31. Subtract 10 from it (because tiles 0-9 are the 10 sprites from IC0_9.WLF) and you get 19. And if you take a look at the first tileset in ALLHTDS1 you'll see that the tile with this id is a desert tile.

      Returns number

      The tile with which the frame around the map is filled.

    • Returns the combat string ID with the given index.

      Parameters

      • index: number

        The combat string index.

      Returns number

      The combat string ID.

    • Returns the string IDs for all the strings used during combat (like "x hits y" and "x is reduced to a red paste" and so on).

      Returns number[]

      The combat string IDs.

    • Returns the random encounter frequency. If it's set to 0 then no random encounters occur. 1 means a random encounter on every move. The higher the number the more seldom a random encounter occurs.

      Returns number

      The random encounter frequency.

    • Returns how quickly you heal over time (Divide 128 by this number to find the number of steps to heal 1 CON point).

      Returns number

      How quickly you heal over time.

    • Returns the map size. This is either 32 or 64.

      Returns number

      The map size (32 or 64).

    • Returns how many random encounters can be on the map at once. This means: When this is set to 2 and you run away from an encounter then you may run into another encounter. But if you run away from this one, too, then you have your freedom until you go back to the still unfinished random encounters and kill the monsters. This byte is directly connected to the Random Encounter Data of action class 0x0F. If this byte is set to 3 then you need three random encounter data blocks in the map.

      Returns number

      How many random encounters can be on the map at once.

    • Returns the number of used random monster types. If it's set to 1 then only the first monster defined in the monster data of the map appears in random encounters. If set to 3 then the first three monsters can appear in random encounters, and so on. This also makes clear that random encounter monsters always must be defined at the top of the monster list.

      Returns number

      The number of used random monster types.

    • Returns the tileset to use to display the map. 0 means the first tileset in ALLHTDS1, 1 means the second in ALLHTDS1, 4 is the first tileset in ALLHTDS2, 5 is the second and so on.

      Returns number

      The tileset to use to display the map.

    • Returns the time that passes when the user moves one square on the map (or presses the ESC key). Divide by 256 to get the time in minutes. So 256 is one minute, 512 is two minutes, 128 is 30 seconds and so on.

      Returns number

      The time that passes on each step.

    • Returns the unknown byte at offset 0x00 in the map info block. It is 0 in all maps.

      Returns number

      Unknown byte.

    • Returns the unknown byte at offset 0x01 in the map info block. It is 0 in all maps.

      Returns number

      Unknown byte.

    • Returns the unknown byte at offset 0x03 in the map info block.

      Returns number

      Unknown byte.

    • Returns the unknown byte at offset 0x04 in the map info block.

      Returns number

      Unknown byte.