change-xml question

Joined
Apr 26, 2014
Messages
659
This is probably a dumb question, but at least something different than my usually art-related posts.

Example:

If i want to change the nation prereq entry for the shrine of zeus, from Greece to… let‘s say Egypt. Now this doesn‘t make sense but it‘s suitable for the sake of my question. Do i need to copy and paste the entire content of improvements.xml to my improvements-change.xml, or just the part with the shrine of zeus? And what if i also want to change that for a second improvement, which is under the shrine of zeus in the improvements.xml, but between shrine of zeus and improvement 2 there are 3-4 other improvements? Will the improvements in between be removed then?

I ask because in the past i made a mapstarttile-change.xml, and only included one entry… the result was that all other nations did not appear in the game 😅.
 
If the file is a CHANGE file, you only need to copy paste the entry you are changing. In this instance, the shrine of Zeus.

Not only that, you only need to copy the zType tag (so the game knows which entry you're changing) PLUS whatever lines you are changing. Below would change the Shrine of Zeus to Egypt.

XML:
    <Entry>
        <zType>IMPROVEMENT_SHRINE_ZEUS</zType>
        <NationPrereq>NATION_EGYPT</NationPrereq>
        <ReligionSpread>RELIGION_PAGAN_EGYPT</ReligionSpread>
    </Entry>

If you are changing multiple improvements, then just do 1 change after the other. Ignore improvements between them, they are irrelevant in this case.

XML:
    <Entry>
        <zType>IMPROVEMENT_SHRINE_ZEUS</zType>
        <NationPrereq>NATION_EGYPT</NationPrereq>
        <ReligionSpread>RELIGION_PAGAN_EGYPT</ReligionSpread>
    </Entry>
    <Entry>
        <zType>IMPROVEMENT_KUSHITE_PYRAMIDS</zType>
        <aiYieldCost>
            <Pair>
                <zIndex>YIELD_STONE</zIndex>
                <iValue>80</iValue>
            </Pair>
        </aiYieldCost>
        <abTerrainValid>
            <Pair>
                <zIndex>TERRAIN_URBAN</zIndex>
                <bValue>1</bValue>
            </Pair>
            <Pair>
                <zIndex>TERRAIN_ARID</zIndex>
                <bValue>1</bValue>
            </Pair>
            <Pair>
                <zIndex>TERRAIN_SAND</zIndex>
                <bValue>1</bValue>
            </Pair>
        </abTerrainValid>
    </Entry>

The Kushite Pyramid change increases the cost to 80, and removes the ability to build it on lush and temperate.
 
WTH??? Why does "Kush-ite" get changed to Kushite? @The_J ???
It even did it in the code block.
 
Cool, exactly the answer i was looking for.

Btw, the „Kush-ite“ get automatically changed, because of the nice word from s to t. I have seen that before here.

Thank you!
 
Btw, the „Kush-ite“ get automatically changed, because of the nice word from s to t. I have seen that before here.

Thank you!
I figured after that's probably what it was. Kush-ite should really be in the whitelist on a site talking about historical nation building games. :)
 
Do we also only need the zType entry and then the entries we want to append, if we are creating an … -append.xml file?
 
Back
Top Bottom