Jump to content


Photo

CBF2BIF


  • Please log in to reply
6 replies to this topic

#1 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 18 January 2011 - 01:44 PM

Posted Image

File Name: CBF2BIF
File Submitter: fearless
File Submitted: 18 Jan 2011
File Category: IE Modding Tools

CBF2BIF v1.0.0 (18.01.2011)

CBF2BIF is a utility to uncompress infinity engine bif format files. These file types are commonly found in the following games:

- Baldurs Gate
- Baldurs Gate: Tales of The Sword Coast
- Baldurs Gate II: Shadows of Amn
- Baldurs Gate II: Throne of Bhaal
- Icewind Dale
- Icewind Dale: Trials of the Luremaster
- Icewind Dale: Heart of Winter
- Icewind Dale II
- Planescape Torment


Features:

- Decompression of BIF V1.0 and BIFC V1.0 compressed BIF file formats.
- Supports * and ? wildcards for batch operations.
- Optionally can specify filename to decompress a single specified file to (wildcards are not supported in this operation)
- Skips files that are not bif files or are already uncompressed.


Usage:	CBF2BIF [/?]
		[path]infilename
		[path]infilename [[path]outfilename]
                        
                        
  /?           	Displays this help
                        
		[path]infilename is name of a valid CBF/BIF file to uncompress to a standard bif file. Supports the use of wildcards * and ? for batch operations. 
		See note below for details on how files are saved if you use this feature 
	
		[path]outfilename (optional) is name of the file to save the uncompressed bif file to. Cannot use wildcards if this is used.                        


Notes:

If destination filename is not specified, the output is to the original input filename provided, overwritting the original file data, except in the case of CBF/BIF V1.0 files, in which case the output is to the filename which is stored internally in the CBF/BIF container. CBF2BIF supports decompression of BIF V1.0 and BIFC V1.0 files.

Click here to download this file

fearless

 

CM690 II Case, Corsair HX1000 PSU, Asus Maximus V Gene, Intel i5-3750K @ 4.2Ghz, Corsair 8GB DDR3, Asus DirectCU GTX-670, Samsung 256GB SSD, WD Caviar Black 2TB HDD x2

 

https://github.com/mrfearless


#2 kamuizin

kamuizin
  • Member
  • 12 posts

Posted 28 June 2012 - 11:27 AM

Hi, every time i try to use cbf2bif.exe the program says:

"CBF2BIF is a console program which needs to be run from a command prompt.
For detailed help on the CBF2BIF options, specifi cbf2bif /? at the prompt"

I'm not good with these things, but every time i open the command prompt and try to scribe what is above (cbf2bif /?) i get nothing.

Can you help me to use the program? Cos i'm in need to extract the bif files from the AR0511.cbf and AR0501.cbf to the cache directory.

#3 Sam.

Sam.
  • Administrator
  • 1337 posts

Posted 28 June 2012 - 12:39 PM

Hi, every time i try to use cbf2bif.exe the program says:

"CBF2BIF is a console program which needs to be run from a command prompt.
For detailed help on the CBF2BIF options, specifi cbf2bif /? at the prompt"

I'm not good with these things, but every time i open the command prompt and try to scribe what is above (cbf2bif /?) i get nothing.

Can you help me to use the program? Cos i'm in need to extract the bif files from the AR0511.cbf and AR0501.cbf to the cache directory.

The easiest way to use the command line is by use of a .bat file. Attached below is a .bat file that will display the help message, and then includes three examples of how to use the program. Lines that start with "::" are comments. Put the .bat file in the same directory as cbf2bif.exe, modify it to suit your needs, and then run it.

Attached File  Convert cbf2bif.rar   352bytes   312 downloads

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#4 kamuizin

kamuizin
  • Member
  • 12 posts

Posted 28 June 2012 - 01:43 PM

Real grateful for the fast reply, take me a while to figure that i need to edit the .bat file you gave me XD, i don't know much about code.

I edited the bat files at your instruction, however no matter if .bat comand was:

