Reading team files

4 posts / 0 new
Last post
RonenKi
RonenKi's picture
Offline
Last seen: 14 years 5 months ago
Joined: 11/24/2006 - 14:00
Reading team files

Hello,
I'm trying to write a smally parsing program for my PC Playmaker. I have pretty basic programming knowledge, and the first obstacle I've run into is reading the team files. When I look at them in a text processor they appear something like this:
׀7_ךe־~   Ned OConnelll[ˆ גSaveל­׀ Z     d P ( <  
Jim Willisester גSaveל­׀ Z     d P  <  
Chad Johnstoner גSaveל­׀ Z Q    2 d P   Lee Searyiver  גSaveל­׀ Z A    d <  
Dukel Lavever  גSaveל­׀ Z C    d (  <  
Monti Dawsver  גSaveל­׀ Z ?    d ( <  
James Strezel  גSaveל­׀ Z M    d (  <   John Jackmanr  גSaveל­׀ Z H    d <   Ric Greenlyoner גSaveל­׀

Needless to say, it would be pretty hard to work with them in that format- no player numbers, and sometimes random characters on the ends of players' names that would make parsing them properly a lot harder. Does anyone have experience with this sort of thing?

Many thanks,
Ronen

jstout
jstout's picture
Offline
Last seen: 7 years 6 months ago
Joined: 11/04/2004 - 19:50
Re: Reading team files

I wrote a PC team editor program so I have some experience in doing this.  The majority of the information is in hexadecimal format so looking at the file in a hex editor will be better for examining the file.  Each player is listed in order with all their info so you just need to breakdown each player format.

For the names, the byte before the player name tells the program how many characters long the name is (Each name can be up to 29 characters long).

I can answer any questions you might run into.

Brian Brinkmann
Brian Brinkmann's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 10/30/2004 - 19:45
Re: Reading team files

It's kind of new, so a lot of folks don't know, but most of the current PMFB source is online.  Here's a link to a function that reads in all the team files in the current file format: [url]http://trac.playmaker.com/browser/public/trunk/pmfb/engine/src/teamFile.....  You can also see the whole file directly at [url]http://svn.playmaker.com/public/trunk/pmfb/engine/src/teamFile.cpp[/url].

If you want, you can download the latest copy of the application that uses these new sources at [url]http://playmaker.com/ftp/pmfb/PlayMaker-Football-2.5.dmg[/url] for Mac, and [url]http://playmaker.com/ftp/pmfb/PlayMaker-Football-2.5-Setup.exe[/url] for Windows.

I should point out that the file format has changed with this new release.  So, you may have additional questions after you have a look at it.

RonenKi
RonenKi's picture
Offline
Last seen: 14 years 5 months ago
Joined: 11/24/2006 - 14:00
Re: Reading team files

Many thanks! The tip about the byte before containing the length of the name really helped. Although maybe I'll need to sideline the development process since Brian released the new version just now :)

On that note, how does one go about obtaining a license for 2.5 (assuming already being registered)? By sending an email to support?

Ronen

Log in or register to post comments