BAG file in Brian Lara International Cricket 2005

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
invisible
Junior Member
Junior Member
Posts: 4
Joined: 2005-07-11, 19:01 UTC

BAG file in Brian Lara International Cricket 2005

Post by *invisible »

Can anyone tell how to edit the *.BAG files in brian lara International cricket 2005 demo?
I tried to open the *.bag files using game extractor,total commander,multiex commander etc.. but none of them were able to read the *.bag files.SO kindly help how to extract the files from the *.bag archive.

Link for the game ->

http://www.codemasters.co.uk/brianlara/index.php

Thanks for the help.
Here are sample files

http://www.megaupload.com/?d=18PGDLCX
http://www.megaupload.com/?d=183G5JHX

this is what i get in game extractor
Image: http://img300.imageshack.us/img300/4422/18hr.jpg
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Can you change the link to http://rapidshare.de/ ?

To wait 40 seconds before download is a pain in the a**.

BTW the *.bag is no archive at all. It's a file with plain text inside and it looks like a kind of database. So your game should be able to open the file.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
invisible
Junior Member
Junior Member
Posts: 4
Joined: 2005-07-11, 19:01 UTC

Post by *invisible »

No its an archive file.It was the same format which was used some 'Empire earth dune' (donno the correct name) game.This is what i could find for BAG archive file

BAG ARCHIVE FILE FORMAT V1.1
by Jeff Connelly

The main goal of bag archives is to provide a simple and efficant way to
combine many files into one. For that reason, it is extreamly simple.

The header is at the beginning of the file:
OFFSET Count TYPE Description
0000h 3 char ID='BAG'
0003h 2 char Version, ID='11'

There is one file block for each file:
OFFSET Count TYPE Description
0000h 1 dword File length in bytes
0004h 1 byte Filename length
????h ? char Filename
????h ? char File contents

At the very end of the file is:
OFFSET Count TYPE Description
0000h 1 char EOF marker, ID=1A

A file length of zero in a file block indicates a special file that will be
used as a description. Directorys are also stored in the filename field:
Filename='> dirname' means change current directory to 'dirname'.
For example,
Filename='> JEFF'
Filename='> COMPUTER'
Filename='> BAG'
Would make the directory be JEFF\COMPUTER\BAG. Files are put in the current
directory.

The files contents is not always raw data, it can be compressed. A
four-byte
signature can specifiy the compression scheme:
---- Compression ----
LZW LZW encoded (note extra space at end)
RLEn RLE method N (1 to 4) encoded
HUFF Huffman encoded
LZHF LZHUF encoded (LZSS + Arithmetic) (Note - the authors of LZHUF to
not allow using is for any commicial purpose)
LZAR LZARI encoded (LZSS + Huffman)
WCOD Word coded -- text only
If no signature is found it is assumed to be raw data.

The word coding compression is as follows:
* Initalize dictionary (max. size FFFF)
* Loop until end-of-file
* Read a space-delimited word from the input stream
* Search for the word in the dictionary
* If it is not there, add it to the first free space and output location
of where in the dictionary the word was added as a 16-bit integer.
* If it is there, output the location of where it is as a 16-bit
integer.
* Write dictionary at end of file. Each word is null-terminated, whole
dictionary is double-null terminated.
This means that each word will be encoded as 2 bytes.

The last character is an end-of-file character to insure the whole file was
recived when transfering this archive.
invisible
Junior Member
Junior Member
Posts: 4
Joined: 2005-07-11, 19:01 UTC

Post by *invisible »

After a lot of waiting i couldn't resist myself in making my own BAG viewer.ANd thanks to all those who replied.I appreciate it.
If anyone wants the BAG viewer which supports only uncompressed bag files, I will post it

Image: http://img339.imageshack.us/img339/5885/12su.jpg
Post Reply