The rules have been updated, read them now: Rules!

Far Cry Primal models

Post questions about game models here, or help out others!
Post Reply
daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Wed Jan 25, 2017 8:04 pm

I have good news and bad news.

Bad news is I found a mistake in my unpacker, so many files were unpacked a little wrong. It usually concerned a few bytes in the end, so it shouldn't affect models convertion. But to be safe, you have to unpack the whole game again.

Also I think you'll need not-compressed files anyway, so I'll update the tool soon. The low mip of blue goats were not compressed, and 40kbytes in size. Yet small models are all compressed. So the game decides whether compress the file or not based on its compression level, not size.

Good news is that I corrected oasis converter so now it converts both FC4 and FCP files.

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 309 times

Re: Far Cry Primal models

Post by volfin » Wed Jan 25, 2017 10:01 pm

I'm not familiar with the Oasis converter. what is that?

bouvrie
advanced
Posts: 54
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 3 times

Re: Far Cry Primal models

Post by bouvrie » Thu Jan 26, 2017 12:19 am

volfin wrote:I'm not familiar with the Oasis converter. what is that?
oasisstrings.bin, basically the dialog text in the game.

@daemon1 awesome work you're doing! The game contains a poo-load of files, it's quite something to make sense of, modding-wise. Luckily, there's a lot of overlap with Far Cry 4! :)

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Thu Jan 26, 2017 6:19 pm

Oasis converter for Far Cry Primal.

There are some tricks in making this work. The tool code had lots of unneeded complications. This is why I don't like messing with other people's code. So I'm trying to make it as easy as possible to me. You will need to do some manual work.

How to use it:

1. Convert BIN to XML as usual
2. Find line with 0xAEE923DE code and delete it. (This new format somehow has 1 section without lines in it. This is causing the old tool to fail. Maybe it's needed or something, then I'll have to find a way to handle it.)
3. Make changes you need
4. Convert file back to BIN
5. Add "table_fcp" table to the end of the file (This can be done in any hex editor or commander tool, or with command line such as "copy /b oasis.bin + table_fcp oasiswithtable.bin")
6. Pack oasis file into FAT/DAT with my packer tool.

Important note. Patch.fat/dat is loaded before patch_sound.fat/dat so you have to find some other package to replace text, or remove old file from patch. I did this by finding the file hash in patch.fat and changing it. The hash is (F3 F8 E3 5D 29 FD BD F2) for english file. Changing any byte here will "mask" the file so game won't find it.
You do not have the required permissions to view the files attached to this post.
Last edited by daemon1 on Sat Jan 28, 2017 7:20 pm, edited 4 times in total.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Thu Jan 26, 2017 6:27 pm

The version for FC4. Same usage.
You do not have the required permissions to view the files attached to this post.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Thu Jan 26, 2017 7:33 pm

And latest packer/unpacker.

- No changes to packer.
- Packer now correctly unpacks ALL files, including 1-byte sectors, and there are MANY of them, beware!

Included additional xml file with only 1 name for english oasis. Unpacker will use all xml files present in directory, so you can add your names if you find any.
You do not have the required permissions to view the files attached to this post.

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 309 times

Re: Far Cry Primal models

Post by volfin » Thu Jan 26, 2017 8:02 pm

i'll try this new unpacker and make sure it doesn't harm the model importer. If all is good I guess I will start breaking ground on a model exporter. I think I have a nearly complete understanding of this format, enough I can pull that off. I will do my best at any rate. :)

User avatar
volfin
ultra-veteran
ultra-veteran
Posts: 452
Joined: Sun Jul 06, 2014 6:30 am
Has thanked: 109 times
Been thanked: 309 times

Re: Far Cry Primal models

Post by volfin » Thu Jan 26, 2017 11:04 pm

the original unpacker came with a file named primal_main.xml, but this version doesn't have that file. And seems it outputs no filenames, only hash names?

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Fri Jan 27, 2017 5:23 am

that file is big, there was no need to reupload it. Add old xml file to get names.

bouvrie
advanced
Posts: 54
Joined: Sat Mar 18, 2006 5:29 pm
Has thanked: 14 times
Been thanked: 3 times

Re: Far Cry Primal models

Post by bouvrie » Fri Jan 27, 2017 11:41 pm

daemon1 wrote:that file is big, there was no need to reupload it. Add old xml file to get names.
For people wondering where that XML is at, see here. But you already know, right Fino? ;)

Fino
ultra-n00b
Posts: 1
Joined: Sat Jan 28, 2017 12:38 am

Re: Far Cry Primal models

Post by Fino » Sat Jan 28, 2017 12:55 am

bouvrie wrote:
daemon1 wrote:that file is big, there was no need to reupload it. Add old xml file to get names.
For people wondering where that XML is at, see here. But you already know, right Fino? ;)
Heya, I am new here in this forum :)

To the quote, no I wasnt wondering where it is. I just saw the names.xml in this existent one and added all lines from primal_main.dvs :D

But in another forum someone told me I should have a look here, since here is a tool for extracting the archives from FarCry Primal.
I was creating an own tool too until I saw yours now, daemon1. I dont even have an exe file, just my raw python script - but with a GUI

Now I was wondering, if I could maybe use your existent tools and create a GUI for it?
I am asking this, because my script for decrompressing the dat/fat files has a bug, which could create corrupted files... and tbh because you allready made a tool for this, there is no need anymore for me to fix or create a new one :P

Cheers, Fino

EDIT:
btw, your tool works like a charm - good work!

User avatar
Andrakann
ultra-veteran
ultra-veteran
Posts: 391
Joined: Wed Jul 06, 2011 8:47 am
Location: Russia
Has thanked: 759 times
Been thanked: 190 times
Contact:

Re: Far Cry Primal models

Post by Andrakann » Sat Jan 28, 2017 7:04 pm

daemon1 wrote:5. Add "table_fcp" table to the end of the file (This can be done in any hex editor or commander tool, or with command line such as "fc/b oasis.bin + table_fcp oasiswithtable.bin")
"fc/b oasis.bin + table_fcp oasiswithtable.bin" - it's for file comparing, not merging, and it thinks "+" symbol is file...

Upd: I googled it out, right command is: "copy/b oasis.bin +table_fcp oasiswithtable.bin"
Last edited by Andrakann on Sat Jan 28, 2017 7:10 pm, edited 1 time in total.

User avatar
tpcrew
n00b
Posts: 15
Joined: Sun Jan 08, 2012 12:36 pm
Has thanked: 12 times
Been thanked: 2 times

Re: Far Cry Primal models

Post by tpcrew » Sat Jan 28, 2017 7:06 pm

daemon1 wrote:And latest packer/unpacker.

- No changes to packer.
- Packer now correctly unpacks ALL files, including 1-byte sectors, and there are MANY of them, beware!

Included additional xml file with only 1 name for english oasis. Unpacker will use all xml files present in directory, so you can add your names if you find any.
Hi, amazing work!

Thx

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Sat Jan 28, 2017 7:21 pm

Andrakann wrote: Upd: I googled it out, right command is: "copy/b oasis.bin +table_fcp oasiswithtable.bin"
ok, corrected
Fino wrote:Now I was wondering, if I could maybe use your existent tools and create a GUI for it?
yes you can.

daemon1
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2277
Joined: Tue Mar 24, 2015 8:12 pm
Has thanked: 54 times
Been thanked: 1912 times

Re: Far Cry Primal models

Post by daemon1 » Sat Jan 28, 2017 7:27 pm

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.

Also I didn't mention that oasis file will be probably changed again in next patch, and you need to get the new table from the end of original file...

Post Reply