Home

Franchise Hex Editing Progress

This is a discussion on Franchise Hex Editing Progress within the Madden NFL Football PC forums.

Go Back   Operation Sports Forums > Football > Madden NFL Football > Madden NFL Football PC
MLB The Show 24 Review: Another Solid Hit for the Series
New Star GP Review: Old-School Arcade Fun
Where Are Our College Basketball Video Game Rumors?
Reply
 
Thread Tools
Old 05-20-2019, 06:27 PM   #17
Rookie
 
bep713's Arena
 
OVR: 0
Join Date: Nov 2009
Re: Franchise Hex Editing Progress

This is an older release. Go to the first post for the most current release notes!

What's up everybody?! We've made a ton of progress on the franchise saves. Basically, to read/write them properly, we need to convert the hex data to binary. I was only seeing part of the picture earlier.

With that, I'm going to release the first version of my schedule editor here. Please make a copy of your franchise in case something goes wrong and you have to lose everything. I haven't tested this too thoroughly so I can't really comment on how it plays out down the line. I made this with the primary goal of importing the new 2019 NFL schedule into Madden 19.

Along with that, we can use this for historical schedules...but anything prior to 2002 will not work well because there weren't 32 teams back then. The editor comes with historical seasons from 1970-2019.

Let me know if the app doesn't work for you or what you'd like to see in the future. This is all open source too so please check it out if you'd like to contribute further! This is a work in progress and is pretty time consuming, so the more the merrier!

Editor: https://github.com/bep713/madden-fra...ditor/releases
Source: https://github.com/bep713/madden-franchise-editor

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.

Last edited by bep713; 07-28-2019 at 02:15 AM.
bep713 is offline  
Reply With Quote
Old 05-20-2019, 09:53 PM   #18
Pro
 
Arrowhead29's Arena
 
OVR: 7
Join Date: Jun 2011
Re: Franchise Hex Editing Progress

Fantastic work, bep!
Arrowhead29 is offline  
Reply With Quote
Old 05-20-2019, 11:01 PM   #19
Pro
 
yankees028's Arena
 
OVR: 0
Join Date: May 2011
Re: Franchise Hex Editing Progress

Quote:
Originally Posted by bep713
Hey guys,
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.
Is there a way to import in photos? Would love to do that for rookies and such
__________________
Madden 20 Underrated Player Guide - 1st post has current updated players.
https://forums.operationsports.com/f...yer-guide.html

Former COD Pro / Streamer: xSiQx / CSn1pe
yankees028 is offline  
Reply With Quote
Old 05-21-2019, 03:45 AM   #20
Nza
MVP
 
OVR: 16
Join Date: Jan 2004
Re: Franchise Hex Editing Progress

Have you had a look into editing injuries in franchises?

Off topic, but is there a known way to get an online CFM and convert it into an offline one? I wonder if it's as simple as packet capturing when Madden loads an online CFM and seeing if it makes a standard HTTP request...
Nza is offline  
Reply With Quote
Old 05-28-2019, 08:37 PM   #21
Rookie
 
OVR: 0
Join Date: Feb 2018
Location: North Carolina
Re: Franchise Hex Editing Progress

Nice work! This definitely comes in handy.

Would it be possible to replace the roster in a franchise file with a custom roster file? Like if I wanted to start a franchise after the Super Bowl using the Revival mod, but replace EA's rosters with a roster file optimized for use with the mod?
JohnnyLaw1 is offline  
Reply With Quote
Advertisements - Register to remove
Old 06-24-2019, 08:09 AM   #22
Rookie
 
OVR: 0
Join Date: Oct 2012
Re: Franchise Hex Editing Progress

Any chance of editing stadiums?
StrokaFresh is offline  
Reply With Quote
Old 06-26-2019, 11:58 PM   #23
All Star
 
franch1se's Arena
 
OVR: 20
Join Date: Apr 2004
Location: San Diego, CA
Blog Entries: 8
Re: Franchise Hex Editing Progress

Quote:
Originally Posted by boloss
this is the message
same exact message I get. Did you ever this resolved?
franch1se is offline  
Reply With Quote
Old 07-28-2019, 01:56 AM   #24
Rookie
 
bep713's Arena
 
OVR: 0
Join Date: Nov 2009
Re: Franchise Hex Editing Progress

And we're back! Can you smell it in the air? It's almost football time!

