Out of the Park Developments Online Manuals
 
Title
KeyExisting Key New Key
Create as
Find in this manual
Case sensitive

Replace with
About Comma-Separated Files
Many of the customizable files used in OOTP are simple text files called "comma-separated" files, also called "CSV files" or "comma-delimited files." We'll call them "CSV files" from here on. It's important to understand a bit about these files if you're going to be customizing. CSV files can be edited with just about any program that can read text files, including most word processing programs, Notepad, TextEdit, and Microsoft Excel.

In a CSV file, each row typically represents a single thing, such as a single nation, name, or injury in OOTP. Each row holds multiple pieces of information about that one thing. These pieces of information (or 'values') are separated by commas. Hence, 'comma-separated,' because commas separate the pieces of data.

For example, in the OOTP name files, we track three pieces of data for each name: the name, the frequency, and the name set ID (don't worry about what they mean yet, that's covered in the names section). These pieces of data are separated by commas. So, the OOTP first names file begins with three lines like this:

A.C.,1,0
A.J.,1,0
Aaron,4,0

Since the commas represent divisions between different pieces of information, we could describe these two lines in plain English in the following way:

The first name 'A.C.' has a frequency of 1, and belongs to name set ID 0.
The first name 'A.J.' has a frequency of 1, and belongs to name set ID 0.
The first name 'Aaron.' has a frequency of 4, and belongs to name set ID 0.

Most of OOTP's text files are comma-separated, and behave in a similar fashion.

Note: Spaces are not needed after commas in comma-separated files. In fact, it is recommended not to use spaces.

Editing CSV Files in Excel
CSV files can be edited using Microsoft Excel, but there are a few caveats.

First, Excel versions prior to Office 2007 have a limit of 65,535 rows of data. Some of the OOTP text files (cities.txt and names.txt) have more rows than that, so editing these files in Excel is a little tricky. You must break the file into parts, edit the parts separately in Excel, save the files in CSV format, and then use a word processing or text editing program to combine the two files.

Second, don't get fooled by Excel's features. While you can format text and build formulas in Excel, when you save the file as a CSV file, all of that information gets lost, and only the simple text is retained.

See the help for your version of Microsoft Excel for more information on how to save files in CSV format.

Previous page: Reports
Next page: Tools and Utilities