Skip to content

An AssettoServer plugin that will track overtake and drift scores, and lap times

License

Notifications You must be signed in to change notification settings

LightspeedAC/ScoreTrackerPlugin

Repository files navigation

ScoreTrackerPlugin

An AssettoServer plugin that will track overtake scores, drift scores, and lap times. Each player and their top score/lap time will be stored in the root folder of your server under score-tracker. The plugin will then display all those entries on your server's web page at http://{ip}:{port}/scores or http://{ip}:{port}/laptimes, which can be accessed by Discord bots, etc.

If you're going to track overtake or drift scores, you'll need a Lua script which can be found here.

Server Configuration

Enable CSP client messages in your extra_cfg.yml

EnableClientMessages: true

Enable the plugin in your extra_cfg.yml

EnablePlugins:
- ScoreTrackerPlugin

Add the plugin configuration to the bottom of your extra_cfg.yml

---
!ScoreTrackerConfiguration
# Whether to listen for overtake score, drift score, or timed laps. 0 = overtake score, 1 = drift score, 2 = timed laps
ServerType: 1
# Depending on 'ServerType', the server sends a message in chat for each new personal best overtake score, drift score, or lap time.
BroadcastMessages: true

Lua Script Configuration (Overtake/Drift)

Add this OnlineEvent to your Lua script

Keep the structure the same otherwise this plugin won't capture any scores. For drift scores just rename the key to driftScoreEnd.
local msg = ac.OnlineEvent({
    ac.StructItem.key("overtakeScoreEnd"),
    Score = ac.StructItem.int64(),
    Multiplier = ac.StructItem.int32(),
    Car = ac.StructItem.string(64),
})

Send a message from your script using the OnlineEvent (to be captured by this plugin)

msg{ Score = personalBest, Multiplier = comboMeter, Car = ac.getCarName(0) }

Example Usage Screenshots

alt text alt text

About

An AssettoServer plugin that will track overtake and drift scores, and lap times

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages