Creating Custom OP civs with Advanced Genie Editor

I recently recreated Spirit of the Law’s overpowered civilizations as a data mod with the Advanced Genie Editor and I thought I could show you guys how I did this. This guide is a bit long, so I’m dividing this into four parts.

Part 1: Creating the OP Cavalry Civ
SOTL’s OP cavalry civilization has the following stats:

Civilization that OP Cavs will replace: Byzantines

Tech Tree: Spanish

Civ bonuses:

  • Cavalry +20% HP starting in Feudal (Franks)
  • Start with +150 food (Lithuanians)
  • Wheelbarrow, Hand Cart free (Vikings)
  • Stable units cost -15% in Castle, -20% in Imperial (Berbers)
  • Land military units (except siege) receive 50% less bonus damage (Sicilians)

Unique Unit: Cataphract

Unit Techs:

  • Stirrups (+33% knight attack rate)
  • Farimba (cavalry +5 attack)

Team Bonus: Units resist conversion (Teutons)

To modify civilization bonuses, you need to be familiar with Genie’s Techs and Effects tabs. All Techs and Effects are assigned index numbers, which you can find in this spreadsheet:

Civ bonuses - Google Sheets.

Most civilization bonuses are assigned under AGE’s Techs tab. However, some effects are defined under a civilization’s tech tree, which is located under the Effects tab. Looking at the spreadsheet, you will see that the Spanish are one of the civilizations that have bonuses defined under their tech tree effect.

With this in mind, let’s start creating our tech tree. Go to the Effects tab and copy all the Effects commands from Spanish Tech Tree effect (index number 446) into a new and/or blank effect (I personally copied the commands onto effect 838). Name this new effect Spanish Tech Tree OP. Under Spanish Tech Tree OP, delete all commands that start with “Set tech…” and “Multiply attr…”. After this, you should be left with 17 commands that all start with “Disable tech…”. Now go to the Civilizations tab and select the Byzantines. Change the Technology Tree to Spanish Tech Tree OP (838) and the Team Bonus to Teutons Team Bonus (404).

The free Wheelbarrow and Hand Cart bonuses are defined under the Vikings Tech Tree. Specifically, they are defined by the four effects commands that start with “Set tech…”. Copy those four commands, return to Spanish Tech Tree OP, and click the Ins Copies button. Be aware that pressing the Paste button will overwrite the first four commands with those Vikings commands.

Now let’s start replacing the Byzantine bonuses with the OP Cav bonuses. Byzantine civ bonuses have Techs index numbers of 283, 284, 397, 401, 417, 418 and 419. The non-tech tree bonuses for the OP Cavs have the following Techs and Effects indices:

  • Cavalry +20% HP starting in Feudal - Techs: 290, Effects: 285
  • Start with +150 food: Effects: - Techs: 697, Effects: 734
  • Stable units cost -15% in Castle, -20% in Imperial - Techs: 586 and 613, Effects: 610 and 638
  • Land military units (except siege) receive 50% less bonus damage - Techs: 771, Effects: 796

With these indices known, we copy and paste the original Techs onto the Byzantine Techs one at a time. To keep it simple, paste Cavalry +20% onto tech 283, +150 food onto tech 284 and so forth. After after each paste, be sure to change civilization dropdown box to Byzantine. There will be five Techs to copy total, leaving you with 2 extra Byzantine Techs. To deal with the extraneous Techs, set the effect index to -1 and rename them to prevent any confusion. Deleting these unused Techs will probably won’t screw up AOE2, but it will change the index numbers, making my spreadsheet kind of useless.

Now lets copy the unique techs. Stirrups, the Castle Age technology, has a Techs index number of 685. Copy Stirrups and paste it on top of Greek Fire (464). Don’t forget to the change the civilization to Byzantine. Do the same with the Imperial Age technology Farimba (577), pasting it on top of Logistica (61).

Now let’s test this mod offline. To do this, navigate to your local mods folder. This is usually located at C:\Users(username)\Games\Age of Empires 2 DE(steamid)\mods\local. In the local folder, create a folder and name it “SOTL OP Cav civ.” Inside SOTL OP Cav civ, create a folder named “resources” and a file named “info.json.” Editing info.json with a text editor, paste the following line of code:

