Escartem / AnimeWwise

Extract audio from those anime games with original filenames, paths and more
51 stars 7 forks source link

Where do I find the pre-installed package files in the game's directory? #11

Open Boyishdude opened 3 months ago

Boyishdude commented 3 months ago

I wanted to try extracting the v5.0 update package's new data since the option to pre-install the patch was made available just tonight, but your instructions on the main page for .hdiff and/or related files for new patches actually don't mention where to find the file(s) for the package containing the next major update. I don't want to have to re-extract the audio directory after v5.0 is installed the day after today just to get the v5.0 files (and somehow find said files manually, since not all of the new dialogue from Natlan will have their keys) when I've already extracted all of the audio files that exist as of v4.8, which totals to ~100+ GBs if they're extracted in WAVE format.

image

Now, obviously, the size of this directory is not my issue. I was expecting the extracted directory from v4.8 to be huge when I had it extracted as WAVE files for the improved quality they provide over MP3 files due to their lack of compression. My issue is that I don't want to re-extract all of those files that I've already extracted just to get the v5.0 audio files. It's a huge hassle to waste ~100 GBs of space re-extracting files I already have when I could just extract the v5.0 files in isolation using the pre-installed package and add them to the existing extraction directory, assuming your tool allows for that.

Escartem commented 3 months ago

I get what you're asking, and more importantly, if you wanted to extract .hdiff files it would require to have the pck before the patch as mentioned in the readme, so it's the perfect time right now to do it.

As to get the files, when downloading the update patch, there are 2 zip files created in the game root folder, one for game content and the other for audio package... that is if you use old launchers, it's been some time since most launchers don't download the zip directly anymore but some blocks files. Depending on your internet connection you may want to use some tools to convert these into a zip, or manually download the audio zip package available right here

Inside the zip you'll have .hdiff and .pck files, follow the guide for them and you should be good. However please note the mapping wasn't updated to 5.0 yet so none of the files will have a name

Boyishdude commented 3 months ago

I've actually been wondering over these past couple days if the new unified HoYoPlay launcher has been designed to be anti-content dumping. I not only did not find a zip file in the game's root directory when I went looking, we didn't even receive the option to pre-install the next patch until today, which is the day before the new patch comes out. They used to let us pre-install the next patch a fair bit sooner.

If I might ask, where did you find the v5.0 audio file zip, and where can I find tools for converting the specific files you mentioned into zips (unless you're just referring to Winrar and 7-Zip for that, in which case, I already have both of those)?

Escartem commented 3 months ago

For getting the zip files, look on Google, a Reddit user named SingularityHRT has been posting them since 1.5, it's pretty easy to get too, just use a basic network tampering tool and look at the launcher requests.

Moreover, The hoyo-play launcher is not specifically made to be anti dump, on this zip thing at least (other launchers does it too), it's more of a way for making download faster and easier to resume if stopped. Depending on the launcher it's not the same method, I don't know about hoyoplay but collapse uses sophon stream available here if I'm not mistaken. It's basically utilities to split the zip and stream it. But you can also download the zip manually, place it in the game folder and the launcher should detect it fine afaik.

Boyishdude commented 3 months ago

I see. I'll keep that Reddit user in mind, then.

On another note, to be honest, I don't really understand the instructions you've given for extracting .hdiff/pre-patch files properly. Is there any way to simplify them so the correct step-by-step process is easier to understand? Is the zip I downloaded already set up properly to extract the new v5.0 audio files, or do I need to do something to make it ready for extraction?

Escartem commented 2 months ago

Inside the zip file there should be .pck files and .hdiff, pck are usual files you can extract with the tool normally, for .hdiff you need to place in the input folder the .pck in your game with the same name on version 4.8 and in the diff folder the .hdiff file that corresponds.

For example if in the zip you have External0.pck.hdiff, you would put it in the diff folder and in the input one the External0.pck file from version 4.8 (the version before the update of where the hdiff is from)

So the process would be to make two folders, in the first you would put all the hdiff files that are in the zip. And in the second you would put both the pck in the zip file, and the pck from the game that have a corresponding name to each hdiff making pairs of two files for each (External0.pck <=> External0.pck.hdiff) and then you would load both folders as diff and input respectively in the tool

Boyishdude commented 2 months ago

That was.. clear as mud. How about I post pictures of the v5.0 audio files directory you gave me to show you what it looks like, then you give me a step-by-step set of instructions of how to extract only the v5.0 audio files using a numbered list format based on those pictures? I don't know what it is exactly, but the way you're explaining all of this is just really confusing, so I can't make head or tails of what you're telling me to do.

image

image

image

image

image

image

image

This last picture is the hdifffiles.txt document the archive came with, so I haven't changed anything in it.

Escartem commented 2 months ago

Among all the pictures, you only need the one with the files, you have your list of files, for the .pck you can extract them normally. For the .hdiff you need to search inside your game (not the update zip) the file with the same name (without the .hdiff) for example in the picture you have External0.pck.hdiff then search in your game External0.pck. Repeat for every hdiff file you have, and then in one folder place all the hdiff files, and in another place all the pck you collected just now. And load both folders in the tool. And again the pck you are copying from the game need to be before the game is updated to 5.0, if you updated your game to 5.0, you need to download the 4.8 English package from the internet.

To make it simpler, just try with one file, let's do it together. In the update zip you have External0.pck.hdiff, then :

If it worked, you can then repeat the process for every hdiff file in the update zip, by putting every hdiff in one folder and the pck in the other as explained above

Hope this helps you more 😀

Boyishdude commented 2 months ago

I'm guessing that it worked then, since it looks like this?

image

If so, I suppose my only gripe is the lack of mappings for v5.0, since it came out only a few days ago. Also:

image

These files lack hdiffs in the v5.0 audio assets directory that you gave me earlier this week. Does this mean that extracting them would not yield me any new files, despite them coming from a compiled archive of the v5.0 pre-installed package?

Edit: I did exactly as required, having all of my hdiffs in a folder called update5.0 and all of the relevant v4.8 .pck files from the zip you gave me, but for some reason, old dialogue that I've already extracted (and has been mapped) is something I've been given the option to extract alongside any files that are actually new. I assume that I'll only want the 'unmapped' files?

image

image

image

image

image

Escartem commented 2 months ago

The .pck in the update zip are 100% new audio, basically a .pck file is a sound bank, and .hdiff is a patch for an existing sound bank, so in updates they add patches and sometime new banks entirely. You can extract the new pck normally, everything inside is new.

I'm not sure about your unmapped question though, however I also updated the mappings so you should be able to have the files names now

Boyishdude commented 2 months ago

I guess I'll just re-extract the thing later today with the new version of your tool. I'm too tired to do it right now.

My question about the unmapped files basically boils down to the question of whether or not they were the actual new files, and if I should only download those ones, but since all of the files are "new", that more-or-less answers the question I had about the unmapped files anyway.

Escartem commented 2 months ago

Hope it works then, I've also extracted all audio from 5.0 as mp3 if you want me to upload it. Tell me if it works on your side