Far Cry 2 XML File Decoder v0.4

Started by wobatt, January 18, 2015, 04:25:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wobatt

I've just uploaded the new version 0.4 of my XML file decoder here  :)

This started as a program to translate more of the hashes in the XML produced by the Gibbed tools, but I have also improved the tools created by Gibbed to identify more files an translate hashes more completely, so it is much easier to mod.

Key changes in version 0.4:
  • Fixed bug where it wasn't loading some strings from the dictionary due to case sensitivity
  • Corrects RML tag duplications
  • Changed the way hashes are looked up, resulting in a massive performance improvement
  • Modified Gibbed tools included

Key changes to Gibbed tools:
  • Fixed a bug where converting XML to FCB and back again would cause additional nested <rml> elements to be added
  • Fixed a bug where it was impossible to extract art files from FAT/DAT as the "no art" option defaulted to true
  • Improved binary class definitions (FCB to XML convertions)
  • Improved file lists (unknown file translations)
  • Improved file type detection for unknown files

I've added it to the downloads here at OWG.

PZ


wobatt


aleeque

Wow, nice tool!

Do you think you could decode more words? I think I'm onto something regarding changing weather conditions in FC2. Basically, it goes like this:

Unpack worlds.fat and navigate to this folder: \worlds\world1\generated\. There will be a file called "world1.managers.fcb". Open it with a hex editor and search for the string "Default.StormIntensity.Default." In Far Cry 3, there was also a similar binary file with the exact same tag and the bytes under it are used to control weather! I've even written a detailed guide on how to do it here.

So if you somehow managed to translate this .fcb file into a readable .xml, I believe we would be able to change weather conditions in FC2.

Art Blade

Hello and welcome to OWG, aleeque :)

Nice information there and good luck with it :)

I usually lock weather conditions using the timescale 0 cheat but can't change those conditions.
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

aleeque

Yeah, I set my timescale to 18 (three times faster than normal) so that it gives me some day/night and weather variety.

In Far Cry 3 though, I'm able to control weather entirely which is even better, especially considering how awesome rain looks in that game.

Art Blade

cool. I liked the long nights in FC2. FC3 is laughable by comparison. Is there a way to get longer nights in FC3, too? If, how?

I just skimmed your nexus article. Hehe, so I suppose you're a fan of Ziggy's mod, too  ^-^
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.


PZ

Nice w@&k, aleeque - welcome to the forum  ;)

OWGKID

Quote from: aleeque on February 01, 2015, 05:49:21 PM
there is, actually
http://www.reddit.com/r/farcry/comments/2jpoxx/how_do_i_changemod_the_timescale_in_far_cry_3/

though I set mine to default in FC3.


Cool  :-X Would be nice to mod the timescale to a realistic 24-hour cycle for the ULTIMATE REALISM  :-() :-()
LEGACY

Art Blade

thanks for the link, and a surprisingly nice read going down that thread, too.  :)
[titlebar]Vision without action is a daydream. Action without vision is a nightmare.[/titlebar]What doesn't kill us, makes us weirder.

OWGKID

Quote from: wobatt on January 18, 2015, 04:25:53 PM
I've just uploaded the new version 0.3 of my XML file decoder here  :)

In the XML files produced by the Gibbed extractor, it can convert most hashes into readable names, and translate most BinHex values into numbers and readable text.
It should make modding a bit easier  :-D

I've added it to the downloads here at OWG.

Err, I get an error message called "Error loading MIDAS.DLL" What does that mean?  ???? ????
LEGACY

aleeque

you need to download that .dll. It's some sort of Delphi library.

Hell Diguner

Quote from: aleeque on February 01, 2015, 03:58:50 PM
Wow, nice tool!

Do you think you could decode more words? I think I'm onto something regarding changing weather conditions in FC2. Basically, it goes like this:

Unpack worlds.fat and navigate to this folder: \worlds\world1\generated\. There will be a file called "world1.managers.fcb". Open it with a hex editor and search for the string "Default.StormIntensity.Default." In Far Cry 3, there was also a similar binary file with the exact same tag and the bytes under it are used to control weather! I've even written a detailed guide on how to do it here.

So if you somehow managed to translate this .fcb file into a readable .xml, I believe we would be able to change weather conditions in FC2.
Gibbed's tools can extract the contents of .fcb files. See http://www.openworldgames.org/owg/forums/index.php?topic=3620.0 for something similar to the procedure you'd have to follow.

Then you can run wobatt's tools to further de-mystify the .xml files.
Guests are not allowed to view images in posts, please Register or Login

wobatt

Quote from: aleeque on February 01, 2015, 03:58:50 PM
Wow, nice tool!
Thanks!