{"Author":"Unpublished","CacheStatus":1,"Description":"No Description","Title":"SOTL OP Cav Civ"}

The “Title” field is the data mod name that shows up in the game settings menu.

Inside the resources folder, create a folder named “_common.” Inside _common, create a folder named “dat.” Inside dat, place the modded empires2_x2_p1.dat file (you aren’t editing the original empires2_x2_p1.dat, right?). After setting up the mod folder, the OP Cavalry Civ will now be playable (remember that the data mod always resets to default when you play a standard game).

While you can now play as the OP Civ, it would still be nice for players to know what the hell they’re looking at. To do this, we will need to create a UI mod. First, create a folder named “SOTL OP Cav Civ UI”. Inside SOTL OP Cav Civ UI, create the same JSON file as earlier, but change the title to “SOTL OP Cav Civ UI”. Also. create a folder named “resources”. Inside resources, create a folder named “en”. Inside en, create a folder named strings. Inside strings, create a folder named “key-value”. Inside key-value. create a file named key-value-modded-strings-utf8.txt. What this text file does is replace existing strings with modded strings by index.

For this mod, we will be replacing three strings: the civilization name, the “click to play as (civilization)” prompt, and the civilization description. For the Byzantines, the indices for these three strings are 10277, 90277 and 120156. Overall, the text file looks as follows:

10277 "OP Cavalry Civ"
90277 "Click to play as the OP Cavalry Civ."
120156 "Cavalry civilization \n\n• Cavalry +20% HP starting in Feudal Age \n• Start with +150 food \n• Wheelbarrow, Hand Cart free \n• Stable units cost -15% in Castle, -20% in Imperial \n• Land military units (except siege) receive 50% less bonus damage \n\n<b>Unique Unit:<b>  \nCataphract (cavalry) \n\n<b>Unique Techs:<b>  \n• Stirrups (+33% knight attack rate) \n• Farimba (cavalry +5 attack)\n\n<b>Team Bonus:<b>  \nUnits resist conversion"

The tech tree for your OP Civ will still show the old Byzantine tech tree. Given that you’ll be spamming cavalry units with this civ, though, I don’t think that’ll be a major issue. Plus, editing the tech tree appearance is honestly not worth it, given you have directly edit the original JSON file.

Part 2: More Unique Techs and Units Notes
If you are porting over two unique techs from the same age, you need to edit the Required Techs and Button boxes under the UT’s Techs entry. Supposed you want to give your OP Archer Civ Kamandaran and Pavise, two Castle Age UT. For the UT you want to place in the Imperial Age, change the required Techs from Castle Age to Imperial Age and change the Button value from 7 to 8.

While playtesting, I found weird glitch involving Perfusion and Conscription. Originally, I had Perfusion be available to the Infantry Civ in the Castle Age. However, if you research Perfusion in the Castle Age and then research Conscription in the Imperial Age, the effects of Perfusion would be removed, making your units be recruited slower. I have no idea why this happens, but moving Perfusion back to Imperial Age fixed this issue.

Let’s also say you want to change the Aztec’s unique unit from Jaguar Warriors to Mameluks, as seen with the OP Monk Civ. To do that, copy the two Mameluke Techs entries (269, 368) and paste them on top of the Jaguar Warrior entries (431, 432). You won’t be able to research Elite Mamlukes yet, though. To do that, go the Elite Aztec Mamluke entry (432) change the required Tech from the original Mameluke tech (269) to the new Aztec Mamluke tech (431). Don’t forget to also change the civilization to Aztecs.

Note that the default AI will not recruit unique units if that unique unit is from another civilization.

Part 3: Khmer No Building Requirements and Shadow Nodes
The OP Gunpowder Civ in the mod has the Khmer’s no building requirement bonus. To give the Gunpowder civ this bonus, copy the Khmer requirement tech (638) and paste it onto a Goth tech (I used 327). In the pasted Tech (which I renamed “Gunpowder requirement”), change the civilization from Khmer to Goths. You will notice that all other dropdown boxes have a value of -1, which means this tech is automatically researched when you play as the Goths.

