Soccer Gaming Forums
Registration is free! Calendar Find other members Frequently Asked Questions Rules User CP Tools Home


Go Back   Soccer Gaming Forums | FIFA Forums, FIFA Mods, Futball > FIFA Series > FIFA 17 Forum

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 16-09-2016, 05:07:PM   #1
Halilyc
Senior Squad
 
Halilyc's Avatar
 
Join Date: Dec 2012
Location: Turkey
Posts: 1,197
Halilyc is on a distinguished road
FIFA 17 Modding Process & Resolving Files (Keep This Thread Clean)

Hi guys, I think FIFA17 News thread was mixed up with other news and questions. So, I created this topic for just modding process and file resolving.

I wish all of us success on this modding "journey" ! We can do it again together
Halilyc is offline   Reply With Quote
Old 16-09-2016, 05:15:PM   #2
thebaddie
Fifa Baddie
 
thebaddie's Avatar
 
Join Date: Jan 2012
Posts: 334
thebaddie will become famous soon enough
Great idea.

I was looking at .cat files, nothing really accurate btw



thebaddie is offline   Reply With Quote
Old 16-09-2016, 05:25:PM   #3
Halilyc
Senior Squad
 
Halilyc's Avatar
 
Join Date: Dec 2012
Location: Turkey
Posts: 1,197
Halilyc is on a distinguished road
Quote:
Originally Posted by thebaddie View Post
Great idea.

I was looking at .cat files, nothing really accurate btw



Good work bro, I dont have any knowledge on hex editing but I hope this work be usefull for other guys (Arianos,Ariel,Shaw,şido e.t.c)
Halilyc is offline   Reply With Quote
Old 16-09-2016, 05:42:PM   #4
SlimOntario2033
Senior Squad
 
Join Date: Apr 2012
Posts: 1,192
SlimOntario2033 will become famous soon enoughSlimOntario2033 will become famous soon enough
If someone is interessted in decompressing files, just write me a pm. I'll add you in our discord where grey and other guys trying to decompress and find the algorithmus. Like I said... he decompressed a ebx file but we need to find out the algorithmus of compression....

I'll share results here for sure!
SlimOntario2033 is offline   Reply With Quote
Old 16-09-2016, 05:48:PM   #5
Halilyc
Senior Squad
 
Halilyc's Avatar
 
Join Date: Dec 2012
Location: Turkey
Posts: 1,197
Halilyc is on a distinguished road
Quote:
Originally Posted by SlimOntario2033 View Post
If someone is interessted in decompressing files, just write me a pm. I'll add you in our discord where grey and other guys trying to decompress and find the algorithmus. Like I said... he decompressed a ebx file but we need to find out the algorithmus of compression....

