[BNW] Creating a simple xml mod

Mario W

Chieftain
Joined
Mar 28, 2024
Messages
50
I tried to make changes to the policies. And it didn't work.
What I did:
1) downloaded My - Changes mod https://www.picknmixmods.com/mods/374cbad6-ee46-4478-a389-d7dfc61bfd17/mod.html
2) unzipped the folder in the mods pack
3) added the following code to the file (copied from Civ5Polices.xml file) MyXmlChanges.xml
Code:
<GameData>
      <Policies>
        <Row>
            <ID>0</ID>
            <Type>POLICY_LIBERTY</Type>
            <Description>TXT_KEY_POLICY_BRANCH_LIBERTY</Description>
            <Civilopedia>TXT_KEY_CIV5_POLICY_LIBERTY_TEXT</Civilopedia>
            <Help>TXT_KEY_POLICY_LIBERTY_HELP</Help>
            <CulturePerCity>999</CulturePerCity>
            <PortraitIndex>24</PortraitIndex>
            <IconAtlas>POLICY_ATLAS</IconAtlas>
            <IconAtlasAchieved>POLICY_A_ATLAS</IconAtlasAchieved>
        </Row>
      </GameData>

4)activated the mod in the game and .... no effect.
What did I do wrong?
 
Short answer, that code is trying to ADD a new entry with ID=0, which is already in the database so will generate an error (see the link in my sig for enabling the error logs).
What you need to do is UPDATE the existing entry. There are several tutorials on the XML you need to do that.
 
Back
Top Bottom