We now need to edit Shadow Node techs (659, 660, 661, 666, 667, 668). In general, shadow techs control the all the requirements for buildings and ages. For each of the Shadow Node tech, add Gunpowder requirement as a required tech (do not remove the Khmer requirement tech from required tech if you want Khmer to continue using the no building requirement bonus). Because the minimum required techs for all of these Shadow Nodes is 1, and because Gunpowder requirement is automatically researched, you will now be able to play with the Khmer building bonus with the Gunpowder civilization.

I tried creating a new Shadow Node tech for the Gunpowder civ requirement, but I could never get that to work. Instead, it seems like only way for apply the Khmer requirement bonus is by editing the existing Shadow Node techs.

Part 4: key-value-modded-strings-utf8.txt index references
Here are some more index references that can help you create your key-value-modded-strings-utf8.txt.

Civilization names section:

10267 "Full Random"
10268 "Mirror"
10270 "Random"
10271 "Britons"
10272 "Franks"
10273 "Goths"
10274 "Teutons"
10275 "Japanese"
10276 "Chinese"
10277 "Byzantines"
10278 "Persians"
10279 "Saracens"
10280 "Turks"
10281 "Vikings"
10282 "Mongols"
10283 "Celts"
10284 "Spanish"
10285 "Aztecs"
10286 "Mayans"
10287 "Huns"
10288 "Koreans"
10289 "Italians"
10290 "Indians"
10291 "Incas"
10292 "Magyars"
10293 "Slavs"
10294 "Portuguese"
10295 "Ethiopians"
10296 "Malians"
10297 "Berbers"
10298 "Khmer"
10299 "Malay"
10300 "Burmese"
10301 "Vietnamese"
10302 "Bulgarians"
10303 "Tatars"
10304 "Cumans"
10305 "Lithuanians"
10306 "Burgundians"
10307 "Sicilians"
10308 "Poles"
10309 "Bohemians"
10310 "ReservedCivI"
10311 "ReservedCivJ"
10312 "ReservedCivK"
10313 "ReservedCivL"
10314 "ReservedCivM"
10315 "ReservedCivN"
10316 "ReservedCivO"
10317 "ReservedCivP"
10318 "ReservedCivQ"

“Click to play as…” section:

90270 "Click to play as a random civilization which hasn't been selected yet."
90271 "Click to play as the Britons."
90272 "Click to play as the Franks."
90273 "Click to play as the Goths."
90274 "Click to play as the Teutons."
90275 "Click to play as the Japanese."
90276 "Click to play as the Chinese."
90277 "Click to play as the Byzantines."
90278 "Click to play as the Persians."
90279 "Click to play as the Saracens."
90280 "Click to play as the Turks."
90281 "Click to play as the Vikings."
90282 "Click to play as the Mongols."
90283 "Click to play as the Celts."
90284 "Click to play as the Spanish."
90285 "Click to play as the Aztecs."
90286 "Click to play as the Mayans."
90287 "Click to play as the Huns."
90288 "Click to play as the Koreans."
90289 "Click to play as the Italians."
90290 "Click to play as the Indians."
90291 "Click to play as the Incas."
90292 "Click to play as the Magyars."
90293 "Click to play as the Slavs."
90294 "Click to play as the Portuguese."
90295 "Click to play as the Ethiopians."
90296 "Click to play as the Malians."
90297 "Click to play as the Berbers."
90298 "Click to play as the Khmer."
90299 "Click to play as the Malay."
90300 "Click to play as the Burmese."
90301 "Click to play as the Vietnamese."
90302 "Click to play as the Bulgarians."
90303 "Click to play as the Tatars."
90304 "Click to play as the Cumans."
90305 "Click to play as the Lithuanians."
90306 "Click to play as the Burgundians."
90307 "Click to play as the Sicilians."
90308 "Click to play as the Poles."
90309 "Click to play as the Bohemians."

Civilization descriptions are split into several separate sections. The first 27 civs (Britons to Berbers) go from 120150 to 120176. The Rise of the Rajas civs (Khmer to Vietnamese) go from 120177 to 120180. The Last Khan civs (Bulgarians to Cumans) go from 120181 to 120183. Lithuanians are 120184. Finally, Burgundians are 120185, Sicilians are 120186, Poles are 120187 and Bohemians are 120188.


more pictures please

I can’t edit the original post anymore, but here are screenshots of some of the things I talked about:

Modded Spanish Tech Tree effect for the OP Cavalry Civilization:

OP Cavalry Civ bonuses:

