Need help with creating bsa files

Post » Tue Mar 15, 2011 12:54 am

I just finished making a HUGE mod (over 25,000 files) and would like to use the bsa format instead of copying over all those files for installation. So, bsapack.exe has a limit of 20,000 files. What I've done is made 2 bsa files. One has all the textures, the other has the meshes and icons. Both have been added to morrowind.ini.

But I'm getting errors in warnings.txt after a ctd that says that textures/meshes are missing. I have verified they are indeed in the bsa file in the correct structure. So my question is, have I done this correctly? Can you use multiple bsa files for 1 mod like I have done?
User avatar
Jessica White
 
Posts: 3419
Joined: Sun Aug 20, 2006 5:03 am

Post » Mon Mar 14, 2011 9:02 pm

To create one BSA file you need the http://www.elricm.com/nuke/html/modules.php?op=modload&name=Downloads&file=index&req=getit&lid=376.

Yes you can use more than one BSA for one mod, but only with the http://planetelderscrolls.gamespy.com/View.php?view=Utilities.Detail&id=29 tool.


Here is a complete http://search2.yacoby.net/search?general=BSA+Reg&game=MW&act=Search&page=1 with http://search2.yacoby.net/. :user:
User avatar
Andres Lechuga
 
Posts: 3406
Joined: Sun Aug 12, 2007 8:47 pm

Post » Tue Mar 15, 2011 2:47 am

Yes, you can, in general principle. However, there's a limit on both the BSA system and the file system, and the number of resources Morrowind can reference.

In this case (and this is an educated guess, not definite), I think your problem is that they're in BSAs. When Morrowind loads a BSA, it has to store a reference to every resource in that file. By having your resources in archives, you're forcing 25,000 unnecessary entries into the list. It's not going to use all the resources at once, obviously, but it still needs to store names and offsets, which is going to take memory and fill the list (max size depends on the internal implementation).

By using a file system and directories, you allow for two major benefits and one easily-avoidable drawback. That many files in a single folder will slow it down, but splitting them into many folder (I'd start with 8 subfolders with another 8 in each, 500 or so resources per sub-sub-dir) will fix that easily.

The first benefit is that the NTFS filesystem can handle that many files without blinking and arrange them nicely, to fill disk space and the allocation table in the best possible way. In addition, when files are in the file system, Morrowind doesn't need to know about them ahead of time. If a file is missing, it will give you an error, but it doesn't have to know where the file is until it's needed, then it goes looking. A bit slower than pulling it from a BSA, but it neatly avoids the size limitation BSAs have.

The second benefit is in compression. BSAs are a very simple binary format, linear. Files come one after another, no thought in their order. This forces any archive program to compress one massive file and since the format is unknown and a mixture of text, binary and image, it's harder to apply special algorithms. By having many small files, the archive program can choose the order to minimize final size, as well as applying delta compression to text and multimedia compression to images. It all depends on your data, but I'd imagine many files will provide a significantly smaller archive.
User avatar
claire ley
 
Posts: 3454
Joined: Fri Aug 04, 2006 7:48 pm

Post » Mon Mar 14, 2011 8:47 pm

Thank you for a great explanation... it makes perfect sense. It seems that I might be better off not archiving to a bsa with such a large number of files. Thankfully, I do have many subdirectories in my mod and not all in one folder. All the data uncompressed is around 3 gigs! But with 7zip I was able to package them into a much smaller file around 400mb. I haven't tried putting the bsa into 7z but from what you are saying I gather it will be much larger. I really wanted to have all the files neatly packed into 1 or a few bsa's, but I guess it's not the best idea in this situation. At least I can use Wrye Mash for installing the beast and managing the files that way (so I can see what's been overwritten, and for making uninstallation easier). It just takes FOREVER because of it's size.
User avatar
Lori Joe
 
Posts: 3539
Joined: Tue Jun 20, 2006 6:10 am

Post » Mon Mar 14, 2011 11:20 pm

Great... now I'm trying to unpack the bsa and I'm getting an "invalid file offset" error for one of the textures, and the operation stops. This could be why the bsa's aren't working in the first place. I don't understand the offsets and hashes very well.
User avatar
Jeffrey Lawson
 
Posts: 3485
Joined: Tue Oct 16, 2007 5:36 pm

Post » Mon Mar 14, 2011 1:05 pm

Ah. I assume you're using Ghostwheel's BSA Pack? Or Argent's package of it in BSA Browser? If so there're couple of other BSA tools I know of, maybe they can work:
http://planetelderscrolls.gamespy.com/View.php?view=Utilities.Detail&id=27
http://www.tesnexus.com/downloads/file.php?id=12189
Crosses fingers.
User avatar
Fam Mughal
 
Posts: 3468
Joined: Sat May 26, 2007 3:18 am

Post » Tue Mar 15, 2011 3:02 am

Ah. I assume you're using Ghostwheel's BSA Pack? Or Argent's package of it in BSA Browser? If so there're couple of other BSA tools I know of, maybe they can work:
http://planetelderscrolls.gamespy.com/View.php?view=Utilities.Detail&id=27
http://www.tesnexus.com/downloads/file.php?id=12189
Crosses fingers.


Sweet, Timeslip's tool worked! That has saved me a lot of time! Thank you very much for that. I was using Ghostweel's bsapack from the command line. I preferred using that because it tells you what's going on and it seems like when using BSA Browser everything just happens in the background. But Timeslip's unpacker seemed not to care about the error I got with Ghostweel's.
User avatar
Luis Longoria
 
Posts: 3323
Joined: Fri Sep 07, 2007 1:21 am

Post » Tue Mar 15, 2011 3:09 am

Sweet, Timeslip's tool worked! That has saved me a lot of time! Thank you very much for that. I was using Ghostweel's bsapack from the command line. I preferred using that because it tells you what's going on and it seems like when using BSA Browser everything just happens in the background. But Timeslip's unpacker seemed not to care about the error I got with Ghostweel's.
Well that's a relief. I kind of thought, with that error, you were screwed there. Good old Timeslip!
User avatar
Emily Martell
 
Posts: 3469
Joined: Sun Dec 03, 2006 7:41 am


Return to III - Morrowind