Jump to content
DIRT 5 - Chat about the game and get support here. Read more... ×
How to contact Customer Service Read more... ×
F1 2021 | Arrives July 16 | First Look Here Read more... ×

Racenet and Discord bot

Recommended Posts

Hello,

We recently created a French discord server to play with friends and french speaking pilots and I'm looking to create a discord bot that could report us stats about our online races (mainly RallyCross championships).

The idea would be to get for example, who made the best lap during each qualify round, raking for each round, ... This discord bot will be shared with everyone as OpenSource.

Creating the discord bot is not a problem as I know nodejs very well but gettings the Dirt Rally data doesn't look so easy.

 

- For now,  I cannot acces to racenet (only the legacy racenet seems to be online). Does anyone know when we can access to racenet again ?

- Is there an API that coulds allow me to get Racenet data ?

- Do I need to create a Club to regroup all pilots from our discord server or is there another solution ?

- Did someone already work on this subject ?

 

Thanks for your help and Happy new year 2021 !

 

Share this post


Link to post
Share on other sites
3 hours ago, PapyMaurice said:

report us stats about our online races (mainly RallyCross championships).

We currently don't have a way to publicly display this data, though considering RaceNet are working on some things who knows what the future may bring. As somebody that regularly visits TrueAchievements I do like some good stattage myself 😉 

 

This is what the website shows currently: 

image.png

 

 

3 hours ago, PapyMaurice said:

- For now,  I cannot acces to racenet (only the legacy racenet seems to be online). Does anyone know when we can access to racenet again ?

The original RaceNet and CREST are currently inaccessible, you can find DiRT Rally 2.0 Challenges here:

 

I know @Bonxy has been able to pull data from there for this website so presumably there's a way to do something similar for Discord? https://bonxystuff.com/dirt/ 

 

3 hours ago, PapyMaurice said:

- Is there an API that coulds allow me to get Racenet data ?

I don't believe so, no. Would be nice, it's something I've put on a wishlist for future titles but I'm just the Social Media Guy, so I can't make it happen 😄 

 

If you do come up with something let me know, as I think a way to send notifications about what new Challenges appear will be very handy. (I might even use it on official channels, like auto-tweeting or something)

Share this post


Link to post
Share on other sites
Posted (edited)

thanx for these infos @PJTierney

I check https://dirtrally2.dirtgame.com/community-events and data is returned via an API so easy to parse and put on Discord but this is not exactly what we are looking for as it is only public events.

Good news is that it also looks possible to do this for Club events.

Ex https://dirtrally2.dirtgame.com/api/Club/365912/recentResults

Now the only problem is that we apparently cannot create RallyCross championships via Club. Only classic rally stages seems to be available.

This is really a shame as this would be exactly what I'm looking for 😕 and for me RallyCross is really more fun with friends than classic rally :classic_tongue:

Edited by PapyMaurice

Share this post


Link to post
Share on other sites
Posted (edited)

Here is a quick update of my researchs :

- Racenet is still unavailable, I would really love to get news about this tools (what is coming and when) 🙄 @PJTierney can you get some news about it ???

- Using API of dirtgame website will not do the trick as we cannot create rallycross championships in clubs and so get stats 😭 Only public events can handle rallycross.

 

Last solution is to use UDP output feature of DR 2.0 (used by racing sim hardware like motion platforms or HUD).

I already digged into it and the stats that I'm able to get are basically:

- current_lap_time (refreshed at 100hz)

- last_lap_time

- current lap and total laps : ex: 1/4

- track_length (should be unique so I can map track name in stats)

 

This could be an alternative solution but everything is not perfect.

- I never get last_lap_time stats for the last lap of a race. Stats resets just after crossing the finish line so I never get last_lap_time packet 😞 I could trick this by using the last current_lap_time packet just before crossing the finish line but this will not be the real precise lap_time that the game calculate but close approximation (~10ms in best case scenario).

- I'm able to match the circuit name based on a track_length info returned via UDP but I have no info about rounds (ex : Q1, Q2, Q3, Q4, semi-final, final). 

- Each player would need to install my software on his machine and active UDP output. I'll also need to create a dedicated API to centralise all players stats.

 

Based on the limitations I talked about earlier, the dashboards I could present would be :

a Track best lap / pilot. I can also filter this by hour/day/week/mounth.

- a graph a best laps/day to follow our progress on every track (circuit)

 

This would be a start but this is quite limited info and represent lots of work compared to the result 😅

@PJTierney I'm not the first user to request for this kind of stats from a codemasters API and all theses info are already tracked in your DB.

The amount of work to give us access to timing API doesn't look big and could benefit for all games. This could be a good way to involve communities in a long term.

How can we help you push this features to codemasters (probably via current racenet rework) ? Survey ? Petition ? 🤣

I'm sure if you give access to data API lots of users will create great stuff (bots, auto tweet, ...) that can benefit everybody, involve players on games in longer terms and improve codemasters social presence throught players communities and events.

 

Just for fun, here is a screen of my actual bot reporting (fake) stats

image.png.845aea43e586a585e7e5e86350c9aed5.png

 

Edited by PapyMaurice

Share this post


Link to post
Share on other sites
On 1/9/2021 at 11:54 AM, PapyMaurice said:

How can we help you push this features to codemasters (probably via current racenet rework) ? Survey ? Petition ? 🤣

It's not that easy I'm afraid, our programmers are very busy on higher priority projects 🙂 

I'll pass this thread on though, but I don't think there'll be any change for DiRT Rally 2.0.

Share this post


Link to post
Share on other sites
22 minutes ago, PapyMaurice said:

OK I understand

 

I've heard back by the way, and it does look like there are some technical hurdles with doing this for DiRT Rally 2.0 and how it's set up to call and distribute data from the servers.

On the plus side its on the team's radar for the future, so fingers crossed something comes of it.

 

  • Thanks 1
  • Agree 1

Share this post


Link to post
Share on other sites

Hi PJTierney

does it mean DiRT Rallye 2.0 is from the view of codemasters feature complete?

Share this post


Link to post
Share on other sites
3 minutes ago, snooops said:

Hi PJTierney

does it mean DiRT Rallye 2.0 is from the view of codemasters feature complete?

It's been "feature complete" ever since the Colin McRae content came out last year.

We've been doing minor updates since then (like adding the Ford Fiesta R5 MKII for esports) but nothing major.

 

While it would be nice to add every little thing or detail that people want, at some point you have to move on to future projects or else they'll never get done, and the Rally team's gone past that point already 🙂 

  • Agree 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×