AI Bot API

Hey, this is an odd request, but would it be possible to make an official bot API for AOE 4?
It doesn’t have to be as complete as the SC2 API, but something that let’s you plugin C#, C++, Java code would be awesome.
I’m in the weird sect of people that like making Minecraft farms but not actually playing Minecraft, there’s quite a few people similar.
Creating bots that fight each other or are good at custom scenarios like king of the hill seems like a fun idea. We already have some community built around it, but having an API with deeper hooks would be useful for more advanced AIs / modding. :grinning:

2 Likes

This is already somewhat possible at least in AoM & AoE3. Hopefully AoE4 has a way to script your own AI too.

2 Likes

I remember there being an XML interface (it’s been a loooong time haha), that’s nice to hear that there was some API. :grinning:
A supported or documented interface for 4 could really help for making complex AIs, beyond a Lua or like scripting interface.

Is there any follow up to this? It would be awesome to have!

1 Like

Being able to code our own AIs in C++ would be awesome, assuming the API gives us satisfactory control over the behaviour.

1 Like

I haven’t heard anything yet.
Hopefully they expose some of the interface in the modding support update.

unless relic is doing a radical change in their way of doing mod support, i wouldnt get my hopes up too much.

CoH2 for example doesn’t even allow to add new target types and so on for units (those are used to tune performance of weapons against certain targets).

1 Like

I hope they open it up!
AoE 2 type games had good mod support as early on the Genie folks did a bang up job reversing the engine, but I think it’s way easier if folks just open it up with symbols instead. As far as I no no-one added AI support to Genie though, with the AIs being large scripts instead.
We could start to open it up with Ghidra or Ida instead and figure it out, but it’s way easier to code with official support cause then you aren’t fighting against the devs with updates :joy:. Also not sure if that would be against the TOS, which would be ironic (Voobly + Forgotten Empires + Heaven Games modding community lead to the creation of AoE4).
I am definitely in the minority, but I enjoy playing against and planning out AIs more than playing games haha.

reverse engineering wont help much due to relic using signatures on all the files to prevent loading your own unrestriced file archives, any community workaround that happened for coh2 was banned by them aswell.

and no, it wasn’t done to prevent cheating cause the game only lets you play with people who have the exact same files (same goes for AoE4)

1 Like

Devs said they colabed with microsoft brains for AI. (they did not mention what kind of AI…may be it’s for music)
Hopes that they really do some AI and will make it public, but not earlier than mods.

1 Like

It’s still possible to patch a binary to override which signature it expects, but then that can get flagged by antivirus as it’s what old viruses used to do. And if a server demands clients have signature XYZ, it’s also possible to just send signature XYZ back (client side security isn’t recommended as then hacked clients are totally doable). I haven’t done that outside of CTFs, and it’s easier said than done.
It’s much nicer if we have an API that’s official and with symbols.
All the time spent reversing and patching binaries is better spent creating the actual mod.
AoE2 accidentally had an anticheat built-in through the state machine network arch (hacked clients desync), if AoE 4 has anticheat that pretty much kills modding support as then folks will get banned even if everyone agrees to play with the mod. I haven’t played since the beta so haven’t had a chance to poke at it.

The AI seems quite intelligent in AoE4 compared to the original AIs in AoE2/3, so it’s possible.

Yeah I would greatly prefer mod support over this feature request, but I have a feeling if mod support is an exposed API they can expose the hooks used by internal AIs at the same time.

They actually talked about it in the context of AI gameplay; not music or anything. Like, use AI deep learning to make AI play/behave like humans, and to uncover bugs. See this post where I link to a video where they talk about it at 25m 30s mark:

1 Like