1. Evolution complete! Make Darwin proud and go vote in the Techtree Contest #12 - Poll.
    Dismiss Notice
  2. Icon Contest #17 - Results are out! Step by to congratulate our winners!
    Dismiss Notice
  3. We've created the Staff Job Openings thread. We're currently in need of icon, video production, and social/multimedia positions to be filled. Thank you!
    Dismiss Notice
  4. Melee Mapping Contest #2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  5. C'thun has spoken! Texturing Contest #29 - Results are published - check 'em out!
    Dismiss Notice

[Misc] Listfile for Warcraft 3 (1.30+)

Discussion in 'Tutorial Submission' started by PurgeandFire, Jul 14, 2018.

  1. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,387
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Last update July 13, 2018.


    Overview


    As of patch 1.30 PTR, Blizzard changed Warcraft 3's game data files to use a CASC file system instead of plain MPQ files. This post is a simple reference for those who want to programmatically access files using something like CascLib.

    First:
    • What is a listfile? A listfile is just a list of all the file paths within an archive. For our purposes, we just use them to look-up a particular asset in an archive. For example, Arthas' theme is stored under "war3.mpq:sound/music/mp3music/arthastheme.mp3" in CASC.

    • What is CASC? CASC (Content Addressable Storage Container) is a new file system that Blizzard has been using to manage game assets. It is the successor to good ol' MPQ storage. Technical details and specs can be found here!

    The List


    See the attached text file at the bottom of the post, or view the gist here. It is too long for a post.

    Here is a sample on using one of the file names to open a file using CascLib:
    Code (C++):

        /// File handle for read operations
        HANDLE file;

        /// Attempt to open the file
        if (CascOpenFile(storage, "war3.mpq:sound/music/mp3music/comradeship.mp3", 0, CASC_OPEN_BY_NAME, &file)) {

            /// do stuff with the file handle

        }

     


    I'll try to keep this updated!
     

    Attached Files:

    Last edited: Jul 14, 2018