cbf2bif.exe /?
OR
cbf2bif.exe AR0501.cbf NewBif.bif

I always get the same error (cbf2bif.exe /?):

[i] Processing command line: cbf2bif.exe *.cbf

[i] Processing file: AR0501.cbf

[!] ERROR: Filename in <CBF> BIF_ Container does not end with a null bite.

[i] Processing file: AR0511.cbf

[!] ERROR: Filename in <CBF> BIF_ Container does not end with a null bite.


OR (cbf2bif.exe AR0501.cbf NewBif.bif)

[i] Processing command line: cbf2bif.exe *.cbf

[i] Processing file: AR0501.cbf

[!] ERROR: Filename in <CBF> BIF_ Container does not end with a null bite.


By the way i didn't try the extraction in the game directory, i made a copy of the .cbf files on another directory just to play safe.

Edited by kamuizin, 28 June 2012 - 01:53 PM.


#5 Sam.

Sam.
  • Administrator
  • 1337 posts

Posted 28 June 2012 - 06:48 PM

[!] ERROR: Filename in <CBF> BIF_ Container does not end with a null bite.

It looks to me like your .cbf files might be corrupted. Which version of which game are these files for?

"Ok, I've just about had my FILL of riddle asking, quest assigning, insult throwing, pun hurling, hostage taking, iron mongering, smart-arsed fools, freaks, and felons that continually test my will, mettle, strength, intelligence, and most of all, patience! If you've got a straight answer ANYWHERE in that bent little head of yours, I want to hear it pretty damn quick or I'm going to take a large blunt object roughly the size of Elminster AND his hat, and stuff it lengthwise into a crevice of your being so seldom seen that even the denizens of the nine hells themselves wouldn't touch it with a twenty-foot rusty halberd! Have I MADE myself perfectly CLEAR?!"

--<CHARNAME> to Portalbendarwinden

--------------------

post-10485-0-15080600-1348188745.jpg
___________Old pen and paper modules of the 70s and 80s.___________

CA Forums CA Homepage


#6 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 29 June 2012 - 05:03 AM

Hi kamuizin, could you mail me one of the files if possible so i can check it. My program does a check on the last byte of the ascii filename as defined in the BIF file format, normally it is a null, the first part defines the length of the containers filename, in the example images (viewing a cbf with a hex editor) the dword shows 0Bh, which is 11 bytes. Counting 11 bytes after this dword we get the filename including the null byte (also shown in hex editor image example).

bif_filelength_dword.png

bif_filename_ascii.png

Might be the file is not a cbf, but is just named that, or as sam says it could be corrupted. By checking for the filelength null byte we dont accidentally go ahead and uncompress stuff that might not actually be a compressed bif (probably would fail and fall out anyhow - but the check is there just to be sure)

fearless

 

CM690 II Case, Corsair HX1000 PSU, Asus Maximus V Gene, Intel i5-3750K @ 4.2Ghz, Corsair 8GB DDR3, Asus DirectCU GTX-670, Samsung 256GB SSD, WD Caviar Black 2TB HDD x2

 

https://github.com/mrfearless


#7 kamuizin

kamuizin
  • Member
  • 12 posts

Posted 29 June 2012 - 12:16 PM

Hi agin ppl, i resolved my problem just by direct download the individual .bif files on the internet, for what i saw on internet there so much ppl with the same problems with those .bif files (the AR0501 and AR0511) that ppl already uploaded copies of these .bif files for download.

Anyway i'm really grateful for the care and time spend with my problem. I ll try to figure out the ways to use the .exe for the future as it can help me in many other ways (i have crashes on the game at 1/2 of times i get to a new area of the game, which probally means some difficults with the override directory).

To answer your question Sam, my version of the game is the 2 CDs, with ThunderPeel2001 guide of improved install, as a consequence i don't pull my planescape data from the CD anymore, but from the CDALL folder that the guide instruct me to create by changing the .ini.

And Fearless, if you yet want a copy of the file for the sake of knowledge i can email or upload it for you.