Enhanced AI Mod

Hello everyone,

I have been a longtime lurker here on the forums. I have decided to release my AI mod. Below are the current release notes.

Enhanced AI
Author: EsteGringo
Version: 0.9.6
Last Updated: December 3rd, 2023

This is a project to make the AI more interesting and competitive. It is usable on both land and sea maps. It is not setup for Archipelago yet, but it will be.

This is an open source project by its nature, so you are free to do as you will with it. If you want to use code from this, give me credit for what you take from this project.

Special Thanks: Felix Hermansson from back in the day.

Some Main Features:
It will cross the sea, land troops, and attack you.
It will use battleships.
Ships will patrol the seas.
It builds walls.
The AI uses church techs and units now.
The AI will use special units. For example, Germans will train Settler Wagons, the Dutch will train Blue Guards, and Ottomans will train Nizam Fusiliers.
Card selection has been modified so more upgrade cards are used.
The AI no longer cheats by getting extra resources.

Upcoming Features and Fixes:
New base building patterns for the AI.
Make warships more aggressive.
Fix the minor bugs involving island invasions. Sometimes invading units stay on the coast for awhile, for example.
Help the AI be able to rush more without the help of extra resources or unit cards.
Allow the AI to make new bases on other islands for water maps.
General refinements to the military and economic strategies.
Better adjustments to the card selection behavior.
Fix the issue where French do not seem to want to research their grenadiers at the church.
Find out why the Ottomans do not select the infinite Sipahi cards.

You may find this mod in the mod browser in the game or you may go to this link: Mods Single - Age of Empires

11 Likes

I’m going to have fun making this play against the Assertive Seawall AI in all kinds of configurations. I’ll set all handicaps to 1.0 to keep the odds equal. I love bot vs bot games (not only in this game, but, like, in chess, for example)

PS: if you are Locura, I am still interested in knowing what caused your transporting issue and how you fixed it ^.^

3 Likes

I’m curious what the result will be! I have no idea how mine performs without handicap. EsteGringo’s AI is going to be in for a few surprises, I hope!

I’m sorry to disappoint you, but I am not him.

You are going to play two different types of modded AIs against each other in the same AoE3 DE game? How do you use two different types of AIs in the same game in AoE3? We have a small group of players building different AIs and I would love to try that myself as well.

1 Like

There’s a whole group of you? :thinking:

1 Like

Yes, there are three of us in our small group whom are working on AIs. I have not seen the code of the other two projects yet, so I cannot say how theirs would differ from mine, but I would definitely like to test my AI against other AIs at some point if that is really possible in AoE3DE.

1 Like

It’s fine. I was asking out of pure curiosity anyway, since I’m not actively modding anything anymore.

About the AI vs AI game, the basic idea is to put the two mods in separate folders and override two of the already existing default AI scripts with the “loaders” of the two mods.

You can do it in any way you like, as long as you are 100% sure the two mods’ files don’t overlap. If that makes sense.

Here’s how I do mine:

├── 📁 mods
│   ├── 📁 local
│   │   └── 📁 Assertive vs Enhanced
│   │       └── 📁 game
│   │           └── 📁 ai
│   │               ├── 📁 assertive
|   |               |   ├── (assertive seawall ai files)
│   │               │   ├── 📄 aicore.xs
|   |               |   ├── 📄 aiglobals.xs
│   │               │   └── (...)
│   │               ├── 📁 enhanced
|   |               |   ├── (enhanced ai files)
│   │               │   ├── 📄 aicore.xs
|   |               |   ├── 📄 aiglobals.xs
│   │               │   └── (...)
│   │               ├── 📄 P2 AI placeholder handicapped.xs
│   │               └── 📄 P3 AI placeholder handicapped.xs
│   ├── 📁 subscribed

