biffing and overriding
#1
Posted 13 June 2003 - 12:42 PM
After a clean install of bg2, tob + patch, I'd like to lump my override directory into a biff, to keep things a little cleaner, so I can see whats going on easier.
My question is, when using --make-biff, the new biff file is placed in the \data directory - how does this affect file precedence?
Is it possible to put the new biff in the override directory, to ensure it's used instead of any files in the \data directory?
When I move the biff into override by hand, weidu gives chiten.key errors.
What about if I have separate files in the override directory, would these override a biff placed in the override directory?
I guess my question boils down to: how can I put the default override directory in a new biff file, which is used in preference to any exising files, and that can be overriden by any files later added.
Hope that makes sense :-)
Cheers
/igi
ps. sorry if this isnt 100% relevant to weidu, but I am using weidu to create the biff :-)
Visit the IESDP
#2
Posted 13 June 2003 - 01:47 PM
For every file that you added from your override, there will now be two references to that file when you view any tree in NI. (For instance, if you pack up the patched ToB override, there will be two references of 25stweap.2da, two references of abclasrq.2da, etc.)
I think Wes would have to add support for overwriting of files within .bif's in order for --make-biff to work correctly for files that already exist in biffs.
(e.g. He would point the file reference that already exists in the chitin.key to the new bif.)
WinBiff does this, but it's buggy. If you create a new bif using WinBiff, it will prompt you for each file that it recognizes as already being in game. However, it doesn't match the files caselessly. (e.g. It thinks 25STWEAP.2DA and 25StWeap.2da are different because of their different cases.)
So, after you add the biff using WinBiff, you end up with a half-ass job. Some of the files are replaced correctly, while others still have two references in the .key file that are shown.
So, you'll either have to wait until Wes decides that this is a pressing issue (if you ask him nicely, he might do it ), or until Theo decides to fix WinBiff to match files caselessly.
#3
Posted 13 June 2003 - 02:09 PM
The great wolf Fenrir gapes ever at the dwelling of the gods.
#4
Posted 13 June 2003 - 02:12 PM
(I think there's a program called Lupas or something I used a while back to do some batch renaming.)
However, you will also have to hop on #teambg on irc.teambg.net to get WinBiff. The TBG servers are currently down.
#5
Posted 13 June 2003 - 02:18 PM
If you find a renamer and find WinBiff, before you create the bif make sure you open up ar0072.tis in the override and remove the 24 byte header from the top of the file.
(You can use any hex editor to do this.)
If you don't, I'm pretty sure the .tis will fail to load after it's been biffed up.
{edit: Nevermind, WinBiff doesn't pack up .tis files very well at all. I tried adding the .tis with and without the header and both resulted in "GUI map screens" when I moved to ar0072. So, if I were you, I'd rename everything to uppercase, move ar0072.tis out of the override temporarily, make the new .bif, save the key and then move ar0072.tis back into the override.}
#7
Posted 16 June 2003 - 01:27 PM
A bit too much for one simple patch, but probably good for bigger modifications and/or patches.
#8 -Idobek-
Posted 17 June 2003 - 05:17 AM
I have tried/am trying the batch file idea. Problems are (in no particular order):
1. WeiDU doesn't unpack/repack tis files so well so biffs containing them need to be avoided (one reason for the question).
2. Not all biff files in BG2 are stored in in the data folder, but WeiDU repacks there regardless (a consistancy issue mainly, plus problems with less than full install) (another reason for the question).
3. In order to make sure that no files disappear during the transfer from override to biff you really need to take it a biff at a time (primary reason for the question), do all biffs at once (problem 1. comes into play as well as a whole host of others), or reorganise the biffs by file type (problem 1. again plus problem 2., compatibily with mods problems- ToB detection checks - although this is easily worked around).
However, if WieDU can extract from a specific biff then progress can be made, taking things a biff at a time avoiding biffs with tis files.
#9
Posted 18 June 2003 - 06:14 AM
Can't weidu patch the ar0072.tis? Give an offset and a value, and weidu does the rest.
Maybe before extracting, weidu should make lists of all the content of all biffs. Isn't there an example in the weidu package, for dialogues? These lists could be used for the automatic extraction AND repacking.
It is no problem that everything is being put into the data folder, as long as the new biffs' names match those iin that one 2DA, where the caching is organized, arealink.2da or another one.
@Idobek: Keep batching(i mean batch file writing), such a batch file would be good for various tasks, and should be included into the weidu package, besides an empty chitin.key.
#10 -Idobek-
Posted 18 June 2003 - 07:58 AM
--biff should be the command used to list the contents of a specific biff but I can't make it do a damned thing! (Possible bug?) However with the combined power of WinBiff, WeiDU and DOS I'm getting around the individual program limitations (I'm extracting files via a tp2 then running the batch from there). It won't be universal though - I'm sticking to replacing the files in the biffs with their duplicates in the override (keeping the same biffs) not adding anything new, and their will be separate batchs for BG1 & BG2 (no surprise there). I'd like to complately restructure the biffs & the chitin.key but I think sticking with the original file index is better for compatibilty with mods. Also the larger batch file can eaily broken down in to smaller files for individual biffs.
The code is a bit clumsy but also easily understandable (it has to be if I'm writing it). I just hope it doesn't freeze peoples' computers - there is a lost of disk activity. Oh - another reason for avoiding extraction of tis files and directory restructuring - at one point (the switch over for tp2 to batch file) all biffs being updated are sitting extracted in their own personal folders - the potential HD eater.
I'll keep you posted. Any advice/warnings is more then welcome.
#11
Posted 20 June 2003 - 01:51 AM
No, WeiDU is just picky about how you specify the biff. You *must* use the filenames from CHITIN.KEY (those from "weidu --list-biffs"): filenames not in CHITIN.KEY will not work. For example, "weidu --biff data\dialog.bif" will work from any directory, but "weidu --biff .\test.bif" will not work even if there is a test.bif in the local directory. It ought to give an error in this case, but it fails silently. WeiDU wasn't meant to be a generic BIFF tool.--biff should be the command used to list the contents of a specific biff but I can't make it do a damned thing! (Possible bug?)
CHITIN.KEY is a maintenance nightmare, and a poor solution to the problem of having BIFFs scattered across CDs. The designers dropped the ball a bit on this one.
#12
Posted 20 June 2003 - 06:18 AM
While doing this, you might also ask him about a feature for the automatic patching of tis files while being biffed. This is probably useful for bg1, or bg2 or iwd1/2 and/or ps:t, i don't know which one of those have this offset problem.
There is another 2da which may cause problems when restructuring the biff content. I guess it is arealins.2da.
Oh, it is just for bg2.
I won't agree with you, Rassadihn. Maybe the chitin.key is annoying, and the loss of it may result in a complete reinstall of the game and all mods(okay, backup is an old idea), but it is a necessary and useful file. Maybe its structure is not perfect, but the maintenance of files with some thousand independent data sets is always a bit hard.
Maybe this thread leads to some sort of optimization of the usage of this file.
#13 -Idobek-
Posted 25 June 2003 - 01:11 PM
@WelloBanir: I'll try to start keeping a record of any extraction problems and if there turns out to be a pattern I'll pass it on. However, I've found a neat way of avoiding the areaxxxx.bif files (where most of the tis files are kept) so if there are problems if won't affect the program. Also, it seems to me that very few mods and patches actually change a lot of tis, wed, mos or area bmp files. The really big mods do, but they tend not to use the override and this batch isn't really intended for them anyway. So my thought is that to avoided screwing around unnecessarily with biffs I'm unlikely going to change, I'll just ignore them. It won't be hard to put them back in the picture if required.
Anyway things are progressing, even if in a bit of a one step forward two steps back kind of way. I might look at releasing batch files to repack specific biffs (items for example) that are used a lot, as well as a big all purpose one. The individual ones would be easy to do I think, especially if I just send out the required file fragments and file lists instead of generating them in the batch.
#14
Posted 27 June 2003 - 11:38 AM
idobek@yahoo.co.uk
Subject: ReBiffer Testing
I need testers for all IE games and, this being a batch file, all Windows platforms (I have XP Pro).
#15
Posted 03 July 2003 - 03:13 PM
Here's a run down of what if does:
1. Makes a list of all the biffs in the data directory (the user can provide a list if they wish).
2. Makes a list of the files in each biff and compares that against the Override directory.
3. If a match is found it extracts the files from the biffs into a directory named after the biff and moves the matching files from the Override directory into the new directory (any replaced files are backed up).
4. Deletes the old biff.
Steps 2-4 are done biff by biff the batch then pauses and asks you to run NI's 'Keyfile cleanup' tool.
5. Makes new biffs and places them in the data directory.
6. Creates UnInstaller.
Any files specified in LEAVE_OVERRIDE.TXT are ignored by the program. You can add to this list at your pleasure.
Anyone have any thoughts or requests?
Can anyone tell me if the TITLE command works in Win9x?