Quote from: aleeque on February 01, 2015, 03:58:50 PM
Do you think you could decode more words?
Working on it, I may have something to release soon  :-D

I've downloaded the source code for the Gibbed tools, and I've made a few improvements, like adding support for 8 bit integer type. The names decoded in my program can be put into the binary_classes.xml file in the Gibbed tool so it can decode as it is extracting the files. This is better than my program, as it is MUCH faster.

Quote from: GKID7891 on February 02, 2015, 09:42:52 AM
Err, I get an error message called "Error loading MIDAS.DLL" What does that mean?  ???? ????
Sorry! I missed that dependency  :-[ 

Quote from: aleeque on February 02, 2015, 01:04:22 PM
you need to download that .dll. It's some sort of Delphi library.
It was written in Delphi, which usually does a good job of compiling dependencies into the program itself, so I wasn't aware of this. I will include this DLL in the next release.

OWGKID

Quote
Sorry! I missed that dependency  :-[ 
It was written in Delphi, which usually does a good job of compiling dependencies into the program itself, so I wasn't aware of this. I will include this DLL in the next release.

No problem  ;) :-X
LEGACY

aleeque

Quote from: Hell Diguner on February 02, 2015, 08:28:14 PM
Gibbed's tools can extract the contents of .fcb files. See http://www.openworldgames.org/owg/forums/index.php?topic=3620.0 for something similar to the procedure you'd have to follow.

Then you can run wobatt's tools to further de-mystify the .xml files.
Yeah, that's what I did. Problem is, Wobatt's tool doesn't support all of the Dunia keywords at the moment, so it couldn't decipher world1.managers_converted.xml.

wobatt

Just uploaded version 0.4 of my tools, plus a modified version of the Gibbed tools that can extract more  >:D

OWGKID

Quote from: wobatt on January 18, 2015, 04:25:53 PM
I've just uploaded the new version 0.4 of my XML file decoder here  :)

This started as a program to translate more of the hashes in the XML produced by the Gibbed tools, but I have also improved the tools created by Gibbed to identify more files an translate hashes more completely, so it is much easier to mod.

Key changes in version 0.4:
  • Fixed bug where it wasn't loading some strings from the dictionary due to case sensitivity
  • Corrects RML tag duplications
  • Changed the way hashes are looked up, resulting in a massive performance improvement
  • Modified Gibbed tools included

Key changes to Gibbed tools:
  • Fixed a bug where converting XML to FCB and back again would cause additional nested <rml> elements to be added
  • Fixed a bug where it was impossible to extract art files from FAT/DAT as the "no art" option defaulted to true
  • Improved binary class definitions (FCB to XML convertions)
  • Improved file lists (unknown file translations)
  • Improved file type detection for unknown files

I've added it to the downloads here at OWG.

1+  :-X :-D
LEGACY

PZ


wobatt

Thanks  :-D

I've just counted up the differences between the original Gibbed tools and my modified version.






OriginalModified
Files identified:88284 (55%)155514 (97%)
Object names:15622120
Value names:4992493

Now to w@&k on shadersobj.fat   :D
Damn colliding hashes  :angry-new:

OWGKID



Could you make the FC3 tools compatible with Far Cry 4? :-D
LEGACY

wobatt

Quote from: GKID7891 on March 03, 2015, 12:23:06 AM
Could you make the FC3 tools compatible with Far Cry 4? :-D

That would mean buying FC4   :-\\
And I've not even got around to playing FC3 yet.

OWGKID


I have FC4 and the Dunia 2 tools. How did you updated Gibbed's tools? I can do it myself if you can tell me how to do it ;)  :-D Btw, your xml decoder seems to replace "." with ",". Can I fix that myself?
LEGACY

wobatt

Could you give me some more details about which file the . -> , replacement happens in? Is it only on particular values or all floats? Just thinking if it could be picking up a regional setting from your computer, which is why it would be fine for me.
I'll take a look at it when I get home from w@&k.


As for making changes yourself...

First step: Learn how to program in C#. I don't really have any tips on the best way to do this. I've used Java before, and Java code and C# code are almost the same, so even though I learnt C# for this project it wasn't much of a jump. You could use any other programming language in theory, but you would have to write new tools from scratch.

You will need a compiler; for C# this is usually Microsoft Visual Studio. It is quite expensive to buy retail, but if you are in/w@&k in education then you may be able to get a copy of this for free (or at least discounted) with DreamSpark.
Otherwise, there is an open source IDE called MonoDevelop that should w@&k.

You will then need to use Subversion (SVN) to download the source code for the tools for FC2 or FC3. There are several free programs that you can use for this.

After that I'm not sure. It really depends on how much the data files have changed in FC4.
What happens if you try to use the FC3 tools to extract the FC4 data files?

Tags:
🡱 🡳

Similar topics (2)