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

I think your folder structure is wrong. It should look like this:

(MainFolder)\Mods\Wampanoag\Assets\Modular\(whatever)

but it looks like this:

(MainFolder)\Mods\Wampanoag\Wampanoag\Assets\Modular\(whatever)

I still got a CTD when loading, but it worked fine when I changed the follwowing things (not all of them caused a crash, some just an error message).

- Delete test_CIV4LeaderHeadInfos2.xml to make sure it isn't loaded.

- Make sure that all ArtDefines references are to existing art files (I changed some from upper case to lower case).

- Change the art (EarlyArtDefineTag) of your UNIT_WAMPANOAG_GUERILLAS from ART_DEF_UNIT_HELLEBARDIER to ART_DEF_UNIT_WAMPANOAG_GUERILLA. This stopped the game from crashing. Remember: whenever the game crashes without warning, it's usually the art files that are to blame (references to non-existing art).

I still got some error message though:

- In your Civ4CivilizationInfos.xml, the following code bits are missing:
-- an end tag </Cities> after line 42.
-- you need a tag <Leaders> right before the first <Leader> tag and a </Leaders> tag after the last </Leader> tag. This is necessary to allow for multiple leaders.

- Your unit is called UNIT_WAMPANOAG_GUERILLA in your CivilizationInfos, but UNIT_WAMPANOAG_GUERILLAS in your UnitInfos.

After making these changes (dunno if the first two are necessary, the last three definitely are), it worked fine.
 
Awesome - Thank you SO much!
But I (Of course) have just one more question. While the mod now loads, everything is appearing as tags; instead of "Metacomet", my leader is showing up as "TXT_KEY_LEADER_METACOMET".

How would I fix this?

EDIT: Nevermind; I figured it out. I'd missnamed my TXT file <_<.
Now I just need to get the yellow sheen off of my flag :D

~S~
 
How's it going Teg. This is my first mod. After creating a new Civ, I had an initial audio problem with diplo music.

I copied my code into some audio module I found online and that worked. But now i've created two new civs and the game crashes everytime it tries to load the audio data.

I put the code for the two new civs just like I did the original and the civs work fine (but with no diplo music) if I remove the audiodefines and etc files. Does anyone have any suggestions?
 
JeanZGerman, what audio module did you use? According to the Modder's Guide (see first post), audio files (and the XML files dealing with sound/audio) don't work with modular loading.
 
It was some sort of universal audio files for a plug and play mod. However, I didn't actually do any modular loading (well to the best of my knowledge). In the config file, I have modular loading set to 0.

Here is the site where I got it. http://forums.civfanatics.com/forumdisplay.php?f=255

When I used his universal audio files, id did correct the problem when I added one civ, just not 3. Maybe it's a schema thing, but I don't know anything about that.
 
I do not know how this plug and play audio file works, nor am I sure if it works at all if you set modular loading to 0. I do not think, however, that you need to use that 'universal audio file' since the idea behind it is that it includes data for as many civs as possible, so that you can use it no matter which modular civs you actually want to use. If you're doing your own mod with only the standard civs + three of your own, you could try editing the standard file until it works.
 
My civilizations (Sweden and Norway) doesn't come up in the Choose a Civilization-list or in the Civilopedia when but it's no problems with the XML when I load my mod.

What can be wrong?


Gurra09
 
You can always test whether the modular files load or not by planting an error in them (deleting a '>' or so). If there is no error message when you start your mod, the files don't load.

If this is the case, you should make sure that you have modular loading enabled (the file you have to modifiy is automatically created the first time you load a mod; it should be in your mod's main directory). Then, double-check the directory structure and whether you have all the schema files necessary.
 
OK, I should check that now and then look in the game again...

It doesn't work, the XML files is wrong and it's something with a line that's "gone" from the XML and isn't in the schema. Maybe the wrong is that I've copied and cut the civilization infos from my mod for original Civ IV?


Gurra09
 
Thank you for this guide!!

I'm starting to mod civ (already experienced in other games), and you have been a great help for getting me started.
:thanx:
 
I've asked this in a few threads, so apologies in advance for the duplication.

Is it possible to load modules through the Custom Assets tree instead of the Mod/Assets route? If this is possible, where does one put the Modules folder, i.e. the one that contains the xml, and there any specific naming convention required?

Cheers
 
Officially, I think it should be possible. It didn't work when I tried it though. If you still want to try, the folder structure should theoretically be CustomAssets\Modules\whateveryouwant, since CustomAssets corresponds to the Assets folder.
 
Thanks for making this; it will be helpful in adding another civilization to BTS.
 
Hi, thanks for the guide, but there are 2 things I'm not really sure of:
What to do with the atlas.dds 's?
If I'm not making art for my special unit can I just copy it, or is even that unnecessary?
 
It doesn't really matter where you put the art files, as long as the paths in the XML files are correct.
 
Top Bottom