1. The poll for our 11th Music Contest is up! Help us choose the most awesome cinematic tracks by casting a vote!
    Dismiss Notice
  2. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  3. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  4. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    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,418
    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