/PyAccEngineer

Set pit stop strategy remotely in Assetto Corsa Competizione and basic live telemetry for teammate

Primary LanguagePythonMIT LicenseMIT

PyAccEngineer v1.5.9

the app

For more images here

Download

Download the zip file from the Releases page.

Or use git: git clone https://github.com/rrennoir/PyAccEngineer.git --recursive

Prerequisite

To work the app need Python installed (for the user is enough, doesn't require admin access) and added to the path.

Don't use python 3.10 or greater as it has problem installing some modules, use 3.8 or 3.9 instead.

Preferrably anaconda, but the default python package work too python

And don't forget to add it to the PATH, it's one of the step in the installer as shown in the screenshot I found on Google Image.

Add python to path

Installation

Install the required Python modules by running the InstallModules.bat (or InstallModules.ps). However .bat is recommended since it doesn't have the permission limitation by default

For server host (any driver, just one of them)

Clients don't need to open anything on their router. Host open TCP and UDP port (4269 for TCP and UDP are the default) for incoming connections as shown below

port_forwarding_example

Open the app

Use the StartApp.bat / StartApp.ps1 script

Possible problems

Python isn't recognized

If you get the error python isn't recognized... and python is installed, check here how to add it your PATH

Nobody is able to connect

If nobody can connect and the address / port are correct that mean the TCP port forwarding isn't setup correctly on the host router or the firewall is blocking the packets.

Able to connect but no telemetry

If everyone can connect, but no telemetry is received to the clients that mean the UDP port forwarding isn't setup correctly on the host router or the firewall is blocking the packets.

How to use it

  • One user starts "As Server" and others connect to it
  • Choose the same username as in ACC ("firstname surname"), so that the user driving can be recognized and will be highlighted in green.
  • Update values will refresh the information on the strategy page to the lastest value in game (mfd page)
  • Set Strategy will send a command to the user who is currently driving and set the strategy accordingly

Run the server as headless (dedicated server)

Simply run the headless_server.py, default port is 4269 (TCP) and 4269 (UDP). Or use the command line switches -u or --udp_port to change the UDP port and -t or --tcp_port to change the TCP port. To change both port at the same time use -p or --port

# sets both UDP/TCP ports to 4275
python headless_server.py -p 4275
# sets ports for UDP to 4270 and TCP to 4269
python headless_server.py -u 4270 --tcp_port 4269

To stop the server simply press ctrl C in the cmd / powershell / Windows terminal

Important note for using this

  • Tyre change must be on before the strategy setter is started
  • At least one pit strategy must be set or different from the default (just setting aggresive preset will work)
  • When the strategy setter is started the driving user shouldn't alt tab (duh)

Will you control my PC for other things ?

No, and if you don't trust me just read the code 😂

The app basicaly has 2 channels, an udp channel sending ACC telemetry and another sending application info like users update, update state, the strategy state, tyre wear data, etc

No keycode are sent over the network, only the desired state of the pit strategy, so the app received it and generate the virtual keypress necessary to fulfill that state.

Donation

If you have too much money you can donate here 😊 (and now gop will stop asking for a donate link 🐒)