]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blobdiff - Event-logging.md
Update Compiling: add libtool dependency
[xonotic/xonotic.wiki.git] / Event-logging.md
index b102db7b95ec37d07e62e32413133a78aa52ab99..6450ce7ffb324ecc42bdb96280d9f38bde6fe3de 100644 (file)
@@ -8,7 +8,9 @@
 * `sv_eventlog_files_nameprefix`: file name prefix to be used 
 * `sv_eventlog_files_namesuffix`: file name extension to be used
 * `sv_eventlog_files_timestamps`: prefix log lines in the files with time events
-* `sv_eventlog_ipv6_delimiter`: change : in IPv6 addresses to _
+* `sv_eventlog_ipv6_delimiter`: change `:` in IPv6 addresses to `_` for easy parsing of :join lines with IPv6 IPs
+
+Also see: [Score logging](./Score-logging)
 
 ## Log format
 ```
@@ -16,7 +18,7 @@
 :gamestart:<gametype>_<mapname>:<matchid>
 :gameinfo:mutators:LIST:mutator1:mutator2:...
 ```
-(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)
+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.
 ```
 :gameinfo:end
 :join:<ID>:<slot>:<ip>:<nickname>
 :name:<ID>:<nickname>
 :part:<ID>
 :team:<ID>:<team>:<jointype>
+:chat:<ID>:<message>
+:chat_team:<ID>:<team>:<message>
+:chat_spec:<ID>:<message>
 :kill:frag:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
 :kill:tk:<ID of killer>:<ID of victim>:type=<death type>:items=<itemstring of killer>:victimitems=<itemstring of victim>
 :kill:suicide:<ID>:<ID>:type=<death type>:items=<itemstring>
 :kill:accident:<ID>:<ID>:type=<death type>:items=<itemstring>
-:ctf:steal:<flagcolor>:<ID of attacker>
-:ctf:dropped:<flagcolor>:<ID of dropper>
-:ctf:pickup:<flagcolor>:<ID of attacker>
-:ctf:capture:<flagcolor>:<ID of attacker>
-:ctf:return:<flagcolor>:<ID of defender>
+:ctf:steal:<flagcolor>:<teamcolor>:<ID of attacker>
+:ctf:dropped:<flagcolor>:<teamcolor>:<ID of dropper>
+:ctf:pickup:<flagcolor>:<teamcolor>:<ID of attacker>
+:ctf:capture:<flagcolor>:<teamcolor>:<ID of attacker>
+:ctf:return:<flagcolor>:<teamcolor>:<ID of defender>
 :ctf:returned:<flagcolor>
 :dom:taken:<previouscolor>:<ID of player>
+:ft:autorevival:<ID of revived player>
+:ft:revival:<ID of revived player>:<ID of reviver1>,<ID of reviver2>,...
 :keyhunt:capture:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
 :keyhunt:carrierfrag:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
 :keyhunt:collect:<ID of player>:<points for player>:<ID of key owner>:<points for key owner>:<name of key>
@@ -67,7 +74,7 @@
 :time:<YYYY-MM-DD HH:MM:SS>
 :recordset:<ID of player>:<time in seconds>
 ```
-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).
+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).
 
 ### Team colors
 * 1 = No Team (Domination)
@@ -93,7 +100,7 @@ Note that only the :join and :player lines ever contain player names. The :time
 ### Item string
 `<weaponid><flags>` or `<weaponid><flags>|<buffs>`
 
-where flags can contain:
+Where flags can contain:
 * F = player carries the flag
 * S = player has strength
 * I = player has the shield
@@ -118,13 +125,16 @@ and weapon IDs are:
 Weapon IDs are below 10000.
 
 ### Death type
-either a weapon ID ORed with weapon death flags, or one of the notifications in common/deathtypes.qh in the form of a string.
+Either a weapon ID ORed with weapon death flags, or one of the notifications in `common/deathtypes.qh` in the form of a string.
 
-weapon death flags are:
+Weapon death flags are:
 * 256 = secondary fire
 * 512 = splash damage
 * 1024 = bounced projectile
 * 2048 = head shot (Vaporizer only)
 * 4096 = unused flag
 
-There will be a log analyzer parsing this file format soon.
\ No newline at end of file
+#### Example programs making use of event logs:
+
+* [incognico/erebus.pl](https://gitlab.com/incognico/erebus/-/blob/master/erebus.pl) - Links Discord<->Xonotic
+* [rcon2irc.pl](https://gitlab.com/xonotic/xonotic/-/blob/master/server/rcon2irc/rcon2irc.pl) Links IRC<->Xonotic (a bit outdated)
\ No newline at end of file