]> de.git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Event-logging.md
Add link to score logging page & clarify more things
[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 * `sv_eventlog_ipv6_delimiter`: change `:` in IPv6 addresses to `_` for easy parsing of :join lines with IPv6 IPs
12
13 Also see: [Score logging](./Score-logging)
14
15 ## Log format
16 ```
17 :logversion:3
18 :gamestart:<gametype>_<mapname>:<matchid>
19 :gameinfo:mutators:LIST:mutator1:mutator2:...
20 ```
21 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.
22 ```
23 :gameinfo:end
24 :join:<ID>:<slot>:<ip>:<nickname>
25 :join:<ID>:<slot>:bot:<nickname>
26 :name:<ID>:<nickname>
27 :part:<ID>
28 :team:<ID>:<team>:<jointype>
29 :chat:<ID>:<message>
30 :chat_team:<ID>:<team>:<message>
31 :chat_spec:<ID>:<message>
32 :kill:frag:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
33 :kill:tk:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
34 :kill:suicide:<ID>:<ID>:type=<death type>:items=<itemstring>
35 :kill:accident:<ID>:<ID>:type=<death type>:items=<itemstring>
36 :ctf:steal:<flagcolor>:<teamcolor>:<ID of attacker>
37 :ctf:dropped:<flagcolor>:<teamcolor>:<ID of dropper>
38 :ctf:pickup:<flagcolor>:<teamcolor>:<ID of attacker>
39 :ctf:capture:<flagcolor>:<teamcolor>:<ID of attacker>
40 :ctf:return:<flagcolor>:<teamcolor>:<ID of defender>
41 :ctf:returned:<flagcolor>
42 :dom:taken:<previouscolor>:<ID of player>
43 :keyhunt:capture:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
44 :keyhunt:carrierfrag:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
45 :keyhunt:collect:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
46 :keyhunt:destroyed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
47 :keyhunt:destroyed_holdingkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
48 :keyhunt:dropkey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
49 :keyhunt:losekey:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
50 :keyhunt:push:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
51 :keyhunt:pushed:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
52 :scores:<gametype>_<mapname>:<map runtime>
53 :labels:player:<head1><flags>,<head2><flags>,...
54 :player:see-labels:<score1>,<score2>,...:<playtime>:<team>:<ID>:<nickname>
55 :player:see-labels:<score1>,<score2>,...:<playtime>:spectator:<ID>:<nickname>
56 :labels:teamscores:<head1><flags>,<head2><flags>,...
57 :teamscores:see-labels:<score1>,<score2>,...:<team>
58 :end
59 :restart
60 :gameover
61 :vote:suggested:<mapname>:<playerid>
62 :vote:keeptwo:<mapname>:<mapvotes>:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:...:didn't vote:<notvoters>
63 :vote:finished:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:<mapname>:<mapvotes>:...:didn't vote:<notvoters>
64 :vote:suggestion_accepted:<mapname>
65 :vote:vcall:<ID of player>:<vote command display string>
66 :vote:vyes:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
67 :vote:vno:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
68 :vote:vtimeout:<yescount>:<nocount>:<abstaincount>:<notvoters>:<mincount>
69 :vote:vstop:<ID of stopper>
70 :vote:vlogin:<ID of player>
71 :vote:vdo:<ID of player>:<do command display string>
72 :time:<YYYY-MM-DD HH:MM:SS>
73 :recordset:<ID of player>:<time in seconds>
74 ```
75 Note that only the :join, :name and :player lines ever contain player names. When splitting on ':', keep in mind that those 2 and (and all :chat* message texts) can contain ':'. 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).
76
77 ### Team colors
78 * 1 = No Team (Domination)
79 * 5 = Red Team
80 * 14 = Blue Team
81 * 13 = Yellow Team
82 * 10 = Pink Team
83
84 ### Join types
85 * 1 = connect
86 * 2 = auto
87 * 3 = manual
88 * 4 = spectating
89 * 6 = adminmove
90
91 ### Label flags
92 * !! = primary sorting key
93 * <!! = primary sorting key, lower is better
94 * ! = secondary sorting key
95 * <! = secondary sorting key, lower is better
96 * < = lower is better
97
98 ### Item string
99 `<weaponid><flags>` or `<weaponid><flags>|<buffs>`
100
101 Where flags can contain:
102 * F = player carries the flag
103 * S = player has strength
104 * I = player has the shield
105 * T = player is typing (console, menu or chat)
106    
107 and weapon IDs are:
108 * 1 = Blaster
109 * 2 = Shotgun
110 * 3 = Machine Gun
111 * 4 = Mortar
112 * 5 = Electro
113 * 6 = Crylink
114 * 7 = Vortex
115 * 8 = Hagar
116 * 9 = Rocket Launcher
117 * 10 = Port-O-Launch
118 * 11 = Vaporizer
119 * 12 = Grappling Hook
120 * 13 = Heavy Laser Assault Cannon
121 * 14 = T.A.G. Seeker
122
123 Weapon IDs are below 10000.
124
125 ### Death type
126 Either a weapon ID ORed with weapon death flags, or one of the notifications in `common/deathtypes.qh` in the form of a string.
127
128 Weapon death flags are:
129 * 256 = secondary fire
130 * 512 = splash damage
131 * 1024 = bounced projectile
132 * 2048 = head shot (Vaporizer only)
133 * 4096 = unused flag
134
135 There will be a log analyzer parsing this file format soon.