Title
KeyExisting Key New Key
Create as
Find in this manual
Case sensitive

Replace with
Import/Export Functions
There are several Import/Export functions available in the Import/Export Functions section of the League Functions page. These are mainly helpful to players with more technical experience. Some people use these functions to edit rosters or player statistics. Others use exported data to create third-party utilities.

Warning! Importing data of any kind into a league is a risky proposition. Be sure to [selflink page=538 text=back up your data] before using any import functions!

See the Cato Converterscreenfor more information on the process of converting old historical data from Jeff Cato's "Catobase" tool.

Import/Export Rosters
The import/export rosters functions give you the ability to export team rosters to a simple text file. You can then edit this file and re-import the rosters into the game, giving you a quick way to mass-edit your players. When you choose. Export Rosters, you will be prompted for a file name, and then you will receive a confirmation that will let you know where the file has been saved:



The roster file is a simple text file that lists all players in the league in a comma-separated format, broken out by teams. Free agents are listed at the bottom of the file. The file itself includes the list of all the fields used in the file, as well as the numeric team IDs. If you wish to edit the rosters, simply modify the text file, and then re-import the file using the Import Rosters function.

Warning: Never import roster files that are not based on an OOTP export file from the SAME league! The results could ruin your league!

Import/Export Stats
The import/export stats functions give you the ability to export player statistics to three simple text files. You can then edit these files and re-import them into the game (see steps below), giving you a quick way to mass-edit your players' statistical history. Selecting Export Stats will create three files in the 'root' of your saved game directory (Your League.lg):

It is recommended that you backup these files before editing them.

  • player_batting_stats.txt
  • player_fielding_stats.txt
  • player_pitching_stats.txt
As with rosters, the files include some simple information that will help you compile information correctly. To import updated statistics, simply: (1) Export Stats (see above); (2) backup the files; (3) edit and close the files; (4) select Erase Major League Career Stats of All Players; and (5) select the Import Stats function to re-import the statistics.

Note: To import statistics, one or more of the files listed above must be present in the "root" of your saved game directory. You cannot rename these files or import files from another directory.

Create SQL Dump for MS Access or MySQL / Export dat to CSV files
OOTP offers the ability to export all of your league data to a series of files in one of three formats:

  • CSV (comma-separated files; you can also control the delimiter used in the CSV dumps via the Preferences page.)
  • MS Access
  • MySQL
All files created by these processes are placed in the import_export directory in your saved game directory. While the CSV process dumps data, the MS Access and MySQL processes actually dump SQL scripts that can be used to create an MS Access or MySQL database.

Configure SQL Dump / CSV Export
Each of these dumps also has a 'configure' option. This option opens a separate window:



This profile screen allows you to select the specific tables you wish to include in your data dumps. You can check or uncheck all using the Activate and Deactivate buttons on the left. There are also a few additional options at the top of the page:

  • Replace accents - Replaces foreign characters/accents with their standard U.S. English counterparts, to avoid problems with data programs that cannot handle accents
  • Dump only cities in use - Limits the dump to just cities that are currently in use. Since the OOTP cities database has over 90,000 entries, this can save a significant amount of unnecessary data.
  • Dump only nations in use - Limits the dump to just nations that are currently in use. Since the OOTP nations database has over 200 entries, this can save a significant amount of unnecessary data.
Users who are interested in SQL/CSV dumps should also review the Almanac, because of its ability to schedule regular SQL/CSV dumps.

Note: Since these tools export the true ratings for all players, for online leagues, only the commissioner is permitted to use these exports. He must provide his commissioner password to do so!

All of these functions can be accessed through the scrollable list on the League Functions page, or through the Import/Export action menu at the bottom of the page. The MS Access, MySQL, and CSV dumps can also be accessed through the Tools action menu on the Database Info page.

Note: These functions work on one league at a time. If you have chosen a parent league, it will work for all affiliated leagues as well. Make sure that the league you wish to change is listed as the "Selected League" under the tabs at the top of the page!

Previous page: Financial Functions
Next page: Cato Converter