How does one remove items or features from the game?

TheRealMaestro

Chieftain
Joined
Aug 20, 2013
Messages
42
Location
Earth
I have recently been able to purchase Beyond the Sword and
I have enjoyed playing it for the three days I've had it so far. I already
have many changes that I wish to make to my game. While there
are some features that I wish to add, there are others I wish to take
away from the game:

  • I wish to do a complete overhaul of the Modern Era of the game;
    this involves removing several technologies, resources, buildings,
    units, and wonders. This could conceivably be broken down into
    multiple questions (How does one remove a technology? ...a unit?
    & cetera), each with a separate answer.
  • The main feature I wish to remove from the game, for ideo-
    logical reasons, are corporations. I'd rather play a game without
    giant companies inevitably appearing and dominating the globe.
  • There are certain civilisations that I do not wish to keep in the
    ordinary game and want to prevent them from appearing.

Given there are many discussions on how to add features or
items to the game, but not so many apparently on how to remove
them, I would like to know how I may do each of the tasks I have
detailed above. Your help would be greatly appreciated.
 
All of those can be done with just XML editing. Basically

1) Create your mod, ie make a folder in the Mods folder
2) Identify the files which refer to the ting you want removed
3) copy those files into your mod
4) remove those entries - the difficult bit ;)
5) play your mod.

For example to remove a resource you would need to copy and edit
- Assets/XML/Art/CIV4ArtDefines_Bonus.XML - the art definition of the resource
- Assets/XML/Terrain/Civ4BonusInfos.XML - the resource itself
- Assets/XML/Terrain/CIV4ImprovementInfos.XML - the improvement that accesses the resource
- Assets/XML/Units/CIV4BuildInfos.XML - the unit action that builds the improvement to access the resource
- Assets/XML/Units/CIV4UnitInfos.XML - the unit that can build...
 
Thank you for your response; it seems to be a useful guide.
Your instructions are very helpful and I have already started
to use them.

Do you have any advice or links to a tutorial on how to identify
which files refer to a given civ/wonder/tech/&c ? A sort of
"road map" telling me, e.g., where I can find all of the files
related to, for example, the Aztecs are to be found, would
be a big help so I don't need to spend so many hours searching
for each item to delete them.
 
I use WinGrep or similar and search the Assets folder for AZTEC in uppercase. It will identify all the files which mention the Aztecs. I have not worked on Civilizations or leaders so I am unsure what would be involved. Probably the Civilizations and Traits files plus maybe the units and leaders file.
 
Given that you know there are tutorials to add stuff, removing stuff is basically removing the stuff in the same files where you are supposed to add.

For a Civ, you need Leader, UB and UU and respective Artwork and Text.
Thus, just delete each of them from their respective XXXInfos.xml.
There is no harm in leaving unused Artwork and ArtDefines except they are a waste of space, so you can ignore them.
 
For things you simply want to remove from the game, it's usually the easiest (and safest) way to just disable them:
  • Civilizations can be disabled by locating the civ in the CIV4CivilizationInfos.xml and setting the <bPlayable> and <bAIPlayable> fields from "1" to "0" . This should also remove all associated leaders from the game for the "Unrestricted Leaders" option in the custom game, not sure about this one, though.
  • Corporations can be disabled in various ways, e.g. you can remove the ability to found a corporation from the corresponding Great Person entry in the CIV4UnitInfos.xml or you can set the <PrereqTech>...</PrereqTech> field of all Corporate HQs to <PrereqTech>TECH_FUTURE_TECH</PrereqTech> in the CIV4BuildingInfos.xml.
  • Units and buildings (including wonders) can be disabled in the same way, by setting <PrereqTech>...</PrereqTech> to <PrereqTech>TECH_FUTURE_TECH</PrereqTech> in the CIV4UnitInfos.xml and CIV4BuildingInfos.xml, respectively.
  • Same goes for resources, they can be disabled by setting <TechReveal>...</TechReveal> to <TechReveal>TECH_FUTURE_TECH</TechReveal> in the CIV4BonusInfos.xml. The resources are still generated with the map but will never be revealed.
 
1) There may still be events which grant free units/buildings whatever, so even if prereq tech is changed, those events still give them because the event codes only refer to original prereq tech.

2) Pedia will still display them.

3) Techtree will display them in Future Tech

4) Efficiency is not reduced.
If I have a loop through all buildings, where 100 of them are "disabled", the loop is still looping through all of them.
 
Correct, forgot about the events :)

As for 2), 3) and 4) - Like I said, it's an easy and safe way and it effectively removes these things from the game itself, but granted, it's also a "kind-of-dirty" way for the reasons you mentioned. Still, good for testing things out (e.g., if unsure about removing certain units, buildings etc.) and any items "disabled" this way can still be deleted from the various files, once I'm happy with the modifications (and should be deleted if I'm going to release or share the mod).
 
Back
Top Bottom