Table of Contents

Creating Custom Libraries

The default library that ships with Digital Diamond Baseball is configured with two teams so you can start playing the game immediately.  However, there is also a very large collection of free libraries that were created by customers and are available online at http://www.sportsreplays.net/downloads4.htm.

 

Of course, it is also a lot of fun to build your own custom libraries.  Using various resources on the World Wide Web, you will be able to build player libraries that contain teams from any season in history.  You can even put your child's little league team in digital diamond baseball!

To create a new library in Digital Diamond Baseball, select the Library->Create A New Library menu item and enter a name for your new library.  This will create an empty player library, and the new library will become your current library.  You can always tell what library is currently in use by looking at the title bar of the Main window.

Once you have created a new library, you are ready to populate your library with players.  There are two ways to populate your library with players:

  • import players directly from another library
  • import players using Comma Separated Value (CSV) files
Importing palyers direclty from another library is the easiest method and will be explained first.

Importing Players Directly From Another Library

The quickest way to add players to your new library is to import them directly from another library installed on your system.  To import a player from another library select the Library->Import Players From Another Library menu item.  After selecting this menu item you will be asked to select the library you want to import the players from (the source library).  After you select the source library, the Import Players From Library dialog box will be displayed.

Using the Import Players From Library dialog you can select the team you want to import players from and the individual players you want to import.  You can select more than one player to import, but they all must be on the same team.  Click OK after you have selected the players you want to import.


The final step in the import process is to specify what team you want to import the players to.  This will be one of the teams in your current library.  When you are prompted to do so, select the destination team and the players will be added to your library.




Importing players using CSV files.

The second way to import players into your library is to use comma separated value files (CSV files).  There are two there are two typical methods for creating import CSV files:

  • Using the Lahman Database: This is the easiest method to generate import files.  This method is explained in detail below.
  • Using websites that provide free baseball statistics: This method is more complicated, but it gives you the ability to create libraries based on up-to-the-minute baseball statistics.  Because this process is a bit more complicated, it is explained using instructional videos available at www.digitaldiamondbaseball.com.

Creating CSV Import Files Using the Lahman Database

The easiest way to create import files is to use the Lahman Database, which is a free and comprehensive Microsoft Access database containing baseball statistics from 1871 to present time.  While this database is free, please consider making a donation to support this amazing project (donations can be made at baseball1.com/statistics; Digital Diamond Baseball is not affiliated with the Lahman Database project in anyway). 

You will need to download the most recent version of the Lahman Database from baseball1.com/statistics before you can create the import files needed to build a custom library.  Once you have downloaded the Lahman Database (be sure to download the most recent Microsoft Access version and remember where you save the file), you can generate import files using the Library->Generate Lahman Import Files menu item.  (NOTE: because the Lahman Database was created using Microsoft Access, this feature is only available if you are using Digital Diamond Baseball on a Windows based machine.  However, you can use libraries that were created by other Digital Diamond customers, and sharing libraries in Digital Diamond Baseball can easily be done using the Library->Backup Current Library and Library->Restore A Library menu items).  This will display the Generate Lahman Import Files dialog box.  To generate import files for your custom library, follow the steps listed below:

  1. Selecting the Lahman DB File: Click on the"..." button to locate your Lahman Database file.  This is the Microsoft Access database file you downloaded from the Lahman website (this is the file with the .mdb extension).
  2. Selecting the year: Select the year that you would like to import.  This year determines what statistics will be included in library.
  3. Selecting the team: After selecting the year you will be given the option to select the team you want to import.  The default option is All Teams, which will import all teams in the selected year.  If you select a specific team, only that team will be included in the import file.
  4. Estimating SO and CS: In most cases, you do not want to check the Estimate CS and SO check box.  However, for some seasons in the late 1800s and early 1900s statistics for CS and SO are missing.  If you check the Estimate CS and SO checkbox, Digital Diamond Baseball will estimate these values using the ratios you specify for SB/CS and AB/SO.  If you only wish to estimate one of these stats (just CS or just SO), you can leave the ratio field blank.  The default ratios (3 SB/CS and 12 AB/SO) were chosen based on ratios for seasons in the same era that were not missing these statistics.  If you check the Estimate CS and SO box, values for CS and SO will be estimated for all players in the library.
  5. Generating the import files: Click on the Generate button.  This will generate the import files.  When the import is complete, click Close to exit the dialog.

Importing Files into a Library

As soon as the import file generation is complete, you will be ready to import the players into your custom library. To import the players, select the Library->Import Players Into This Library menu item.  This will display the Import Players dialog box shown below.

