Player Export Format
Introduction
HardBall 5 allows you to import and export player data.
The file extension is meant to tell the two player types apart; Batters use
.BTR, and Pitchers use .PIT.
Exported player data is split into multiple parts:
- Header
- General
- Ratings
- Statistics
Some of these are the same between batters and pitchers, while others differ. As with most HardBall 5 data, values are little-endian.
This page only covers player exports. Some of the data structures are similar in Team exports and League files, but are different enough to require their own documentation.
Header
Player export files have a two byte header at the start of the file (offset 0). This is also meant to tell batters and pitchers apart, in case you were trying to be funny and swap file extensions.
- Batters:
0x40,0x00 - Pitchers:
0x41,0x00
These values also differentiate HardBall 5 player exports from HardBall 4 player exports.
It's important to note that this header is not stored in Team Exports or League Data. Those files use different ways of telling batters and pitchers apart.
General
File offset 2 marks the beginning of the player data "proper". The following data is shared between batters and pitchers:
- Offset 2: Player image index (2 bytes).
- Offset 4: Player name call index (2 bytes).
- Offset 6: Player name (16 bytes including
0x00terminator).
todo: document uppermost bits of player image and name call
Ratings
Some Ratings values are shared between batters and pitchers, while others aren't.
Offsets 0x2D-0x2F are not used by either batters or
pitchers, and should be set to 0x00.
Shared between Batters and Pitchers
Values shared between Batters and Pitchers in the same locations:
- Offset 0x16: Jersey Number (1 byte; valid values 0-99)
- Offset 0x17: Age (1 byte; valid values 20-55)
- Offset 0x18: Experience (1 byte; valid values 0-45)
- Offset 0x19: Speed (1 byte; valid values 1-99)
- Offset 0x1A: Primary Fielding Ability (1 byte; valid values 0-99)
- Offset 0x1B: Close/Late (1 byte; valid values 0-99)
- Offset 0x1C: Runners in Scoring Position (1 byte; valid values 0-99)
- Offset 0x1E: Player Position and Skin Color (1 byte)
- Offset 0x1F: Player Handed-ness (1 byte)
- Offset 0x20: Streak Type (1 byte)
- Offset 0x21: Unsure;
0x00for most players (1 byte)
Values shared between Batters and Pitchers in different locations:
- Offset 0x1D: Home/Away for Batters (1 byte; valid values 0-99)
- Offset 0x2B: Home/Away for Pitchers (1 byte; valid values 0-99)
- Offset 0x1D: vs. Left Hand Batters for Pitchers (1 byte; valid values 0-99)
- Offset 0x28: vs. Left Hand Pitchers for Batters (1 byte; valid values 0-99)
This byte defines both the skin color and player position. The player position is only meant to be used by the batter, but...
76543210 |__|???| | | | +--- Skin Color (0=Light, 1=Dark) +-------- Player Position
Values for Player Position are as follows:
0x0_Pitcher0x1_Catcher0x2_1st Base0x3_2nd Base0x4_Shortstop0x5_3rd Base0x6_Right Field0x7_Center Field0x8_Left Field0x9_Designated Hitter0xA_Utility Infielder0xB_Utility Outfielder
While these values aren't valid, they won't outright crash the game:
0xC_"PH" (Pinch Hitter?)0xD_"OF" ("Offspeed")0xE_"CU" ("Curveball")0xF_"FA" ("Fastball")
The three pitch types appear since the pitch type string table is located directly after the player position string table.
This byte defines both the batting and throwing hands.
76543210 |__||__| | | | +--- Batting hand (0-2) +------- Throwing hand (0 or 1)
0 = Left, 1 = Right, 2 = Switch (batting only)
As this value doesn't make sense unless you have the manual, here's what each of the possible values mean:
- Even throughout the season.
- Hot at the start, cools through end.
- Hot at the start and end, cool in the middle.
- Cool at the start and end, hot in the middle.
- Cool at the start, hot at the end.
Batters only
Values that only Batters have:
- Offset 0x22: Contact
- Offset 0x23: Power
- Offset 0x24: Arm
- Offset 0x25: Secondary Fielding Ability
- Offset 0x26: Groundout %
- Offset 0x27: Pull %
- Offset 0x29: Secondary Position
Offsets 0x2A-0x2C are ignored for batters, and are usually
set to 0x00.
todo: explain values for Secondary Position
Pitchers only
Values that only Pitchers have:
- Offset 0x22: Stamina
- Offset 0x23: Accuracy
- Offset 0x24: Fastball
- Offset 0x25: Curveball
- Offset 0x26: Changeup
- Offset 0x27: Slider
- Offset 0x28: Sinker
- Offset 0x29: Knuckleball
- Offset 0x2A: Screwball
- Offset 0x2C: Pitcher Type
Statistics
Statistics begin at file offset 0x30, and aren't fully identified yet. All stats in player export files are assumed to be Historical.