|
|||||||
| Earlier versions of OOTP: General Discussions General chat about the game... |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
All Star Starter
Join Date: Feb 2002
Posts: 1,178
Thanks: 0
Thanked 12x in 4 posts
|
Editing cities and nations files
With no time table for the customization manual, I was wondering if anyone could provide some insight into the mechanics of customizing the "cities" and "nations" files in the database folder.
The "cities" file has no header so I'm not sure what those fields represent. I'm assuming longitude and latitude are in there (do they affect anything within the game?) and I can only guess that population are included. For "nations" there is a header. The fields are: ID Country Long Country Short Abbr Nationality Region Baseball Level Ethnicity1,% Ethnicity2,% Ethnicity3,% Ethnicity4,% The funny/odd thing is that while there are 15 fields indicated in the header (I lumped Ethnicity with their percentages above), there are nations with fewer entries. For example, here's the record for the United States: 206,The United States,U.S.A.,USA,American,4,5,0,71,1,27,2,2 I'm no computer whiz but I had assumed I'd see at least 15 fields! Since I'm not sure how anyone can start a fictional league without editing these files, any help would be appreciated. |
|
|
|
|
|
#2 (permalink) |
|
Hall Of Famer
Join Date: Mar 2003
Posts: 8,403
Thanks: 104
Thanked 78x in 52 posts
|
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. 100 PM June 1, 2006 |
|
|
|
|
|
#3 (permalink) |
|
Hall Of Famer
Join Date: Mar 2003
Posts: 8,403
Thanks: 104
Thanked 78x in 52 posts
|
Nations.txt
Fictional world building starts with nations.txt Path C:\Program Files\Sports Interactive\OOTP Baseball 2006\data\database\cities.txt Explanation of Format ID,Country Long,Country Short,Abbr,Nationality,Region,Baseball Level,Ethnicity1,%,Ethnicity2,%,Ethnicity3,%,Ethni city4,% 206,The United States,U.S.A.,USA,American,4,5,0,71,1,27,2,2 206 = ID number, which will be seen in cities.txt later on. This is what matches the two files up. If I made a CSA as nation ID 227, I would change a great deal of cities in cities.txt from 206 to 227 to reflect that. Country = fairly obvious, the nation, and yes, using the in the title messes up the alphabetization Short = short form Abbr = abbreviation, which is important for your flags. name your flag PNG's after the nation's abbreviation. CSA.png would be an example. Nationality = an adjective describing your citizenship, English, Brazilian, American, Canadian. Google CIA World Fact Book 2005 and you will have all sorts of real world goodies . . . 4 = the continent, in this case North America. See more in continents.txt for more detail. There is concern that this file was eliminated from the release 12231 version. 5 = Baseball quality and 5 is excellent, world class. Ethnicity1 = 1 part of the ethnic component of a nation, it is immediately followed by a % sign 0,71 is the example from the USA. 0 is the American nameset, and 71 is the percentage of generated players using it. 1,27 is the next one. 1 is the Hispanic name set, and 27 is the percentage of names generated using those names.2,2 is last. 2 is the Japanese name set, and the second 2 indicates that 2 percent of American names will draw on the Japanese name set. Editing Editing this file is a snap in any text editor. Make sure that you do NOT use a comma in a place name or put spaces between the records. Example Good: 206,The United States,U.S.A.,USA,American,4,5,0,71,1,27,2,2 Example Bad 206, The United States, U,S,A,USA, American, 4 , 5 ,0 ,71, 1,27, 2, 2 Say you want to change the long form of nation ID 206 to United States of America. Open up the file, highlight The United States, and edit it to United States of America. Close the file. The next world you build will reflect the change. Next, let’s edit the Nationality for Guam. Ex 79,Guam,Guam,GUM,Guamean,2,1,0,100,,, You can change Guamean to Guamanian, then close your file to save. The next world you build will reflect the change Editing Name sets Let’s look at the Guam example again. Guam is set to use name set 0 ( American ) 100% of the time. The commas indicate that ethnicities 2,3,and 4 are not used. So, I am going to add Hispanic names. Hispanic names are drawn on name set 1. I’ve decided to make the percentage 5%. 79,Guam,Guam,GUM, Guamanian,2,1,0,95,1,5,, Fictional Nation Building Let’s make Texas into an independent nation. First, a new nation ID must be created. 227 is the first available number. For the sake of argument, I am cloning US ethnicities to use in Texas. 227,Texas,Texas,TEX,Texan,4,5,0,71,1,27,2,2 |
|
|
|
|
|
#5 (permalink) | |
|
Hall Of Famer
Join Date: Mar 2003
Posts: 8,403
Thanks: 104
Thanked 78x in 52 posts
|
Quote:
The problem with the above is that I wrote that stuf this afternoon from memory. I know how to customize the stuff, I just have not written in down. Those two posts are copies of my first drafts, and may or may not work. They may be as clear as mud,too, as this is my initial take. I have not yet tested my examples to make sure they work yet.
|
|
|
|
|
|
|
#6 (permalink) | |
|
Major Leagues
Join Date: May 2004
Location: Colorado USA
Posts: 322
Thanks: 0
Thanked 5x in 5 posts
|
Quote:
|
|
|
|
|
|
|
#8 (permalink) | |
|
Hall Of Famer
Join Date: Mar 2003
Posts: 8,403
Thanks: 104
Thanked 78x in 52 posts
|
Quote:
The file was in the database folder along with nations.txt and cities.txt continents.txt are as follows: 1,"Africa","AFR","African" 2,"Asia","ASI","Asian" 3,"Europe","EUR","European" 4,"North America","NAM","North American" 5,"Oceania","OCE","Oceanic" 6,"South America","SAM","South American" It was in my betas. I don't know what the consequences are of not having it are at this time, |
|
|
|
|
|
|
#11 (permalink) | |
|
All Star Starter
Join Date: Jun 2002
Location: Where we talk proper English like the Queen innit?
Posts: 1,982
Thanks: 160
Thanked 29x in 25 posts
|
Quote:
__________________
Population of Pominville - 174 Muga's Sports Replay Blog DICE Hockey - NHL 1962-63 Basho Fury - 1981 Nagoya |
|
|
|
|
|
|
#12 (permalink) |
|
Major Leagues
Join Date: May 2004
Location: Colorado USA
Posts: 322
Thanks: 0
Thanked 5x in 5 posts
|
I created a continents.txt file and put in the database folder...the game runs fine, but it doesn't read the data in the file, it uses the standard continents no matter what I edit. Maybe we can get MH to put that info back into a txt file like it was in the beta loads.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|