Home | Webstore
Latest News: OOTP 25 Available - FHM 10 Available - OOTP Go! Available

Out of the Park Baseball 25 Buy Now!

  

Go Back   OOTP Developments Forums > Out of the Park Baseball 25 > OOTP Mods > OOTP Mods - Names and Nations

Reply
 
Thread Tools
Old 08-30-2012, 01:06 AM   #1
Dreifort
Major Leagues
 
Dreifort's Avatar
 
Join Date: Dec 2003
Posts: 307
editing world_default.xml (quick ref guide)

I haven't played OOTP in a while and noticed in ver 13 (and apparently v12) that editing the world and creating new nations is quite different now.

So I saw a few posts in the forums, but not really a "How to Guide" for editing world_default.xml and a lot of unanswered questions...

So I decided to create a quick explanitory guide and create an Excel spreadsheet that will [hopefully] allow for older users who created nations/cities in the old .txt files to be able to copy over their creations to the world_default.xml without typing for 3 days straight.

Hope this helps anyone looking to fully dive into OOTP's customization that makes it so popular!


CREATING NATIONS, STATES, and CITIES:



Q. How do you view and edit the world_default.xml?
A. There are many ways to view and edit the file. I recommend most HTML editors, since XML is treated like code in those programs - making it much easier to view while editing. I personally use Adobe's Dreamweaver. HTML editors will also number the code lines, making it easy to track down any XML parsing errors and such if OOTP gives you a line error. Dreamweaver is not free, but there are several free ones easily found in the internet. Wordpad type editors will work, but do not offer you the extra coding formatting that HTML editors may offer.

For viewing the world_default.xml file, I prefer Microsoft's Excel - though it will not allow for editing and saving the file. But it's perfect for viewing the data in the .xml file and for easily sorting it to get a better grasp on all the data in the file.


Q. What can you edit in the file?
A. Not 100% sure on that answer, but I imagine everything. Just remember with any type of editing, to ALWAYS make a backup of the original file before modifying it. I've tinkered with every major parameter in the file so far with great success.


Q. What is in the file? What are the parameters I can modify?
A. Listed further below you will find my limited explanation of each parameter to help you better understand on what you may want to modify. (You'll see in just a little further in this article.) Basically all the parameters help you create everything from a new city, to a new state, a new nation/country... and even a new world! And most parameters have individual features you can customize like geographic location, population and altitude, etc. I've determined about 95% of the parameters you can easily modify getting the desired outcome you seek.



Ok, here is my step-by-step quick guide to create a new Nation in OOTP.

IMPORTANT! This guide assumes you are editing an untouched world_default.xml file that has not previously had any new cities, states, nations, or worlds added via external editors OR from within OOTP itself.
If you have a file that has already had cities, states, nations, or worlds added - that's ok. You will just have to make sure the starting ID #s you use respectively for new cities, states, nations, and worlds do not duplicate any exisiting ones that may have been added to world_default.xml.

First, here is an example of an existing country, Monaco, already in OOTP's world_default.xml:

PHP Code:
    <CONTINENT id="3" name="Europe" pop="731000000" lid="0" abbr="EU" dem="European">
        <
NATIONS>
        <
NATION id="223" name="Monaco" pop="33000" lid="8" gender="0" bbqual="0" abbr="MSR" dem="Monégasque" time_zone="1" observes_dst="1">
            <
ETHNICITIES>
            <
ETHNICITY lid="8" pct="80" />
            <
ETHNICITY lid="9" pct="20" />
            </
ETHNICITIES>
            <
STATES>
            <
STATE id="2095" name="Monte Carlo" pop="16012" lid="0" abbr="MON">
                <
CITIES>
                <
CITY id="51419" name="Monte Carlo" pop="16012" lid="0" lat="43.75" long="7.42" abbr="MON" />
                </
CITIES>
            </
STATE>
            <
STATE id="2096" name="La Condamine" pop="12167" lid="0" abbr="LA ">
                <
CITIES>
                <
CITY id="42255" name="La Condamine" pop="12167" lid="0" lat="43.74" long="7.41" abbr="LA " />
                </
CITIES>
            </
STATE>
            <
STATE id="2097" name="Fontvieille" pop="3880" lid="0" abbr="FON">
                <
CITIES>
                <
CITY id="25978" name="Fontvieille" pop="3880" lid="0" lat="43.73" long="7.41" abbr="FON" />
                </
CITIES>
            </
STATE>
            </
STATES>
            <
CAPITAL id="51419" />
        </
NATIONS>
        </
NATION>
    </
CONTINENT

I am going to create my new Nation called Legend by editing the world_default.xml file. Anyone familiar with HTML or PHP or any coding - XML works very similar. Codes are opened and closed, like <NATION> opens everything related to a specific Nation and </NATION> closes what pertains to that nation. Same with <STATE> </STATE>, etc. Note <STATES> contains individual <STATE>. Don't fret if you have no clue about coding, you don't need to fully understand it to have fun creating your own new geographic locations with OOTP.

Here is the final result for adding Legend, keep reading for detailed explanations of all the coding from my results (from what little I can figure out ):

PHP Code:
    <CONTINENT id="7" name="New America" pop="500000" lid="0" abbr="NA" dem="Legend">
        <
NATIONS>
        <
NATION id="253" name="Legend" pop="500000" lid="40" gender="0" bbqual="5" abbr="LGN" dem="Legendary" time_zone="-3" observes_dst="1">
            <
ETHNICITIES>
            <
ETHNICITY lid="39" pct="40" />
            <
ETHNICITY lid="18" pct="15" />
            <
ETHNICITY lid="32" pct="10" />
            <
ETHNICITY lid="20" pct="7" />
            <
ETHNICITY lid="16" pct="10" />
            <
ETHNICITY lid="1" pct="5" />
            <
ETHNICITY lid="6" pct="5" />
            <
ETHNICITY lid="15" pct="5" />
            <
ETHNICITY lid="9" pct="3" />
            </
ETHNICITIES>
            <
STATES>
            <
STATE id="3367" name="Darby" pop="300000" lid="0" abbr="DBY">
                <
CITIES>
                <
CITY id="89999" name="Abner" pop="300000" lid="0" lat="42.85" long="-58.19" abbr="ABN" />
                </
CITIES>
            </
STATE>
            <
STATE id="3368" name="Yount" pop="200000" lid="0" abbr="YNT ">
                <
CITIES>
                <
CITY id="90000" name="Bankston" pop="200000" lid="0" lat="36.30" long="-44.28" abbr="BNK" />
                </
CITIES>
            </
STATE>
            </
STATES>
            <
CAPITAL id="89999" />
        </
NATION>
        </
NATIONS>
    </
CONTINENT

1. To start, open and edit the world_default.xml file with an editor (text or HTML editor)... the first thing you will see is a code for <WORLD>. You can have more than one world in OOTP. Maybe you want to create a new one called Mars? or the Moon? Each world must have a unique World ID #.


PHP Code:
<WORLD id="1" name="default" required_ootp_version="13" file_version="OOTP Developments 2012-07-27 15:25:00"

World:
ID - Game has just one, "default" (or Earth as we know it). The value of the default world is "1". To add a new world, start with value of 2. Do not duplicate world ID #s.
REQUIRED_OOTP_VERSION - Version of the game required to run, default value is "13", not sure what happens if this is changed.
FILE_VERSION - Default value is "OOTP Developments 2012-07-27 15:25:00", not sure what happens if this info is altered.

I am not going to create a new world. If you want to, you will need to scroll all the way down until you see the default world closed with the code </WORLD>. You can then add a new world by starting a new code <WORLD> right after the prev world's </WORLD>.



2. You'll next see a list of default languages in the .xml file for the default world. Languages is a bit misleading label IMO. Think of it as ethnicities. There is a seperate ethncities.txt file that I assume corresponds with the world_default.xml file. So if you want to add your own language/ethnicity to the game, be sure to ALSO add it to the ethnicities.txt file also located in the database directory in addition to adding it to the .xml file. The ethnicities.txt file also lets you specifiy your cultural mixture of your new language/ethncitiy.

ethnicities.txt content header:
Code:
//language id (do NOT change), language, african (1/1000),asian,east-indian,caucasian,hispanic,
(1/1000) means the totals for the 5 major face gen groups must = 1000 for your new ethnicity. The 5 major face gens types are African, Asian, East-Indian, Caucasian, and Hispanic.


So I am going to add a new language/ethnicity to both the .txt file and .xml file. Since I plan on my nation being near USA, Canada and Greenland (and start in 1901), I want a mix of 10/1000 African faces, 10/1000 Asian faces, 0/1000 East-Indian faces, 970/1000 Caucasian faces, and 10/1000 Hispanic. I add the following to the .txt file:

PHP Code:
40,Legendary,10,10,0,970,10
Notice the #s add up to 1000: 10,10,0,970,10... if you create a new ethnicity - be sure your combination of the 5 major face gens total 1000.

then add the following making it the last of the listed langauges in the .xml file using the next available Laguage ID # which is "40":

PHP Code:
    <LANGUAGE id="40" name="Legendary" /> 


3. Now I am going to add Legend to the default world, Earth (and not create a new world). Legend will be on its OWN new continent just off the east coast of USA. About the size of U.K. Now I need to create a new continent. I scrolled down to the very end of defaul list of nations & continents in the world_default.xml file and you should see/find the Falkland Islands listed (which is in the South America continent). I am entering a new continent after the </CONTINENT> listed after Falkland Islands which closes the South America continent. BUT I am inserting my new continent before the </CONTINENTS> code which closes all codes for continents of the default world, Earth.

PHP Code:
    <CONTINENT id="7" name="New America" pop="500000" lid="0" abbr="NA" dem="Legend"
Continent:
ID - Game default # value for continents ends at 6 (if you add a new continent to an untouched world_default.xml, start with an ID # value of 7). Do not dupllicate Continent ID #s.
NAME - Enter the full name of the continent.
POP - Enter the continent's total population. (I am assuming OOTP13 still does not allow for population growth over time, so POP value here for career historical lgs would be max future/present day value, NOT historical value.)
LID - I am assuming there is no uniform language to set for continents, so make value "0" (which is same default value for all other continents).
ABBR - Enter the abbrevation for your continent. Europe = EU, South America = SA, etc. Be creative while limiting your abbr to 1-3 characters.
DEM - Nationality term for the continent. For Europe, it's European... Africa, African, etc..



4. Now I need to add my nation to my new continent. Don't forget - continents can have more than one nation. But I am only going to add one, Legend, the only nation on my new continent.

First I need to open up the Nations coding with <NATIONS>. Note this code is plural, nationS with the S at the end. When I am done adding my 1 or many nations, and all it's cities and states... I will close the Nations coding with </NATIONS>.

PHP Code:
        <NATIONS>
        <
NATION id="253" name="Legend" pop="500000" lid="40" gender="0" bbqual="5" abbr="LGN" dem="Legendary" time_zone="-3" observes_dst="1"
Nation:
ID - Game default # value for nations ends at 252 (if you add a new nation to an untouched world_default.xml, start with 253). Never duplicate Nation ID values.
NAME - Enter the full name of the country.
POP - Enter the nation's total population.
LID - Primary language ID #.
GENDER - I am assuming 0 is value for male?? Not sure on this one.
BBQUAL - Nation's baseball quality level. 0-5 with 0 = bad and 5 = excellent.
ABBR - Enter the abbrevation for your country... such as USA is abbr for United States of America. Try not to duplicate this value with other nations to avoid confusion (doesn't matter for states below). This is also what your country flag file name will have to be. If my country Legend abbr is LGN, then the flag I create MUST be named the same 3 letters - "lgn.png" in the flags folders.
DEM - Nationality term for the country. For Scotland it would be "Scottish", for France it would be "French", etc.
TIME_ZONE - Desigantes which world time zone the country is in. Values relate to real life values.
OBSERVES_DST - Observes Daylight Savings Time? 1= Yes, 0= No. (Spring ahead, fall back... lose an hour, gain an hour... you know what it is.)


5. The next thing to add to our new nation will be ethnicity. From what little I can tell so far, the earlier language/ethnicity ID designation defined at the begining of the world_default.xml and used earlier in the <NATION id="253" name="Legend" pop="500000" lid="40"... could be used to determine the face gens types? I am not quite sure. But adding the Ethnicities IDs to our new nations will determine the naming styles of our inhabitants. The ethnicities used are once again referenced in the ethnicities.txt file. We open Ethnicities coding with <ETHNICITIES> and close it with </ETHNICITIES> when we are finished. See my addition to the Legend nation:

PHP Code:
            <ETHNICITIES>
            <
ETHNICITY lid="39" pct="40" />
            <
ETHNICITY lid="18" pct="15" />
            <
ETHNICITY lid="32" pct="10" />
            <
ETHNICITY lid="20" pct="7" />
            <
ETHNICITY lid="16" pct="10" />
            <
ETHNICITY lid="1" pct="5" />
            <
ETHNICITY lid="6" pct="5" />
            <
ETHNICITY lid="15" pct="5" />
            <
ETHNICITY lid="9" pct="3" />
            </
ETHNICITIES
Enthnicities:
You can have multiple Enthnicity LID lines (as many as there are languages I think?)
LID - Langue ID #. (Game default has 40 different values, 0-39. You can view them at begining of world_default.xml or in the ethnicities.txt file.)
PCT - What percentage value (out of 100%) the current LID ID # is. Max = 100. No need to enter a LID with 0 value, as any LID ID# not listed defaults to 0 value.
* All LID line PCT values must not total more than 100 for the country. Example, you could have 3 different LID PCT values of 70, 20, and 10... totaling 100%.



6. Now let's add some states (or as I prefer to call them in Legend - provinces). Just like Nations, we need to open the States coding... and close it when we're done adding cities. Open States coding with <STATES>. Later we will close it with </STATES>. I am going to add two states, below is an example of adding the first state (or province) called "Darby".

PHP Code:
            <STATES>
            <
STATE id="3367" name="Darby" pop="300000" lid="0" abbr="DBY"

States:
ID - Game default # value for states ends at 3366 (when adding new states to an untouched world_default.xml, start with 3367). Never duplicate State ID values, regardless if in different nations.
NAME - Enter full name of the state (or provience or whatever you would wish this area to be, etc., the world_default.xml does not support counties).
* From what I can tell (could be wrong?) states are required, so a small country with no states, each city is their own state (I know, a little bit of double entry... you could just make your country a state also within itself to make it easier).
POP - State population (refer to Continent POP about historical lgs, same applies here).
LID - Not sure what this value refers to, so I'd leave its value at "0" (game default state values). Possibly you could give states their own language/ethnicity type? If that is true, you would refer to the ethnicities.txt file for LID # references, default file has 0-39 for 40 ethnicities.
ABBR - State's abbreviation of it's full name. Example, North Carolina = NC... Florida = FLA, etc.


7. Now to add cities to our new state. Cities are the last stop of the geographical tree in the .xml file. Started with WORLD and ends the tree with CITIES. Like the previous tree entires, Cities must be opened with <CITIES> and closed with </CITIES> when finished. Here is a city I added to Darby:

PHP Code:
                <CITIES>
                <
CITY id="89999" name="Abner" pop="300000" lid="0" lat="42.85" long="-58.19" abbr="ABN" />
                </
CITIES
Citiy:
ID - Game default # value for cities ends at 89998 (when adding new cities to an untouched world_default.xml, start with 89999). Never duplicate City ID values, regardless if in different states or nations.
NAME - Enter full name of the city.
POP - City population (refer to Continent POP about historical lgs, same applies here).
LID - Not sure what this value refers to, so I'd leave its value at "0" (game default city values).
LAT - Lattitude location value of the city (referencing a real life world map).
LONG - Longitude location value of the city (referencing a real life world map).
ALTITUDE - This value # tells OOTP if your city is at a higher elevation than the default (sea) level value of "null" (which equals "0"). The Altitude code is not required and if not included will default to null (or "0"). Highest altitude value in default game is "6" (which are a few cities in Colorado). Only around 600-700 cities have altitude coded in world_default.xml. I assume the higher the elevation # (1-6), the more HRs the city stadium gives up?
ABBR - Enter the abbreviation for the city. Like airports... Charlotte, NC = CLT. There is no perfect abbr, be creative.

You can add as many cities as you wish to a state, be sure to list all the cities between the <CITIES> </CITIES> code brackets. So if I wanted another city besides Abner in my above example, I would just and another <CITY id="90000" name=... etc. line. Rememebr at the end of the <CITY code line to close the it with /> just as I did with Abner. Add as many <CITY lines between the <CITIES> </CITIES> brackets as you wish.


8. Ok, almost done. Now we need to close out all our Cities and States. Just be sure the </CITIES> and </STATES> codes are in their correct places. You can start new Cities and States, just make sure each one opened is closed or you will get an XML Parsing Error from OOTP. If you do get an error, it will tell you which line of coding it tried to find a </ > closing out a city, state, nation or world.

If I was only adding 1 state (Darby), this is the code to close Darby (we closed the cities above with </CITIES>):

PHP Code:
            </STATE>
            </
STATES
If you wanted to add other states, just add the </STATES> after the final </STATE> is closed.

Before closing </NATION>, we need to pick a Capital of my new country Legend! I want the city Abner to be the capital. Abner's city ID was "89999". So I need to add the Capital code and then close out my Legend nation:

PHP Code:
            <CAPITAL id="89999" />
        </
NATION>
        </
NATIONS
I followed </NATION> with </NATIONS> (just like states) since I only had 1 nation. For multiple nations on your continent - be sure to add the </NATIONS> after the final </NATION>.


Just a few reminders:

Populations are referrred to as "modern day". I plan on starting a league in 1901 but if I set a city population to 3,000... when the league reached 2010, the city pop would still be 3,000. OOTP lets you control game attendance change over the years, but not city population change (that I am aware of). So set your nation, state, city population values to the max modern day value so in 2010 your 40,000 seat stadium will draw more than 3,000 fans.

The real life and fictional examples are using small countries, but this should give a good idea of how to create your own. I hope I can find more time to get back into OOTP... I miss it. I know the .xml format is much different than the old .txt formats for nations, worlds, etc... but I hope I make it easier for those still wanting to customize their OOTP13 & 12 universes.



REGIONS:

There is also a new feature added in the world_default.xml file called "Regions".
Regions allow you to specify territories you want your baseball league to cover. Meaning... if I create a new region with ONLY Germany and France referenced, when I create a new league with that new region specified - all the players generated will be born from either Germany or France. Now of course if you set your Foreigner limit (0-100%) more than 0%, you will also have players from outside those two countries as well. Also, any automated teams generated for your new league will use Germany and France for city choices, not just use your designated Nation of origin for your league.

For my new nation of Legend, I want to create a new region that will cover Legend and it's surrounding countries: Canada, USA, Greenland, Iceland, Scotland, Wales, and England. But I don't want players from California (since Legend is on the east coast of USA). The world_default.xml will also let you specify states in your region!

Specifying states is great especially if you wanted to create a West Coast (USA) only baseball league... like the PCL. Works with other nations (keep in mind that some nations in OOTP don't really use states, instead they assign states to individual cities or assign a state to represent the entire country). Using Excel to view the world_default.xml file really comes in handy here. You can open the .xml file in Excel and it will sort all the parameters into columns - sweet! So ALL cities will be in 1 column, as with states, nations, etc. Each in their own respective column. Makes it easy to find state, nation, city ID #s. Continents, Nations, States, Cities, etc. are well labeled. However, the ID #s are not well labeled - they are labeled id1, id2, id3, id4, etc. You will just have to use a little thinking to figure out the id's that match to nation, state & cities. Not to hard as they are usually right next to each other. For example, id13 = State ID #. Anyway, Excel makes it much easier to view and sort the world_default.xml data. Just don't try to edit and then save the data in Excel - it won't work (and even if you make it save, OOTP will not recognize the new file properly). Excel should be for viewing only on the .xml file.

Ok, how to create a new Region the .xml file. Scroll down to the very end of the .xml file and see this code:

PHP Code:
    </REGION>
    </
REGIONS>
</
WORLD
We are going to add the new Region after the last </REGION> but before the </REGIONS>. The plural /REGIONS closes all Region coding, we want our new Region to be inside that bracket, but the last Region added (so make it easier to find to edit later).

Here is my new region to include Legend and it's surrounding nations, but ONLY certain states within the USA:

PHP Code:
    <REGION id="143" sort_order="113" name="Legendary Region">
        <
REGION_NATIONS>
        <
REGION_NATION id="253" />
        <
REGION_NATION id="36" />
        <
REGION_NATION id="250" />
        <
REGION_NATION id="212" />
        <
REGION_NATION id="212" />
        <
REGION_NATION id="153" />
        <
REGION_NATION id="61" />
        <
REGION_NATION id="89" />
        <
REGION_NATION id="164" />
        </
REGION_NATIONS>
        <
REGION_STATES>
        <
REGION_STATE id="167" />
        <
REGION_STATE id="168" />
        <
REGION_STATE id="165" />
        <
REGION_STATE id="164" />
        <
REGION_STATE id="161" />
        <
REGION_STATE id="160" />
        <
REGION_STATE id="159" />
        <
REGION_STATE id="156" />
        <
REGION_STATE id="150" />
        <
REGION_STATE id="148" />
        <
REGION_STATE id="146" />
        <
REGION_STATE id="143" />
        <
REGION_STATE id="141" />
        <
REGION_STATE id="132" />
        <
REGION_STATE id="131" />
        <
REGION_STATE id="130" />
        <
REGION_STATE id="129" />
        <
REGION_STATE id="128" />
        <
REGION_STATE id="127" />
        <
REGION_STATE id="126" />
        <
REGION_STATE id="124" />
        <
REGION_STATE id="122" />
        <
REGION_STATE id="120" />
        <
REGION_STATE id="118" />
        <
REGION_STATE id="135" />
        </
REGION_STATES>
    </
REGION

Region:

You have to open a new Region with the code <REGION> as such:

PHP Code:
    <REGION id="143" sort_order="113" name="Legendary Region"
ID - The Region ID# must be unique to all other Regions created. The default OOTP Regions end at # 142. To add a new region, start with "143". Do not duplicate region ID #s.
SORT_ORDER - This # represents the order in which your region will be listed in the drop down Region selection box within the OOTP game. "1" you will be first listed, "9532" prob means it will be listed last. I do not think duplicate #s will do any harm here. I am going to give my new region a value of "113" hoping to be near the top of the list, but not first 5-10. The default order values vary and are NOT consecutive. Don't know why. Don't worry about it. Just pick a numbner .
NAME - Full name to describe your region. This text is what will be displayed in the drop down Region selection box within the OOTP game.


Now that the <REGION> code is opened for a new region, lets add territories. You can add nations and states.

To add a Nation, open the code with <REGION_NATIONS>, then add 1 or more of the following type line:

PHP Code:
        <REGION_NATION id="61" /> 
ID -Enter the nation ID # you want to add. Example, "61" is England. Ad as many of these lines as you want.

When finished adding nations to your Region, close the nations coding with </REGION_NATIONS>.

Now, let's add some US States and open the States region coding with <REGION_STATES>, then add 1 or more of the following type line:
* NOTE, the nation whose states I am adding, I did not add as a nation in the <REGION_NATION> coding (since I only want certain states of that nation).

PHP Code:
        <REGION_STATE id="165" /> 
ID - Enter the state ID # you want to add to your region. This can be any state, from any nation. Remember each state has their own unique ID #. In my Legend example, "165" is Maine, USA. Ad as many of these as you want.

When finished adding states to your Region, close the states coding with </REGION_STATES>. Then close your new Region coding with </REGION>. That's it for creating a new region.





I will post a reply shortly containing an Excel spreadsheet that will allow you take take OOTP v11 or older worlds and import them a little easier than just retyping everything.

Hope this helps those wishing to customize their own universe, world, and/or planet!
__________________
________________________________________________
Coming soon! Legendary Baseball League.... stay tuned!

Last edited by Dreifort; 08-30-2012 at 12:49 PM.
Dreifort is offline   Reply With Quote
Old 08-30-2012, 01:16 AM   #2
The Wolf
Hall Of Famer
 
The Wolf's Avatar
 
Join Date: Jun 2006
Location: All alone
Posts: 12,612
Infractions: 0/1 (1)
I use a real XML editor to edit XML. Serna makes a great free one.
__________________
__________________
Quote:
Originally Posted by Markus Heinsohn View Post
Well, the average OOTP user...downloads the game, manages his favorite team and that's it.
According to OOTP itself, OOTP MLB play (modern and historical) outnumbers OOTP fictional play three to one.

Five thousand thanks for a non-modder? I never thought I'd see the day. Thank you for your support.
The Wolf is offline   Reply With Quote
Old 08-30-2012, 08:43 AM   #3
Bluenoser
Hall Of Famer
 
Bluenoser's Avatar
 
Join Date: Mar 2002
Location: In The Moment
Posts: 13,632
Great stuff Dreifort, thanks for taking the time to write this out and for sharing.
Bluenoser is offline   Reply With Quote
Old 08-30-2012, 12:38 PM   #4
Dreifort
Major Leagues
 
Dreifort's Avatar
 
Join Date: Dec 2003
Posts: 307
Added info about creating new Regions to my original post above:


REGIONS:

There is also a new feature added in the world_default.xml file called "Regions".
Regions allow you to specify territories you want your baseball league to cover. Meaning... if I create a new region with ONLY Germany and France referenced, when I create a new league with that new region specified - all the players generated will be born from either Germany or France. Now of course if you set your Foreigner limit (0-100%) more than 0%, you will also have players from outside those two countries as well. Also, any automated teams generated for your new league will use Germany and France for city choices, not just use your designated Nation of origin for your league.

For my new nation of Legend, I want to create a new region that will cover Legend and it's surrounding countries: Canada, USA, Greenland, Iceland, Scotland, Wales, and England. But I don't want players from California (since Legend is on the east coast of USA). The world_default.xml will also let you specify states in your region!

Specifying states is great especially if you wanted to create a West Coast (USA) only baseball league... like the PCL. Works with other nations (keep in mind that some nations in OOTP don't really use states, instead they assign states to individual cities or assign a state to represent the entire country). Using Excel to view the world_default.xml file really comes in handy here. You can open the .xml file in Excel and it will sort all the parameters into columns - sweet! So ALL cities will be in 1 column, as with states, nations, etc. Each in their own respective column. Makes it easy to find state, nation, city ID #s. Continents, Nations, States, Cities, etc. are well labeled. However, the ID #s are not well labeled - they are labeled id1, id2, id3, id4, etc. You will just have to use a little thinking to figure out the id's that match to nation, state & cities. Not to hard as they are usually right next to each other. For example, id13 = State ID #. Anyway, Excel makes it much easier to view and sort the world_default.xml data. Just don't try to edit and then save the data in Excel - it won't work (and even if you make it save, OOTP will not recognize the new file properly). Excel should be for viewing only on the .xml file.

Ok, how to create a new Region the .xml file. Scroll down to the very end of the .xml file and see this code:

PHP Code:
    </REGION>
    </
REGIONS>
</
WORLD
We are going to add the new Region after the last </REGION> but before the </REGIONS>. The plural /REGIONS closes all Region coding, we want our new Region to be inside that bracket, but the last Region added (so make it easier to find to edit later).

Here is my new region to include Legend and it's surrounding nations, but ONLY certain states within the USA:

PHP Code:
    <REGION id="143" sort_order="113" name="Legendary Region">
        <
REGION_NATIONS>
        <
REGION_NATION id="253" />
        <
REGION_NATION id="36" />
        <
REGION_NATION id="250" />
        <
REGION_NATION id="212" />
        <
REGION_NATION id="212" />
        <
REGION_NATION id="153" />
        <
REGION_NATION id="61" />
        <
REGION_NATION id="89" />
        <
REGION_NATION id="164" />
        </
REGION_NATIONS>
        <
REGION_STATES>
        <
REGION_STATE id="167" />
        <
REGION_STATE id="168" />
        <
REGION_STATE id="165" />
        <
REGION_STATE id="164" />
        <
REGION_STATE id="161" />
        <
REGION_STATE id="160" />
        <
REGION_STATE id="159" />
        <
REGION_STATE id="156" />
        <
REGION_STATE id="150" />
        <
REGION_STATE id="148" />
        <
REGION_STATE id="146" />
        <
REGION_STATE id="143" />
        <
REGION_STATE id="141" />
        <
REGION_STATE id="132" />
        <
REGION_STATE id="131" />
        <
REGION_STATE id="130" />
        <
REGION_STATE id="129" />
        <
REGION_STATE id="128" />
        <
REGION_STATE id="127" />
        <
REGION_STATE id="126" />
        <
REGION_STATE id="124" />
        <
REGION_STATE id="122" />
        <
REGION_STATE id="120" />
        <
REGION_STATE id="118" />
        <
REGION_STATE id="135" />
        </
REGION_STATES>
    </
REGION

Region:

You have to open a new Region with the code <REGION> as such:

PHP Code:
    <REGION id="143" sort_order="113" name="Legendary Region"
ID - The Region ID# must be unique to all other Regions created. The default OOTP Regions end at # 142. To add a new region, start with "143". Do not duplicate region ID #s.
SORT_ORDER - This # represents the order in which your region will be listed in the drop down Region selection box within the OOTP game. "1" you will be first listed, "9532" prob means it will be listed last. I do not think duplicate #s will do any harm here. I am going to give my new region a value of "113" hoping to be near the top of the list, but not first 5-10. The default order values vary and are NOT consecutive. Don't know why. Don't worry about it. Just pick a numbner .
NAME - Full name to describe your region. This text is what will be displayed in the drop down Region selection box within the OOTP game.


Now that the <REGION> code is opened for a new region, lets add territories. You can add nations and states.

To add a Nation, open the code with <REGION_NATIONS>, then add 1 or more of the following type line:

PHP Code:
        <REGION_NATION id="61" /> 
ID -Enter the nation ID # you want to add. Example, "61" is England. Ad as many of these lines as you want.

When finished adding nations to your Region, close the nations coding with </REGION_NATIONS>.

Now, let's add some US States and open the States region coding with <REGION_STATES>, then add 1 or more of the following type line:
* NOTE, the nation whose states I am adding, I did not add as a nation in the <REGION_NATION> coding (since I only want certain states of that nation).

PHP Code:
        <REGION_STATE id="165" /> 
ID - Enter the state ID # you want to add to your region. This can be any state, from any nation. Remember each state has their own unique ID #. In my Legend example, "165" is Maine, USA. Ad as many of these as you want.

When finished adding states to your Region, close the states coding with </REGION_STATES>. Then close your new Region coding with </REGION>.
__________________
________________________________________________
Coming soon! Legendary Baseball League.... stay tuned!

Last edited by Dreifort; 08-30-2012 at 12:48 PM.
Dreifort is offline   Reply With Quote
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
Old 09-08-2012, 09:33 PM   #6
daves
Hall Of Famer
 
daves's Avatar
 
Join Date: Dec 2007
Posts: 3,583
Subscribed to thread.
__________________


daves is offline   Reply With Quote
Old 09-09-2012, 05:20 AM   #7
Tyke
All Star Starter
 
Tyke's Avatar
 
Join Date: Apr 2002
Location: Brighouse, West Yorkshire, U.K.
Posts: 1,122
This has all been REALLY useful! Many thanks, Dreifort, your efforts are very much appreciated.
Tyke is offline   Reply With Quote
Old 09-09-2012, 01:30 PM   #8
ashantewarrier
Hall Of Famer
 
ashantewarrier's Avatar
 
Join Date: Feb 2004
Location: Somerset, NJ via Brooklyn, NY
Posts: 2,291
Blog Entries: 7
This thread should be stickied! Thanks!
__________________
"I'm not concerned with your liking or disliking me... All I ask is that you respect me as a human being."
-Jackie Robinson, #42 Brooklyn Dodgers


"Hitting is better than sex." - Reggie Jackson
ashantewarrier is offline   Reply With Quote
Old 10-19-2012, 03:57 AM   #9
MUFC1878
All Star Reserve
 
MUFC1878's Avatar
 
Join Date: Sep 2012
Location: Venezuela
Posts: 621
Quote:
Originally Posted by Dreifort View Post
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!

Thanks for this. Very helpful.
MUFC1878 is offline   Reply With Quote
Old 10-19-2012, 11:32 AM   #10
Bigrod
OOTP Stats Master
 
Join Date: Mar 2009
Location: Maine
Posts: 3,075
Thanks for taking the time to do this.
Just one note on something not covered:
Time zone info for all states etc. has been added in ootp 13. That data should also be entered as it controls game start times and is tied to your time zone setting on your Manager options page.
Time zone info is entered as UTC time.

Quote:
FILE_VERSION - Default value is "OOTP Developments 2012-07-27 15:25:00", not sure what happens if this info is altered.

This line is the date and time the world defaut.xml file was last edited by it's creator.

Another important note is to make a backup copy of your edited file and keep it safe. If one does a new/re install it'll get overwritten with the default one.

Thanks again for your hard work..
Bigrod is offline   Reply With Quote
Old 10-19-2012, 02:00 PM   #11
Who Killed Kenny?
Major Leagues
 
Join Date: Mar 2007
Posts: 410
Correct me if I am wrong, but for existing leagues, you cannot modify the world and re-import it into the existing game. There is some editing that can be done in game, but its extremely limited IMHO.

I'd like to fix my states back to what they were before they were broken in an infamous OOTP 12 "patch", but will have to wait until in game editing, or importing the world xml works.

If anyone has figured out how to do the above, please post.
Who Killed Kenny? is offline   Reply With Quote
Old 10-19-2012, 05:17 PM   #12
Righty Groove
Minors (Triple A)
 
Join Date: Apr 2012
Posts: 262
Thanks for the time, help and work on developing this guide. It's excenllent and even I, who have never edited anything in xml in my life, understood it.

I believe any changes only take effect after you start a new game, right? Can you add (as opposed to edit already existing) nations or regions on a game?

Once again, thanks a lot.
Righty Groove is offline   Reply With Quote
Old 10-19-2012, 06:03 PM   #13
Dreifort
Major Leagues
 
Dreifort's Avatar
 
Join Date: Dec 2003
Posts: 307
The only time the world_default.xml file is referenced is when creating a new league. If you create a new league using your new world, and then update your world_default.xml - your existing league will not see new changes/updates to the file.

There are still a few limitations to world progression in OOTP.

Somethings you can do manually from inside OOTP the game, such as add new cities, edit cities, etc. to any nation/city/state that was loaded into your league when you created it.
__________________
________________________________________________
Coming soon! Legendary Baseball League.... stay tuned!
Dreifort is offline   Reply With Quote
Old 10-19-2012, 06:05 PM   #14
Dreifort
Major Leagues
 
Dreifort's Avatar
 
Join Date: Dec 2003
Posts: 307
Quote:
Originally Posted by Who Killed Kenny? View Post
Correct me if I am wrong, but for existing leagues, you cannot modify the world and re-import it into the existing game. There is some editing that can be done in game, but its extremely limited IMHO.

I'd like to fix my states back to what they were before they were broken in an infamous OOTP 12 "patch", but will have to wait until in game editing, or importing the world xml works.

If anyone has figured out how to do the above, please post.
You can click on your user/manager name inside of OOTP and then select Explorer Game World under the INFO & TOOLS section. From there you can select existing nations, states, cities and do some editing to them there and update existing leagues.
__________________
________________________________________________
Coming soon! Legendary Baseball League.... stay tuned!
Dreifort is offline   Reply With Quote
Old 10-19-2012, 06:40 PM   #15
MUFC1878
All Star Reserve
 
MUFC1878's Avatar
 
Join Date: Sep 2012
Location: Venezuela
Posts: 621
Quote:
Originally Posted by Bigrod View Post
Thanks for taking the time to do this.
Just one note on something not covered:
Time zone info for all states etc. has been added in ootp 13. That data should also be entered as it controls game start times and is tied to your time zone setting on your Manager options page.
Time zone info is entered as UTC time.
Do I also need to enter time zone in a completely fictional world?
MUFC1878 is offline   Reply With Quote
Old 10-20-2012, 12:45 AM   #16
Dreifort
Major Leagues
 
Dreifort's Avatar
 
Join Date: Dec 2003
Posts: 307
Quote:
Originally Posted by MUFC1878 View Post
Do I also need to enter time zone in a completely fictional world?
nations, even if fictional, will want a point of reference - so yes, I would enter a time zone.

Quote:
Nation:
ID - Game default # value for nations ends at 252 (if you add a new nation to an untouched world_default.xml, start with 253). Never duplicate Nation ID values.
NAME - Enter the full name of the country.
POP - Enter the nation's total population.
LID - Primary language ID #.
GENDER - I am assuming 0 is value for male?? Not sure on this one.
BBQUAL - Nation's baseball quality level. 0-5 with 0 = bad and 5 = excellent.
ABBR - Enter the abbrevation for your country... such as USA is abbr for United States of America. Try not to duplicate this value with other nations to avoid confusion (doesn't matter for states below). This is also what your country flag file name will have to be. If my country Legend abbr is LGN, then the flag I create MUST be named the same 3 letters - "lgn.png" in the flags folders.
DEM - Nationality term for the country. For Scotland it would be "Scottish", for France it would be "French", etc.
TIME_ZONE - Desigantes which world time zone the country is in. Values relate to real life values.
OBSERVES_DST - Observes Daylight Savings Time? 1= Yes, 0= No. (Spring ahead, fall back... lose an hour, gain an hour... you know what it is.)
__________________
________________________________________________
Coming soon! Legendary Baseball League.... stay tuned!
Dreifort is offline   Reply With Quote
Old 10-21-2012, 08:05 PM   #17
MUFC1878
All Star Reserve
 
MUFC1878's Avatar
 
Join Date: Sep 2012
Location: Venezuela
Posts: 621
Is it necessary to enter a time zone for every city? I only entered it in the state's line, but they also apply to each city in that state. All cities in California's lat/long are in utc -8 and so on.
MUFC1878 is offline   Reply With Quote
Old 11-22-2012, 02:38 AM   #18
NCBeachBum
All Star Starter
 
NCBeachBum's Avatar
 
Join Date: Jul 2003
Location: Topsail Island, NC, USA
Posts: 1,049
Dreifort, you are my new damn hero for that Excel file.
__________________
And ain't that a shame, shame, shame
Shame, shame, the way you do
Oh, it's a shame, shame, shame
Shame, shame on you

NCBeachBum is offline   Reply With Quote
Old 03-14-2013, 02:54 PM   #19
Aumakua
Major Leagues
 
Join Date: Apr 2010
Location: Flat lands
Posts: 421
I know this is an old thread but my main reason for editing these files is naming of players.

It looks like the ethnicities.txt file is for changing the facegen creation ratio for each nation, based on the US numbers this makes sense as about 50% of players are white and the other 50% are black/hispanic.

Now it looks like the ethnicities LID in the world editor changes the names that the nation uses when creating a player, so those numbers effect what percentage will receive hispanic last names or traditional US last names... This would also make sense because although 50% of MLB players are black/hispanic in ethnicity, maybe half of them have non traditional US last names. so you are going to be around 75% for US names.

please let me know if this is a correct assumption. I hope OOTP updates their manual for OOTP 14 because in the 13 manual it makes no mention of this file and still references the old .txt files.
Aumakua is offline   Reply With Quote
Old 07-17-2013, 05:12 PM   #20
canadiancreed
Hall Of Famer
 
Join Date: Aug 2004
Posts: 11,660
Blog Entries: 1
Question for an idea I'm bouncing around. You stated that world.xml is refrenced at league creation. Say you had countries/cities that change names, merged, or were dissolved entirely. Coudl this be done somehow in world.xml or is it another part that would need to be edited...or world.xml once the league is created, is effectively useless?
__________________
PT21



PT22

canadiancreed is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:31 AM.

 

Major League and Minor League Baseball trademarks and copyrights are used with permission of Major League Baseball. Visit MLB.com and MiLB.com.

Officially Licensed Product – MLB Players, Inc.

Out of the Park Baseball is a registered trademark of Out of the Park Developments GmbH & Co. KG

Google Play is a trademark of Google Inc.

Apple, iPhone, iPod touch and iPad are trademarks of Apple Inc., registered in the U.S. and other countries.

COPYRIGHT © 2023 OUT OF THE PARK DEVELOPMENTS. ALL RIGHTS RESERVED.

 

Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright © 2020 Out of the Park Developments