App Raceroom Commander

Discussion in 'Community Workshop' started by Koenvh, May 6, 2020.

  1. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    [​IMG]
    Raceroom Commander is a small program that runs alongside your dedicated server, and adds support for chat commands in Raceroom. It can also set custom rules regarding minimum rating/reputation with whitelist, and drive-through penalty rules for incidents.

    We run a community that races twice a week, and whilst the majority of the drivers are community members, our races are also open to the public. To make sure that these events go well, we needed a way to manage those races quickly and effectively, hence this tool.

    So what does this tool actually do?
    This tool gives a list of admins (that you can specify) access to the following commands:
    • /kick NAME - Kicks a player from the server
    • /ban NAME - Bans a player from the server
    • /slowdown (or /sd) NAME DURATION - Give a slowdown penalty to a player for DURATION seconds
    • /drivethrough (or /dt) NAME - Give a drive-through penalty to a player
    • /stopandgo (or /sg) NAME DURATION - Give a stop-and-go penalty to a player for DURATION seconds
    • /disqualify (or /dq) NAME - Black flag a player
    • /next - Continue to the next session
    • /restart - Restart the current session
    • y - Confirm the action
    • n - Reject the action

    It also allows you to set a minimum reputation and minimum rating for people that join the server. The dedicated server also has an option for this, but here it is also possible to create a list of players that are exempt from those requirements. So you can set the minimum reputation at 80, but still allow your friends who have not driven ranked, or are only rank 70 to join by adding them to the whitelist. Players who do not meet the requirements will be kicked automatically.

    The dedicated server also has an option to set a maximum number of incidents. Unfortunately, the only thing it can do is disqualify players. Raceroom Commander allows you to specify custom incident rules, which will give the player a drive-through, slowdown or stop-and-go penalty when reached. You can also choose which incident types you want to include, and which ones you do not. For example: You can say that when someone reaches 20 points due to car-to-car contact, they will receive a drive-through penalty, and then when they get 30 points from off-track, they get a stop-and-go penalty, etc.

    Currently, banning players in the dedicated server does not prevent them from joining until you restart the server. If you use /ban, then they will be added to the ban list, and they will be unable to join as long as RRC is running.

    You do not need to use all functionality, and you can disable functionality you do not use.

    And a video showing some (but not all) functionality. Note that it might be slightly outdated:


    Raceroom Commander can be found here:
    https://gitlab.com/Koenvh/raceroom-commander
    Releases can be found here:
    https://gitlab.com/Koenvh/raceroom-commander/-/releases
     
    • Winner Winner x 3
    • Wonderful Wonderful x 2
    • Like Like x 1
    • Love it! Love it! x 1
    Last edited: May 5, 2021
  2. NL-Jos

    NL-Jos Well-Known Member

    Joined:
    Jun 5, 2015
    Ratings:
    +184 / 0 / -0
    Looks good, but in this example the host has to type it while he's driving to
    (Ziet er goed uit Koen, maar nu moet de host de tekst schrijven, er van uitgaande dat hij zelf mee rijd)
     
    Last edited: May 6, 2020
  3. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    Yes, that is correct for the commands. You can also add the server to the list of admins, and have someone who does not participate in the race do that (like a live steward), but our races generally do not have a live steward present (because everyone wants to participate). And in case of a wrecker at a one-hour race, we rather have one of the admins slow down for a brief moment to type "/ban Mr. Wrecker" than having to leave the game, log in to the server, open the server management page and then ban the person, or worse, having to finish the race with the wrecker still present. I believe ACC has a similar system.
     
    • Informative Informative x 1
    Last edited: May 6, 2020
  4. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    I added a bit more refined rule system, which means you can now specify exactly for what incidents what happens. E.g. going off-track four times: Slowdown. Colliding with another car four times: 2 second stop-and-go penalty. Getting 25 points for any type of incident: drive-through. Whilst you can set up a very complex rule system, make sure that you can still explain it to your drivers :wink:

    Suggestions are welcome of course; I am still exploring what is possible within the bounds of the dedicated server API, so I cannot promise that it is possible to do at the present time, but I can at least take a look at it.
     
    • Like Like x 1
    • Love it! Love it! x 1
  5. Simon Fillingham

    Simon Fillingham Well-Known Member

    Joined:
    Apr 27, 2016
    Ratings:
    +161 / 0 / -0
    nice. am interested in penalties for cut track instances.

    so i have downloaded your software and have it configured and it seems to work as i want it to :)

    i have it set to DT penalty for cut track instances, with intervals of 5, 10, 15 etc...

    i notice that cut track's also get counted in Q (and i presume P) and even though in Q i got a DT penalty for exceeding TL 5 times, the penalty was not applied as obv no DT can be served in Q. my question is, if i amassed 3 cut track instances in Q would i then only need to cut track 2 more times in R to get myself a DT penalty? or would your software reset the penalty points to 0, so i would again get 5 'lives' in the race?
     
    • Like Like x 1
  6. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    The incident counter resets at the start of every session. I will look into removing those messages during qualification and practice.

    The way it works is that it looks at the points you have now vs. the points you had last time it checked. Raceroom resets the points to 0 every session, so Raceroom Commander resets the points to 0 too.
     
    • Like Like x 1
    • Love it! Love it! x 1
    Last edited: May 22, 2020
  7. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    @Simon Fillingham I have added a check to see whether the current session is a race or not, so it should no longer check for incidents during practice, qualifying and warmup (and thus it should also no longer show the message).
     
    • Like Like x 2
    • Love it! Love it! x 1
  8. Simon Fillingham

    Simon Fillingham Well-Known Member

    Joined:
    Apr 27, 2016
    Ratings:
    +161 / 0 / -0
    Will be trialling this at RRLeagues on Sunday night in a fun race.

    In-game cut penalties off, RCC running with DT penalty set for 5th, 10th, 15th, 20th etc... track cut.

    Will give you any feedback. :)
     
    • Like Like x 2
    • Love it! Love it! x 1
  9. Simon Fillingham

    Simon Fillingham Well-Known Member

    Joined:
    Apr 27, 2016
    Ratings:
    +161 / 0 / -0
    @Koenvh

    Sorry, forgot to give feedback.

    Not much to say really, it works as intended. Perhaps just 2 things that may make for improvement...

    1) A counter for the specific incident we have a penalty for. I know there is a global counter but a separate counter for cut track (in our case) incidents would be helpful so drivers know how close they are to a penalty.

    2) I'm not sure the 'chat' message is necessary. That yellow text is off-putting during a race and there are other visual reminders (and audio if using the CrewChief) to notify us we have a penalty.
     
  10. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    I understand both your points, but I do not see how one would unify those two points. The only thing I can show is using those chat messages - all other counters are from the game itself. Or did you mean something different?
     
  11. José Rafael Alvarez

    José Rafael Alvarez New Member

    Joined:
    Jun 3, 2020
    Ratings:
    +0 / 0 / -0
    Hi,
    Is there a possibility of a sanction for not respecting a blue flag?



    Is it possible to add more types of incidents?



    It would be interesting to develop an application with an interface in which to introduce the different parameters and at the end generate the json file.

    Thank you very much for your work, very useful.

    Let's put it in our championship.





    Greetings
     
  12. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    The incident types used are the ones provided and detected by Raceroom - I cannot create my own.
    As for generating the JSON file: If you want to create something, feel free to do so. Please note however that since it is still in early stages of development, I might still change the configuration format at any point. Starting from version 1.0.0 I will make sure that the configuration is mostly set in stone, but until then everything might still change. Just as a word of caution.
     
    • Like Like x 1
    • Informative Informative x 1
  13. Roman TRT

    Roman TRT Well-Known Member

    Joined:
    Jun 3, 2015
    Ratings:
    +77 / 0 / -0
    I did everything according to the instructions, corrected your id on your own.
    I started the game server, then the rrcommander, but I do not have commands written in the window rrcommander
     
  14. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    I am not sure what you mean. What exactly are you trying to do? What do you expect to see, and what do you actually see? Did you try the example as shown in the video?
     
  15. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    @Simon Fillingham You can now change the messages (or turn them off entirely). I unfortunately cannot control the global incident counter, so that's still displayed as-is.
     
    • Winner Winner x 1
    • Informative Informative x 1
  16. tEWONE

    tEWONE New Member

    Joined:
    Apr 26, 2019
    Ratings:
    +2 / 0 / -0
    Hello, i've followed your instructions but i keep getting an error(ValueError: <string >: 2 Unexpected " " " at column 3) message whenever i run rrcomander and it just closes itself. Am i missing something? Thanks
     
  17. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    Could you check your config? Especially for a spurious " (that's what the error message says). Or try to load the config here: https://jsonformatter.org/json5-validator

    It'll probably show you where the error is.
     
    • Informative Informative x 2
  18. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    Version 1.0.0 is out now. The last thing I really wanted to add before 1.0.0, which is a minimum activity point limit (so that you can bar infrequent drivers). Do know that this applies globally, so you can have a minimum activity point limit whilst allowing any reputation or rating.
     
    • Like Like x 1
    • Useful Useful x 1
  19. IcyMind

    IcyMind New Member

    Joined:
    Jun 14, 2020
    Ratings:
    +0 / 0 / -0
    i downloade the the zip unpack it executed and got the following error "
    Traceback (most recent call last):
    File "rrcommander.py", line 433, in <module>
    File "rrcommander.py", line 119, in main
    File "rrcommander.py", line 61, in get_data
    File "site-packages\requests\models.py", line 897, in json
    File "site-packages\simplejson\__init__.py", line 518, in loads
    File "site-packages\simplejson\decoder.py", line 370, in decode
    File "site-packages\simplejson\decoder.py", line 400, in raw_decode
    simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    [3600] Failed to execute script rrcommander"
     
  20. Koenvh

    Koenvh Member

    Joined:
    Feb 3, 2020
    Ratings:
    +8 / 0 / -0
    Are you sure the server is running and running correctly? It only works when the program is running on the same computer as the server is.