Ethatron / bsaopt

BSAopt is a tool which manages and recompressed BSA-files. It has been forked off NIFopt and both programm share the same underlying technology regarding BSAs. Both programs treat BSAs exactly like directories, files inside can be adressed easily.
http://http://obge.paradice-insight.us/wiki/BSAopt
31 stars 13 forks source link

Fallout/FalloutNV Compatibility #13

Open malonn23 opened 12 years ago

malonn23 commented 12 years ago

I've noticed that BSAOpt doesn't handle .OGG files correctly. Even though the program says it has support for Fallout, the native .OGG files used for voice and sound (in some cases), isn't supported. If one creates an BSA with OGG files in it, there will be no sound when in-game. Could this be corrected? It could be something as simple as an flag that isn't set. All other files function and manifest in-game correctly.

malonn23 commented 12 years ago

EDIT After some experimenting, it is, indeed, a BSA Archive flag issue. Also, the archive cannot be compressed, if it contains .OGG files, or there will be no sound, as well. But, back to the flag that needs to be set. My testing shows that flag number 9 needs to be set if there are OGG files inside the archive. Hopefully this helps you and you can make a quick update to BSAOpt, as it is the best archiving utility available.

Ethatron commented 12 years ago

That's great to have the flag, I'll add it. Do you know if OGGs need to be excluded from compression? Like what's the compression-state in official BSA-files? You can make a mixed BSA by adding others with compression and then add the OGGs without compression, if you want to try it out.

malonn23 commented 12 years ago

Awesome. I hope you can get that flag for BSA's which contain .OGG files squared away. From my experience, if you compress OGG files, then you will not hear anything in-game, just like if the flag isn't set. From what I've read, OGG files are compressed already, and recompressing will just increase file size, and cause a no sound response when playing, in-game.

Ethatron commented 12 years ago

You're sure about bit 9? It's the ".lip" bit.

Ethatron commented 12 years ago

Nevermind that was a custom ".lip" flag. You can verify the adjustment with this file: https://github.com/downloads/Ethatron/bsaopt/BSAopt-OGG.zip

If it doesn't allow compression (you have to force compression to test it), I'll prevent them from being compressed as well.

malonn23 commented 12 years ago

Okay. My info is a little inaccurate. When I posted that flag 9 needed to be set for OGG files to be heard, it was for the "OldWorldBlues - Main.bsa". If bit 9 is not set in that file, you cannot hear what is being said, as well as the lips don't move. BUT, for the "Fallout - Voices1.bsa" (the main voices file), bit 9 is not set. It turns out, bits 4 and 5 are set (WAV and MP3 bits). So, if I build a Fallout - Voices BSA with the test version you linked to above, I get no sound. So it seems I didn't test enough before I posted. I'm in the process of rebuilding my mods, and plan on testing more once I get a full load order. It could be that bit 9 has to be set for archives which contain more than just OGG and LIP files, I don't know. I have a mod which uses OGG files for voice, and will build that archive and test with and without flag 9 set.

malonn23 commented 12 years ago

Okay, after testing further with "Fallout - Voices1.bsa", the only flags that need to be set are the 4 and 5 bit on the "Files" set. I have to test further on archives which contain both OGG and other files like NIF's and DDS's. I can say that an archie I built using BSAopt which contained the said mixed resources, I got no sound or lip movement. Like I said in the above comment, it could be that archives that feature mixed resources need bit 9 set, as well as bits 4 and 5. But, definitively, an archive which only contains OGG and LIP files only need bit 4 and 5 set, not bit 9.

Ethatron commented 12 years ago

Okay, try again (it's another file): https://github.com/downloads/Ethatron/bsaopt/BSAopt-OGG.zip

malonn23 commented 12 years ago

Okay, I'll try that file today and post back. But I'm wondering if I could request a feature now?...would it be possible to make it so that you have a flags menu? That way you could set the flags yourself, based on the archive you are building. That may be easier than trying to figure all this stuff out. I don't know if other users of BSAopt would want that, but I know I would.

malonn23 commented 12 years ago

Sorry it took so long to get back to you, but I tested the latest build you linked to above. It doesn't work properly. The flags are still incorrect, though the lack of compression for bsa's which contain OGG's IS correct. You still are not setting bit 9 for bsa's which contain other files besides OGG's. If there are textures and meshes, bits 1,2,5 and 9 have to be set. If there are only OGG (and WAV's work also), bits 4 and 5 need to be set.

Ethatron commented 12 years ago

Here are the bits:

/* File flags */

define OB_BSAFILE_NIF 0x0001 //!< Set when the BSA contains NIF files

define OB_BSAFILE_DDS 0x0002 //!< Set when the BSA contains DDS files

define OB_BSAFILE_XML 0x0004 //!< Set when the BSA contains XML files

define OB_BSAFILE_WAV 0x0008 //!< Set when the BSA contains WAV files

define OB_BSAFILE_MP3 0x0010 //!< Set when the BSA contains MP3 files

define OB_BSAFILE_TXT 0x0020 //!< Set when the BSA contains TXT files

define OB_BSAFILE_HTML 0x0020 //!< Set when the BSA contains HTML files

define OB_BSAFILE_BAT 0x0020 //!< Set when the BSA contains BAT files

define OB_BSAFILE_SCC 0x0020 //!< Set when the BSA contains SCC files

define OB_BSAFILE_SPT 0x0040 //!< Set when the BSA contains SPT files

define OB_BSAFILE_TEX 0x0080 //!< Set when the BSA contains TEX files

define OB_BSAFILE_FNT 0x0080 //!< Set when the BSA contains FNT files

define OB_BSAFILE_CTL 0x0100 //!< Set when the BSA contains CTL files

So OGG is equivalent to MP3-flag I presume.

Ethatron commented 12 years ago

Can you test the version in "Downloads" and report, thanks.

malonn23 commented 12 years ago

Hey, sorry it took so long to get back to you. To answer the previous question, yes: the MP3 flag is used for OGG files as well. But, there are some 30 flags for BSAs and the 13 you listed there are not the only ones ever used. For example: Oblivion - Voices2.bsa needs flags 5, 17, 19, 20, 24, 26, 28, 29, and 30 set for the BSA to function properly. If those flags are not set, then certain dialogues will not be heard. Others will, but not all of them. I would like to make a request. Could you make it so that the user can set the flags his/herself?? That would make it much easier to handle packing BSAs. And, I do not have New Vegas installed at the moment, so I can't report if the latest development version works or not.

OmniBlade commented 11 years ago

On the subject of FAllout3/NewVegas compatibility, it seems that .dlodsettings files are't handled correctly, I believe they should be flagged the same as .ctl files.

Ethatron commented 11 years ago

I made it add the MISC-flag whenever no other flag is set, it may not be enough though.

OmniBlade commented 11 years ago

With some limited testing it appears that both ogg and dlodsettings files work in bsa files with the latest beta when used with fallout new vegas at least.