PC GameSource Blog

Tag: bethesda

Oblivion Tip: Make Bash Installers (BAIN) Properly Handle Default Data Files

by on Aug.31, 2010, under Uncategorized

An in-game screenshot showing Oblivion s user ...
Image via Wikipedia

I know, you probably read the title and thought, “Huh?”

For those of you who read my previous Oblivion Tip, I hinted at creating a Bash Installer package for your default game files, so that ’s conflict detection will help notify you and preserve your game files should you wish to overwrite them.

I took this a step further, and created a set of BAIN packages which allow me to completely customize my experience without harming any original files. The packages offer multiple versions of the default BSAs (compressed, uncompressed, and with the files packed in), original or cleaned versions of the official , etc.

But I noticed that, even after installing the package, BAIN could not detect the fact that the default files even existed (it would always show Oblivion – Meshes. as ‘Missing’, for example, even though it was there and matched exactly the file in the BAIN package.

This is due to the list of default files stored in ‘bush.py’ in the variable bethDataFiles. BAIN is using this variable as a skip-list so that it does not calculate CRCs or check dates for any default files. My goal was to change this behavior.

This variable, bethDataFiles, is not necessarily only used for Bash Installers, so I did not want to edit it here. Instead, I opened up the file ‘bosh.py’ and found that it is what is actually performing the CRC checks and skipping the default files.

There are two places where I commented out references to this variable, and the result is that BAIN treats all files in the Data directory equally… it now calculates CRCs for the default .bsas (which takes a little bit of time) and properly shows matches for my installed files that overwrote the default ones.

If you’d like to have this, too, first let me specify that I take no responsibility for what Bash might do to your default Bethesda game files if you perform this tweak. The reason I did it was to use a set of custom Bash Installers I created which contain the default files, among other variations, so I am not in danger of losing anything. If you do not have such a package, make sure you back up ALL of your data files.

Open up ‘bosh.py’ in a text editor. Around line 9721 look for the following:

if not rsDir and sFile.lower() in bethFiles: continue

Change it to:

#if not rsDir and sFile.lower() in bethFiles: continue

Next around line 9935 look for:

elif file in bethFiles:
if not bSkip: skipDirFilesAdd(full)
continue
Change it to:
#elif file in bethFiles:
#if not bSkip: skipDirFilesAdd(full)
#continue
Make NO other changes unless you know what you are doing. Save the file, then you may wish to delete the file ‘bosh.pyc’ if it exists, which is the compiled version of the old script. Python should see the change and recompile it anyway, but deleting the file will ensure it gets recompiled.
Open up Bash, and the Installers tab, and you will notice that it takes a little bit longer, and you may even see some of the default Bethesda filenames on the progress window. That means it worked!
Note: If you should happen to uninstall a package which in turn deleted Oblivion.esm, you’ll get a Stack Trace (error message) from Wrye Bash. Don’t fear–close the error message and install another version of Oblivion.esm and there will be no further issue.

1 Comment :, , , , , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Blogroll

A few highly recommended websites...