xml file structure for RoM

nullgraph

Chieftain
Joined
Mar 9, 2011
Messages
2
Hello, I'm trying to create an external viewer for the Civilopedia and I've been reading about how everything is defined through xml files. I've also looked at a xml tutorials like (the very helpful) BrentRichie's Civ 4 XML Tutorial. However, my setup is RoM together with A New Dawn and after this many layers of xml, I'm not sure where what is defined. For example, in the Rise of Mankind\Assets\XML\Text directory I find the description of the Abyssinia civilization in RoM_CIV4GameText_Abyssinia.xml, but for the life of me, I can't figure out where the America civilization descriptions are. I'm sure there's a structure for all these xml files, is there a tutorial or a place that details where things are? Any pointer to that mysterious place is appreciated!
 
Hello, I'm trying to create an external viewer for the Civilopedia and I've been reading about how everything is defined through xml files. I've also looked at a xml tutorials like (the very helpful) BrentRichie's Civ 4 XML Tutorial. However, my setup is RoM together with A New Dawn and after this many layers of xml, I'm not sure where what is defined. For example, in the Rise of Mankind\Assets\XML\Text directory I find the description of the Abyssinia civilization in RoM_CIV4GameText_Abyssinia.xml, but for the life of me, I can't figure out where the America civilization descriptions are. I'm sure there's a structure for all these xml files, is there a tutorial or a place that details where things are? Any pointer to that mysterious place is appreciated!

I tried to do this at one stage also but did not get far. However I did come up with where to look for stuff in xml.

First there are the "main" XML files in Assets/XML. Then since there are many mods added to RoM there are more in each subfolder on Assets/Modules. Each of those subfolders may also have subfolders containing more XML.

It is a coding standard/convention/guideline to name the XML files in the mod
<modname>_<XML File name> eg Andean_CIV4ArtDefines_Building.xml for the Andean for the mod and CIV4ArtDefines_Building.xml for the file it is based upon. However this guideline was developed over time and may not be used in all mods.

Finally, RoM, uses the WoC standard for defining the XML. Which means
  • mod XML may change any XML that was loaded before it (except you can't reset to the default value)
  • the XML may have conditions that need to be met before it is applied. these include gameoptions and the existence of other objects (units, terrain etc)
  • it is possible to over write the whole of an object but you need to provide all the information to do so.

If you are just doing text, which was all I was going to do, then you just search all folders and files for the <TEXT> tags.

Hope this helps. My main problem was getting the XML to be read in, in a way that I could manipulate. But then I was aiming for a wiki with language support from the start, ie to high an aim.:)
 
Thank you for the info about coding standard and subfolder. I'm using Crimson editor which conveniently has a search all files function and I did try to search for tags but I didn't think about previous incarnation of files. Will try more searches when I get home today.

Right now I would be happy enough if I could get the text to display (I'm on a deadline - someone's birthday). I intend to put the XML data into a sqlite database and hoping that sqlite manager (a Firefox plugin of all thing!) would do the job. If not I guess some real coding is called for. Can you tell me what tools you used and where the difficulties lie?
 
Sounds like you are well ahead of me. I have always had to build stuff from scratch so don't know what tools are around. Although I can do all sorts of stuff to data which is in SQL form.

The TEXT tags will give you all the names, pedia and strategy stuff. Which is a very good start because mostly modders won't play around with updating those things just replacing them.

It is when you start to try and get other details, like upgrades and strength or costs, that you will have problems. Those bits of information are in the non text files and that is where I stopped.
 
Top Bottom