Assertive Seawall AI

The funny thing is I’ve been working this whole time, but the updates were mostly specific to Age of Pirates. I still recommend people play that one but I get that some people may not want to download all the extra stuff.

I have also been trying age of pirates, so I’ll keep a close eye on it too, but a standalone version is nice to have too. Thanks again for your work, having fishing ships garrison on docks is big!

1 Like

Huge fix coming to Ceylon. AI should build all its buildings now:


I also updated the fishing boat garrison to work better, but that’s not as important. Both changes are uploaded already to try them out.


Unrelated tease:
image

image

2 Likes

I’ve been trying the mod and the ship garrison works great now! they can really defend against an attack, and thats very very good. Still have to test Ceylon tho.

Now, that tease about water treasures I hope makes its way to an update soon! :smiley: :smiley: :smiley:

1 Like

No need to wait! I went ahead and dropped that update in there. It stops gathering as the game goes on but it usually takes at least one on a map like Mediterranean.

2 Likes

Always delivering! thanks! I’ll try it today :star_struck:

1 Like

one day, i hope this project is added as an option for AI ingame, the first AI to actually work on water maps

2 Likes

I appreciate the kind words! Any suggestions going forward?

I think the next big thing I want to do is get the ships even more active. When there’s something to attack they’ll attack, but when everything is hidden they just sit around waiting for the one explorer ship to find something. Even if they just attack a random spot on the water to see if anything is there, that might be better than waiting.

3 Likes

giving it a timer of sorts to engage would be interesting

1 Like

I’ve removed all the timers for attacking on water. If the AI sees a fight it thinks it can win, it takes it. With how big some of the maps are, though, it can take a lot of time to notice anything.

1 Like

interesting
btw, is this a custom script or just adjusted existing one?
just curious

1 Like

I do both. The attack script is an original that I expanded on quite a bit, ### the nugget gathering is a separate rule I wrote from scratch.

b - u - t is censored?

1 Like

i actually didn’t know its possible to do custom scripting in that manner, i suspected it would be based on ensemble’s track record with aoe2, interesting

1 Like

The idea of making them go attack random spots is a good one: Mahy times it happens as you say and the ships have no line of sight of anything from the enemy to attack. Maybe if its possible make it scout the coast of enemy islands until they find something?

1 Like

It already should be doing that. If you see a fishing boat roaming around, that’s what it’s doing. The ocean is usually really big, though, so it’s really easy to hide fishing boats off in the corner. I could tell them to attack random points of interest. I’m thinking of things like whales or clumps of fish. Other than that I could just do some math to guess where the enemy is? I don’t know if I want to circle an enemy’s island since it makes it really easy to pick them off with a tower or pair of culverin.

1 Like

Cómo se llama el mod? Es para no tener que leer conversaciones antiguas :point_right:t2::point_left:t2:

1 Like

In the mod browser it’s called Assertive Seawall Naval AI. You can go to the top post in this thread to get to the web link.


Alright, I updated again.

There’s now a rule that will take 1-3 available ships and patrol “random” locations on the map. “Random” means a random whale, and if it can’t find any, a random fish. If there are no fish either it just turns off. Let me know if it seems any different. In my testing it looked like the boats were getting out a little more, and the AI was able to catch a couple fishing boats hiding off in a corner that it wouldn’t normally catch. This is also in addition to the normal attack plan, so theoretically it could attack two things at once, but the attack plan will most likely steal all the ships.

My hope is that the AI will feel more aggressive, since warships will be out prowling even if they aren’t actively spotting anything.


Uploaded another fix to the treasure gathering 2023-08-16T05:00:00Z

2 Likes

I played some games testing different maps, because I noticed the ai behaves differently in some. I haven’t got to all of them, but as of now I’ve seen:
General: Ai tends to leave its units in a foreign island and never recovers them. The units stay at the shore when they want to be movedd but a ship never appears. I think i’ve seen some ship moving towards them but it seems a function overrides that call and makes the ship go somewhere else.

Walling:
Ai sometimes walls very effectively, even surrounding towers with them as to make them harder to destroy, but sometimes the wall trigger doesn’t start or the walls is left incomplete.

Caribbean:
Portuguese AI won’t build its second TC until age 3, its third until 4 and will always leave one TC wagon unused. This only happens in this map, and can be the same error that prevents other ai’s to use its wagons that I have observed many times on this map. Other maps work ok.

Hispaniola:
The Ai will build some docks but wont build any fishing ships nor many warships.

Ceylon:
Ai almost never will build a dock in the first island, so its very easy to destroy their first ship and strand them in their island. Also, villagers stranded in the first island will never collect the resources in that island nor the resource crates that arrive at the original TC except for hunts. This is very detrimental because you start the game with a gold mine, a bunch of tress and berries, but the stranded ai will never touch them, which along the dock issue basically leaves them unfunctional for the rest of the game. Portuguese do build its second TC in the second age, and in a very good position too!

Besides that, the general use of the ships by the AI has improved drastically: they scout, they attack, they chase your fishing ships, they hide theirs in their docks so destroying them is harder than before, its so much better overall. They also use more big ships to transport rather than fishing ships, which is a big plus.

Thank you for all the feedback!

I haven’t touched this part yet, but thank you for reminding me! It might be related to why the attacks seem to breakdown. I think this and the land attacks are the next big priorities to focus on.

I didn’t advertise it, but I turned off walls for civs that are in a “rush” disposition. I also didn’t want the AI sacrificing too many resources so I left the priority low, explaining why they don’t finish building. I can rework the priority, though, since it does waste a lot of time sending villagers back and forth.

I’ll take another look. It may have to just remain mostly fixed.

Good point! The definition of “water map/island map” has left some holes, and there are some clearly heavy water maps where it would be beneficial to create some sort of trigger for the AI to try and dominate the water. It’s tricky, though, since not every map with water is like that.

Yeah for now it’s best to leave their starting boat alone so they can get established and make a decent game. They’re already supposed to build a dock, but they don’t always do it for whatever reason. I’ll look into adding a check if there’s no boat. Typically they still ship their 2 caravels first so in my experience they get a boat anyway even if they don’t build the dock.

Awesome! That’s really good news if the new rule solved the lack of aggression issues. Hopefully your fishing boats feel less safe!

I see. Its good, saving resources on island is good, because they have to prioritize ships. Still, I’ve never seen the ai build a defensive wall around a tower to protect it in base, that was a nice surprise.

So, i tested the portuguese TC issue again, and in my subsequent tests it does work! It just takes a bit to build them because it looks for a good dock location first. I’ve had some games where they use all of their TCs in very good defensible spots, and others when they don’t use all of them, maybe because they are looking for docks first? But yeah, it does work but there are some things to iron out.

Thats true, I thing the AI determines strategies by map names, right? I can cycle through them all and make a list of the ones that need a heavier water focus.

This might work, as their starting TC can defend it from attacks. They do send the 2 boat shipment now, thats a very good change, but they still can be destroyed, specially on team games. It would be good if they use their starting resources in the little island but it is not that crucial, and if it makes the Ai work weirdly it can wait.

They are surely scared now! The AI even managed to destroy the whole fishing operation and initial docks of one of my allies, and he responded by destroying the enemy deck with a mix of ships and a landing force. I was very surprised!

One question: how many fishing boats do the AI builds in every age? I imagine its limited by resources too, but I think making them build slightly more boats might help them age up faster and get access to better ships. They now garrison, so they would be safer too