Mod Question - Deleting Civilizations and Leaders

SneoplesGov

Chieftain
Joined
Apr 25, 2016
Messages
11
Hello! New to the forums here. Currently messing around with a mod of my own and needed a few pointers.

Say I want to delete the Zulu civilization and the leader Shaka from the mod. How to I go about doing this? Is it all XML bits that I have to edit out, or more? A bit further, say I wanted to delete Washington, but leave in the American civilization. How would I do that?

Any help is appreciated. Thanks in advance!
 
Welcome to the Forum! :beer: :band:

To delete a Civ or a Leader just requires XML editing. And possibly Notepad++ which is a free and convenient text editor that many modders use.

All you have to do is to make sure that you edit out all the occurences of the name in the XML. Note that if you forget one, the game will tell you with an error popup while you try to load it.

For a Civ, just delete the entry in the CivilizationInfos file. Eventually, its art definition in Art/CIV4ArtDefines_Civilization. But deleting art entries is not mandatory.

For a Leader, delete its entry in the LeaderHeadInfos and its reference in the CivilizationInfos file. Plus also all references to the Leader in GameInfo/CIV4DiplomacyInfos. Plus eventually the art reference in Art/CIV4ArtDefines_Leaderhead.

I think that's about it.

Note that you can also simply disabling a Civ in the CivilizationInfos file by zeroing the tags bPlayable and bAIPlayable. However, they would still show up in the Civilopedia despite being non-playable.

Have fun (and make sure to keep a set of BtS original files)!

PS/Edit: if you delete a Civ, you should also consider what to do with their unique unit and unique building. Strictly speaking, you don't have to delete them but they would become useless. Same goes for all the related texts...
 
Deleting a civ is fairly easy. Just remove their info in CivilizationInfos, make sure to change the derivative civs (America is the derivative civ for a bunch of European civs, for example). Certain civs also have random events associated with them, so you might want to remove them or assign them to some other civ.

Leaders, it's like Isenchine said. Delete their info from LeaderheadInfos + Civ4DiplomacyInfos.
 
Note that you can also simply disabling a Civ in the CivilizationInfos file by zeroing the tags bPlayable and bAIPlayable. However, they would still show up in the Civilopedia despite being non-playable.
I really recommend doing this instead of actually deleting anything. It's less work, there's less of a chance of messing something else up, and you can easily revert it.

If you only care about a civ/leader not showing up in your games anymore that's the best way to achieve it.
 
Certain civs also have random events associated with them, so you might want to remove them or assign them to some other civ.

Not in plain BtS!
 
I remember France and America specific events in BtS.
 
Really? Looking through CIV4EventInfos.xml and CVEventTriggerInfos.xml, I can't find anything?
 
Was the American impeachment event from a mod?
 
I apologize - I was wrong, sorry about that! :(

I also checked the xml files before replying but it's in CvRandomEventInterface.py where you have several civilizations listed as prerequisite: America, Aztec, Egypt, France and Russia.
 
Thank you all very much! That helped me quite a bit in making my own mod, believe me.

Also, to sort of piggy back off of my first question, how would you delete a unit/building? A Religion?

Thank you all very much, again.
 
The same: track down every instance of unit/building in XML. Don't worry, if you forget one, the game will remind it to you at launch!

Units/Buildings have two main files: one who lists them all and one for each class. Of course, don't delete the class if you are just deleting a Unique Unit/Building.

Both can be referenced several times in their own file (upgrade unit, prereq building) + in CivilizationInfos.

Both can be in Events (2 xml files + Python/EntryPoints/CvRandomEventInterface.py).

In addition, for Units: TechInfos (GP), GoodyInfo (Settler, Scout, Warrior, Worker) and Python/CvAdvisorUtils.py (Privateer, Spy).

This list is not complete but as I said, error popups at xml check are there to assist you. Experience helps too!

XML/Art is not mandatory to delete but if you delete a reference and keep the unit/building, you have a guaranteed crash (don't delete the art for Siege Tower, used by the exe).

Religion is more tricky. Of course you have the missionaries and the associated buildings, but you have also the symbols in the 2 tga files (Assets\res\Fonts). Just deleting a Religion would mess up the order of other Religions/Corporations. However, there is a useful tool made by Asaf to deal with them.

Also check for Events, Leaders have a favorite Religion, Prophets can build the Shrine.
 
Back
Top Bottom