• "Mwoah" - Kimi Räikkönen
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Dear Guest. Follow RaceDepartment on Twitter, Facebook, Instagram, Twitch, Steam and YouTube.

How to automate a race?

Discussion in 'Motorsport Manager' started by Gary3, Apr 3, 2017.

  1. Gary3

    Gary3

    Messages:
    5
    Ratings:
    +0
    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?
     
    • Agree Agree x 1
  2. UglyPsycho

    UglyPsycho

    Messages:
    80
    Ratings:
    +3
    I would also be interested in this, or any kind of bodge beyond just using "going rogue", would be useful for mod testing purposes.
     
  3. TheFlamingRed

    TheFlamingRed

    Messages:
    855
    Ratings:
    +131
    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
     
  4. DavyDepuydt

    DavyDepuydt

    Messages:
    5
    Ratings:
    +0
    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.
     
  5. DavyDepuydt

    DavyDepuydt

    Messages:
    5
    Ratings:
    +0
    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[​IMG]
     
  6. TheFlamingRed

    TheFlamingRed

    Messages:
    855
    Ratings:
    +131
    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: Apr 8, 2017
  7. Teguh Waluyo

    Teguh Waluyo

    Messages:
    69
    Ratings:
    +30
    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.