Importing is accomplished by specifying the import files that you just generated using the Lahman Database.  Please complete the following steps to perform the import:

  1. Specifying the Formats: Click the three "..." buttons located in the Format Section of the Import Players dialog and select the Lahman-BattingFormat, Lahman-PitchingFormat, and Lahman-FieldingFormat files respectively.  These files can be found in the Import\Lahman folder, which is located in the Digital Diamond Baseball installation folder.
  2. Specifying the Batting Stats: Click the "..." button located in the Batting Section of the Import Players dialog and select the Lahman-YEAR-TEAM-BatterCombined file, where YEAR and TEAM are the year and team you selected when you generated the import files. This file will be located in the Import\Lahman\YEAR-TEAM folder.
  3. Specifying the Pitching Stats: Click the "..." button located in the Pitching Section of the Import Players and select the Lahman-YEAR-TEAM-PitcherCombined file, where YEAR and TEAM are the year and team you selected when you generated the import files. This file will be located in the Import\Lahman\YEAR-TEAM folder.
  4. Specifying the Fielding Stats: Click the nine "..." buttons located in the Fielding Section of the Import Players and select each of the the nine Lahman-YEAR-TEAM-FieldingPOS files, where YEAR and TEAM are the year and team you selected when you generated the import files, and POS represents each of the nine positions. These files will be located in the Import\Lahman\YEAR-TEAM folder.  Please note that for much older seasons, only one fielding file will be created for the outfield positions (Lahman-YEAR-TEAM-FieldingOF).  This file should be selected for each of the three outfield positions in the Import Players dialog.

  5. Selecting the Type of Import: In most cases, you will want to perform a Basic import.  A bassic import updates a player's statistics if they already exist in the library, and creates new players if they are not already in the library.  The Basic import feature will only add or update players in a library, it never removes players.  However, if you are importing players into a library that is already populated with players, and you want to erase those players first, you should select the Empty library before import radio button before you do the import. The Track real-time statistics, Freeze Year, and Freeze Team options are not used when importing from Lahman.  These options are explained in detail in the next section and in the help videos posted on digitaldiamondbaseball.com.   \

  6. Importing the Players:  Click on the Import button to start the import.  When the import completes, click on the Close button and you should see your players in the Main window.

Congratulations, you just created your first custom library!  Please see the Browsing Players in a Library section to learn how to browse the players in your new library.

If for some reason, you would like to remove all players, simulated statistics, teams, and scheduled games from the current library, you can use the Library->Empty This Library menu item.

Creating CSV Import Files Using Websites that Provide Free Baseball Statistics

It is possible to create a custom library using import files that you collect using online baseball statistical references.  Baseball-Reference.com is perhaps the best free online reference for building custom libraries.  The exciting part about this feature is it allows you to build libraries based on statistics from the currently active baseball season.  In other words, you can have a library that mirrors the current baseball season as it unfolds.

In Digital Diamond Baseball, import files are simply text files that consist of player statistics.  Each player is specified on a different line in the file, and each statistic for a player is separated by a comma.  Digital Diamond Baseball requires that certain statistics are specified for batting, pitching, and fielding.  However, fielding statistics are optional. 

The first step to create a custom library using import files is to create a single file containing batting statistics for all the players you would like to have in your library.  This file should include batting statistics for pitchers as well.  Next, you will need a single file containing pitching statistics for all pitchers in your library.  Finally, if you want to have individual fielding ratings, you can also provide a single file per position for all players in your library.  All of these files can easily be created by exporting the statistics from an online baseball statistical reference.

Batting, pitching, and fielding files must follow a particular format.  The example that will follow shows a format that works well with Baseball-Reference.com.  However, the format can be customized to suite other online baseball statistical references.

Required Batting Statistics

FullName Team G AB R H Doubles Triples HR SB CS BB SO SH Pos
Joe Smith#, PHI, 154, 573, 88, 146, 41, 1, 20, 24, 10, 87, 132, 0, 79
Andy Williams*, PHI, 149, 511, 62, 134, 20, 2, 10, 8, 2, 60, 140, 1, 89
Randy Thomas, PHI, 84,210, 14, 65, 5, 0, 5, 0, 0, 16, 23, 2, 6,

Required Pitching Statistics

FullName Team G GS SV IP H R ER HR BB SO
Steve Jones*, PHI, 53, 0, 31, 49.2, 33, 19, 19, 5, 25, 49
Tony Ulmer, PHI, 19,19, 0, 112.1, 112, 41, 35, 6, 22, 775

