Jump to content

Reading the .sav files


MLBTinker

Recommended Posts

The extraction reads the entire length of the .sav file (about 1.3MB) and splits most of it into separate files.

It should be no longer than 30 seconds, especially if you are using a machine capable of running MVP.

The main program calls the MLBRead.exe, which is what your waiting to complete. When MLBRead is complete, it updates the mlbstatu.tmp file. When the main program recognizes that the .tmp has been updated, it begins reading the extracted data.

Link to comment
Share on other sites

  • Replies 113
  • Created
  • Last Reply

OK, I'm definitely using a computer that shouldn't be overloaded by this (2.8 gHz, 512) so I'll send you the two .sav files that I couldn't get to work so you can see what the issue may be. One file uses GForce's Total Minors rosters, but the other is using the default rosters with 1 or 2 user created players.

thanks again for the hard work

Link to comment
Share on other sites

hmm, interesting, I've tried it using TotalMinors and it didn't work, and I also tried it using the default rosters (with one user created player) and both stalled at the extracting phase. Oh well, thats why its a Beta version, if there weren't problems no one would know what to fix :D

Link to comment
Share on other sites

For those that never finish extraction (Krawhitham) - the program creates several dozen .txt files during extraction with the names playera.txt, playerb.txt, ... pitchera.txt, pitcherb.txt..., etc.

One way to determine where the problem is - did any of these files get created? The progression is player(a-u), pitcher(a-o), team(a-e), manager(a-B), organization(a-B), schedule(a-c), data(a-c).

no

Link to comment
Share on other sites

OK, so something is different in the header (the first 850 bytes) of your file. This is one area that I could not decipher much, other than noting that the total file size was included within the first 200 bytes. The file names also appear in several ways.

The program first copies the selected .sav to mlbinput.tmp within the install directory. Then, extraction is performed on that temp file.

I added a user-created player to my file, and the program still works. There seems to be some variable-length stuff in the header that needs to be identified.

Can you compress the .sav and email? It may help to ID the missing variable-length part.

If you don't want to part with the .sav, I have a utility that spits out all the bytes for the entire file. If you put it in the install directory, it will read mlbinput.tmp and create an mlbout.txt. I'd need the first 15 lines or so of that output back.

Do you even get a header.txt file created in the install directory? That is the first 840 bytes of data (after the first 3.)

Link to comment
Share on other sites

Noticed something that might be a problem for some of you.

I've installed to C:Program FilesReadMLB, and created a sub-folder named Yankees Dynasty. When I try to create the ouput file inside the sub-folder, it stays at the extracting .sav stage. When trying to create the output file in the root directory of the install (C:Program Files est.txt), it all works fine. Seems that spaces may be the issue.

EDIT - Just tried creating the file Yankees Dynasty in the root directory of install, and it worked, but when finished, I got an RTE 53 - File not found error. Looks like spaces are the problem. :) Hope this helps.

DOUBLE EDIT - The RTE 53 might have been because I deleted the readme.txt, uninstall log and MLBSTATU.tmp by mistake. :oops:

Link to comment
Share on other sites

Ladies and Gentlemen, we have enlightenment.

Found the problem with the hanging extraction - somehow the directory change on the destination file is causing the MLBRead.exe to write the status to the destination directory instead of the program directory.

Easy fix. Done.

For the Error 9, thanks to Krawhitham for the .sav. There was an issue with the rotation of your 94th team. The MVP default is to place 0's in empty slots, not 255's. I adjusted to check for both.

Done.

I'll upload a corrected V0.9.1 with the directory fix tonight.

Link to comment
Share on other sites

OK, I just tried it with the output file being within the readMLB folder and I got a Runtime Error

Runtime Error '62':

Input past end of file

Don't know if its something I'm doing or what, I'll wait until you get the update up this evening and try it again though.

Link to comment
Share on other sites

I was just about to post asking if it was possible to have some more info in the HTML file, then I remember what it is you're doing. :lol: Kinda asking for something when you haven't figured out how to export it yet. :lol:

Again, great job.

Link to comment
Share on other sites

OK.

That is another issue. I'm assuming you've moved on to the Reading Data portion and that's where the run-time error occurs. The program reads the extracted sub-files for information to calculate the statistics, attributes, names, etc. (You'll know if you've made it that far if datac.txt exists for that extraction - it's the last one created. Since it may have worked before, you'll need to check the time of the file to determine if it was from that extraction.)

Please check the first line of playera.txt, pitchera.txt, teama.txt, managera.txt, organa.txt and scheda.txt. [within the installation directory.]

Using default data, they are 2500, 1600, 100, 100, 30, and 2436.

The number of lines in each file should be the first line number +1 and all files of the same type should start with the same number on line 1.

I went through the code again - can't find anything glaring. Let me know if something I described seems different.

Link to comment
Share on other sites

OK, those are the numbers that are at the beginning of each of those files. The extraction apparently worked since I have all those files, but the runtime error occured before I could read anything. I tried to Email the .sav file to you, but the email you listed in the readme got returned Undeliverable...

Let me know what information you need to help.

Link to comment
Share on other sites

Fuzz,

Personally, I just think it would be great to be able to access the stats without having to load the game. Also, I'm still holding out hope that eventually the files will be able to be edited, to make it a fully fledged Dynasty editor.

Link to comment
Share on other sites

Fuzz,

MarkBTheYankee kind of hit upon the reason I started this project. There is absolutely no way to realistically manage all three teams in your organization with the limited data viewing tools provided within the program. Reviewing data without having to open the program might help some, too.

While MVP is not touted as a statistical-based program, I think with the appropriate mods, the stats might be meaningful.

Additionally, CPU optimized rosters can get pretty interesting.

While the data in year 1 is quite editable (.dat files.) Data is subsequent years may need modification. I realize that someone provided a updated progress file, but hopefully an editor could spot trends and adjust as necessary.

Please keep in mind that this is just the beginning. However, once everyone can read their .sav's, the rest should come quickly.

Link to comment
Share on other sites

While the data in year 1 is quite editable (.dat files.) Data is subsequent years may need modification. I realize that someone provided a updated progress file, but hopefully an editor could spot trends and adjust as necessary.

Where would we find those files?

Thanks a lot MLBTinker. I truly apprieciate your work. :)

Link to comment
Share on other sites

I have processed the two updates and have a V0.9.2 patch ready. I'm waiting for a response from someone testing a certain fix before releasing.

Aside from the two bugs (the destination directory and the Error 9), I think I've fixed the Input past EOF as well.

I've added AAA and AA stats to the html.

If anyone wants now, send me directions.

If 0.9.2 works for all .savs, it will be time to expand the output options/attempt altering the file.

Link to comment
Share on other sites

(posted here for everyone to see in case they have the issue)

I think there may be some quirky timing issue with the completion of the subprogram at the same time the main program is trying to read the status as the subprogram writes that status.

I've put in an error trap to check there.

Let me know if you get a specific message.

Link to comment
Share on other sites

the speed thing seems to work for me although I still got a message in the middle of the execution about reading the status or something like that. But the HTML stuff seems to come out right

This rules, I hope this leads to a usable dynasty editor...but for now I'm happy to be able to read stats without starting up the game.

Link to comment
Share on other sites

out of curiosity, as this progresses will it be possible to do two things, 1) put the major league clubs and their minor league affiliates next to eachother rather than spread apart in the HTML doc and 2) somehow be able to sort by statistics??

I don't understand what has been done to get what we have so far, but these are two things that I thought would be good improvements

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...