Removing data for large overhaul

Kleinzach

Chieftain
Joined
Oct 28, 2014
Messages
4
If I were to want to do an overhaul mod changing nearly every techs, civ, and virtue, how would I do that? I think I read something about being able to completely replace a file by having the same name? Im just thinking that going through every loadout option and removing it one by one will take a long time. Any ideas?
 
The answer is different depending on if you're replacing XML or Lua files. Since you're describing what sounds like just the XML files, I'll use Techs as an example.

Remember that all of the core game data is stored in a database, so that means there are two steps to a total replacement:

1. Remove all of the old data
2. Load all of the new data

I personally like to use SQL to do my bulk deletes, but others use the XML format. You will need to add an SQL file to your project, and your project's actions tab, add it with Event: OnModActivated, Action: UpdateDatabase. In the sql file itself, you will just need the following:

Code:
DELETE FROM Technologies

How do you know 'Technologies' is the name of the table to dump everything out of? Look at CivBETechnologies.xml in the core game files. You will also need to find the table names to remove things like affinities, extra perks, and other effects, as well as the connections between all of the techs.

Then to load, just write up your new XML file containing your new tech information. Follow the same format as the existing CivBETechnologies.xml

Hope this gives you a good start.
 
Due to the many interactions between the different files, it's actually surprisingly difficult to remove things completely. I would recommend starting with a full copy of the vanilla files and removing things one by one.

There's also always the lazy variant to just remove things from the tech web, but otherwise leaving the buildings, etc. alone. This is much less hassle
 
Back
Top Bottom