View Single Post
Old 07-16-2006, 12:10 PM   #1
doug melvin
Minors (Single A)
 
Join Date: Jul 2003
Posts: 91
Wanted: Some help creating a draft pick editor

Pierre's utilities used to be fantastic for this in 6.12, but there's nothing for 6.5. I know the layout of the tradedpicks.dat file, but have little experience coding outside of perl and bash scripts.


The anatomy of tradedpicks.dat is as follows:

Each 'line' contains 20 hexadecimal pairs.
1st line:
1st pair: total number of entries
remaining 18 pairs: 00

2nd line (and subsequent lines):
1st pair: rd of pick traded
next 7 pairs: 00
next pair: team no. of team that gives up the pick
next 3 pairs: 00
next pair: team no. of team that gets the pick
next 3 pairs: 00
next pair: entry number
next 3 pairs: 00


So, if the Yankees (Team 1) traded their 1st rd pick to Boston (Team 2), and the A's (Team 6) traded their 3rd rd pick to Pitt (Team 15):
02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 01 00 00 00
03 00 00 00 00 00 00 00 06 00 00 00 0f 00 00 00 02 00 00 00

You can associate team names with their numbers from the Teams.dat file.
Entry 0x0bb8-0x0be9 is Team Name 1
Entry 0x1770-0x17a1 is Team Name 2
Entry n*0xbb8 to n*0xbb8+31 is Team Name n

The last detail I'm a little less sure of. You can figure out the draft order from draft.dat. The beginning of that file consists of sets of 4 hexadecimal pairs:
line 1:
1st pair: team no. of team with 1st pick in the draft under normal circumstances
remaining 3 pairs: 00

Line 2: repeat until you get to end of a typical draft round.
__________________
http://cpl.shulermisra.org
doug melvin is offline