Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Far Cry Primal models

Post questions about game models here, or help out others!
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry Primal models

Post by volfin »

ok I've verified the new unpacker did change the model format slightly. Because the UV scale/offset is near the end of the file, it's location has changed. I'm surprised nobody noticed this. I'm concerned because at least one model appears corrupted, i'm worred the new unpacker is introducing errors. But i'll have to unpack with the old unpacker to do some comparisons and see.

Edit: it's not a corruption, just a change near the end of the file. New version to work with the new unpacker attached.
You do not have the required permissions to view the files attached to this post.
FartingSquirrel
ultra-n00b
Posts: 5
Joined: Sun Mar 06, 2016 1:36 am
Has thanked: 1 time

Re: Far Cry Primal models

Post by FartingSquirrel »

daemon1 wrote:
Fino wrote:Now I was wondering, if I could maybe use your existent tools and create a GUI for it?
yes you can.
That'd be awesome!
bouvrie
advanced
Posts: 55
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Far Cry Primal models

Post by bouvrie »

daemon1 wrote:Alright, I think that's enough for now. Can be better to have dictionary as plain text, and add more names, so maybe later if I will have time. Enjoy the tools.
Great, finally found the time to extract the files with the new tools! They're working nicely! :)

Some things I noticed though, that slightly differ from the Dunia toolset's workflow:
  • The unpacker seems to unpack to the current working dir? If you could add a parameter that defines the output dir for unpacking files to, It would be less cluttering.
  • As unpacking occurs in the current working dir, I'm used to making a separate dir outside of the game location, with symlinks to the game's dat/fat files (to save diskspace). However, the tools don't support symlinks (windows' mklink): "Unhandled Exception: System.IO.IOException: The name of the file cannot be resolved by the system.".
  • The unpacker also loads the xml definitions from the current working dir, rather than the tool's dir. Same thing for the dat/fat specified. So currently, the tool *and* accompanying xmls *and* dat/fats must all be copied to a new dir in order to unpack it from there.
  • Oh, and the unpacker loads definition XML's recursively. Meaning if unpacking a dat produces xml files, running the unpack again will try to load those XML files and error out I think.
But it's no biggie, I'm happy to be extracting already! But if you ever have a chance to work on them again... :D
bouvrie
advanced
Posts: 55
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Far Cry Primal models

Post by bouvrie »

Another thing I noticed, is that unpacking file entries without a dirname will fail ("Unhandled Exception: System.ArgumentException: Path cannot be the empty string or all whitespace."). For example, try unpacking common.dat with this XML entry:

Code: Select all

	<File name="soundregions.xml" />
Changing this entry to ".\soundregions.xml" in the XML would obviously be no fix, as the CRC64 value of the string will differ.
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Far Cry Primal models

Post by daemon1 »

Yes having all in current dir was the fastest and simplest way to do.

But ok, here's a new version for you. Now you can go to current dir, run the tool from somewhere else and specify FAT file somewhere else. So you can place everything in 3 different dirs if you like:

1. dir with the tool
2. dir with fat/dat pair
3. current dir where unpacked files will go (also must have xml files for names)

Recursive xml search was one on purpose, because if more names will be found in files, this is only better.

As for "unpacking file entries without a dirname", do you think the game has some files without a dirname?

UPD. new versions below.
Last edited by daemon1 on Sun Feb 05, 2017 11:26 am, edited 1 time in total.
bouvrie
advanced
Posts: 55
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Far Cry Primal models

Post by bouvrie »

Wow, thank you! really cool! :D
daemon1 wrote:As for "unpacking file entries without a dirname", do you think the game has some files without a dirname?
Yeah, I suspect that error only even occurred because of that. I assume your tool parses the name attribute and 'splits' it into a dir- and filename. In case of common.dat there's a soundregions.xml in the root. Possibly a credits.xml and version.xml too (as was the case in Far Cry 4, in the patch datfile as well).

Should be easily fixable by checking if the parsed dirname is empty, and if so, add a '.\' in its place?
daemon1
MEGAVETERAN
MEGAVETERAN
Posts: 2647
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 65 times
Been thanked: 2871 times

Re: Far Cry Primal models

Post by daemon1 »

New versions. The unpacker will now work with "file entries without a dirname".
The packer will also pack "hashed" files with no names. Unfortunately the game doesn't work correctly with full repacked packages, for example, common.dat. No idea why is that.

Can anyone confirm oasis tools working? Its time to gather all tools and put them in title post. I need to know if it works.
You do not have the required permissions to view the files attached to this post.
lukamas
ultra-n00b
Posts: 8
Joined: Sun Sep 06, 2015 8:12 pm

Re: Far Cry Primal models

Post by lukamas »

Hey guys, is anyone making an exporter for far cry 4, I really want to mod this game, and It would be my dream to make a new object or asset for the map editor for far cry 4,

If anyone makes an exporter for Far Cry 4, let me know, I would be more than excited!

thanks in advance.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry Primal models

Post by volfin »

lukamas wrote:Hey guys, is anyone making an exporter for far cry 4, I really want to mod this game, and It would be my dream to make a new object or asset for the map editor for far cry 4,

If anyone makes an exporter for Far Cry 4, let me know, I would be more than excited!