I'll share results here for sure!
We`re waiting good news from you and other guys bro. If I can, I want to help you too
Halilyc is offline   Reply With Quote
Old 16-09-2016, 07:52:PM   #6
thebaddie
Fifa Baddie
 
thebaddie's Avatar
 
Join Date: Jan 2012
Posts: 334
thebaddie will become famous soon enough
And about easter eggs and hilarious things (thanks to GreyDynamics working hard)

// // User and buttons
// SWITCHING_LEVEL=0.5f
// // 0: (DEFAULT)
// // 1: Less assisted
// // 2: FIFA06 level
// // 3: Normal(default)
// // 4: WE(PES) level
// // 5: Most assisted

that WE(PES) level
thebaddie is offline   Reply With Quote
Old 17-09-2016, 03:26:AM   #7
regularcat
Manager
 
Join Date: Jun 2008
Posts: 12,688
regularcat is a jewel in the roughregularcat is a jewel in the roughregularcat is a jewel in the rough
Keep the bullshit out of this thread, if your post has no useful information we don't need to see it in this thread, use the FIFA 17 News thread.
__________________
regularcat is offline   Reply With Quote
Old 18-09-2016, 02:04:PM   #8
Centre
Youth Team
 
Join Date: Apr 2012
Posts: 300
Centre is on a distinguished road
Quote:
Originally Posted by willams9991 View Post

I don't know how the engine calls these files internally
but they are by far the most common file format that
Frostbite 2 has. They exist in two formats: unencrypted
and signed and XOR encrypted. To keep them apart from
each other the engine seems to use the 4 byte header
00D1CE00 at the beginning of files.

If a file starts with 00D1CE00 a hash will be located at
0x08 in the file and start with the ascii letter "x",
then 256 ascii letters which are the hash and then again
the letter "x". What this hash is used for I do not know.

The lookup table for the XOR encryption then is located
at 0x0128 and is 257 characters long. It is followed by
XOR encrypted data. For each character read the following
decryption has to be applied:

for (int i = 0; i < data_size; i++)
data[i] = data[i] ^ magic[i % 257] ^ 0x7b;

If the file does not start with that header the payload
starts at byte zero directly.

- File Format Description

The file can be described as a form of binary JSON. It
generally is a nested structure of dictionarys or lists
and some scalar types as well as strings and blobs.

Each object is prefixed with a typecode and some flags:

uint8 byte = read_single_byte();
int flags = byte >> 5;
int typecode = byte & 0x1f;

I don't know what the flags are doing but for reading the
files it seems that you can ignore them. The following
typecodes exist:

0 None / nil
1 List
2 Dict
5 Unknown (8 bytes)
6 Bool
7 Binary String
8 int32
9 int64
15 UUID
16 SHA1
19 Variable Length Quantity (varint)

Strings are prefixed with the number of bytes as varint.
Lists and dicts are prefixed with the number of elements
they contain of but they are also delimited by `None` at
the end.

Dicts are interesting in that they move the typecode of
the value of the dict before the key which means that
you need to read "typecode key value" where value is no
longer prefixed with a typecode.

// CAS / CAT files

- CAS File Format

CAS files are the data source for everything the engine
reads. All the assets are stored in CAS files. The CAS
files by themselves can be dumped to the filesystem
without the help of the CAT file but finding things in
that file would be O(n) as such the CAT file exists which
is a catalog of all the CAS files.

struct entry {
char header[4];
char sha1[20];
int32 data_length;
char padding[4];
};

The header for all entries in the CAS file are always
FACE0FF0.

- CAT File Format

CAS Catalogs are very similar. They start with the
header "NyanNyanNyanNyan" and after that they list all
the contents of all CAS files with the additional
information of position, size and which CAS file they
are from:

struct entry {
char sha1[20];
int32 offset;
int32 size;
int32 cas_num;
}

The cas num is the name of the cas file. "2" would
indicate "cas_02.cas" etc.

// How Does The Engine Find Stuff?

- File Identifiers

The sha1 hashes in the CAS/CAT are the SHA1 hash of the
contents of the file. This is also how the engine looks
them up which indicates that it does not do a md5 hash
of the filename. The .toc/.sb files in combination have
UUIDs for bundles which then have a bunch of SHA1 hashes
which point to files in the CAS files.

Additionally there is a bom.fb2 file which seems to be
unused by the game. Once decrypted with the algorithm
from above it exposes a zip file made up of .m files
which point to various parts in the archives. Yet the
patch does not have such a bom.fb2 file.
Probably better here.
Centre is offline   Reply With Quote
Old 18-09-2016, 02:10:PM   #9
regularcat
Manager
 
Join Date: Jun 2008
Posts: 12,688
regularcat is a jewel in the roughregularcat is a jewel in the roughregularcat is a jewel in the rough
The issue with that post is it is using Frostbite 2 and FIFA is running on a newer more adapted Frostbite engine, 3 or 4 most likely.
__________________
regularcat is offline   Reply With Quote
Old 18-09-2016, 10:18:PM   #10
Damien
Reserve Team
 
Damien's Avatar
 
Join Date: Nov 2006
Location: Italy,Turin
Posts: 829
Damien has a spectacular aura aboutDamien has a spectacular aura about
Some updates from Rinaldo after he emailed me today and shared the following discoveries:

- He got the source code for the new frostbite file system from a Battlefied modding website and succesfully converted it in C# for his tools.

- After this conversion he is now able to read the .toc, .sb and .cat files (with a few minor bugs) which are similar to the old .bh files.

- He is currently working to figure out the .cas files which contains all the data of the game like textures, 3d models, etc.

- If he manages to read the .cas files he will need to see if the file structure is the same as FIFA 16 or different and afterwards figure out how to mod it.

Overall he is pretty optimistic and said he will share his sources in order to view the files as soon as he finish his research on the new engine system.
__________________



.:: FIFA-Infinity Founder & Modder ::.

Last edited by Damien; 18-09-2016 at 10:20:PM.
Damien is offline   Reply With Quote
Old 18-09-2016, 10:34:PM   #11
regularcat
Manager
 
Join Date: Jun 2008
Posts: 12,688
regularcat is a jewel in the roughregularcat is a jewel in the roughregularcat is a jewel in the rough
Quote:
Originally Posted by Damien View Post
Some updates from Rinaldo after he emailed me today and shared the following discoveries:

- He got the source code for the new frostbite file system from a Battlefied modding website and succesfully converted it in C# for his tools.

- After this conversion he is now able to read the .toc, .sb and .cat files (with a few minor bugs) which are similar to the old .bh files.

- He is currently working to figure out the .cas files which contains all the data of the game like textures, 3d models, etc.

- If he manages to read the .cas files he will need to see if the file structure is the same as FIFA 16 or different and afterwards figure out how to mod it.

Overall he is pretty optimistic and said he will share his sources in order to view the files as soon as he finish his research on the new engine system.
I can tell you now the structure has changed and the layouts from root are now different.
__________________
regularcat is offline   Reply With Quote
Old 19-09-2016, 06:01:AM   #12
SlimOntario2033
Senior Squad
 
Join Date: Apr 2012
Posts: 1,192
SlimOntario2033 will become famous soon enoughSlimOntario2033 will become famous soon enough
Quote:
Originally Posted by Damien View Post
Some updates from Rinaldo after he emailed me today and shared the following discoveries:

- He got the source code for the new frostbite file system from a Battlefied modding website and succesfully converted it in C# for his tools.

- After this conversion he is now able to read the .toc, .sb and .cat files (with a few minor bugs) which are similar to the old .bh files.

- He is currently working to figure out the .cas files which contains all the data of the game like textures, 3d models, etc.

- If he manages to read the .cas files he will need to see if the file structure is the same as FIFA 16 or different and afterwards figure out how to mod it.

Overall he is pretty optimistic and said he will share his sources in order to view the files as soon as he finish his research on the new engine system.
Could you tell him please: a group of modders from FIFA (ariel will join soon, arianos, thebaddie,fifaccitiu and some members of fifamods are already in there), the creator (and I'm sure the owner of the scripts rinaldo used) of Frostbite Editor 3 -> GreyDynamics and the owner of DAI Tools (Dragon Age, Frostbite modder too) are in there and are just on the cat/cas files... Grey got a dump of datas too! there you can see the filestructure:





We are chatting, sharing and these stuff via discord (a free website where you only have to enter your username)
Feel free to everyone to join. Link via PM because we don't want spam there..

Last edited by SlimOntario2033; 19-09-2016 at 06:20:AM.
SlimOntario2033 is offline   Reply With Quote
Old 19-09-2016, 06:34:AM   #13
benqbiggis
Youth Team
 
Join Date: Apr 2010
Posts: 449
benqbiggis is on a distinguished road
Quote:
Originally Posted by SlimOntario2033 View Post
Could you tell him please: a group of modders from FIFA (ariel will join soon, arianos, thebaddie,fifaccitiu and some members of fifamods are already in there), the creator (and I'm sure the owner of the scripts rinaldo used) of Frostbite Editor 3 -> GreyDynamics and the owner of DAI Tools (Dragon Age, Frostbite modder too) are in there and are just on the cat/cas files... Grey got a dump of datas too! there you can see the filestructure:





We are chatting, sharing and these stuff via discord (a free website where you only have to enter your username)
Feel free to everyone to join. Link via PM because we don't want spam there..
how discord works ? plz provide me the link
benqbiggis is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump





































All times are GMT +1. The time now is 02:18:AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
You Rated this Thread: