View Single Post
Old 07-08-2011, 03:06 AM   #50
Andreas Raht
Administrator
 
Andreas Raht's Avatar
 
Join Date: Jun 2002
Location: Hollern/Stade/Germany
Posts: 8,992
Hey guys,

The idea why we switched from txt files to XML files is indeed the higher flexibility of XML especially when it comes to structured data. I know that XML has one disadvantage and that is you cannot just open and edit it as a table in Excel. We will do our best to add functionality to OOTP to make sure that the XML files are an improvement for all of you instead of a step back.

What we really needed for OOTP was an online world database where we can edit the world data and export it to a world file that we can ship with OOTP. That has been done now. We made a lot of code changes and improvements and added states and regions. The number of languages per nation is no longer hard-coded. The number of languages in the game is still hard-coded (40), but my goal is to get rid of all hard-coded data eventually.

I'll add the following features in patches ASAP:
- add, edit, delete and search/filter cities
- add, edit, delete and search/filter states
- export world data to XML

This way you will not need to edit data in the XML.
If you edit data in XML, please use text editors that can edit plain text. Wordpad or MS Word will add all kind of unwanted formatting code to the files. Notepad++ is AFAIK the perfect tool to edit the XML files. You can easily test XML files by opening them in a web browser. Most browsers will show error messages if the XML file has syntax errors.

Of course OOTP 12 should import OOTP 11 leagues with customized world data properly. The world data is saved in the world.dat and that file will be imported into OOTP 12. OOTP 12 will not merge the world_default.xml file into the imported OOTP 11 game or something like that.

If you edit the world_default.xml file, your changes will not have any effect on games that you already created. You will only see them in new games.



Quote:
Originally Posted by albatross11 View Post
True...there is the "potential" for more flexibility. However, if I already have a very heavily modified cities.txt file (that I have spent years modifying to my liking), and the only way of using that data in OOTP12 is inputting over 140 thousand lines of data into the XML file (and not, from reading these forums, being sure even that would work) then the change to the XML format is not a good thing (for me).
You can import the OOTP 11 league into OOTP 12 and export the world data to XML, when the export tool is available.


Quote:
Originally Posted by cephasjames View Post
Yeah, and I don't think changes we've made for 11 will even tansfer over into 12 if we import an 11 world into 12.
If that's the case, it's a bug.

Quote:
Originally Posted by Markmeister View Post
Joe,

I'm guessing that when languages were originally added they were hard coded.

Markus may have added them to the world default.xml, but hasn't changed the hard coding in the game yet.
That's true, we still have a hard-coded languages array in the game. But the goal is definitely to get rid of all hard-coded stuff.
Andreas Raht is offline   Reply With Quote