🛈 Announcement
Greetings! Far Cry forums are now archived and accessible in read-only mode, please go to the new platform to discuss the game.
  1. #11
    Flanker1Six's Avatar Senior Member
    Join Date
    Aug 2013
    Location
    US
    Posts
    2,125
    After playing around with your team's archetype browser, and looking at my modded FC3 weapon properties files; I realized the FC 3 weapon property file line: <field name="disLibItemId" type="Id64">171144368018084255</field> corresponds to the archetype file numbers (mostly). Easy copy and paste in the archetypes folder search box after that. Very cool!

    I modded 5 of archetype library weapons .ark/xml files to match the ones in my modded FC 3, as a test run. Piece 'o cake.

    Your archetypes library readme refers to converting the modified .ark/xml files back to .fcb files. Easily done with the Dunia 2 tools ConvertBinaryObject.exe tool...................so your readme says to convert my 5 modded weapon .ark/xml files into .fcb files with the Dunia 2 CBO.exe tool (I think).....................your read me then says: Then just pack and your changes should take effect.

    Am I to repack JUST the 5 modded .ark/xml files, or all 9201 of them as I would with a FC3 mod? Regardless of which way that goes; I must have to rename the repack folder to something that matches one of the folders in FC 4. What is that? Then install the renamed folder in the correct location in FC 4 for my mods to take effect...................where is that? I'm guessing the location is the Far Cry 4/data_win32/worlds/fcc_main/folder as new fcc_main.dat/fat files. Correct? TY!
    Share this post

  2. #12
    Originally Posted by StabbysUPAcct Go to original post
    So far, your definition files have let me compile the .ark.xml files back to .ark.fcb. So again, a big thanks for that!

    However, I started thinking that I should probably re-extract each .fat/.dat so I would have a better idea of what files live where.
    But once I tried to extract them, I got an error about a hash collision which caused the Unpack tool to fail.
    Since it showed me the problematic name, I did a quick grep for it in the project files and found that it was in the file "merged.filelist".

    So I decided to clean up the file, since it looked like it was the result of a 'strings' output that still had lots of duplicates and invalid filenames.
    (i.e. single number prefixing the entry; while others had a colon in the middle, which is an invalid character for a file/dir name)

    Here is what I did:
    Spoiler:  Show

    • Sorted all entries (case-insensitive)
    • Removed duplicates (again, case-insensitive)
    • Renamed invalid entries that began with a single digit. (e.g. "2entityarchetypeslibrary\example.ark.fcb" -> "entityarchetypeslibrary\example.ark.fcb")
    • Removed invalid entries (anything containing a colon)
    • Renamed all entries that ended in ".part" to end with ".partemitter" (I was unsure about this one, so let me know if I should fix it!)
    • Removed any entry that didn't contain at least one backslash (since there are only 2 or 3 files that are not in at least 1 sub-dir)
    • Removed entries that were missing a filename (e.g. "soundbinary\.spk")
    • Replaced all occurrences of '\\' with '\'


    Having done that, it will now extract all the main .fat/.dat files without errors.
    And from the looks of it, has a LOT more things with actual names, rather than their hashes!

    If anyone is interested, here is the updated file: merged.filelist
    (This is a replacement for the file "Far Cry 4\files\merged.filelist" from the "FarCry4_Project.rar" linked in the original post.)

    Finally, please let me know if I changed/removed anything that I shouldn't have... it was trivial to do, so redoing it (correctly) wouldn't be an issue.
    That's strange. We've been able to unpack & pack with this filelist without issues.
    Share this post

  3. #13
    Originally Posted by Flanker1Six Go to original post
    After playing around with your team's archetype browser, and looking at my modded FC3 weapon properties files; I realized the FC 3 weapon property file line: <field name="disLibItemId" type="Id64">171144368018084255</field> corresponds to the archetype file numbers (mostly). Easy copy and paste in the archetypes folder search box after that. Very cool!

    I modded 5 of archetype library weapons .ark/xml files to match the ones in my modded FC 3, as a test run. Piece 'o cake.

    Your archetypes library readme refers to converting the modified .ark/xml files back to .fcb files. Easily done with the Dunia 2 tools ConvertBinaryObject.exe tool...................so your readme says to convert my 5 modded weapon .ark/xml files into .fcb files with the Dunia 2 CBO.exe tool (I think).....................your read me then says: Then just pack and your changes should take effect.

    Am I to repack JUST the 5 modded .ark/xml files, or all 9201 of them as I would with a FC3 mod? Regardless of which way that goes; I must have to rename the repack folder to something that matches one of the folders in FC 4. What is that? Then install the renamed folder in the correct location in FC 4 for my mods to take effect...................where is that? I'm guessing the location is the Far Cry 4/data_win32/worlds/fcc_main/folder as new fcc_main.dat/fat files. Correct? TY!
    Replacing patch_hd is the best way to test these edits. You only have to include the *.ark.fcb files you edited. The path to the *.ark.xml files is mod_folder\entityarchetypeslibrary\ where mod_folder is the root folder of your mod (specified as the source directory for building .fat)

    I'd recommend using a for loop over the *.ark.xml files to convert them.
    Code:
    for /r "mod_folder\entityarchetypeslibrary" %%i in (*.ark.xml) do "path_to_gibbed_tools\Gibbed.Dunia2.ConvertBinaryObject.exe" --fcb %%i
    After converting them to *.ark.fcb, you can just pack your mod_folder to patch_hd.fat & .dat and test the edits. I guess the Map Editor is the fastest way to test things.
    Share this post

  4. #14
    Originally Posted by Janne252 Go to original post
    That's strange. We've been able to unpack & pack with this filelist without issues.
    I temporarily restored the original "merged.filelist" to reproduce the error I got.
    Code:
    $ Gibbed.Dunia2.Unpack --verbose common.fat
    Loading project...
    Reading FAT...
    
    Unhandled Exception: System.InvalidOperationException: hash collision ('graphics\sky\dome\stars\starsphere.xbg' vs 'graphics\Sky\dome\Stars\StarSphere.xbg')
       at Gibbed.ProjectData.Project.LoadListsFrom[TType](String basePath, String filter, Func`2 hasher, Func`2 modifier, HashList`1 list)
       at Gibbed.ProjectData.Project.LoadLists[TType](String filter, Func`2 hasher, Func`2 modifier)
       at Gibbed.ProjectData.Manager.LoadLists[TType](String filter, Func`2 hasher, Func`2 modifier)
       at Gibbed.Dunia2.FileFormats.ProjectHelpers.LoadListsFileNames(Manager manager, Int32 bigVersion)
       at Gibbed.Dunia2.Unpack.Program.Main(String[] args)
    And here is the 'grep' (case-insensitive) search for the file it complains about: (starsphere.xbg)
    Code:
    $ grep -i 'starsphere.xbg' merged.filelist
    graphics\Sky\dome\Stars\StarSphere.xbg
    graphics\sky\dome\stars\starsphere.xbg
    As you can see, two results were returned... both with the same path. In a true linux environment, this wouldn't be an issue... but Windows ignores case and considers those to be both the same file.

    Edit: The version of Gibbed tools I'm using is r179_b115

    Edit #2: And here are the entries that are invalid on any system.. since they contain colons:
    Code:
    $ grep ':' merged.filelist
    fc3_props:stp/cigar_lit
    fc3_props:stp/lighter_01
    fc3_props:stp/handfan
    fc3_props:stp/burialburnstick
    Maybe the "merged.filelist" included in the download was an old version of the one you have?
    Share this post

  5. #15
    Flanker1Six's Avatar Senior Member
    Join Date
    Aug 2013
    Location
    US
    Posts
    2,125
    Janne.......................thanks for the reply! Answered pretty much everything for me, as to titling any generated .dats and .fats as well as their file path/placement inside FC4. The only problem for me with going with a patch_hd.dat/fat is I'm already using a combo of JRavens mods packed as those two files. I'll unpack them again and see if I can fold my weapon stuff into them without losing any of JR's excellent work. Oh................BTW: I'm using the r179_b115 tool set as well.

    I am having a problem though. When I said converting my .ark/xml files to .fcbs would be easily done........................my ConvertBinaryObject.exe does not seem to be working, so I can't convert my modded weapon.ark.xml files to .fcbs for packing.

    All I ever did with .xmls in FC 3 was drag and drop them into the CBO.exe tool (that's the way the tutor did it in the "how to" video I watched on youtube). When I drag and drop my modded weapon.ark.xmls into the CBO tool----------nothing. No .fcb is generated.

    I tried dragging and dropping the .ark.xmls into the tool set's ConvertXml.exe tool as a test, and damned if that didn't work fine. Generated an .rml file right next to the original .ark.xml file...........................except I don't need .rml files. &*%&@&%##!!

    I tried changing the .ark suffix to a plain .xml suffix; then did the drag and drop thing....................that didn't work either.

    BTW: I did get a copy of the Far Cry 4 project folder from your link/site and have it installed in the project folder of the tool set I'm using for FC 4.

    You completely lost me with: for /r "mod_folder\entityarchetypeslibrary" %%i in (*.ark.xml) do "path_to_gibbed_tools\Gibbed.Dunia2.ConvertBinaryO bject.exe" --fcb %%i. Say WHAT??!! LOL!
    Share this post

  6. #16
    Originally Posted by Flanker1Six Go to original post
    Janne.......................thanks for the reply! Answered pretty much everything for me, as to titling any generated .dats and .fats as well as their file path/placement inside FC4. The only problem for me with going with a patch_hd.dat/fat is I'm already using a combo of JRavens mods packed as those two files. I'll unpack them again and see if I can fold my weapon stuff into them without losing any of JR's excellent work. Oh................BTW: I'm using the r179_b115 tool set as well.

    I am having a problem though. When I said converting my .ark/xml files to .fcbs would be easily done........................my ConvertBinaryObject.exe does not seem to be working, so I can't convert my modded weapon.ark.xml files to .fcbs for packing.

    All I ever did with .xmls in FC 3 was drag and drop them into the CBO.exe tool (that's the way the tutor did it in the "how to" video I watched on youtube). When I drag and drop my modded weapon.ark.xmls into the CBO tool----------nothing. No .fcb is generated.

    I tried dragging and dropping the .ark.xmls into the tool set's ConvertXml.exe tool as a test, and damned if that didn't work fine. Generated an .rml file right next to the original .ark.xml file...........................except I don't need .rml files. &*%&@&%##!!

    I tried changing the .ark suffix to a plain .xml suffix; then did the drag and drop thing....................that didn't work either.

    BTW: I did get a copy of the Far Cry 4 project folder from your link/site and have it installed in the project folder of the tool set I'm using for FC 4.

    You completely lost me with: for /r "mod_folder\entityarchetypeslibrary" %%i in (*.ark.xml) do "path_to_gibbed_tools\Gibbed.Dunia2.ConvertBinaryO bject.exe" --fcb %%i. Say WHAT??!! LOL!
    That's batch code building mods with the Gibbed tools is done with batch (*.bat files). You have to use Gibbed.Dunia2.ConvertBinaryObject.exe for converting the *.akr.xml files back to *.fcb.

    For example:
    Code:
    Gibbed.Dunia2.ConvertBinaryO bject.exe --fcb 1004387489302.ark.xml
    


    For more information,
    http://fc4modding.janne252.com/index...ea=misc#post_4
    Share this post

  7. #17
    Originally Posted by StabbysUPAcct Go to original post
    I temporarily restored the original "merged.filelist" to reproduce the error I got.
    **snip**
    [/CODE]

    Maybe the "merged.filelist" included in the download was an old version of the one you have?
    We've actually been using a custom set of Gibbed's tools compiled by RazorFinnish. One of the improvements might be a more flexible file list handling. Those lists are mostly parsed from large files byte-byte so there might be some invalid paths. My filepath parser skips potential strings if they don't contain a dot and a back slash and if they are smaller than 10 characters long. Colons are not even included in the character map so the parser would stop there and start a new buffer. I also handled some filelists with my other custom tool to get rid of the root folder names where in some cases had some numbers in front of them. Those invalid filepaths might have gotten in during the early development. I'll make sure to update the download with a proper filelist.
    Thanks for letting us know.
    Share this post

  8. #18
    Originally Posted by Janne252
    We've actually been using a custom set of Gibbed's tools compiled by RazorFinnish.
    Ahh.. are there any future plans for a public release?
    Just tell me where I can pre-order!


    Originally Posted by Janne252
    Those invalid filepaths might have gotten in during the early development. I'll make sure to update the download with a proper filelist.
    Thanks for letting us know.
    Your welcome. I'm just glad to see any progress towards an updated toolset. Who knows, maybe Rick will see this and get inspired to update the base!

    Also, have you been able to successfully decompress/convert "oasisstrings_compressed.bin"? If so, how?
    Share this post

  9. #19
    Originally Posted by StabbysUPAcct Go to original post
    Ahh.. are there any future plans for a public release?
    Just tell me where I can pre-order!



    Your welcome. I'm just glad to see any progress towards an updated toolset. Who knows, maybe Rick will see this and get inspired to update the base!

    Also, have you been able to successfully decompress/convert "oasisstrings_compressed.bin"? If so, how?
    RazorFinnish has had great success with decompressing osasis_strings but so far the operation back to compressed format has been an issue.
    I even started working on an editor, implemented a simple browser first..

    Spoiler:  Show


    Share this post

  10. #20
    Originally Posted by StabbysUPAcct Go to original post
    Ahh.. are there any future plans for a public release?
    Just tell me where I can pre-order!



    Your welcome. I'm just glad to see any progress towards an updated toolset. Who knows, maybe Rick will see this and get inspired to update the base!

    Also, have you been able to successfully decompress/convert "oasisstrings_compressed.bin"? If so, how?
    Decompression yes; getting it back together breaks it however... Weirdly enough, my own tool can load the original, save the thing, then load it again without problems, but FC4 itself fails at loading the changed files. Guess I'm going to get that fixed at some point though.
    Share this post