Franchise Hex Editing Progress - Operation Sports Forums

Franchise Hex Editing Progress

Collapse

Recommended Videos

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bep713
    Rookie
    • Nov 2009
    • 67

    #1

    Franchise Hex Editing Progress

    Hey guys,

    I started looking into editing the franchise save files for M19. I couldn't find much on here or FootballIdiot so if anyone else has made progress on this, please feel free to share what you've found! I'm going to use this thread as a how to/notes page.

    Update - Editor Download
    I've released a beta version of the editor. Please make a copy of your franchise save before using it.
    Editor: https://github.com/bep713/madden-fra...ditor/releases
    Source: https://github.com/bep713/madden-franchise-editor

    Release notes and info on post #24!

    To download editor:
    1. Click link above for Editor
    2. Scroll down all the way and click 'Assets'
    3. Click the first item
    4. Unzip contents and run madden-schedule.exe
    5. Read instructions on the download page for how to use


    It may take some time to unzip all the files.

    How to start hex editing the franchise file
    The game saves each file to [My Documents]/Madden NFL 19/settings. Each franchise file will be named like: CAREER-[filename].

    If you open one of those up in a hex editor you'll get a lot of jumbled data - because it's compressed (well most of it). You can use Offzip to extract the data into a readable format. The good news is that we can reimport the modified data back into the franchise save...well, sometimes.
    1. Make a new folder in your Madden 19 save folder named 'output'
    2. Extract offzip.zip anywhere you want
    3. Open a new command prompt in the folder you extracted offzip (Open the folder in Windows Explorer and type 'cmd' in the address bar without the quotes.)
    4. Type offzip -a [path to your franchise file here] output


    You might get some warnings but that's okay. If you open up the output folder you made in step 1, you should see a file named 00000052.frt. This file contains the uncompressed franchise data for your save.

    Download Offzip here Scroll down or search for Offzip! It's not the first one.

    Download HxD Hex Editor here Make sure to select the English version :P

    Reimporting the data to the franchise file
    Once you made your changes, you can re-import the data back into the franchise file and load it up in game.
    1. Re-open a command prompt window in offzip's directory if you closed it before.
    2. Type offzip -r -a [path to your franchise file here] output
    3. Offzip will try re-importing the data back. This usually takes awhile
    4. You might see some warnings like before, but it should say 1 files reimported when done.


    I've noticed that Offzip will tell me that the compressed data is bigger than the original in some cases. If you get this error, the changes will not be made to the franchise file and you'll have to either figure out why or edit something else for now. I don't know much about compression algorithms but I do know that Madden edits other values in the save when you make a small change which would probably keep the compressed data the same size.

    Generic Strategy
    My plan is to find as much as I can and hope other people join in too because I probably don't have the time to do this myself. Once we figure enough info out I could make a program that would make this much easier.
    1. Determine what to find
    2. Make a copy of the uncompressed data and set it aside as a control
    3. Make a small change in the game - maybe change the first letter of Baker Mayfield's name...or re-order just him and one other player on the depth chart, or sim one game. You want to change as little as possible so that you have a better idea of what changed in the file when comparing.
    4. Save the franchise file in game
    5. Use Offzip to extract the compressed data
    6. Use a comparison tool like Beyond Compare to analyze what changed from the control and the new file
    7. Repeat until we figure it out!


    Goals
    • Editable schedules - my primary focus here
    • Editable teams/divisions
    • Figuring out where stats are located and how they are stored in the hex file
    • Custom rosters/salaries
    • Anything else! You name it, we want it.
    Last edited by bep713; 07-28-2019, 02:23 AM.
  • bep713
    Rookie
    • Nov 2009
    • 67

    #2
    Re: Franchise Hex Editing Progress

    Progress
    I'll keep progress info updated here so it's easier to find.

    Player names
    This one's easy because you can search for the player name as text. Note that this is ONLY the player's name, ID, and hometown. Other data like height, weight, and attributes are located somewhere else.

    Data starts around 0x38B360 and will start with legends and misc players. The data will depend on which roster you used when you started your franchise. I'm not sure if all of them have legends but I used Sabo's roster to start and I don't think he made legends in there. The NFL players will be listed in alphabetical order by last name. The names will always be in the following order: FIRST, LAST, ID, Hometown.

    Teams
    Again, easy because you can search for the team name. Located around 0x932DC0 for me.

    Starts with the 49ers and goes in alphabetical order by team last name. Data will be in the following order: Team last name, team last name again, city name, team last name again, unknown (D), team abbreviation, team db name, alternate abbreviation, team last name, alternate abbreviation. I was able to change the Browns to the Crowns by changing each team last name entry.

    Comment

    • bakersville123
      Rookie
      • Aug 2007
      • 210

      #3
      Re: Franchise Hex Editing Progress

      Excellent write-up!


      Sent from my iPhone using Operation Sports

      Comment

      • bep713
        Rookie
        • Nov 2009
        • 67

        #4
        Re: Franchise Hex Editing Progress

        Quick update: I was able to change the super bowl matchup to any teams that I wanted - including the AFC pro bowl team (the game crashed when i tried to play). However, it is definitely possible to edit schedules.

        I was also able to change the score of past games, but it did not reflect the stats or standings of each team or player, bummer.

        On a note about stats, I was able to change a player's career stats but not season stats. Even then, the change only showed on the career stats page (Stats -> Career stats). The change did not show when i viewed player stats from the player edit screen. I think this is because the season stats are calculated from each week's stats on the fly...so if we find those we can probably edit the season stats too.

        Note about the franchise file: I'm pretty sure Madden uses a zlib encoder.

        If you open the compressed file from the game, there is definitely a header that always starts with FBCHUNKS. Offset 4A has three hex numbers that mark the end of the compressed data. If you go to that address, there will be 51 hex characters after it, which could be a trailer? I have no clue.
        Last edited by bep713; 03-25-2019, 05:59 PM.

        Comment

        • Willchillz
          Banned
          • Feb 2012
          • 527

          #5
          Re: Franchise Hex Editing Progress

          This is huge man, I was trying to dabble with this last night
          and I'm going to dabble more and keep updated on this post also when I can start crunching with things.

          I'll be trying to figure out MUT to Franchise conversion things
          once I get the hang of what you've uncovered.
          I feel like I might have to find a different hex program though I'm not sure.
          Since its all server MUT based. Anything I figure out or make I'll post here credited.

          Massive post.

          Comment

          • bep713
            Rookie
            • Nov 2009
            • 67

            #6
            Re: Franchise Hex Editing Progress

            Alright, made some progress on the schedule. I was able to note all team hex values and I was able to figure out the game time (sort of)

            Team hex values for the schedule
            Spoiler


            You can find the schedule by searching for 'SeasonGame' in the uncompressed data. I was able to find it in the compressed file sometimes, but changing values inside the compressed file didn't do anything in game.

            Here's a snippet of one game in hex:
            Spoiler


            Common game times (there's more than 1 way to make the same time)
            Spoiler


            *EDIT*: The 33 11 at the end of the week was actually part of the last game's score. The 11 indicates the day of week.

            Day of week values
            Spoiler


            As far as the '33' number - I'm not sure what is, but TNF games always have 31, normal games always have 30, SNF has 32, and MNF has 33. Could be presentation packages?
            Last edited by bep713; 03-26-2019, 10:31 PM.

            Comment

            • trey31
              Pro
              • May 2012
              • 599

              #7
              Re: Franchise Hex Editing Progress

              This is fantastic work!!

              Comment

              • bep713
                Rookie
                • Nov 2009
                • 67

                #8
                Re: Franchise Hex Editing Progress

                End of day update:
                • I was able to swap home/away teams just by swapping their team IDs in the hex.
                • Found the day of week indicator
                • Found the game week indicator BUT it's UI only. If you move your game from week 3 to week 5, Madden will still want you to play that game on week 3. I'm not sure why.
                • I've been using packzip to repackage the compressed data and it won't give any errors BUT the CRC data is not correct in the franchise file and I think that will lead to game freezes/errors later on down the line. But for now, this is great for testing. We'll want to figure out how to calculate the CRC eventually.

                Comment

                • TuckFheman
                  Just started!
                  • Dec 2018
                  • 4

                  #9
                  Re: Franchise Hex Editing Progress

                  Would it be possible to convert an Offline CFM to appear as an Online CFM so it will load in the Madden Companion app?

                  Comment

                  • ForUntoOblivionSoar∞
                    MVP
                    • Dec 2009
                    • 4682

                    #10
                    Re: Franchise Hex Editing Progress

                    Is there a logical path towards figuring out how to change all 4 pm games to 1 pm games, in your estimation? That would solve the epic fail of EA forgetting about time zones when they made the game.
                    Originally posted by Therebelyell626
                    I am going to create a team called "the happy town fundament rapscallions" and hurt your already diminishing image
                    https://forums.operationsports.com/forums/showpost.php?p=2049813056

                    Last edited by your mom; 06-06-2006 at 6:06 PM.

                    Comment

                    • Huskereurocat
                      Rookie
                      • Jan 2017
                      • 196

                      #11
                      Re: Franchise Hex Editing Progress

                      This is awesome! I was curious if you were using TheBleedingRed21's discord channel as a resource to bounce ideas off of as well? "OS Madden 19 Mod Community" I would be particularly interested in printing out the stats during the season, so any headway on that would be appreciated greatly!!
                      CPU: R7 5800X 32GB RAM
                      MoBo: ASUS X570-P
                      GPU: RX 6700XT 12GB
                      OS Drive: Crucial 1TB M.2
                      Recording Drive: Samsung 960EVO M.2
                      PSU: Corsair RM850x
                      Monitor: LG 32" 1920x1080 60Hz

                      Comment

                      • boloss
                        Rookie
                        • Apr 2019
                        • 7

                        #12
                        Re: Franchise Hex Editing Progress

                        i have followed the first steps but i got an error

                        Comment

                        • boloss
                          Rookie
                          • Apr 2019
                          • 7

                          #13
                          Re: Franchise Hex Editing Progress

                          this is the message
                          Attached Files

                          Comment

                          • bep713
                            Rookie
                            • Nov 2009
                            • 67

                            #14
                            Re: Franchise Hex Editing Progress

                            Originally posted by TuckFheman
                            Would it be possible to convert an Offline CFM to appear as an Online CFM so it will load in the Madden Companion app?
                            I'm not sure about this, but odds are we would just make our own version of the companion app and we'd make it open source so that it can be modified each year...that's a long way down the line tho haha.

                            Is there a logical path towards figuring out how to change all 4 pm games to 1 pm games, in your estimation? That would solve the epic fail of EA forgetting about time zones when they made the game.
                            Yeah for sure, I'm working on an app that will hopefully make doing that real easy. The only thing is that I'm pretty sure the game will take the game time at face value...so if you change a normally 8:15 PM EST game to 5:15 PM, the game will most likely look like an afternoon game instead of night. I haven't tested this tho.

                            This is awesome! I was curious if you were using TheBleedingRed21's discord channel as a resource to bounce ideas off of as well? "OS Madden 19 Mod Community" I would be particularly interested in printing out the stats during the season, so any headway on that would be appreciated greatly!!
                            Hey, I am on the discord but I haven't really been talking about this stuff on there. The stuff that I've figured out is in this thread. I have a feeling stats are gonna be tough but I bet we can figure it out. There has to be a pattern that the game uses to figure out everything anyway, it's just a matter of figuring out the pattern.

                            i have followed the first steps but i got an error
                            Hey man, I wasn't able to see the picture that you attached. Could you send another?

                            Comment

                            • bep713
                              Rookie
                              • Nov 2009
                              • 67

                              #15
                              Re: Franchise Hex Editing Progress

                              Alright, I'm back. Since the schedules were released I wanted to get back and try to make one for the upcoming year...and in doing that I decided it would be way too boring and tedious to manually sift through the hex values to make the season so I've decided to make an app to do this.

                              A few other things to note about game times:
                              Game times in the hex code are weird because they don't follow a pattern that you'd expect. It starts off normal, going from 0000 to 059F (1440 minutes in a day)...but then it sorta goes off the rails. 05A0 = 12:00 PM instead of wrapping back around to 12:00 AM, and then 05DC (60 minutes later) = 13:00 PM. This actually continues all the way until 07FF, which is 22:07 PM. After that, the time does wrap back around to 00:00 AM.

                              I'm guessing this pattern continues until FFFF. The times will 'reset' every 2048 (800 in hex). So, 0000 = 12:00 AM, 0800 = 12:00 AM, 1000 = 12:00 AM and so on. The 'usable' times in those increments are only from the base number to base number + 1439 (59F in hex).

                              Using this pattern, we can figure out why 8:15 PM had a hex value of 7CBF in the other post. Jump in increments of 800 until you hit 7800 (12:00 AM), then add 4BF (1215 - number of minutes from 12:00 AM to 8:15 PM) to get 7CBF.

                              Misc notes
                              The schedule starts at the same location in every franchise save that I've seen, which is awesome! The first game of regular season week 1 should be located at 0x1D05FD.

                              The app will come pre-loaded with historical schedules and will (eventually) include a quick way to replace all games with a historical schedule. Thanks to pro football reference for providing the data!
                              Last edited by bep713; 04-23-2019, 09:39 PM.

                              Comment

                              Working...