How to automate a race?

I made a post in the workshop discussions on steam about ways that I can have a race that I could simulate or play through without player intervention. As in, say for single race mode, is there a way I could essentially have the game just play itself so I could watch a race and jump between drivers and watch without having to control a team. Someone mentioned something about messing with a "dll" and making it so the game automatically does pit stops and any other actions for whatever team you're controlling. I know it's a weird request but I throughly enjoy sometimes just watching AI play each other and seeing what happens, and this game is fun but I always have to focus on what's going on with the drivers I have and sometimes I want to watch the other battles and drivers and what's going on. Basically:

TL;DR- I want to find a way to watch a race without having to play a team, as in not having to engage pit stops or change engine and driving modes, just some way to play a race and jump between drivers and watch from beginning to end. Is this possible and how could I achieve this?
 
I tried this last night... the old console commands have been disabled since 1.3 came out. I tried inserting a note into the Use AI session orders or it to apply even on a player team, but that didn't work either,

I could do with an old dll (1.0v) to see how the command used to work. I didn't start Modding the filemdirect until long after. So I don't have a backup of ot
 
If someone finds out how to do this or edit the assembly to achieve this, I'd be very interested in this as well.
as in: let the AI control the player team like it were an AI team. I like to do the managing in between the races, but during the race I like to watch from the sideline how the race unfolds, without giving instructions myself.
 
I think I'm onto something, in the Driver class I've updated the method "IsPlayersDriver" to always return "false". I've only had 10 minutes time to test it, but now the AI is controlling my drivers during the race (they pit automatically, you can see the driving style and engine mode change) and it looks like there is no impact during the management part (so far). I've also checked that during the race the sponsor objective still works :)

it's important that when using dynspy with the driver class, you simply edit the method and not the full class, because for some reason a line from the constructor cannot be compiled
playerdriver.png
 
Great find :) i think we can probably 'hotnkey toggle that' :) having it set of 'auto false' might cause some issues with other areas of the game Depending on where it's used. Keep testing and let us know what you find

Though I am afraid this thread will be closed real soon as it's talking about mods :(

Therefore, come join me in my discord channel to talk about this further, while we try and work out a mod friendly discussion forum.
https://discord.gg/nMjKaDE
 
Last edited:
I think I'm onto something, in the Driver class I've updated the method "IsPlayersDriver" to always return "false". I've only had 10 minutes time to test it, but now the AI is controlling my drivers during the race (they pit automatically, you can see the driving style and engine mode change) and it looks like there is no impact during the management part (so far). I've also checked that during the race the sponsor objective still works :)

it's important that when using dynspy with the driver class, you simply edit the method and not the full class, because for some reason a line from the constructor cannot be compiled
playerdriver.png

I'm interesting with dnspy. Care to share how You edit it? each time I try, I always crash to desktop when entering to game after practice cinematic loading. tried it on single race.
Here how I do it.
1. select
public bool IsPlayersDriver()
{
return this.contract != null && Game.IsActive() && this.contract.GetTeam() == Game.instance.player.team;
}
2. right click, edit method c#. edit it into return false. and then save module.

Which part did i do wrong? thank You.
 
Back
Top