Imperial Age Pavise, with button value of 8:

Modded Shadow Node tech that removes all the building requirements for the Fast Imperial Civ, due to tech 327 (Gunpowder requirement) being added as a required tech:

I recently uploaded a new OP civilization: the Casusin Berbers. This OP farming civilization is based on a post by casusincorrabil and has the following bonuses:

  • Folwark replaces Mill (Poles)
  • Free Farm upgrades (Franks)
  • Eco tech upgrades available one age earlier and cost half food (Burgundians)
  • Farm upgrades provide 100 percent more Food (Sicilians)
  • Farms cost 40 percent less (Teutons)
    Team Bonus: Farms are built 100 percent faster (Incas)

Tech Tree: Berbers

Unique Unit: Camel Archers, Genitours

Unique Techs: Silk Armor, Recurve Bow

There were a few tricky things I encountered while putting together this civilization. The first tricky issue was getting the one age earlier eco tech bonuses to work. To do this, I first had to copy and paste the Burgundian’s eco tech requirement Techs (758, 759 and 760) onto the new Techs (824, 825 and 826 respectively). 758 is the Feudal eco tech requirement that’s automatically researched in the Dark Age, 759 is the Castle eco tech requirement that’s automatically researched in the Castle Age and 760 is the Imperial eco tech requirement that’s automatically researched in the Imperial Age.

Then I added the (Berbers) Feudal eco tech requirement as a Required Tech to Horse Collar, Gold Mining, Double-Bit Axe, Wheelbarrow and Stone Mining; the (Berbers) Castle eco tech requirement as a Required Tech to Caravan and Gillnets; and the (Berbers) Imperial eco tech requirement as a Required Tech to Guilds. Here’s a screenshot of how the Horse Collar tech entry looked like:

The other tricky thing involved trying to get the Folwarks to work with Farm upgrades. The Casusin Berbers have the Sicilian’s farm upgrades, which means that a Folwark should instantly gather 32.5, 57.5 and 92.5 food from a farm in Dark, Feudal and Castle respectively. However, when I originally uploaded this civilization, the Folwarks gathered only 17.5 food regardless of age. In other words, the Farm upgrades were not increasing the instant gather amount, and Folwarks were not gathering 10% of the farm food.

The reason for this was that the (Berbers) Folwark bonus techs were using the Poles’ Folwark as opposed to the Berber’s Folwark as a required tech. Also, the Folwark bonus effects don’t actually multiply Farm food by 0.10. Instead, three effects (821, 822, 823) add 7.5, 12.5 and 17.5 to the instant gather amount when Horse Collar, Heavy Plow and Crop Rotation are researched. In turn, to match Sicilian Farms, I copy and pasted those three existing effects and changed the instant gather values to 15, 25 and 35.

Here’s a screenshot of the modified Horse Collar Folwark bonus tech. Note that the Polish Folwark tech is 793, while the custom Casusin Berbers Folwark tech is 584.

And here’s a screenshot of the modified Horse Collar Folwark effect that will be used with the Casusin Berbers’ Folwark Horse Collar bonus tech:

1 Like

Any mods around? This should be top of the stickied list yesterday! THANK YOU! There are far too few tutorials and guides around for modding aoe2DE and this is one of the best ones I’ve seen anywhere, much less on this specific forum.

1 Like

Can you make a tutorial on how to do this? I still can’t figure out how to export this information for Civs, I am trying to update and rework some of the Civ Builder Code created by Krakenmeister. I need this information for adding the new DLC information to it. {“Author”:“Unpublished”,“CacheStatus”:1,“Description”:“No Description”,“Title”:“SOTL OP Cav Civ”}

Your custom data file will not work if it’s missing civilizations. I don’t think Civbuilder has been updated yet to include the Indian Dynasties civilization.

I was trying to export the necessary information for those Civilizations from Advance Genie Editor and incorporate them into Civ Builder. I have access to the code for Civ Builder. I am trying to figure out how it works so if for some reason Krakenmeister can’t continue to update for some reason, I can still continue to update and add content myself. I am trying to figure out how he got the Civ information to incorporate into the code I am seeing if it is possible to get that information from Advance Genie Editor. I have found the information I need, I just can’t export it. I have found another solution its just much longer and harder and if it is possible to export what I need directly, it would save a lot of time.