@kayahr/wastelib
    Preparing search index...

    Class Exe

    Provides information from the WL.EXE file.

    Index

    Methods

    • Returns the strings used during character creation.

      Returns string[]

      Character creation strings.

    • Returns string[]

      Strings used in the ending sequence.

    • Returns string[]

      Strings used in infirmaries.

    • Returns the intro strings. They are used in the title of the game and contain the copyright message and the small introduction before the game starts.

      Returns string[]

      The intro strings.

    • Returns various strings which mostly have something to do with the players inventory but also contains strings for skills and attributes.

      Returns string[]

      Various strings mostly used in inventory, skills and attribute screens.

    • Returns string[]

      Strings used in libraries.

    • Returns the location index of the given map.

      Parameters

      • disk: number

        The disk index (0 or 1).

      • map: number

        The map index (0-19 for disk 0 and 0-21 for disk 1)

      Returns number

      The location index (0-49)

    • Returns the disk index of the specified location.

      Parameters

      • location: number

        The location (0-49, but there are also invalid locations within this range).

      Returns number

      The disk index (0 or 1).

    • Returns the map index of the specified location.

      Parameters

      • location: number

        The location index (0-49, but there are also invalid locations within this range).

      Returns number

      The map index (0-19 for disk 0 and 0-21 for disk 1).

      RangeError if the location index is invalid.

    • Returns the map offset of the given map.

      Parameters

      • disk: number

        The disk index (0 or 1).

      • map: number

        The map index (0-19 for disk 0 and 0-21 for disk 1).

      Returns number

      The map offset.

    • Returns the map size of the given map. This information is needed to load a map because the maps itself do not know their size until the map info is read which is only available AFTER the map data has been parsed.

      Parameters

      • disk: number

        The disk index (0 or 1).

      • map: number

        The map index (0-19 for disk 0 and 0-21 for disk 1).

      Returns number

      The map size.

    • Returns various unsorted strings like some encounter messages, loot messages, weapon reloading and more.

      Returns string[]

      Various unsorted strings.

    • Returns the portrait index in ALLPICS1 (when disk is 0) or ALLPICS2 (when disk is 1) for the given portrait ID.

      Parameters

      • disk: number

        The disk index (0 for ALLPICS1, 1 for ALLPICS2).

      • portraitId: number

        The portrait ID as used in the game files.

      Returns number

      The portrait index in ALLPICS1 or ALLPICS2 (depending on disk parameter).

    • Returns the portrait record offset within ALLPICS1 (when disk is 0) or ALLPICS2 (when disk is 1) for the given portrait ID.

      Parameters

      • disk: number

        The disk index (0 for ALLPICS1, 1 for ALLPICS2).

      • portraitId: number

        The portrait ID as used in the game files.

      Returns number

      The portrait record offset within the corresponding ALLPICS file.

    • Returns string[]

      Strings used during promotions.

    • Returns the offset of the savegame data in either GAME1 or GAME2.

      Parameters

      • disk: number

        The disk index (0 for GAME1, 1 for GAME2).

      Returns number

      The savegame offset

    • Returns the actual shared location for the specified derelict building location.

      Parameters

      • derelictLocation: number

        The derelict location (lower 7 bit).

      Returns number

      The actual shared location.

    • Returns the shop item list offset in GAME1 or GAME2 for the specified shop number.

      Parameters

      • shop: number

        The shop number (0-3 in GAME1, 4 in GAME2, 3 is actually invalid because it does not exist and is not used in the game).

      Returns number

      The shop item list offset

    • Returns string[]

      Strings used in shops.

    • Returns the skill list. Note that the indices in the returned array are zero-based while skill IDs are one-based. So if you need to access skill 2 for example then you have to access skills[1].

      Returns Skill[]

      The skill list.

    • Returns the offset from the beginning of the huffman compressed tile map within the map data. This information is needed to load a map because the maps itself do not know where the tile map section begins.

      Parameters

      • disk: number

        The disk index (0 or 1).

      • map: number

        The map index (0-19 for disk 0 and 0-21 for disk 1).

      Returns number

      The tile map offset.

    • Returns the disk number of the given tileset ID.

      Parameters

      • tilesetId: number

        The global tileset ID (0-8).

      Returns number

      0 for ALLHTDS1 and 1 for ALLHTDS2.

    • Returns the tileset offset within the corresponding ALLHTDS file for the given tileset ID.

      Parameters

      • tilesetId: number

        The global tileset ID (0-8).

      Returns number

      The tileset offset within ALLHTDS1 or ALLHTDS2.

    • Returns the compressed tileset size for the given tileset ID.

      Parameters

      • tilesetId: number

        The global tileset ID (0-8).

      Returns number

      The compressed tileset size in bytes.

    • Parses a WL.exe file and returns the information from it.

      Parameters

      • data: Uint8Array

        The array containing the packed content of the WL.EXE file.

      Returns Exe

      The parsed information from the exe file.