thanks in advance.
Far Cry 4 was done years ago. Just search the forums.
bouvrie
advanced
Posts: 55
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Far Cry Primal models

Post by bouvrie »

lukamas wrote:Hey guys, is anyone making an exporter for far cry 4, I really want to mod this game, and It would be my dream to make a new object or asset for the map editor for far cry 4
You may want to head over to http://farcrymods.freeforums.net/board/2/mod-far-cry-4 and/or read this post there. ;)

I'm currently sifting through all the FCP files, uncovering filenames as I go. Will be releasing an XML file to use with daemon1's unpacker, which coincidentally also names some more Far Cry 4 files in the Dunia tools. Plus I'm working on updating Dunia's object definitions, first Far Cry 4, then Primal's.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry Primal models

Post by volfin »

There's no need to 'go' anywhere. If people just search, you'd see what I said was true:
viewtopic.php?f=16&t=12339
Complete unpackers and model extraction, etc. I mean Dunia Tools is fully supported for 4, which was what was talked about at the start of this thread. All the filenames are already found. Redoing all the work is just wasteful.
bouvrie
advanced
Posts: 55
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Far Cry Primal models

Post by bouvrie »

volfin wrote:There's no need to 'go' anywhere. If people just search, you'd see what I said was true:
viewtopic.php?f=16&t=12339
Complete unpackers and model extraction, etc. I mean Dunia Tools is fully supported for 4, which was what was talked about at the start of this thread. All the filenames are already found. Redoing all the work is just wasteful.
Sorry, but the thread you referenced only deals with exporting models from FC4, not creating new game assets for use in the Far Cry 4 level editor and game as lukamas asked. Hence why I linked to the forum discussing modding Far Cry 4 as a game.

Also, as far as I know, Dunia currently has only 29% (146734/492208) filenames covered. If you could please point me to a full filelist for Far Cry 4's files, my work will finally be wasteful. :D
bouvrie
advanced
Posts: 55
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 4 times

Re: Far Cry Primal models

Post by bouvrie »

daemon1 wrote:Can anyone confirm oasis tools working? Its time to gather all tools and put them in title post. I need to know if it works.
I tried the oasis tool for Far Cry Primal, and conversion seemed fine for English, German and Czech. Bins converted to XML, and back again. With the string replacement and table copy, as well as the patch.fat patch, it seems to work fine ingame! :)

But, there may be something weird with the FC4 Oasis tool. On my end, it's working on the oasisstrings_compressed.bin for the english language, from the latest patch.dat. So far so good! However, trying to convert let's say Czech or Dutch back to bin seems problematic. For example:

1. Running "JGR.Dunia2.ConvertXml.fc4p.exe --osx oasisstrings_compressed.bin", creates oasisstrings_compressed_converted.xml
2. I open the XML, and remove the line " <section name="0xAEE923DE" />", and the newline at the end of that line (that shouldn't matter, right?).
3. I run "JGR.Dunia2.ConvertXml.fc4p.exe --osb oasisstrings_compressed_converted.xml", it produced a "oasisstrings_compressed_converted_compressed_converted.bin" file, @ 30KB instead of 1.34MB. It throws an exception:
Unhandled Exception: System.ArgumentException: Source array was not long enough. Check srcIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Array.Copy(Array sourceArray, Array destinationArray, Int32 length)
at JGR.Dunia2.FileFormats.OasisstringsCompressedFile.OasisSection.Serialize(Stream output, Endian endian)
at JGR.Dunia2.FileFormats.OasisstringsCompressedFile.Serialize(Stream output)
at JGR.Dunia2.ConvertXml.Program.Main(String[] args)


For me personally, I'll probably only mod the english file to remove annoying prompts on the screen. perhaps that will work without issues. But if others want to make a translation mod, there may be problems down the road, I'm guessing it's due to some characters/encoding of the XML file or something? If you need more language files for testing, I upped them all here.
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 110 times
Been thanked: 326 times

Re: Far Cry Primal models

Post by volfin »

bouvrie wrote:
volfin wrote:There's no need to 'go' anywhere. If people just search, you'd see what I said was true:
viewtopic.php?f=16&t=12339
Complete unpackers and model extraction, etc. I mean Dunia Tools is fully supported for 4, which was what was talked about at the start of this thread. All the filenames are already found. Redoing all the work is just wasteful.
Sorry, but the thread you referenced only deals with exporting models from FC4, not creating new game assets for use in the Far Cry 4 level editor and game as lukamas asked. Hence why I linked to the forum discussing modding Far Cry 4 as a game.

Also, as far as I know, Dunia currently has only 29% (146734/492208) filenames covered. If you could please point me to a full filelist for Far Cry 4's files, my work will finally be wasteful. :D
he asked for an exporter. And that is what is in the thread. It's assumed he'd do any converting to assets for the editor himself. But if you want to do that work for him, have at it.

And it seems my copy has 33% of filenames, so you're correct, it's not all. It's been awhile since I messed with FC4.
lukamas
ultra-n00b
Posts: 8
Joined: Sun Sep 06, 2015 8:12 pm

Re: Far Cry Primal models

Post by lukamas »

guys, I was looking on this site http://steve.farcry.eu/?log=fcmsig, at the "FC4 Editor Selected Objects Export/Import" is that under development, or what is that all about, when modding Far Cry 4
Post Reply