View Single Post
Old 09-02-2012, 05:17 PM   #5
Dreifort
Major Leagues
 
Dreifort's Avatar
 
Join Date: Dec 2003
Posts: 307
Ok, I made a generic Excel Spreadsheet to use to import cities into the world_default.xml file for OOTP 12 & 13.

What this file does is allow you to type out (or paste) multiple city info in an easy to view and use spreadsheet and then import into OOTP 12 or 13's world_default.xml file.

You will still have to manuall create your world and/or nation (and manually set up the <CITIES> </CITIES> codes), but hopefully this file will allow you to quickly add many cities to your world_default.xml file.


The Excel Spreadsheet basically lets you copy and paste (or type in) columns on data into the LIGHT BLUE columns. Once the blue columns have data, the spreadsheet will then combine all the inputed data and XML code into one easy to copy orange line. So if you have 50 or 200 cities, you can then quickly highlight 50 or 200 rows of just a few columns and paste into the world_default.xml file in a snap.

There are 5 orange columns. 4 empty ones (for spacing in the XML code) and 1 column with your city data and XML code combined.

Tada!



Link for Excel file: http://www.legendarybaseball.com/import_cities.xls


Basic instructions for importing older OOTP cities.txt or just manually entering in cities:

1. Enter the next available City ID # in your world_default.xml file into the RED CELL under the City ID column - this is your starting city ID # for the mass import. For an untouched .xml file, the # will be 89999 - which I already put in Excel file. Change this number if you need to. If you use the Excel file multiple times to enter cities into the same .xml file, be sure to CHANGE the starting City ID# appropriately. OOTP will not allow for duplicate City ID #s, every city MUST have their own unique #. So for each additional use, enter a new starting # in the RED CELL and the rest of the column will automatically increase each additional city ID # by +1.

2. For old OOTP users, open your old cities.txt file and copy rows of cities and paste them into the light blue City column. You can also manually type in your own city names.

3. Now enter in the remaining column data (Population, latitude, longitude, altitude, and abbreviation). Altitude data is not required, the default value is "0" which is already populated in the spreadsheet. There are 7 values, 0-6 for altitude with 6 being highest default value in OOTP.

4. After all the light blue columns have data for as many rows as you entered in cities. Highlight and copy the 4 orange columns for as many rows as you have cities.

5. Open your world_default.xml file and find the <CITIES> </CITIES> for the state you want to add the cities to. Then paste the copied orange cells into the last row before </CITIES>.

Done.


Now if you want to use the Excel Spreadsheet again to enter more cities for a different state (or for the same state), just remember to change the STARTING City ID # in the Excel file!

__________________
________________________________________________
Coming soon! Legendary Baseball League.... stay tuned!

Last edited by Dreifort; 09-02-2012 at 05:19 PM.
Dreifort is offline   Reply With Quote