[BNW] Some XML values (traits/difficulty) not being applied


Feb 10, 2022
I'm making a small balance mod, and I need help getting my changes to traits and AI difficulty to apply in-game.

I should start off by saying I don't use ModBoddy for the simple reason that I can't look at such a bright screen. Instead, I skim through the vanilla files until I find the XML value I want to change and then update that value in my own file. Currently, my .modinfo file looks like this:

Mini Balance Mod.modinfo
Spoiler :

<?xml version="1.0" encoding="utf-8"?>
<Mod id="38fa82c9-e1ab-43a7-8b64-c2fec723d96e" version="5">
    <Name>Mini Balance Mod</Name>
    <Teaser>A small balance mod.</Teaser>
    <Description>This is a work-in-progress mod intended to balance Civilization V by tweaking a handful of beliefs, buildings, policies, traits and units to bring them in line with the rest. Also nerfs the AI on Immortal and Deity somewhat, especially at the start of the game.</Description>
  <Dependencies />
  <References />
  <Blocks />
    <File md5="C050B3DD9249A93003701CE9F6FD155F" import="0">Beliefs.xml</File>
    <File md5="CD02CF9440A3703E954697023A30BDBF" import="0">Buildings.xml</File>
    <File md5="2155830174BA6E69C819C3FF1ECE8CB6" import="0">SocialPolicies.xml</File>
    <File md5="AF0500E3693DF4206276F43335706235" import="0">Text.xml</File>
    <File md5="9BFDC6296AE6055C787C45B6F910398E" import="0">Traits_Babylon.xml</File>
    <File md5="1ECFC6296AE6055C787C45B6F910398E" import="0">Traits_Korea.xml</File>
    <File md5="BAFDC6296AE6055C687C45B6E910398E" import="0">Units.xml</File>
    <File md5="CF0500E3293DF4206170F03335706452" import="0">HandicapInfos.xml</File>

My assumption here is that if I want to update a value I found in Sid Meier's Civilization V/Assets/DLC/DLC_05/Gameplay/XML/CIV5Traits_Korea.xml (in this case, the science bonus from specialists), I list "Traits_Korea.xml" under the <Files> tag and give it a random unique value for "md5", then list that filename again under <OnModActivated>. If this is incorrect, please let me know. As for what that file contains, it's as follows:

Spoiler :

<?xml version="1.0" encoding="utf-8"?>
            <Set Yield="1"/>
            <Where TraitType="TRAIT_SCHOLARS_JADE_HALL"/>
            <Set Help="TXT_KEY_TRAIT_SCHOLARS_JADE_HALL"/>
            <Where TraitType="TRAIT_SCHOLARS_JADE_HALL"/>
    <!-- (Some commented-out stuff) -->

This seems correct to me, and yet when I test it in game Korean specialists still give +2 Science. It seems like this file isn't being applied at all. The same happens for the following 2 files:

Spoiler :

<?xml version="1.0" encoding="utf-8"?>
            <Set GreatScientistRateModifier="25" Help="TXT_KEY_TRAIT_INGENIOUS"/>
            <Where TraitType="TRAIT_INGENIOUS"/>

Spoiler :

<?xml version="1.0" encoding="utf-8"?>
            <Set AIStartingDefenseUnits="1"
            <Where Type="HANDICAP_IMMORTAL"/>
            <Set AIStartingWorkerUnits="1"
            <Where Type="HANDICAP_DEITY"/>

For contrast, here's my social policies file, which is applied correctly:

Spoiler :

<?xml version="1.0" encoding="utf-8"?>
            <Where Type="POLICY_LEGALISM"/>
            <Set NumCitiesFreeCultureBuilding="3"/>          

            <Where Type="POLICY_TRADITION_FINISHER"/>
            <Set NumCitiesFreeFoodBuilding="2"/>

            <Where Type="POLICY_SPACE_PROCUREMENTS"/>

    <!-- (Some commented-out stuff) -->

What am I missing here?
Check the log files (link in my sig) and if those don't reveal the issue, attach the actual mod (link also in my sig)
Thanks for the quick reply! Turns out the <Help> tags in the Korea/Babylon files were unnecessary and causing problems; additionally, for Babylon I was trying to update <TraitType> rather than <Trait>. After fixing those issues both traits now work as I want them to.

The changes to AI bonuses seem to be only partially working; on Immortal, the AI now starts without a worker (intended) and their military units start with only 10 XP (intended), but they still start with 2 military units instead of 1 (unintended) in addition to their settler and scout. I was unsure how to test the other changes and feel like I would probably have to play several full games to get a sense of whether they were working. I should note that upon first testing things I got a line in my logs that said something like "HandicapInfos.xml: Duplicate Set entries are not supported", but after fixing Korea and Babylon I no longer get this line even though I haven't made any changes to HandicapInfos.xml. I've attached my mod below; if you could help me locate the problem I would greatly appreciate it.


  • Mini Balance Mod (v 5).zip
    6.5 KB · Views: 14
Last edited:
It's been a long time since I was heavily modding Civ 5 ... forgotten so much ... but pretty sure the AIStartingXyz values in HandicapInfos.xml are in addition to the standard 1 settler + 1 defender that players start with
You're correct, thanks! I should've looked more closely at the vanilla file.
Top Bottom