AdmiralCurtiss / HyoutaTools

A collection of tools for extracting and/or reinserting data from/into video games.
Other
69 stars 19 forks source link

Can't unpack *.nub-file from Tales of Vesperia #20

Closed LabMember12 closed 1 year ago

LabMember12 commented 1 year ago

Hello, sorry for bothering. I compiled build in Visual Studio 2022 without errors. Then tried to extract music from *.nub-file in Tales of Vesperia (PC) just to get empty folder and nothing else. Any solution?

image

AdmiralCurtiss commented 1 year ago

Looks like the endian detection fails and it tries to read millions of file entries.

LabMember12 commented 1 year ago

Thanks for quick reply.) Damn, that was last hope to get music (and possibly replace) somehow. :P I guess problem with nub-files in PC version in general. When I checked SE3 file it got extracted fine.

AdmiralCurtiss commented 1 year ago

Okay, I pushed a fix, changed the autodetection a little and you can also override it now if it fails. All the PC and PS3 files seem to extract fine now, though vgmstream can't seem to play a lot of them -- not sure if that's my fault or vgmstream's.

AdmiralCurtiss commented 1 year ago

FYI if you want to play around with this, there's bnsf encoder source code available at https://www.itu.int/rec/T-REC-G.722.1-200505-I/en

LabMember12 commented 1 year ago

Thank you very much! I will check update tomorrow and post about results here.

AdmiralCurtiss commented 1 year ago

Okay, files should play fine in vgmstream now too. It was half and half, vgmstream is very picky about the filesize and chokes if the file has padding, but the music ones were my fault because I truncated the header (since the music files have looping info their header is longer than the voice files).

LabMember12 commented 1 year ago

Thanks again! Now it works great, got unpacked everything. I'll use vgmstream for simple playback. Also will try to learn how to pack it back, so thanks for remark about decoder too. Much appreciated!

LabMember12 commented 1 year ago

Checked encoder to get errors in compilation process. Maybe I'm too stupid and VS isn't old enough for source code. image

AdmiralCurtiss commented 1 year ago

The encoder source code is quite old so you probably have to replace a few typedefs and/or names and maybe add a few includes. Shouldn't be too hard to get running though, I remember getting it working a few years ago (on Windows at least).

LabMember12 commented 1 year ago

Today I was able to compile it without much troubles. I installed Visual Studio 2003 (somehow, it still works on W10), then converted sources and managed to build executable. So, you was completely right, while I'm panicker sometimes. Thank you very much again! image