How do you use additive mods for Homecities and Civ files

I understand how to mod things like the tech tree and proto files with additive mods but I don’t understand how you do it with the homecity and civ files. Does anyone have a mod that I can look at or can explain it to me?

Search for “Age of the World”. It added many new civs.

It does but it doesn’t actually utilize any of the ‘mergeMode’ options.

I assume you already tried them (e.g. remove Spanish) and didn’t obtain any result?

But basically, the merge mode should be applied to an entry, so for a civ, you would apply it to the <civ> tag. If you want to change the homecity, I guess you would do something along the lines of:

<civ mergemode="replace">
  <name>Spanish</name>
  <homecityfilename>homecityspanishmod.xml</homecityfilename>
</civ>

I’m not sure about anything though.

I tried something similar to that but it didn’t work. I was trying to change what a original civ started with.

homecity, like adding cards?
Well, I replaced the Aztec sheeps with turkeys, buildable in Farm, herdables. I had to use protomods.xml (create a new unit, HerdableTurkey and modify the farm, removing sheep and adding HerdableTurkey) and techtreemods.xml (removing in Age0XPAztec creation of Sheeps and adding to Age0XPAztec the enabling of HerdableTurkey)
Now, I decided replace the Aztec Cow with herdable Deer (Deer were common in Aztec lands, but I’m cannot justify their breeding. Today, there are Deer Farms. In any case, surely Aztec did not raise cows). However, Cows are unlocked with a card, so I have to remove Ranching from Aztec Deck and add a new tech, “AztecRanching”. I create the new tech in techtree.xml, and in a new file called

homecityXPAztec.mods.xml

located in \data, I write

<homecitymods>
	<cards>
		<card mergeMode='add'>
		  <name>HCXPAztecRanching</name>
		  <maxcount>1</maxcount>
		  <level>0</level>
		  <prereqtech>-1</prereqtech>
		  <age>0</age>
		</card>
	</cards>
	
	<building>
		<name>Cathedral</name>
		
		<obtainabletechs>
			<tech mergeMode='remove' x="3.0" y="6.0">HCXPRanching</tech>
			<tech x="3.0" y="6.0">HCXPAztecRanching</tech>
			
		</obtainabletechs>
		<activetechs>
			<tech mergeMode='remove' x="3.0" y="6.0">HCXPRanching</tech>
			<tech x="3.0" y="6.0">HCXPAztecRanching</tech>
		</activetechs>			
	</building>
</homecitymods>
1 Like

So say I wanted to change the Hungary deck is this how I would do it?

<homecitymods>
  <cards>
    <card mergeMode='add'>
      <name>DEHCREVShipHorseArtillery</name>
      <maxcount>-1</maxcount>
      <level>0</level>
      <prereqtech>XPRevolution</prereqtech>
      <age>2</age>
      <displayunitcount>2</displayunitcount>
      <revoltcard>
      </revoltcard>
    </card>
    <card mergeMode='add'>
      <name>DEHCREVGermanAlliesHabsburg</name>
      <maxcount>1</maxcount>
      <level>0</level>
      <prereqtech>XPRevolution</prereqtech>
      <age>1</age>
      <revoltcard>
      </revoltcard>
    </card>
    <card mergeMode='add'>
      <name>HCDuelingSchoolTeam</name>
      <maxcount>1</maxcount>
      <level>25</level>
      <prereqtech>HCFencingSchool</prereqtech>
      <age>0</age>
      <bindtotech>HCDuelingSchoolTeam</bindtotech>
      <revoltcard>
      </revoltcard>
    </card>
  </cards>
  <decks>
    <revoltdeck civ="DERevHungary">
      <cards>
        <card mergeMode='add'>HCDuelingSchoolTeam</card>
        <card mergeMode='add'>DEHCREVGermanAlliesHabsburg</card>
        <card mergeMode='add'>DEHCREVShipHorseArtillery</card>
      </cards>
    </revoltdeck>
  </decks>
</homecitymods>

Probably. Test it, verify, and report here if it not works

It didn’t work. Nothing changed. It was as if I didn’t make any changes.

Remove the prereqtech
That only belongs to the only system where oyu had to pick cards. Besides, that the rpereqtech would have been a different card, and not the XPrev tech