Custom Deck modding

Hi, I want to enable cards from other civilizations for the Portuguese and use them in my custom deck. I’m trying to create a mod for this, but I’ve hit a wall. Using the Resource Manager, I can locate the cards I need in the techtreey.xml file and copy them one by one, but I’m not sure what to do next. If I create a new XML file by copying only those entries, what should I name it, and is copying only that section enough?

These are the tech IDs and names of the cards I want to copy:

HCCavalryCombatOttoman
HCArtilleryCombatOttoman
DEHCMercenaryCampsGerman
HCMercenaryCombatGerman
DEHCPoker
DEHCContinentalRangers
YPHCWesternReforms
YPHCArtilleryCombatChinese
YPHCArtilleryDamageChinese
YPHCNativeHitpoints
YPHCNativeDamage
DEHCKoxinga
DEHCShipSebastopolMortar2
DEHCJesuitSpirituality
DEHCFirearmsItalian
HCNativeCombat
HCNativeCombatTeam
HCXPConservativeTactics
DEHCSahelianKingdoms
DEHCRoadBuilding
HCPriestessInfinite
YPHCMeleeDamageIndians
DEHCLevantineTrade
HCLeonardosTank
DEHCSchiavoniSwords
YPHCNativeIncorporation
HCShipMalteseGun2
DEHCFrenchTongue
DEHCRussianTongue
DEHCMilitaryOutposts
DEHCFlintlockRockets
HCCavalryLOSTeam
DEHCGermanMercenaryContracts
DEHCContractMercsGiantGrenadiers

You need to add them in the portuguese homecity file, then enable them below on one of the buildings. Then it will work

1 Like


i have tried to add this cards but it isn’t working. What’s my mistake there(can’t share full .xml here it’s forbidden)
DEHCMercenaryCampsGerman
HCMercenaryCombatGerman

Here’s an example where I add three cards to the Portuguese homecity using the additive data mods system. You can consult this article for more details:

https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods

path: mods\local\MOD_NAME\Data

filename: homecityportuguese.mods.xml

<homecitymods>

  <cards>

    <card>
      <name>HCNativeCombat</name>
      <maxcount>1</maxcount>
      <level>25</level>
      <prereqtech>-1</prereqtech>
      <age>1</age>
    </card>

    <card>
      <name>DEHCMercenaryCampsGerman</name>
      <maxcount>1</maxcount>
      <level>0</level>
      <prereqtech>-1</prereqtech>
      <age>2</age>
    </card>

    <card>
      <name>DEHCContinentalRangers</name>
      <maxcount>1</maxcount>
      <level>0</level>
      <prereqtech>-1</prereqtech>
      <age>2</age>
    </card>

  </cards>

  <building>
    <name>Market</name>
    <obtainabletechs>
      <tech x="1.0" y="1.0"></tech>
    </obtainabletechs>
    <activetechs>
      <tech x="1.0" y="1.0"></tech>
    </activetechs>
  </building>

  <building>
    <name>Academy</name>
    <obtainabletechs>
      <tech x="1.0" y="1.0">DEHCContinentalRangers</tech>
    </obtainabletechs>
    <activetechs>
      <tech x="1.0" y="1.0">DEHCContinentalRangers</tech>
    </activetechs>
  </building>

  <building>
    <name>Cathedral</name>
    <obtainabletechs>
      <tech x="1.0" y="1.0">HCNativeCombat</tech>
    </obtainabletechs>
    <activetechs>
      <tech x="1.0" y="1.0">HCNativeCombat</tech>
    </activetechs>
  </building>

  <building>
    <name>ManufacturingPlant</name>
    <obtainabletechs>
      <tech x="1.0" y="1.0"></tech>
    </obtainabletechs>
    <activetechs>
      <tech x="1.0" y="1.0"></tech>
    </activetechs>
  </building>

  <building>
    <name>Dock</name>
    <obtainabletechs>
      <tech x="1.0" y="1.0">DEHCMercenaryCampsGerman</tech>
    </obtainabletechs>
    <activetechs>
      <tech x="1.0" y="1.0">DEHCMercenaryCampsGerman</tech>
    </activetechs>
  </building>

</homecitymods>

Good luck and have fun!

1 Like