Forum > Random

new file system CASC

<< < (29/35) > >>

MR. Farrare:

--- Quote from: "schlumpf" ---
--- Quote from: "MR. Farrare" ---Iron horde cannon with anim
--- End quote ---
Yes, we know that you can copy files. Sorry to disappoint you, but there is nothing special about it.
--- End quote ---

don't care I find it  special   :)

akspa420:
I find it odd that no one has mentioned that the extractor is able to extract a 'signature' file from the CASC files, of which lists a bunch more resources that aren't listed in the extractor's listfile. Maybe I'm wrong. The signature file appears to use a ";" to delimit the text contained in it, making it easy to pull out the embedded listfile.

stoneharry:

--- Quote from: "akspa420" ---I find it odd that no one has mentioned that the extractor is able to extract a 'signature' file from the CASC files, of which lists a bunch more resources that aren't listed in the extractor's listfile. Maybe I'm wrong. The signature file appears to use a ";" to delimit the text contained in it, making it easy to pull out the embedded listfile.
--- End quote ---

The signature file does not contain a full file list. But yes, using that, the listfile from MoP, and extracting paths from the DBC's / file contents, you can get a listfile that is over 99% complete.

TaylorMouse:
Hey, I used the BLTE code to extract the M2 files and it worked

I did add some source code that it automatically extracted all of the data.xxx file

The result was that all of the files had these GUIDs as filenames

Here is a piece of code that reads in the M2 file and extracts the name of the model and replaces the GUID of the name with its correct name.

For all of the m2 files ( about 45000 files) the process takes about 3 minutes ( give or take)


--- Code: ---using System;
using System.IO;

namespace RenameM2Files
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] files = Directory.GetFiles(@"D:Warlords Of Draenor\Extracted", "*.m2");

            int currentFile = 1;
            string nbrFiles =  files.Length.ToString();
            foreach (string file in files)
            {
                string newName = "";
                using (var br = new BinaryReader(File.OpenRead(file)))
                {
                    br.ReadBytes(8);
                    var nameLen = br.ReadUInt32();
                    var nameOff = br.ReadUInt32();

                    br.BaseStream.Seek(nameOff, SeekOrigin.Begin);

                    var name = br.ReadString((int)nameLen);

                    newName = name.Substring(0, name.Length - 1);
                    br.Close();
                }
               
                var info = new FileInfo(file);
                newName = info.Directory.FullName + "\" + newName + ".m2";
               
                if(!File.Exists(newName))
                    info.MoveTo(newName);
               
                if (File.Exists(file))
                    File.Delete(file);

                Console.WriteLine(currentFile.ToString() + " / " + nbrFiles);

                currentFile++;
            }
            Console.WriteLine("DONE");
            Console.ReadKey();

        }

       
    }
}

--- End code ---

here is the extension method for the binaryReader:


--- Code: ---using System;
using System.IO;


namespace System.IO
{
    public static class Extesions
    {
        public static string ReadString(this BinaryReader br, int nbrChars)
        {
            string ret = "";
            for (int i = 0; i < nbrChars; i++)
            {
                ret = string.Concat(ret, br.ReadChar());
                if (ret == "")
                    return null;
            }
            return ret;
        }
    }
}

--- End code ---

Hope this can help someone :)

T.

MR. Farrare:
any body know  CASC editor or how to extract files from the newest update from WOD because the new update is on and I cant extract anything from Cromon extractor the tool is not updated for the current build

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version