smaller font for cscope subsection headers
[xonotic/xonotic.wiki.git] / Event-logging.md
1 ## CVars (see xonotic.org/tools/cacs for more up-to-date information)
2
3 * `sv_eventlog`: master switch
4 * `sv_eventlog_files`: print frags, scores and captures for separate files each match
5 * `sv_eventlog_console`: print frags, scores and captures to serverconsole during the match
6 * `sv_logscores_bots`: choose whether bot are included in stats or not
7 * `sv_eventlog_files_counter`: number of matches logged until now
8 * `sv_eventlog_files_nameprefix`: file name prefix to be used 
9 * `sv_eventlog_files_namesuffix`: file name extension to be used
10 * `sv_eventlog_files_timestamps`: prefix log lines in the files with time events
11
12 ## Log format
13 ```
14 :logversion:3
15 :gamestart:<gametype>_<mapname>:<matchid>
16 :gameinfo:mutators:LIST:mutator1:mutator2:...
17 ```
18 (note that mutators are listed by their cvar name with g_ removed, unless such a cvar is 1 by default - then the mutator is listed with a no_ prefix if the cvar is 0)
19 ```
20 :gameinfo:end
21 :join:<ID>:<slot>:<ip>:<nickname>
22 :join:<ID>:<slot>:bot:<nickname>
23 :name:<ID>:<nickname>
24 :part:<ID>
25 :team:<ID>:<team>:<jointype>
26 :kill:frag:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
27 :kill:tk:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
28 :kill:suicide:<ID>:<ID>:type=<death type>:items=<itemstring>
29 :kill:accident:<ID>:<ID>:type=<death type>:items=<itemstring>
30 :ctf:steal:<flagcolor>:<ID of attacker>
31 :ctf:dropped:<flagcolor>:<ID of dropper>
32 :ctf:pickup:<flagcolor>:<ID of attacker>
33 :ctf:capture:<flagcolor>:<ID of attacker>
34 :ctf:return:<flagcolor>:<ID of defender>
35 :ctf:returned:<flagcolor>
36 :dom:taken:<previouscolor>:<ID of player>
37 :keyhunt:capture:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
38 :keyhunt:carrierfrag:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
39 :keyhunt:collect:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
40 :keyhunt:destroyed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
41 :keyhunt:destroyed_holdingkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
42 :keyhunt:dropkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
43 :keyhunt:losekey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
44 :keyhunt:push:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
45 :keyhunt:pushed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
46 :scores:<gametype>_<mapname>:<map runtime>
47 :labels:player:<head1><flags>,<head2><flags>,...
48 :player:see-labels:<score1>,<score2>,...:<playtime>:<team>:<ID>:<nickname>
49 :player:see-labels:<score1>,<score2>,...:<playtime>:spectator:<ID>:<nickname>
50 :labels:teamscores:<head1><flags>,<head2><flags>,...
51 :teamscores:see-labels:<score1>,<score2>,...:<team>
52 :end
53 :restart
54 :gameover
55 :vote:suggested:<mapname>:<playerid>
56 :vote:keeptwo:<mapname>:<mapvotes>:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:...:didn't vote:<notvoters>
57 :vote:finished:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:<mapname>:<mapvotes>:...:didn't vote:<notvoters>
58 :vote:suggestion_accepted:<mapname>
59 :vote:vcall:<ID of player>:<vote command display string>
60 :vote:vyes:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
61 :vote:vno:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
62 :vote:vtimeout:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
63 :vote:vstop:<ID of stopper>
64 :vote:vlogin:<ID of player>
65 :vote:vdo:<ID of player>:<do command display string>
66 :time:<YYYY-MM-DD HH:MM:SS>
67 :recordset:<ID of player>:<time in seconds>
68 ```
69 Note that only the :join and :player lines ever contain player names. The :time event only appears in the log files if sv_eventlog_files_timestamps is 1; there is no way to log these time stamps to the console (for console timestamps, set timestamps to 1).
70
71 ### Team colors
72 * 1 = No Team (Domination)
73 * 5 = Red Team
74 * 14 = Blue Team
75 * 13 = Yellow Team
76 * 10 = Pink Team
77
78 ### Join types
79 * 1 = connect
80 * 2 = auto
81 * 3 = manual
82 * 4 = spectating
83 * 6 = adminmove
84
85 ### Label flags
86 * !! = primary sorting key
87 * <!! = primary sorting key, lower is better
88 * ! = secondary sorting key
89 * <! = secondary sorting key, lower is better
90 * < = lower is better
91
92 ### Item string
93 `<weaponid><flags>` or `<weaponid><flags>|<buffs>`
94
95 where flags can contain:
96 * F = player carries the flag
97 * S = player has strength
98 * I = player has the shield
99 * T = player is typing (console, menu or chat)
100    
101 and weapon IDs are:
102 * 1 = Blaster
103 * 2 = Shotgun
104 * 3 = Machine Gun
105 * 4 = Mortar
106 * 5 = Electro
107 * 6 = Crylink
108 * 7 = Vortex
109 * 8 = Hagar
110 * 9 = Rocket Launcher
111 * 10 = Port-O-Launch
112 * 11 = Vaporizer
113 * 12 = Grappling Hook
114 * 13 = Heavy Laser Assault Cannon
115 * 14 = T.A.G. Seeker
116
117 Weapon IDs are below 10000.
118
119 ### Death type
120 either a weapon ID ORed with weapon death flags, or one of the notifications in common/deathtypes.qh in the form of a string.
121
122 weapon death flags are:
123 * 256 = secondary fire
124 * 512 = splash damage
125 * 1024 = bounced projectile
126 * 2048 = head shot (Vaporizer only)
127 * 4096 = unused flag
128
129 There will be a log analyzer parsing this file format soon.