P2 AI placeholder handicapped.xs and P3 AI placeholder handicapped.xs contain some modified code based on aiLoaderStandard.xs + aiMain.xs to make sure the files are loaded from assertive and enhanced, not from core. I’m pretty sure those placeholder files are unused in the unmodded game so I decided to use them for testing. Now, all that remains to do is to create a scenario based on any map (I like New England since it is extremely feature-rich) and load the placeholder files to that scenario.

And now, time for the self-promotion :smiling_imp: Since you’re so many in your group (believe me, 3 AI modders, that’s a whole crowd because AI modders are so rare), it would be so fantastic if you guys could share your knowledge ^.^ I’m trying to write a guide about AI modding: Getting Started - AOE3 AI Scripting Guide

6 Likes

Should’ve knows that’s where this was going :innocent:

You load up your test on New England, but I’ll be looking forward to an Amazon test!

Hola, solo para informarte que la IA con las facciones africanas (Etíopes y Hausa) no mejoran sus unidades a Elite, campeona y legendaria del campamento de guerra por mas que lleguen a V

Thank you! I will try that out!

En serio? Esta bien, lo arreglare. Japon, China, y India deberian estar un poco mejor que antes. Les permiti investigar aun mas tecnologias que la IA no estaba usando antes por alguna razon. Gracias.

P.S. - Por este razon, la version no esta 1.0 aun. :slight_smile:

1 Like

Lo probe y todos llegaron a ser legendarios. Cual mapa usaste, cuantos jugadores habia, y cuales civilizaciones se usaban? @IvanZvania

jugué en Grandes llanuras y en Llanuras húngaras. Usé los rusos, aliado otomano y como enemigo etíopes e italianos. en las dos partidas Etiopía llegaba a V sin mejorar sus unidades aun estando en dificultad Difícil. seguiré chequeando en otros mapas a ver como se comporta la IA. Muchas gracias por tomarme en cuenta :smiling_face:

@IvanZvania, desactivaste todas las demás modificaciones de AI, correcto? Además, recibes un mensaje del primer AI cuando inicias el juego? Si no, eso significa que la AI no está activada.

Me sucedió solo una vez y luego todo normal como tiene que ser. Gracias

1 Like

Bro your mod is nuts, just tried it on Amazonia 3v3 and it took me 2,5 hours to beat the AI on extreme. The enemy landed on our side early on and basically obliterated my two AI allies. It took me one 1 hour to even get to the other side because the enemy parked like 30 ships in front of our side. Big mistake thinking I could go in without any water cards in my deck lol.

I really liked that the AI kept sending troop after troop over the river and kept moving forward after unloading. Sometimes the AI will have the troops stuck in one location, repositioning on the same spot. No idea if this is something that can be fixed, on Amazonia at least it did not seem like a big deal. On Caribbean I saw enemy troops moving back and forth between our trading posts, but never actually attacking them so they were stuck on that island. No idea what was going on there.

Also once the AI tried to load the ship but couldn’t because my docks were in the way. I had to delete them so the AI finally was able to load the ship. Not a big deal at all but was very funny.

1 Like

Thank you for the praise, @Dakta, I really appreciate it.

There are some limitations to what can be done with the AI and some things, such as some built-in XS methods, simply do not seem to work as they should or even at all. However, I plan to try to fix the behaviors you mentioned since I have noticed them as well. Whether or not they can be fixed depends on how much can be done within the scope of XS scripting. While I have not performed detailed logging on those particular issues yet, I would hypothesize that those issues should be resolvable within the limits of what can be done in XS scripting. :slight_smile:

Tried a couple of games on land maps and the AI also seems much improved. AI uses a lot more interesting tech cards to upgrade their units. Of course the difference is not as noticeable as the difference on water maps but what impressed me is the amount of unit movement and attacking going on. Just non stop action, an allied AI immediately sent its troops to help defend me when I was getting attacked and when we were on the offense they also kept sending wave after wave, the enemy had no chance haha, might need to increase the handicap a little bit even.