View Full Version : Disecting the FGA File format
In relation to QS's thread about FOF Utilties, I thought I would share my work on figuring out the format of the FGA files (the same game files FOF creates). I have just started on this, so don't get your hopes up, but I will keep the format updated as I discover more of it. Hopefully this will help someone else out in writing utilities, and hopefully people will help me fill in holes so that it can be complete.
Anyway, here's the file (Excel 95 spreadsheet):http://fidosutils.shorturl.com/fofreporter/fgaformat.xls
sabotai
11-20-2003, 03:35 PM
bump
sabotai
11-20-2003, 04:06 PM
Fido,
The 3rd value under GameInData (the short value after Game Stage) is the current week. If you change the value, and go into the game, you'll see when you click on "Simulate Games", it opens to a different week. The number in the status bar at the bottom changes as well.
sabotai
11-20-2003, 04:19 PM
With the 6 after FA Stage, they didn't change at all in the season that I smmed, but they changed after I hit End Season (and before I did anything). If that helps...
I'm really goign to feel stupid if you ended up figuring all the missin gones out already. :D (Which you probably did)
wbonnell
11-20-2003, 05:14 PM
Do you go through the tedious process of making a change and then running a binary diff of the changed files? I did this once for Diamond Mind Baseball but never got around to writing a user interface to make changes.
sabotai
11-20-2003, 05:27 PM
I've been using a Hex Editor. I make a change to something and going into the game to see if it changed anything.
Fido, as for the last large chunk of data you thought could be draft info, I made a bunch of trades involving just draft picks and noticed some changes in that area.
My only thought is why would be it be 4 years? It only lets you trade up to 3 years of draft picks. I also noticed some data at the end of that chunk that hasn't changed yet.
Originally posted by wbonnell
Do you go through the tedious process of making a change and then running a binary diff of the changed files? I did this once for Diamond Mind Baseball but never got around to writing a user interface to make changes.
I haven't gotten to that point yet. Right now I'm reading in the file, dumping chunks out to csv files and searching for patterns and trying to find data from the game in the dump.
Originally posted by sabotai
With the 6 after FA Stage, they didn't change at all in the season that I smmed, but they changed after I hit End Season (and before I did anything). If that helps...
I'm really goign to feel stupid if you ended up figuring all the missin gones out already. :D (Which you probably did)
I'm not sure about that one - I based it off of work someone else had doen on FOF4. What I think it means is the FA stage during the FA process.
Originally posted by sabotai
Fido,
The 3rd value under GameInData (the short value after Game Stage) is the current week. If you change the value, and go into the game, you'll see when you click on "Simulate Games", it opens to a different week. The number in the status bar at the bottom changes as well.
Added in and updated with all of the stuff that I had figured out since I posted this. Thought the idea had died from complete lack of interest so I stopped updating.
sabotai
11-20-2003, 09:23 PM
Originally posted by Fido
Added in and updated with all of the stuff that I had figured out since I posted this. Thought the idea had died from complete lack of interest so I stopped updating.
I somehow missed it the first time through. I found it when I did a search on the fourm.
lighthousekeeper
11-20-2003, 09:42 PM
Since this seems to be a utility writer's thread, I throwing this question out there to anyone who can help:
When reading the *.fff files, what programming technique do you use to know the length of the "Save File Name". Of course this field length is variable depending on the name of the saved game that the user chooses, and (unlike many other cases of string fields) there seems to be no field that stores the length of the field. So I'm having a hell-a time trying to read these files into my utilty.
:confused:
Any help is greatly appreciated.
lighthousekeeper
11-21-2003, 01:54 AM
Sorry - I figured out what I was doing wrong - the file name is a set 48 characters. The *.fff structure is:
UniHeaderID string (16)
UniHeadVersion string(2)
UniFileNum short, total number of saved universe
UniID string(8), ID of universe
UniName string(48), saved name of universe
Originally posted by lighthousekeeper
Sorry - I figured out what I was doing wrong - the file name is a set 48 characters. The *.fff structure is:
UniHeaderID string (16)
UniHeadVersion string(2)
UniFileNum short, total number of saved universe
UniID string(8), ID of universe
UniName string(48), saved name of universe
Was just going to post that as well. An interresting thing to note here is that the size of the file does not seem to shrink. If you delete a saved game, you'll have 56 bytes of empty space at the end of the file.
sabotai
11-21-2003, 03:19 PM
Fido,
On your spreadsheet, line 22 of PlayerDataFile05, is a little chunk of 6. #5 and 6 of that chunk is a short value that specifies what status the player is. 0 = Active Roster, 1 = Injured Reserve, 2 = Inactive Roster, 3 = Suspended.
sabotai
11-21-2003, 06:24 PM
Right now I'm reading in the file, dumping chunks out to csv files and searching for patterns and trying to find data from the game in the dump.
What are you doing to dump the data to csv? A program you found or something of your own design?
sabotai
11-21-2003, 07:08 PM
Just a thougt here. The 2 in the transaction info that you don't know. Could it be a reference to the offer that the player accepted or declined when signed by a team?
Originally posted by sabotai
Just a thougt here. The 2 in the transaction info that you don't know. Could it be a reference to the offer that the player accepted or declined when signed by a team?
I don't think it is. I think that would fall under the transaction type field. Both of those unknown fields really could be an extension of the previous fields (they could be longs instead of shorts).
Originally posted by sabotai
What are you doing to dump the data to csv? A program you found or something of your own design?
Neither actually. I'm figuring out the data as I am writing the code that will read it in for my utility. I read the data into contiguous memore chunks, then interpret it to determine the actual values. As I want to research a specific section of the file, I add in debug code which writes the raw data out to a csv file. OPen it up in access, look for patterns and use that to tweak the interpretation.
I just updated the file again, and this will probably be the last update from me for a while. I'll add in anything that other people find (if anyone's looking:)), but I've been working on this for about a week now and am getting sick of it. Plus I have enough of the data figured out that I can get started on the actual utility.
sabotai
11-21-2003, 09:54 PM
The short value before Injury Length effects what status player is given (Out, Doubtful, Questionable, etc.). But it is not as simple as 1=Out, 2=Doubtful, etc. I'm not sure how it works yet. It might be some kind of modifier that involes the length of injury and injury type.
Either way it's not simple so I dont' feel like figuring it out. :D
lighthousekeeper
11-22-2003, 09:44 AM
I've been trying to follow Fido's spreadsheet when dissecting the first tab (GameInDataFile05), but its not working for me. Seems to me that there are a lot more bytes before I get up to the email section.
Of course I may just be screwing something up on my own accord, which is my guess.:)
Originally posted by lighthousekeeper
I've been trying to follow Fido's spreadsheet when dissecting the first tab (GameInDataFile05), but its not working for me. Seems to me that there are a lot more bytes before I get up to the email section.
Of course I may just be screwing something up on my own accord, which is my guess.:)
I did just fix a couple of problems in the spreadsheet that did not match up with my code, but nothing to do with the size of it. The spreadsheet could very well be wrong - I'm only testing it against the three debug games that I have saved. If you want to e-mail me your (zipped) fga file (dfedolfi2000 is my yahoo mail address) I can look and see what is diffrent.
gstelmack
06-22-2004, 07:15 PM
Did anyone save off this spreadsheet? I may have a use for it...
I have it. What's your email address? I'll email it to you.
P.S. So you're in Cary, huh? I didn't notice that before. I live in Durham and work in Raleigh.
gstelmack
06-22-2004, 08:40 PM
I've got it, thanks. Yeah, I live in Cary and work in Morrisville.
wade moore
06-23-2004, 03:02 AM
Taco,
Can you send it to me also? wademoore AT gmail.com
gstelmack
08-08-2005, 03:06 PM
Anyone have a more up-to-date version of this? Taco's does not have the "player injury status" change mentioned above, and I'm having the same issue Lighthousekeeper is with there being a lot more data at the end of the first GameDataFile section (which, of course, is now at version "A5" instead of "05").
I can mess around trying to figure this out, but that of course would delay doing anything with this utility, wouldn't it? Actually, I'm not precisely sure what utility I'm going to write with this. At the very least, I may finally be able to produce an automated draft order file for Extractor, but if I get ambitious I'm half-tempted to go so far as produce an MDB Exporter that dumps all the game-visible info to an MDB file for other utility writers to work from (I say "game visible" because I'm still against exporting the raw coach/scout/player attributes for cheating purposes).
vBulletin v3.6.0, Copyright ©2000-2026, Jelsoft Enterprises Ltd.