Jump to content


Photo

Convert *.cbf to *.bif


  • Please log in to reply
12 replies to this topic

#1 Mad Mate

Mad Mate
  • Member
  • 191 posts

Posted 17 January 2011 - 04:01 PM

Just one short question.

Is there simple way to convert (unpack) CBF to BIF?

Thanx!

#2 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 17 January 2011 - 05:55 PM

You could try WinBiff: http://www.gameapps.com/winbiff.htm

See if that works. Or possibly using weidu? dont know to be honest, I'm sure other regulars here on SHS would know if weidu can handle that. Are you looking to extract just one file or just have the cbf uncompressed to bif for some other reason?

If there is a particular need/requirement to convert cbf 2 bif, and there isnt a tool out there, i can probably write one. Let me know if the above solutions dont work, and if not, i can put something together.

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


#3 Mad Mate

Mad Mate
  • Member
  • 191 posts

Posted 18 January 2011 - 07:52 AM

Thank you for replying, fearless.

Here is the problem...

I'm playing Planescape with my 2CD version of game and had few very different crashes in game. All of crashes were solved by copying AR*.bif (of the area where I was at the moment of crash) from 4CD disks in my cache dir. My game (don't know why) fails to extract them properly ingame.

Difference between versions is that 4CD version has *.bif, and 2CD and GOG version has compressed *.cbf.

Not everyone has 4CD version, so it would be easier to solve this problem with manualy unpacking cbf file when needed.
I tried Winbiff, but it works only with 4CD version.
I don't understand how Weidu works (player, not modder :(). Maybe if you can tell me what should I write in command line to unpack cbf to bif. I didn't find anything about cbf in weidu readme.

Thank you for your time.

#4 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 18 January 2011 - 07:57 AM

I'm pretty sure that the 2CD version of the game works correctly for 99% of people; perhaps your CDs are scratched?

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#5 Mad Mate

Mad Mate
  • Member
  • 191 posts

Posted 18 January 2011 - 08:07 AM

Well, maybe it is scratched cd, but I did full install using this guide, so all needed cbf files are on the HD.

I could check it easily by unpacking my cbf files on HD or CDs and comparing it to biff file on 4CD version, but I don't know how to do it. That is the reason why I'm asking this.

#6 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 18 January 2011 - 08:18 AM

Have a utility i put together last night - cbf2bif. Written in assembler for Win32 using masm32 libraries and zlib. Just doing some testing on it. Hopefully ill post up tonight.

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 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 18 January 2011 - 08:22 AM

Have a utility i put together last night - cbf2bif. Written in assembler for Win32 using masm32 libraries and zlib. Just doing some testing on it. Hopefully ill post up tonight.

Saves me the hassle of adding --cbf-to-bif to WeiDU (the functionality is there but not directly callable). Why would you program in ASM and not an high level language, though?

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#8 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 18 January 2011 - 08:36 AM

I can program with Visual Foxpro, but any program i create with that language would require lot of dependancies to be installed with the tool (ocx, dll etc) - that are just bloat tbh for what is required.

The cbf2bif is just a console program that doesnt require much - i have some of the functions already created from similar projects i had on the go a few years ago, and from a newer program i'm in the middle of creating now, called BAMTool.

I had started an IE.lib library for use with all infinity engine files few years ago, that could be compiled into other higher level languages, but lost interest/got distracted by other interest/projects/real life and only recently got back to baldurs gate stuff and programming as well.

Also its a refresher for me, both programming wise, and re-understanding some of the Infinity Engine file formats.

At the moment the cbf2bif.exe is stand alone and approx 36k in size, so shouldn't take up much space or bandwidth.

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


#9 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 18 January 2011 - 01:06 PM

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)


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.

If you wish to prevent accidentally overwritting files, specify both source input filename and destination output filename. The internal filename in the CBF/BIF container files will be ignored in this case.

Attached Files


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


#10 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 18 January 2011 - 01:24 PM

I would suggest you upload it properly instead (Downloads->Upload File->Select "IE Modding Tools" and onward from there). Maybe this link will take you directly to the "select category" step.

#11 Mad Mate

Mad Mate
  • Member
  • 191 posts

Posted 18 January 2011 - 01:45 PM

Thank you fearless!!!!

I just tried your program and unpacked 2 files (AR0511.cbf & AR0501.cbf) that my game couldn't properly unpack. I compared produced bifs with ones from 4CD disks and they are identical.

So that mean your program works and my 2CDs are OK. Why game crashed at these areas, I don't know. Maybe mods caused it or memory leak or...
But it doesn't matter now, 'cause I can extract bifs from cbfs. :-))

Thank you!

P.S.
I can now ditch 4CD version that I downloaded from internet for this reason and use just my original 2CDs. :-D

#12 fearless

fearless
  • Member
  • 79 posts

Donator

Posted 18 January 2011 - 01:49 PM

@Wisp - Thanks for that link, i've submitted my file now :D

@Mad Mate - Your welcome, glad i could help.

Best regards

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


#13 enderandrew

enderandrew
  • Member
  • 166 posts

Posted 28 September 2012 - 08:12 PM

Sorry for the necropost, but I seem to be running into the same problem with the 2CD version. Unfortunately, I don't have files to grab from the 4CD version.
Nihilism makes me smile.