Modding Egypt

Osubaker33

Chieftain
Joined
Oct 27, 2016
Messages
26
Could use some help with Egypt.

So far I modded them to always start on Desert with river and floodplains but I can't figure out how to give them a boost to desert tiles. Any help would be greatly appreciated.

Thanks!
 
From what I can tell, you cant give direct boosts to terrain as there is no TerrainModifiers table of sorts. Currently these modifiers would need to be granted through the players unique building or somehting similar.
 
The easiest way of figuring out how to do this is to refer to a part of the game that does something similar. Russia, for example, gives extra yield to Tundra tiles, so I assume the same principles it uses to do so can be applied to a bonus for Desert tiles.

Investigation reveals that it does this through a series of Modifiers applied through the Trait (TRAIT_CIVILIZATION_MOTHER_RUSSIA, in this case). I'll give an example of two related parts as a reference for the general structure.

First, within the <Modifiers> table:
Code:
<Row>
       <ModifierId>TRAIT_INCREASED_TUNDRA_FAITH</ModifierId>
       <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
       <SubjectRequirementSetId>PLOT_HAS_TUNDRA_REQUIREMENTS</SubjectRequirementSetId>
</Row>
<Row>
       <ModifierId>TRAIT_INCREASED_TUNDRA_HILLS_FAITH</ModifierId>
       <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
       <SubjectRequirementSetId>PLOT_HAS_TUNDRA_HILLS_REQUIREMENTS</SubjectRequirementSetId>
</Row>
These are the entries for how and when the modifier should act: in this case, it's an adjustment of plot yield on Tundra and Tundra Hills (I included both for a reason: it's important to note that the game considers flat and hill terrain to be two separate terrain entries; this is true of Desert and Desert Hills too, by the way, check Terrains.xml for more details).

Now for the the modifier's actual purpose, in the <ModifierArguments> table:
Code:
<Row>
       <ModifierId>TRAIT_INCREASED_TUNDRA_FAITH</ModifierId>
       <Name>YieldType</Name>
       <Value>YIELD_FAITH</Value>
</Row>
<Row>
       <ModifierId>TRAIT_INCREASED_TUNDRA_FAITH</ModifierId>
       <Name>Amount</Name>
       <Value>1</Value>
</Row>
Two entries, the first defining what type of yield is to be modified and the second defining how much that yield is to be modified. This will give +1 Faith to Tundra tiles. I'm sure you can imagine what it'd look like for Tundra Hills (hint: the ModifierId is the key here).

And last but not least, actually applying these modifiers to the trait in the <TraitModifiers> table:
Code:
<Row>
       <TraitType>TRAIT_CIVILIZATION_MOTHER_RUSSIA</TraitType>
       <ModifierId>TRAIT_INCREASED_TUNDRA_FAITH</ModifierId>
</Row>
<Row>
       <TraitType>TRAIT_CIVILIZATION_MOTHER_RUSSIA</TraitType>
       <ModifierId>TRAIT_INCREASED_TUNDRA_HILLS_FAITH</ModifierId>
</Row>

This was just a portion of Russia's trait, of course; it adds +1 Faith/+1 Production to Tundra tiles. Since Tundra Hills tiles are a specific type as well, it requires 4 different modifiers (two for each yield) to be applied to the trait.

If you wanted to apply this to Egypt, you'd apply it to the trait TRAIT_CIVILIZATION_ITERU and use Desert/Desert Hills instead of Tundra.
 
Last edited:
Weird, I implemented the suggestions above and now whenever I start a new game, me and all of the AI start in the exact same spot. Any ideas on what could possibly be causing that??

Edit * - Well I fixed that issue (accidentally erased an end line in the xml) but now for some reason its adding the bonuses to all tiles for Egypt instead of just Desert. I copied the exact same format as Russia has for Tundra so I'm not sure why its giving the bonus to every single tile.
 
Last edited:
Care to give some code snippets? Your problem sounds like it's related to setting the modifier requirements incorrectly, but I can't say for sure without any code to look at.
 
All changes were done in the "Civilizations" xml Quite a bit of code had to be added. I also included the "civilizations" xml file.