Required Fielding Statistics (you need one file per position, this file represents statistics for RF)

FullName Team Chances Errors
Joe Smith, PHI, 259, 1
Andy Williams, PHI, 145,22

The data shown in the tables above were generated using Baseball-Reference.com.  In the batting and pitching files, an * listed after a player's name indicates that they bat or throw left-handed.  For batting files, a # listed after a player's name indicates that they are switch hitters.  The Pos field in the batting statistics file indicates all the positions played, where each number is a position (i.e., 1-pitcher, 2-catcher, 3-first base, 4-second base, 5-third base, 6-short stop, 7-left field, 8-center field, and 9-right field).  

Creating the import files listed above is easy using Baseball-Reference.com.  The steps shown below walk you through the steps for importing the batting statistics for the 2010 NL season (NOTE: it is highly recommended that you view the video posted on digitaldiamondbaseball.com that walks you through these steps in detail):

  1. Point your browser at Baseball-Reference.com and navigate to Leagues->NL History->2010 NL.


  2. Scroll down to the Player Standard Batting section and click on the SHARE link.  If you don't see the SHARE link, wait for the page to finish loading, it can take a while for the entire page to load.


  3. Click on the next to the columns that are not required by Digital Diamond Baseball.  If you don't see the , wait for the page to finish loading, it can take a while for the entire page to load.  When you are done your player table should only include FullName, Team, G, AB, R, H, 2B, 3B, HR, SB, CS, BB, SO, SH, Pos. Summary.


  4. Click on the comma-separated link to get the statistics in Comma-Separated-Value format.




  5. Press the Ctrl and A keys at the same time to select all of the statistics and then press the Ctrl and C keys at the same time to copy the statistics to your clipboard.  Next, open your favorite text editor (you can use Window's Notepad, but Notepad++ is a better choice), and paste the text into your editor.  Do not use a word processor like MS Word because it will not save the file using plain text.



    Scroll to the end of the file and delete everything after the last player. 



  6. Create a folder under the Import\BaseballReference folder (this folder can be found in your Digital Diamond Baseball installation folder).  This folder will be used to store your import files.  Because these are 2010 NL statistics, you may want to call the folder 2010NL.  Next, use your editor to save the statistics to a file called CombinedBatting.txt in the Import\BaseballReference\2010NL folder.
  7. Repeat these steps using the pitching statistics on Baseball-Reference.com to create a file called CombinedPitching.txt and save it in Import\BaseballReference\2010NL folder. 
  8. If you wish to include fielding statistics in your library, you can get them using the Fielding menu in Baseball-Reference.com. This menu provides access to the required fielding statistics for each position. 

     

    You will need to create one import file for each position.  For example, the fielding for pitchers in Baseball-Reference.com can be generated as shown below:



    NOTE: For the fielding stats you will need to delete the LgAve line located on the second line of each fielding file, and also everything after the last player in the file.

  9. Once you have created the import files listed above, you can import them using the steps listed in the "Importing Files into a Library" section above.  When entering the batting, pitching, and fielding layout files in the Import Players dialog box, select the files located in the Import\BaseballReference folder located inside your Digital Diamond Baseball installation folder.  For the batting, pitching, and fielding statistics, select the files you created in steps 8 and 9 and saved in the Import\BaseballReference\2010NL folder.  Because the year is not included in your import files, you will need to enter the year (in this case the statistics are from 2010) into the Freeze Year field in the Import Players dialog box before you execute the import.

As mentioned earlier, there are ways to customize the import file formats to accommodate other online references.  Please view the videos posted on digitaldiamondbaseball.com for more information.

Following Along With the Current Baseball Season using CSV Files

If you want to follow along with the current baseball season, all you have to do is repeat the steps listed above as often as you like (every month, every week, or even every day).  For example, every Monday morning during the regular season you could download and import the statistics from Baseball-Reference.com and your library will be instantly updated with the current season stats and rosters!  In addition, the season stats that you have accumulated while simulating games will remain unchanged.

When creating a custom library that will be based on real-time statistics, be sure to select the Track real-time statistics radio button in the Import Players dialog box.  This will tell Digital Diamond Baseball to handle trades and player promotions properly.  For example, if a player is traded you will be prompted to confirm the trade.  Upon confirmation, they will be removed from their previous team's roster and added to their new team.  Importantly, the season statistics they have already accumulated on their previous team will remain in the Browse Season Stats tab.