Youjose / PyCriCodecs

Python frontend with a C++ backend for managing Criware formats.
60 stars 7 forks source link

trouble with a .awb file #8

Closed GoldieLeGenie closed 1 year ago

GoldieLeGenie commented 1 year ago

Hi, great job! I just have a small issue with an AWB file that cannot be decrypted correctly. Do you have a solution for this file It would be really awesome ? https://www.mediafire.com/file/7tefsy31qy3wiqq/voice_r01.awb/file

Youjose commented 1 year ago

Hello, HCA files are encrypted using a key, and you would need this key to decrypt it, I searched a bit and managed to find that this AWB is from a game called "One Piece Treasure Cruise", and the key they use is 1224 or 0x04C8, with this information you can extract the audio by running this:

from PyCriCodecs import *
awbobj = AWB("voice_r01.awb") # Given that the this script is in the same folder with the file.
awbobj.extract(True, 1224)

This will extract the awb. Better yet, if you have an ACB that is with this AWB you can get the original filename of the audio, but currently my library does not support that, so I would suggest using a better tool called VGMStream, it also can extract this awb with no problems!

Hope this helps, tell me how it goes.

GoldieLeGenie commented 1 year ago

Yep, it was from 'One Piece Treasure Cruise,' and the code you gave me works perfectly fine. Thank you so much! Have a great day :)