Latest News: OOTP PATCH 9.1.6 released! - OOTP 9 RELEASED! - Title Bout Championship Boxing 2.5 released! - OOTP 2007 receives Editors Choice Award from PC Gamer - Inside the Park Baseball Patch 1.03 released, DEMO now available

Click here to download Out of the Park Baseball 9!

Go Back   OOTP Developments Forums > OUT OF THE PARK BASEBALL 9 > OOTP 9 - Mods > Names and Nations
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-02-2006, 07:25 AM   #1 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
Cities.txt

Modding Cities.txt

Cities.txt is a massive 95,000+ line text file that lists most every city above 1000 people on the planet. It was compiled from census data.

Components

city, population, nation ID, state or province name, latitude, longitude

Example:

New York,8107916,206,New York,40.67,-73.94

New York = the city, in this case, the Big Apple
8107916 = the population, in this case, eight million people
206 = nation ID, in this case The United States
New York = the state, in this case New York
40.67 = 40.67 degrees North
-73.94 = 73.94 degrees West

Please note that latitude and longitude can be negative numbers. A negative number for latitude makes the latitude south of the equator. Think Australia. A negative number for longitude makes the longitude west of the Prime Meridian (in bloody England). Think USA.

Editing

Since this is a text file, you can easily edit a single line in Notepad, Microsoft Office, or in Open Office.

Make sure that you do NOT use a comma in a place name or in population, or put spaces between the records.

Good:
New York,8107916,206,New York,40.67,-73.94

Bad:
New York, 8,107,916, 206, New York, 40.67, -73.94

Intermediate Editing

Let's change New York City into the five constituent boroughs.

Locate the line for New York.

New York,8107916,206,New York,40.67,-73.94

Delete that line.

Add the following lines:

Brooklyn,2465326,206,New York,40.65,-73.95
Queens,2229379,206,New York40.74,-73.79
The Bronx,1332650,206,New York,40.85,-73.86
Staten Island,443728,206,New York,40.58,-74.15
Manhattan,1537195,206,New York,40.78,-73.96

Save your work, and the next universe you create will reflect the changes.

For other places, you'll have to do your own research on population, state or province name, longitude and latitude. The nation ID is located in nations.txt, which is in the same folder as cities.txt.

Advanced Editing

You will want to use Microsoft Excel for this. I found using Open Office very slow.

Microsoft Excel can't handle a file with as many lines as cities.txt. What I did was copy cities.txt, rename the copy, import the newly renamed file as a comma space delimited file, and get as many records into one sheet as possible. I located the break point, then wrote that down. I went back into the original file, located the break point, then copied the rest of the data into a new txt file. Next, I imported that text file as a new comma space delimited in a new Excel file. That gave me two Excel spreadsheets, one with 65,000 lines and one with 30,000 lines. I copied the data from the smaller file into a new workbook on the first Excel spreadsheet.

This should give you 1 Excel spreadsheet with two workbooks. Sheet one will be massive, topping 65,000 lines, and sheet two will be 30,000 lines.

You cant sort by columns and do some mass changes now.

Example

Building the Confederate States of America

This example depends on a change being made to nations.txt labeling the CSA as nation ID 227.

I sorted both spreadsheets by the state column. I located each state in the old Confederacy. I changed the nation ID for the first city in Arkansas to 227. I copied that line and pasted it to every city in every state in the old Confederacy on sheet one. I repeated this on sheet two.

I saved each sheet as a CSV under a new name. I opened the second CSV, copied all of the data, then pasted it into the first CSV.
__________________
Raidergoo is offline   Reply With Quote
Old 06-03-2006, 03:38 PM   #2 (permalink)
Hall Of Famer
 
enuttage's Avatar
 
Join Date: Mar 2002
Location: Balcones Fault Line
Posts: 2,251
Quote:
Originally Posted by Raidergoo
Save your work, and the next universe you create will reflect the changes.
Just a quick question of clarification...

If we edit the file, it will NOT be reflected in currently operating universes. Is that correct?

McAllen, Texas went bye-bye in the game's files (tsk, tsk. That's a big city to miss ), so I gotta add it back in, but have already created the league.

This one's gonna be tough for folks who don't know their city doesn't exist until after they start the game and get a whole lot of other stuff set up.

If I'm misunderstanding, then awesome.

TIA,

-E
__________________
WHBL - Managua Four Roses

"When the going gets weird, the weird turn pro."
enuttage is offline   Reply With Quote
Old 06-03-2006, 04:32 PM   #3 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
Quote:
Originally Posted by enuttage
Just a quick question of clarification...

If we edit the file, it will NOT be reflected in currently operating universes. Is that correct?

McAllen, Texas went bye-bye in the game's files (tsk, tsk. That's a big city to miss ), so I gotta add it back in, but have already created the league.

This one's gonna be tough for folks who don't know their city doesn't exist until after they start the game and get a whole lot of other stuff set up.

-E
File edits of this file MUST take place before the universe starts.

McAllen,608,206,Texas,28.61,-97.8

http://www.allsimbaseball.com/index....d=18&Itemid=37

It was decided not to use an even bigger cities.txt file than the current one, so I turned the data I had into a mod. Follow the link and get the additional 14,000 US cities, if you wish.
__________________

Last edited by Raidergoo : 06-03-2006 at 04:40 PM.
Raidergoo is offline   Reply With Quote
Old 06-03-2006, 06:45 PM   #4 (permalink)
Hall Of Famer
 
enuttage's Avatar
 
Join Date: Mar 2002
Location: Balcones Fault Line
Posts: 2,251
Quote:
Originally Posted by Raidergoo
File edits of this file MUST take place before the universe starts.

McAllen,608,206,Texas,28.61,-97.8

