1. The results for Texturing Contest #28 are out! Step by to congratulate our winners!
    Dismiss Notice
  2. Join us in our custom games night on Saturday, July 14. If you'd like to create a map for the night, check out the map challenge!
    Dismiss Notice
  3. Join in on Icon Contest #17 and show your interpretation of a legendary equipment set!
    Dismiss Notice
  4. 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
  5. Music Contest #10 Retro is out! Join us for some retro/vintage fun!
    Dismiss Notice
  6. Don't be stagnant - embrace change! The time has come to evolve and join the Techtree Contest #12 - Evolution.
    Dismiss Notice
  7. On May 20th a new law about privacy and data processing comes into work in the EU. I am no lawyer and I need help figuring out if we comply and if not, what we must do about it. Please message me if you can provide any assistance. Read more. Ralle
    Dismiss Notice

[Misc] Listfile for Warcraft 3 (1.30+)

Discussion in 'Tutorial Submission' started by PurgeandFire, Jul 14, 2018 at 6:53 AM.

  1. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,346
    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 at 7:15 AM