Saturday, March 25, 2017

Adding Stadium Art to Baseball Mogul

I got an email this morning with the following question:
  1. I am trying to use this photo of Jarry Park in Baseball Mogul, but all the numbers are skewed. The batter is nowhere near home plate, the first baseman is almost on the pitchers mound... what can I do to fix this?
They attached a file called PBP-Stadium-Montreal.jpg:

To verify the problem, I copied this file to my 'Stadiums' folder and started a new game as the 1974 Expos. When I went into Play-By-Play mode for their first home game, the field looked like this:

As reported, the ratings for all the fielders are in the wrong place on the field (as are the outfield fence distances). This is because every stadium photo requires a matching text file that specifies the coordinates that Baseball Mogul needs to use when drawing these labels.

To get these coordinates, open the photo in a graphical editing program. I use the "Paint" program included with Windows. Baseball Mogul assumes a photo size of 640 x 480 pixels, so you should resize your photo before proceeding.

Microsoft Paint displays the coordinates of your cursor in the lower left corner of the window. Start by placing your cursor over home plate and record the coordinates to a text file. Continue this process for each of the following locations on the field, typing each set of coordinates on it's own line. (If the foul poles are outside the picture, estimate their coordinates.)

Home Plate
First Base
Second Base
Third Base
Left Field Corner
Center Field Wall
Right Field Corner

After each pair of coordinates, you can add a comment by typing '//' and the following it with a useful label. When done with PBP-Stadium-Montreal.jpg, my text file looks like this:

318,351 // HOME_PLATE_COORDINATES Bottom corner
515,290 // FIRST_BASE_COORDINATES Outside corner
321,250 // SECOND_BASE_COORDINATES Top corner
128,285 // THIRD_BASE_COORDINATES Outside corner
-47,221 // LEFT_FIELD_COORDINATES Base of foul pole
324,194 // CENTER_FIELD_COORDINATES Base of CF wall
700,229 // RIGHT_FIELD_COORDINATES Base of foul pole

Save this file with the same filename as the stadium photo, but add the ".ini" file extension (e.g. PBP-Stadium-Montreal.ini).

When I go back into Baseball Mogul 2016 and resumed the game with the 1974 Expos, the stadium view now looks like this:

Much better!

No comments: