How to create aoe3 discord bot

United States of America frostibite
Musketeer
Posts: 85
Joined: Dec 28, 2016

How to create aoe3 discord bot

Post by frostibite »

Hi,

I want to make a bot that can see how many deathmatch/supremecy games are currently existing in the eso server

how do I do this? I know how to create a discord bot but how do I search the eso server with it
User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4515
Joined: Mar 31, 2015
ESO: EAGLEMUT
Clan: WPact

Re: How to create aoe3 discord bot

Post by EAGLEMUT »

Hello, this would not be an easy task. You would need to have the bot open AoE3 game client, log onto ESO and either scrape results from screen or hook into the packets sent by ESO and decode the communication (game list is gzipped from what I've heard). There is no public endpoint to retrieve the game list easily.

For rooms hosted on the ESOC Patch environment (only), we offer our own public API used by the ESOC Discord bot. It's possible that we will add support of games played outside the ESOC Patch environmet in some capacity in the future, but I wouldn't count on it due to the technical difficulties involved.
United States of America frostibite
Musketeer
Posts: 85
Joined: Dec 28, 2016

Re: How to create aoe3 discord bot

Post by frostibite »

I would be willing to put in some work on figuring put how to read server packets if I was pointed in the right direction.
Is there anyway to connect a bot to the elorating site so that at least the bot could do updates like "so and so just beat so and so"
User avatar
Czech Republic EAGLEMUT
ESOC Dev Team
Donator 05
Posts: 4515
Joined: Mar 31, 2015
ESO: EAGLEMUT
Clan: WPact

Re: How to create aoe3 discord bot

Post by EAGLEMUT »

frostibite wrote:I would be willing to put in some work on figuring put how to read server packets if I was pointed in the right direction.

Well, first I'd advise to figure out how to even run a bot which opens the game and logs onto ESO. I think this would basically require having an extra computer constantly running with some sort of script to keep relogging whenever ESO goes down. I believe @princeofcarthage was working on something like that, perhaps he can offer insight.

frostibite wrote:Is there anyway to connect a bot to the elorating site so that at least the bot could do updates like "so and so just beat so and so"

For this it's possible to use the GameSearch endpoint and parse the results from html:
TAD - http://agecommunity.com/stats/GameSearch_yp.aspx
Nilla - http://agecommunity.com/stats/GameSearch.aspx (sometimes down nowadays)
Note that there are on average 2 games per minute happening on TAD alone, so that will be a lot of spam unless you filter it somehow.
United States of America frostibite
Musketeer
Posts: 85
Joined: Dec 28, 2016

Re: How to create aoe3 discord bot

Post by frostibite »

Eagle, this is great advice and what I was looking for.
It won't be as spammy for DM as games are more of a rarity. Probably like 2 games per hour

Who is online

Users browsing this forum: No registered users and 7 guests

Which top 10 players do you wish to see listed?

All-time

Active last two weeks

Active last month

Supremacy

Treaty

Official

ESOC Patch

Treaty Patch

1v1 Elo

2v2 Elo

3v3 Elo

Power Rating

Which streams do you wish to see listed?

Twitch

Age of Empires III

Age of Empires IV