]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Score-logging.md
Upload attachment zzz-bai-jokes-v18.pk3
[xonotic/xonotic.wiki.git] / Score-logging.md
1 ## CVars (see xonotic.org/tools/cacs for more up-to-date information):
2
3 * `sv_logscores_console`: print scores to serverconsole after each match (set to 1 to enable)
4 * `sv_logscores_file`: print scores to a file after each match 
5 * `sv_logscores_filename`: filename of the output file if sv_logscores_file is enabled (the file will be stored in Xonotic/data/data or ~/.xonotic/data/data)
6 * `sv_logscores_bots`:choose whether bot are included in stats or not
7
8 Also see [Event logging](./Event-logging)
9
10 ## Commands
11
12 * `printstats`: print current scores to file/console (requires sv_logscores_console and/or sv_logscores_file to be enabled)
13
14 ## Log format
15
16 Example:
17 ```   
18 :scores:dm_nexdm01:131
19 :player:1:7:129:1:GrooveMachine
20 :player:1:4:129:1:DanceWithMe
21 :player:10:1:130:3:Player
22 :end
23 ```   
24 Start of a new section: `:scores:<gametype>_<mapname>:<map runtime>` (if the dump was triggered by "printstats", the line starts with :status:)
25
26 Player entry: `:player:<frags>:<deaths>:<playtime>:<team>:<nickname>` (player names might contain ":", so be sure your parser doesn't split them, playtime is measured in seconds)
27
28 Section end: `:end`
29
30 Team colors:
31 * Red Team      =  5
32 * Blue Team     = 14
33 * Yellow Team   = 13
34 * Pink Team     = 10
35
36 Other team numbers may appear in free for all games.
37
38 For an example parser (written in perl) have a look at [incognico/erebus.pl](https://gitlab.com/incognico/erebus/-/blob/master/erebus.pl)