<ModifierArguments>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FAITH</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FAITH</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_PRODUCTION</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
<Name>Amount</Name>
<Value>2</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
<Name>YieldType</Name>
<Value>YIELD_FOOD</Value>
</Row>
<Row>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_F)OOD</ModifierId>
<Name>Amount</Name>
<Value>1</Value>
</Row>



<TraitModifiers>
<Row>
<TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
<ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
<ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
<ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
</Row>
<Row>
<TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
<ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
</Row>

<RequirementSets>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
<RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
</Row>

<Requirements>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
<RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
<RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
</Row>

<RequirementArguments>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT</Value>
</Row>
<Row>
<RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
<Name>TerrainType</Name>
<Value>TERRAIN_DESERT_HILLS</Value>
</Row>

<RequirementSetRequirements>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
</Row>
<Row>
<RequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
<RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
</Row>
 

Attachments

  • Civilizations.xml
    167.8 KB · Views: 307
Just based on context, I gather that you're modding the base game's Civilization.xml? I would definitely warn against doing that. Any and all mods should be handled in separate folders and using a .modinfo file. Modding the base game's files is pretty dangerous. Search around in the tutorial forum and in existing mods for how to write your .modinfo file and where to put it to make it work.

Aside from that, however, it's obviously not working as intended, but one of the other problems with editing the base game files is that it makes your code incredibly tedious to troubleshoot, as there's so much superfluous stuff in between.

I'd recommend putting all the necessary code for adding this stuff to Egypt's trait in a separate file that pretty much reads like this:
Code:
<GameInfo>
    <Requirements>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
        </Row>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_DESERT</Value>
        </Row>
        <Row>
            <RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_DESERT_HILLS</Value>
        </Row>
    </RequirementArguments>
    <RequirementSets>
        <Row>
            <RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>
        <Row>
            <RequirementSetId>PLOT_HAS_DESERT_HILL_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>
    </RequirementSets>
    <RequirementSetArguments>
        <Row>
            <RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
            <RequirementId>REQUIRES_PLOT_HAS_DESERT</RequirementId>
        </Row>
        <Row>
            <RequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
            <RequirementId>REQUIRES_PLOT_HAS_DESERT_HILLS</RequirementId>
        </Row>
    </RequirementSetArguments>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FAITH</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FAITH</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FOOD</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FOOD</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_PRODUCTION</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_PRODUCTION</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
    </ModifierArguments>
    <TraitModifiers>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierType>TRAIT_INCREASED_DESERT_FAITH</ModifierType>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierType>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierType>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierType>TRAIT_INCREASED_DESERT_FOOD</ModifierType>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierType>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierType>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierType>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierType>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierType>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierType>
        </Row>
    </TraitModifiers>
</GameInfo>

Put the file in a folder, write a .modinfo file, and throw it in the Civ6 Mods folder. If you're unsure how to do that, there are tutorials all over the forum.

That code should include all the necessary changes to getting the trait to work the way you want it to. Note: it might not be perfect, it's something I typed up in ten minutes or so as an example. If you use it and it's not working, make sure to check your Database.log for errors.
 
Thank you very much for the help.

Yes I am editing the base game xml files but I duplicated the entire assets folder so that should i ever just need to start over its there. I will definitely take your advice though and learn how to make a proper mod.

If I create a mod for Egypt will it overwrite the changes I made or do I need to undo them?
 
