Announcement

Collapse
No announcement yet.

FIFA 17 Modding Process & Resolving Files (Keep This Thread Clean)

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Great idea.

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



    Comment


    • #3
      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)

      Comment


      • #4
        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!
        http://img5.fotos-hochladen.net/uploads/eep152v9mag4pc1r.png

        Comment


        • #5
          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

          Comment


          • #6
            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

            Comment


            • #7
              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.

              Comment


              • #8
                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.

                Comment


                • #9
                  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.

                  Comment


                  • #10
                    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.
                    Last edited by Damien; 18-09-2016, 10:20:PM.



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

                    Comment


                    • #11
                      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.

                      Comment


                      • #12
                        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, 06:20:AM.
                        http://img5.fotos-hochladen.net/uploads/eep152v9mag4pc1r.png

                        Comment


                        • #13
                          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

                          Comment


                          • #14
                            The biggest issue is that .cas files (the ones containing the data) appear to be compressed and the algorithm is a custom version of what they used for bf or dragon age

                            so basically the flow is:

                            toc -> sb -> cat -> cas

                            and it's not that difficult to move through this files (btw we didn't found an index for the correct cat in the sb so you have to search in every cat while you find the correct one)

                            Comment


                            • #15
                              Originally posted by regularcat View Post
                              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.
                              Yes bro, you're right and I can confirm: g_frostbiteRelease="2015.4".

                              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 had no doubt, super Rinaldo!

                              Comment

                              Working...
                              X