HOW TO: Add a Civ/Unit/Building in BTS (Modular XML Modding)

Tags can be overwriten if they aren't empty: 0, -1 or NONE (maybe -1 works as it usually means unlimited, I don't remember)
The text files aren't modular so they have to go to the mod's Text folder. That also means that you cannot simply reuse the text tag reference in a module. Rename it, at least a bit.
 
The game allows introducing new text files with different names though. As long as they are in XML/Text they will be parsed and their tags will be available. I would assume that you can create an XML file in XML/Text in your module, and as long as it does not conflict with a file name in the base mod it will be included.
 
The game allows introducing new text files with different names though. As long as they are in XML/Text they will be parsed and their tags will be available. I would assume that you can create an XML file in XML/Text in your module, and as long as it does not conflict with a file name in the base mod it will be included.
From my observation, thanks to Teg_Navanis and his forced error in XML method especialy.
Base mod:
1- XML files >> Folder structure = mandatory, names = mandatory (same as game).
2- XML text files >> Folder structure = mandatory, names = freestyle

Modules
3- XML files>> Folder structure = freestyle, names = freestyle. Just need to deal with XML schemes and scheme refences in XML files.
4- XML text files >> Folder structure = freestyle, name = _CIV4GameText.xml + freestyle prefix. >> Nazi_CIV4GameText.xml >> Leo _CIV4GameText.xml

Adition for rule 3:
>> If multiple modular XML files are using the same tag, the alphabetical order of the file XML file name is taken.
>> Zeo_CIV4BuildingInfos.xml will overwrite XML entries from previously loaded Leo_CIV4BuildingInfos.xml
>> Non modular XML files like Leo_CIV4DiplomacyInfos.xml will have to be merged, because game will load only one and that is decided by maybe folder structure, folder names (first letter of last word?) and mostly probably XML file name. maybe even name of the schema file.
 
Last edited:
Dealing with rule 4 from my previous post. Multiple XML text files >> Cities, Civopedia, Objects, Textchanged and whatever.
1- Merging XML text files into one. >> Leo _CIV4GameText.xml
2- Multiple XML text files in one folder, but renamed to meet the rule 4. >> Leocity _CIV4GameText.xml, Leopedia_CIV4GameText.xml, Leobjects_CIV4GameText.xml, Leochanged_CIV4GameText.xml
3- Leo _CIV4GameText.xml being multiple times in the module, each in its own folder for coresponding thing >> folder for cities, civopedia, objects, ... etc

Solution 1 is nice for small modules with just one civilization and probably most used.

My lil modular friend then looks like this. (picture)
 

Attachments

  • Leo.png
    Leo.png
    7.6 KB · Views: 3
Back
Top Bottom