It actually isn't quite as simple as overwriting--if your mod attempts to add something to the base game that's already there (and in your case, because you edited the base game, what you're adding in the mod will already be there), it quite simply won't work. Once it finds a conflict with trying to add something that already exists, the XML parser pretty much gives up and calls it quits there. If you try to implement these changes as a mod, I'd definitely recommend returning to using the baseline, unedited game files.
 
Well I tried it the xml way and that completely failed so I searched for modbuddy but there doesn't seem to be one out yet for Civ6 that I can find. Completely at a loss
 
Alright, I got it to work after a bunch of trial and error. If you don't know, Database.log in your Civ6 Documents is your best friend for troubleshooting database issues.

First off, the code I provided above was wrong, though mostly because the XML parser didn't seem to think "REQUIRES_PLOT_HAS_DESERT" was a unique Requirement (and numerous other issues like that). I don't know why it thought it was defined elsewhere (I don't think it was), but I changed the names around to make sure they wouldn't possibly conflict with anything. I also misused the <RequirementSetRequirements> table: I thought it was <RequirementSetArguments>. Whoops.

Here's the code I finally got to work:
Code:
<GameInfo>
    <Requirements>
        <Row>
            <RequirementId>REQUIRES_EGPYT_PLOT_HAS_DESERT</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
        </Row>
        <Row>
            <RequirementId>REQUIRES_EGPYT_PLOT_HAS_DESERT_HILLS</RequirementId>
            <RequirementType>REQUIREMENT_PLOT_TERRAIN_TYPE_MATCHES</RequirementType>
        </Row>
    </Requirements>
    <RequirementArguments>
        <Row>
            <RequirementId>REQUIRES_EGPYT_PLOT_HAS_DESERT</RequirementId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_DESERT</Value>
        </Row>
        <Row>
            <RequirementId>REQUIRES_EGPYT_PLOT_HAS_DESERT_HILLS</RequirementId>
            <Name>TerrainType</Name>
            <Value>TERRAIN_DESERT_HILLS</Value>
        </Row>
    </RequirementArguments>
    <RequirementSets>
        <Row>
            <RequirementSetId>EGYPT_PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>
        <Row>
            <RequirementSetId>EGYPT_PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
            <RequirementSetType>REQUIREMENTSET_TEST_ALL</RequirementSetType>
        </Row>
    </RequirementSets>
    <RequirementSetRequirements>
        <Row>
            <RequirementSetId>EGYPT_PLOT_HAS_DESERT_REQUIREMENTS</RequirementSetId>
            <RequirementId>REQUIRES_EGPYT_PLOT_HAS_DESERT</RequirementId>
        </Row>
        <Row>
            <RequirementSetId>EGYPT_PLOT_HAS_DESERT_HILLS_REQUIREMENTS</RequirementSetId>
            <RequirementId>REQUIRES_EGPYT_PLOT_HAS_DESERT_HILLS</RequirementId>
        </Row>
    </RequirementSetRequirements>
    <Modifiers>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>EGYPT_PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>EGYPT_PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>EGYPT_PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>EGYPT_PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>EGYPT_PLOT_HAS_DESERT_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
            <ModifierType>MODIFIER_PLAYER_ADJUST_PLOT_YIELD</ModifierType>
            <SubjectRequirementSetId>EGYPT_PLOT_HAS_DESERT_HILLS_REQUIREMENTS</SubjectRequirementSetId>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FAITH</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FAITH</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FOOD</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_FOOD</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_PRODUCTION</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
            <Name>YieldType</Name>
            <Value>YIELD_PRODUCTION</Value>
        </Row>
        <Row>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
            <Name>Amount</Name>
            <Value>1</Value>
        </Row>
    </ModifierArguments>
    <TraitModifiers>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierId>TRAIT_INCREASED_DESERT_FAITH</ModifierId>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FAITH</ModifierId>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierId>TRAIT_INCREASED_DESERT_FOOD</ModifierId>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_FOOD</ModifierId>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierId>TRAIT_INCREASED_DESERT_PRODUCTION</ModifierId>
        </Row>
        <Row>
            <TraitType>TRAIT_CIVILIZATION_ITERU</TraitType>
            <ModifierId>TRAIT_INCREASED_DESERT_HILLS_PRODUCTION</ModifierId>
        </Row>
    </TraitModifiers>
</GameInfo>
And make sure your .modinfo file has something like this:
Code:
<Mod id="d0499766-b0e4-4867-91de-6be69e9a3f47" version="1">
    <Properties>
        ...
    </Properties>
    <Components>
        <UpdateDatabase id="EGYPT_TEST">
            <Items>
                <File>Data/EgyptTest.xml</File>
            </Items>
        </UpdateDatabase>
    </Components>
    <Files>
        <File>Data/EgyptTest.xml</File>
    </Files>
</Mod>
You can name the file and put it wherever you want in the mod, Data/EgyptTest is just an example.

With all the things mentioned above, I was seeing +1 Faith/Food/Production on only Desert tiles:



All of those tiles are Desert Hills, but it works on flat Desert as well.
 
Thank you very much for getting this to work. I finally got it to work using your updated code and am having a really great time playing as Egypt!
 
Top Bottom