Editor Progress

Link to new editor: https://github.com/bep713/madden-fra...s/tag/3.0-beta

Alright so a lot of stuff has changed since my last update on here. The editor should be able to read/write M20 franchise files now, but I can't test the write functionality since I can't play the game yet. Back when the schedule editor released, I built the app to only read 1 specific table with hard-coded offsets. Since then, we've found a way to read and write every table in the file (probably...I don't have time to test every single thing - if you find something please let me know). This is accomplished by using the franchise schema file which you can get either by my source code on github (in the data folder) or in Frosty under Legacy explorer -> franchise -> franchise-schemas.ftx.

The new version of my editor includes a table editor which is very raw. It's real easy to break things so please make a backup. You'll know if you mess something up because the save won't load and/or the game will crash to desktop.

That said, you can edit most things! I'll be working on easier to use editors for common things like Player editing or Team editing. For now though, the table editor will work.

I'm going to mention this each time - Stingray68 is awesome and has helped so much.


Madden 20!

I'll be able to play M20 on August 2nd, but I was able to pre-load the data. This will be a great way to ensure the editor is backwards and forwards-compatible. There are a few things that we'll have to do each year that Madden releases:
  1. Get the schema XML file. - Frosty accomplished this for M19, but we don't have Frosty for M20 just yet. That won't stop us, though! I'll talk about this later.

  2. Add any custom schema entries to the new file (UserEntity)

  3. Save a franchise in the new game and open it. - Thank you Seeman22 for providing this on Discord!

  4. Open up a few common tables to see if everything looks right. This is the hardest part because the franchise file structure may change from year-to-year. Good tables to test: SeasonGame, Player, Team, any array table.

  5. Change a value and save the file. Open in the game to see if everything worked. <- WE ARE HERE but we won't get past it until I can get the game to test things out.


Reverse Engineering

NOTE - this gets pretty technical. The main point is that we have the schema file. I'm going to ramble a bit here how I got it in case anyone else is interested in reverse engineering the game's compressed data.

Alright, so as mentioned, I was able to pre-load the M20 data to my PC, which means I do have access to the game's archive (Program Files (x86)/Origin Games/Madden NFL 20/Data/). Pretty much everything you can access in Frosty exists in these directories and sub-directories...it's just a matter of extracting and replacing them (and that takes a long time to do!) Luckily for us, we just need the Franchise schema file and we don't need to replace anything either, so we really don't need Frosty for this.

The schema file for M19 was located in Data/Win32/superbundlelayout/madden_installpackage_00/cas_03.cas and it is located in that same place in M20. How do I know? Look at the schema file from M19. It starts with <FranTkData ....><!--INCLUDES--><Includes />. Open up the M20 cas_03.cas in HxD and search for <!--INCLUDES. You'll find the schema file in its compressed glory. Now we need to decompress it.

Last year, we used frostbite.bms to extract all the files from the cas.cat files....but this year there are no cas.cat files (yay). So, we can't use frostbite.bms to extract the data...but we can use it to figure out what the heck it's doing in the first place.

The frostbite.bms file is really meant to look at the layout.toc file (in Data/) and find all files and give them names that will look familiar if you use Frosty. But we have another problem. In M19, each .toc had a matching .sb file. This year, there are no .sb files.

Anyway, I went down a huge rabbit hole trying to figure out how the script retrieves the data but I actually found an unrelated helpful answer - the compression algorithm. I'm not experienced in reverse engineering, but now I'll know that once you have the compression algorithm you're pretty much golden. Well, M19 uses 'zstd' compression and M20 uses 'lz4'. Knowing that, we can start decompressing the data. We also know when the compressed data ends because the XML will end with </FranTkData>, which we can see in the compressed section too.

The only other thing to understand here is that the data is in 'chunks' of 0x10000 bytes. Every 0x10000 bytes, there's a new lz4 header block or whatever ya call it.

In the end, I was able to get the schema! Awesome!


Next Steps

I really want to work on a stat tracker where you can keep track of historical records, stats, and schedules. Plus the ability to view player progression history by year and which team they were on that year.
bep713 is offline  
Reply With Quote
Reply


« Previous Thread | Next Thread »

« Operation Sports Forums > Football > Madden NFL Football > Madden NFL Football PC »



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 On
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -4. The time now is 04:56 PM.
Top -