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.

OWGKID

I'm using the ENGLISH version of Windows 8.1. Unfortunately, the school I am attending doesn't have any programming classes. Which means I don't know a thing about programming  :D  :( The float values in the 41_WeaponProperties and player.xml seems to get the "." -> "," conversation. Other values looks fine. Regarding the Dunia2 tool: I can unpack the .dat files, but I cannot open the files the tool produces. If I attempt to decompile a .fcb file, it will only give out a xml/rml... 
LEGACY

wobatt

Quote from: GKID7891 on March 03, 2015, 08:53:57 AM
Unfortunately, the school I am attending doesn't have any programming classes. Which means I don't know a thing about programming  :D  :(

Java is generally a good language to start learning from, partly because everything you need to get started is free  :-D  It's also quite widely used in business as it is the main language used for writing Android apps, so good to have on your CV. There are online courses and free tutorials widely available for it.
In contrast to C#, both commonly used Java IDEs are free, NetBeans or Eclipse.
And once you can write Java, then you can write C#.

Quote from: GKID7891 on March 03, 2015, 08:53:57 AM
The float values in the 41_WeaponProperties and player.xml seems to get the "." -> "," conversation. Other values looks fine.

I will investigate later. Seems odd, not sure what could cause it. I've probably changed something by accident  :-\\

Quote from: GKID7891 on March 03, 2015, 08:53:57 AM
Regarding the Dunia2 tool: I can unpack the .dat files, but I cannot open the files the tool produces. If I attempt to decompile a .fcb file, it will only give out a xml/rml... 

That is actually very good. It means that the overall structure of the data files hasn't changed, so now it's 'just' a case of identifying the files  :-D

If you open them in a hex editor (e.g. HxD), then the first few bytes can usually tell you what type of file it is. For example FCB files all have the first 4 bytes "nbCF". I have a program that I wrote to help me identify files in FC2, I could upload it, but I will need to write some instructions on how to use it first.

For decoding the XML extracted from the FCB files, my tool should still w@&k (in theory), but will need a different dictionary. The names are probably in one of the DLLs, but it is not trivial to extract them.

OWGKID

Regarding the Dunia2: In the "projects" folder, there are folders with xmls which shows the files the program are supposed to decode. Can I re-write them for Far Cry 4?
LEGACY

wobatt

Quote from: GKID7891 on March 03, 2015, 11:52:52 AM
Regarding the Dunia2: In the "projects" folder, there are folders with xmls which shows the files the program are supposed to decode. Can I re-write them for Far Cry 4?

Yes, well spotted :-X
Provided that nothing has majorly changed in how files are saved, that should be all that is needed.

I've uploaded a new version of my tools that should fix the comma problem.

OWGKID



The guys at nexusforums managed to mod the files by using a hex editor. Another forum stated that they had contacted "Rick/Gibbed" about FC4 support. Regarding that: Seems like the Dunia 2 tools need to be updated  ???
http://fc4modding.janne252.com/index.php?area=misc Those guys did the job alredy :o  ;)  :-D

Regarding floats: It doesn't process all floats correctly with a "."

   <value name="iRecoilRecoveryLevel" hash="158EFFD8" type="Int32">1</value> <!-- type="BinHex" value="01000000" -->
              <value name="fRecoilAchieveTime" hash="C0671E89" type="Float">0,1</value> <!-- type="BinHex" value="CDCCCC3D" -->
              <value name="fRecoilAnimationWeight" hash="641C31C5" type="Float">1,0</value> <!-- type="BinHex" value="0000803F" -->
              <value name="fRecoilMax" hash="0788D065" type="Float">45,0</value> <!-- type="BinHex" value="00003442" -->
              <object hash="F9FB3361" type="RecoilIK">
                <value name="fIKRecoilBurstSpeedIn" hash="9818FA35" type="Float">11.0</value> <!-- type="BinHex" value="00003041" -->
                <value name="fIKRecoilBurstPitchRandom" hash="7400B78C" type="Float">0.12</value> <!-- type="BinHex" value="8FC2F53D" -->
                <value name="fIKRecoilBurstSpeedOut" hash="7EFA3159" type="Float">7.0</value> <!-- type="BinHex" value="0000E040" -->
                <value name="fIKRecoilBurstPitchRate" hash="CC366276" type="Float">1.35</value> <!-- type="BinHex" value="CDCCAC3F" -->
LEGACY

PZ

These will be ready soon, I'll bet so even the novice modder can use them  :-X

wobatt

Quote from: GKID7891 on March 03, 2015, 11:31:28 PM
Regarding floats: It doesn't process all floats correctly with a "."

I've uploaded version 0.4.2, which should finally fix this issue. I'm still not completely sure why it's doing this for you and not me  :-\\
I added an extra step in the converter so that after it has formatted the floats it does a string replace for any "," with ".".

OWGKID


Umm, the 0.4.1 version works fine now, I had to re-set my modding directory( re-run bootstrap) and then, run decodeXml. ;) It worked :-D :-D :-D Nice tool :-() :-() :-() :-() I used the old version (0.4) to process the files and used 0.4.1 after that. Seems like that caused the error  :D  :angel: Maybe you should add it to the Wob_ReadME that re-setting bootstrap may be necessary and remove older versions of your tool.
LEGACY

wobatt

Ok, will add it to the readme  :-X
The way I wrote the fix in 0.4.2 would have corrected any "," that were put in by 0.4 anyway, but it's still probably best to reset.

Tags:
🡱 🡳

Similar topics (2)