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.
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
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) }