Touge Plugin - EricManintveld/TougePlugin GitHub Wiki

Touge Plugin is a plugin for Assetto Corsa servers that enables touge racing with an elo system and automatic enforcement of touge rules. Designed for competitive head-to-head driving. Find some live example servers running the plugin here.

Note that the plugin currently only works on tracks that have a defined start and endpoint for timings. (Meaning you should be able to see your laptimes in Assetto Corsa.) The plugin uses these points for determining the course.

Installation

  • Download the plugin
    Click here to download the plugin for AssettoServer v0.0.55-pre26.. v0.0.55-pre25 version is available here.
  • Extract it
    Place the contents into your server's plugins directory.
  • Run your server once
    This will generate configuration files inside the cfg folder.
  • Customize your ruleset
    Set up the starting areas in the touge_starting_areas.ini file and adjust the settings in plugin_touge_cfg.yml to your liking.

Configuration

touge_starting_areas.ini

Used to setup the starting areas on various maps. You can use comfy map to get the position and heading. The following example sets up two starting areas, one for Gunma and one for Imola. Configurations for different tracks can all be stored in the same file. A download link for a base configuration file that contains various starting positions for popular tracks will be added later. Also, feel free to share your configs in the Discord.

[pk_gunma_cycle_sports_center-gcsc_full_attack_1]
leader_pos = -199.7,467.3,-87.7
leader_heading = -16
chaser_pos = -195.3,467,-83.1
chaser_heading = -17

[imola_1]
leader_pos = -199.7,467.3,-87.7
leader_heading = -16
chaser_pos = -195.3,467,-83.1
chaser_heading = -17

plugin_touge_cfg.yml

Elo Configuration

CarPerformanceRatings

Type: Dictionary<string, int>
Description: Specifies performance ratings for different car models.
Usage: Each key represents the car's internal model name (e.g., ks_mazda_miata) and the value is a performance score between 1 and 1000.
Purpose: Used in player elo calculations to improve fairness. Winning in a faster car against a slower car will award less elo gain than beating a fast car using a slower one.
Example:

CarPerformanceRatings:
  ks_mazda_miata: 125
  ks_toyota_ae86: 131

MaxEloGain

Type: int
Description: The maximum amount of elo rating a player can gain (or lose) in a single race.
Constraints: Must be a positive integer.
Purpose: Gives control over the volatility of the rating system.

ProvisionalRaces

Type: int
Description: The number of initial races a player is considered "provisional" in the elo system.
Constraints: Must be greater than 0.
Purpose: Allows for slightly larger elo changes than configured in MaxEloGain while a player's skill is still being established.

MaxEloGainProvisional

Type: int
Description: The maximum elo gain/loss while a player is still provisional.
Constraints: Must be greater than 0.
Purpose: Allows for a faster elo adjustment during provisional matches compared to regular ones.

Race Setup

isRollingStart

Type: bool
Description: Enables or disables rolling starts.
Usage:

  • true: Cars start moving at the beginning of the race.
  • false: Cars are stationary at the start.

outrunTime

Type: int
Description: The number of seconds the chase car has to cross the finish line after the lead car finishes.
Constraints: Must be between 1 and 60 seconds.
Purpose: Used to determine if the lead car successfully outran the chase car.

Database

isDbLocalMode

Type: bool
Description: Whether the system should use a local in-memory or file-based database instead of a PostgreSQL server.
Usage:

  • true: No external DB needed; local data only.
  • false: Requires valid PostgreSQL connection string.

postgresqlConnectionString

Type: string?
Description: Connection string used to connect to a PostgreSQL database.
Constraints:

  • Must be non-empty only if isDbLocalMode is false.
    Purpose: Provides data persistence and multi-server support in non-local setups.

Example:

postgresqlConnectionString: "Host={IP/URL};Port={Port};Username={Username};Password={Password};Database={Database name}"