Will you create a Tool for compressing XML strings to BIN?Rick wrote:Nearly the same as FC2. I don't know enough about modelling to make import/export tools, someone will have to take my work and do something with it.CMihai wrote:Anything new regarding Geometry Rick?
The Forum is up for sale: XeNTaX Forum looking for new owner
Far Cry 3 .FAT decryption
- abdullayev007
- beginner
- Posts: 21
- Joined: Thu Aug 02, 2012 12:02 am
- Has thanked: 2 times
- Been thanked: 1 time
Re: Far Cry 3 .FAT decryption
- TheDude
- mega-veteran

- Posts: 239
- Joined: Sun Mar 20, 2011 7:35 pm
- Has thanked: 29 times
- Been thanked: 59 times
- Contact:
Re: Far Cry 3 models and junk
Edit: Nevermind, the models have already been dumped on the Interwebs. ![rolleyes [roll]](./images/smilies/icon_rolleyes.gif)
Re: Far Cry 3 .FAT decryption
Any chance you could have a look at the Xbox xml format, some xmls are plain txt & others seem to be garbled, I thought they maybe zlib compressed but no 
We can use some of the PC files so not all is lost
the file in the attached files the PC version works on the Xbox, I removed the Memory limits from items.
Batch I put together to extract Common.fat just drag the folder containing the Comman.fat/dat onto the batch or double click it. (searches through folders for the files, keeps my work space clean)
We can use some of the PC files so not all is lost
Batch I put together to extract Common.fat just drag the folder containing the Comman.fat/dat onto the batch or double click it. (searches through folders for the files, keeps my work space clean)
Code: Select all
@echo off & Title Common.dat Unpacker
:: Set File & Folder names
:: Checks through the folders for the files.
for /f "delims=" %%A in ('dir /b /S "common.fat"') do Set "Input=%%A"
if "%Input%"=="%Input:~0,-11%\common.fat" Set "Filename=common"
Set "Output=%homedrive%\Unpacked"
:: Echo output information
Echo:
Echo Unpacking = %Filename%
Echo Temp Location = %Output%
Echo Final Directory = "Common Unpacked"
Echo:
Ping -n 3 127.0.0.1 >Nul
:: Do the work :-D
for /f "delims=" %%B in ('dir /b /S "Gibbed.Dunia2.Unpack.exe"') do "%%B" -v -o "%Input%" "%Output%"
Move "%Output%" "%CD%\"
Ren "Unpacked" "Common Unpacked"
CLS
Echo:
Echo Done...
Echo:
Ping -n 3 127.0.0.1 >Nul
Explorer "%CD%\Common Unpacked"
Exit
You do not have the required permissions to view the files attached to this post.
- lostprophet
- mega-veteran

- Posts: 202
- Joined: Wed Apr 07, 2010 7:38 pm
- Has thanked: 35 times
- Been thanked: 7 times
Re: Far Cry 3 .FAT decryption
The text file was always editable (18.000 lines of pure joy in 1 .xml file), the only problem is, that the game doesn't use it, since it (probably) has to be repacked to a .bin file.qabRieL wrote:Is it possible to both view and edit the text files on PC yet?
Hungarian translator | Previous translations: http://lostprophet.hu
-
rengareng
- veteran
- Posts: 131
- Joined: Fri Feb 18, 2011 10:23 am
- Has thanked: 7 times
- Been thanked: 49 times
Re: Far Cry 3 .FAT decryption
Here the 010Editor template that parses oasisstrings_compressed.bin file. Run this template on the oasisstrings_compressed.bin file.
LZO compression is used in the cmpData places in the file.(lzo1x)
THIS TEMPLATE DOES NOT DECOMPRESS ANYTHING!
It is just for to show structure of file.
Code: Select all
int stringTableCount;
struct stringTable{
int unknown;
int sectorCount;
struct section{
int sectorHash;//crc32 of sector name
int stringCount;
struct{
int id; //line id
int sec; //same as sectorHash
int _enum; //crc32 hash of enum attribute in string
int pack; //crc32 Hash of 'Main'
}lines[stringCount]<optimize=false>;
int cmpPartCount; //Number of lzo compressed parts
struct{
int unknown;
int cs;//compressed size of data
int ds; //decompressed size of data
ubyte cmpData[cs]; //These bytes are lzo compressed (lzo1x)
}parts[cmpPartCount]<optimize=false>;
}sectors[sectorCount]<optimize=false>;
}all[stringTableCount]<optimize=false>;

Here is the tool from General_Problem (ubisoft far cry 3 forums)
General_Problem wrote: JGR.Dunia2.ConvertXML version 1.0
I have completed my first version of my tool to de-compress and re-compress the oasisstrings_compressed.bin file. This tool also has the ability to use oasisstrings.xml as a lookup dictionary for de-compressing the section and enum names into human-readable text rather than hexadecimal when that file is in the same folder as the oassistrings_compressed.bin file you are decompressing.
I have also trimmed down the source code to only those sections of the Dunia2 source which were necessary to support the tool as a standalone application.
Get the executable here
Get the source code here
The tool was written based on Rick's original Gibbed.Dunia2.ConvertXML application, but I added options in order to handle this special file as well as a new FileFormats class, OasisStringsCompressedFile, to handle the conversion to and from XML (as well as the de-/compression).
Here is a brief overview of the steps to follow in order to modify game text and put your changes into the game utilizing this tool:
1) Put the files for this tool in a new tools folder (or you can put them in your existing Dunia2 folder, but it will overwrite
some files, so MAKE A BACKUP if you do this).
2) Use the JGR.Dunia2.ConvertToXML.exe tool to convert your oasisstrings_compressed.bin to xml. (Note that the output will have
the text "_converted" appended the same way the original Dunia2 tools do).
3) Edit your desired text in the xml file output from step 2
4) Use JGR.Dunia2.ConvertToXML.exe again to convert your xml file back to oasisstrings_compressed.bin. (Note that the output will
now also have "_compressed_converted" appended to the name).
5) Rename your final output file back to "oasisstrings_compressed.bin"
6) Don't forget to put the new "oasisstrings_compressed.bin" file into your patch under the .\languages\*your local language*\
folder, then re-pack your patch to try it in the game.
7) Remember that unless you translate your modified text and perform these tasks for all supported language files, your mod will
likely only function properly when executed from versions that support your own language. You could potentially replace all
of the oasisstrings_compressed.bin files with your newly modified file in your patch to force all users to see your language.
Please read the README.txt file in the downloads for more information.
Cheers!
Acknowledgements:
- Rick for creating the original tools that were completely essential
- Special thanks to "tom.solo", "sfaunl", and "celikeins" for your assistance, input, and dedictaion to the virtual islands.
-
soulslayerzx
- beginner
- Posts: 39
- Joined: Tue Aug 14, 2012 2:46 am
Re: Far Cry 3 .FAT decryption
So far, I believe this dunia thing can extract textures, sounds,
I was wondering if there was a way to extract the models without ripping them unrigged. I hate rigging.
I was wondering if there was a way to extract the models without ripping them unrigged. I hate rigging.