http://www.allsimbaseball.com/index....d=18&Itemid=37

It was decided not to use an even bigger cities.txt file than the current one, so I turned the data I had into a mod. Follow the link and get the additional 14,000 US cities, if you wish.
What's odd is that McAllen has well over 100,000 people in it per the 2000 census. Lord only knows how many that's ballooned to at this point. It's a very quickly growing area.

Thanks for the response. That's a bummer.
__________________
WHBL - Managua Four Roses

"When the going gets weird, the weird turn pro."
enuttage is offline   Reply With Quote
Old 06-03-2006, 06:54 PM   #5 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
http://factfinder.census.gov/servlet...g=en&pctxt=fph

. . .hmmm. . . .they SI file the game uses is supposed to handle everythin on Earth bigger than 1000 people. Looks like I will have to report that as an issue.

McAllen ,106414,206,TX,26.22,-98.24

http://www.allsimbaseball.com/index....d=18&Itemid=37

An alternate US only cities listing is at that site, and it looks like I got it right in that file.

I bet the listing for McAllen,608,206,Texas,28.61,-97.8 in my small cities of America file is a fragment of McAllen in a different county. Cities in multiple counties were a major pain to edit for the work I've done.
__________________

Last edited by Raidergoo : 06-03-2006 at 07:00 PM.
Raidergoo is offline   Reply With Quote
Old 06-03-2006, 07:01 PM   #6 (permalink)
Hall Of Famer
 
enuttage's Avatar
 
Join Date: Mar 2002
Location: Balcones Fault Line
Posts: 2,251
The fragment must've somehow overrided the larger counterpart and made it filter out McAllen from the default file.

And, of course, since I'm an OCD-type, now I'm strongly considering re-starting my whole universe for just this one city.

lol.

I've definitely got some issues.
__________________
WHBL - Managua Four Roses

"When the going gets weird, the weird turn pro."
enuttage is offline   Reply With Quote
Old 06-03-2006, 07:03 PM   #7 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
Quote:
Originally Posted by enuttage
The fragment must've somehow overrided the larger counterpart and made it filter out McAllen from the default file.

And, of course, since I'm an OCD-type, now I'm strongly considering re-starting my whole universe for just this one city.

lol.

I've definitely got some issues.
Wait til you get to Brooklyn.
__________________
Raidergoo is offline   Reply With Quote
Old 06-03-2006, 07:07 PM   #8 (permalink)
Hall Of Famer
 
enuttage's Avatar
 
Join Date: Mar 2002
Location: Balcones Fault Line
Posts: 2,251
Quote:
Originally Posted by Raidergoo
Wait til you get to Brooklyn.
Why's that?

This particular one is a Texas League, otherwise there's no way in hell I'd ever peg McAllen for a franchise.

But I'm out of other cities in the Valley! I'm using Edinburg as McAllen's home city right now, but I gotta fix this [pulls out hair].
__________________
WHBL - Managua Four Roses

"When the going gets weird, the weird turn pro."
enuttage is offline   Reply With Quote
Old 06-03-2006, 07:09 PM   #9 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
Quote:
Originally Posted by enuttage
Why's that?
There is no Brooklyn in OOTP 2006!
__________________

Last edited by Raidergoo : 06-06-2006 at 05:10 PM.
Raidergoo is offline   Reply With Quote
Old 06-06-2006, 02:59 AM   #10 (permalink)
Minors (Double A)
 
Join Date: Nov 2002
Location: Chicago, IL
Posts: 179
I noticed that in cases where there should be an "ó", there is a "z" instead (case in point: Córdoba/Czrdoba, Argentina).
MrHaroldG is offline   Reply With Quote
Old 06-06-2006, 05:10 AM   #11 (permalink)
Minors (Single A)
 
Join Date: Mar 2006
Posts: 59
For files with as many records as yours I'd suggest Corel's QuattroPro, WordPerfect's office suite spreadsheet. In versions 12 and X3 you can have over 1,000,000 records - if you have the RAM. The spreadsheet commands are very similar to Excel.

I don't think there's a better text editor on the market than UltraEdit. If the columns in the data are true columns, creating "csv" files are a snap with the columnar editing feature.
johnph77 is offline   Reply With Quote
Old 06-06-2006, 07:09 AM   #12 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
I am downloading both apps suggested. Quattro is 230+ megs, so it will take up my little at home this AM. I will report back with results after June 7th.
__________________
Raidergoo is offline   Reply With Quote
Old 06-06-2006, 10:22 PM   #13 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
After testing Quattro, I will follow my mother's advice. If you can't say something nice, don't say it at all.

After scanning Ultra Edit's zip, for the first time in my life, my antivirus scanner went off. I have never seen Grisoft AVG in action before, and I am to never see it again.

UE was disposed of untested.
__________________

Last edited by Raidergoo : 06-07-2006 at 07:24 AM.
Raidergoo is offline   Reply With Quote
Old 06-07-2006, 04:17 AM   #14 (permalink)
Minors (Single A)
 
Join Date: Mar 2006
Posts: 59
Re QuattroPro - I only use it in applications where I have more than 65,336 records I need displayed in columnar form.

Re UltraEdit - I have the CD version; I've never used the download. I apologize for any inconvenience on your part but IDM (supposedly) is a reputable company to deal with. I'm going to report your experience to them and will keep you posted of any response from them.
johnph77 is offline   Reply With Quote
Old 06-07-2006, 07:25 AM   #15 (permalink)
Hall Of Famer
 
Raidergoo's Avatar
 
Join Date: Mar 2003
Location: 39.84 N -84.12 W
Posts: 7,222
I am curious how well Ultra Edit does with english.xml, so I appreciate what you are doing.
__________________
Raidergoo is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:48 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 Out of the Park Developments