cvar "g_log"
-
- Posts: 13
- Joined: Mon Feb 09, 2004 8:00 am
cvar "g_log"
As it's the first time I had a look into a quake sdk, i'm not sure if I'm right - so please correct me if I'm wrong.
Because cvar "g_log" can't be modified in multiplayer and I'm interested in detailed log output, I search around in SDK where those things might be defined. A simple "grep -R g_log *" didn't have any usable result, so I wondered why this cvar isn't defined anywhere?
After searching around I found in source/game/gamesys files called "SysCvar.cpp" and "SysCvar.h". The .cpp file includes this comment: "All game cvars should be defined here." - but g_log isn't around anywhere. But I found another cvar called g_gamelog, that seems to do the thing g_log does. This cvar (g_gamelog) also appears in several source files together with C-defines for log output. But in server console this cvar doesn't exist, it says "Unknown command".
Is there any sort of alias of cvar defined somewhere outside sdk? As mentioned above grep didn't bring me any result while searching for cvar g_log in sdk game source.
In the next step I'll hack g_gamelog as static "true" and try to compile the sdk to figure out if the dedicated server does the correct output then.
If anyone got a better hint for me, please let me know. As said above, these are my first steps in any quake sdk, so please be patient.
kaffeedoktor.
Because cvar "g_log" can't be modified in multiplayer and I'm interested in detailed log output, I search around in SDK where those things might be defined. A simple "grep -R g_log *" didn't have any usable result, so I wondered why this cvar isn't defined anywhere?
After searching around I found in source/game/gamesys files called "SysCvar.cpp" and "SysCvar.h". The .cpp file includes this comment: "All game cvars should be defined here." - but g_log isn't around anywhere. But I found another cvar called g_gamelog, that seems to do the thing g_log does. This cvar (g_gamelog) also appears in several source files together with C-defines for log output. But in server console this cvar doesn't exist, it says "Unknown command".
Is there any sort of alias of cvar defined somewhere outside sdk? As mentioned above grep didn't bring me any result while searching for cvar g_log in sdk game source.
In the next step I'll hack g_gamelog as static "true" and try to compile the sdk to figure out if the dedicated server does the correct output then.
If anyone got a better hint for me, please let me know. As said above, these are my first steps in any quake sdk, so please be patient.
kaffeedoktor.
Last edited by kaffeedoktor on Thu Nov 17, 2005 3:56 pm, edited 1 time in total.
-
- Posts: 13
- Joined: Mon Feb 09, 2004 8:00 am
Ok, after having a closer look to the game source, it looks like there isn't any log output in detail as it was in q3. There may be some output when a player receives damage, but all other output is some physics data (from Physics_Player.cpp). So it seems this is just some debug output.
There's another object containing some game information which is used to calculate the stats output at the end of game. I even don't think it has all information in it, I'll have a closer look to it.
Right now I think game logging like in q3 has to be added and isn't included right now.
There's another object containing some game information which is used to calculate the stats output at the end of game. I even don't think it has all information in it, I'll have a closer look to it.
Right now I think game logging like in q3 has to be added and isn't included right now.
-
- Posts: 13
- Joined: Mon Feb 09, 2004 8:00 am
It really seems there's no log output like in q3 builtin. If I'm totally wrong, please correct me!
So it looks like we'll have to do it on our own - now as the sdk is out this won't be such a big problem. I think I'll do the job, but first I want to have some feedback from you if such log output is wanted. On the other side I'll contact developers of mods like q4max oder q4-xbattle for working together - a mod with just extended log output won't get many friends
What do you expect of extended log output for use in statistics software? Please append this list:
- weapon pickup
- ammo pickup
- item pickup
- health / armor pickup
- kills / suicides
- weapon hits with damage and origin
- gametyp specific (ctf, ...)
- detailled gamedata (timelimit, fraglimit, other limits, map, time, date, ...)
- player name & id (punkbuster id?)
So what do you think?
So it looks like we'll have to do it on our own - now as the sdk is out this won't be such a big problem. I think I'll do the job, but first I want to have some feedback from you if such log output is wanted. On the other side I'll contact developers of mods like q4max oder q4-xbattle for working together - a mod with just extended log output won't get many friends

What do you expect of extended log output for use in statistics software? Please append this list:
- weapon pickup
- ammo pickup
- item pickup
- health / armor pickup
- kills / suicides
- weapon hits with damage and origin
- gametyp specific (ctf, ...)
- detailled gamedata (timelimit, fraglimit, other limits, map, time, date, ...)
- player name & id (punkbuster id?)
So what do you think?
-
- Posts: 4022
- Joined: Sat Mar 12, 2005 6:24 pm
-
- Posts: 13
- Joined: Mon Feb 09, 2004 8:00 am
-
- Posts: 13
- Joined: Mon Feb 09, 2004 8:00 am
Excellent, wunderschoen, bravissimo, fantastisk
I was actually planning to do the same thing, but with exams coming up I do not think I have enough spare time.
However I will help if I can and I might even write a log file parser/analyser for the new logs
My suggestions
Basically I would like the log to look more or less like the old quake 3 log (especially the osp), with some improvements:
* As with osp put a timestamp in front of every sentence
* Use guid instead of player name to keep track of who does what.
* Make a reference from guid to the player name and if player name change.
* Every shot that are made and with what type of gun, if it hit a player/bot where it hit
head shot, etc..
* Where in the game a player was killed
* IP
* Ping
* Chatting
team chatting, normal say, etc..
* Kills
type of kills, suicide, shotgun, etc..
* Picking up items, weapons, flags, life, etc..
* Points made
returned the flag, defence etc..
* Voting
* Kicking, banning
* Speed
Of players when they shoot and on the pray if the shoot hit
*In the or on the ground.
If player is shooting while jumping, falling etc or is standing on the ground and the same for the pray if it hit
Log format
* Use easy and simple key words so it is easier to track and understand what is happening:
* Use "one words"
- dark_matter_gun or DARK_MATTER_GUN instead of » Dark Matter Gun
- not_used or NOT_USED instead of not used
* Use a separator such as ¦,¡,±,½,»,;, or other almost never used chars
example
time ± player_id ± location ± position ± speed ± action ± (depending on action: ± type ± value ± weapon ± pray ± location ± position ± speed ± hit ± consequents )
* Suicide:
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± shoot ± rocket_launcher ± 4721A7D0A5450374784B7285888444B4 (guid) ± "coordinate" ± ground ± "units/second" ± ground ± suicide
* Chat:
03/04/2005 - 19:38:35 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± say ± team ± "HELP, PEOPLE ARE KILLING EACH OTHER HERE"
* Item
03/04/2005 - 19:38:45 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± item ± red_armour ± 150 (life)
* Kill
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± units/second ± shoot ± rocket_launcher ± 1345B68VHW545037474677N858457904 (guid) ± "coordinate" ± air ± "units/second" ± torso ± kill
* Shoot, miss
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± units/second ± shoot ± rocket_launcher ± air ± miss
* Shoot, but not kill
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± shoot ± rocket_launcher ± 1345B68VHW545037474677N858457904 (guid) ± "coordinate" ± air ± "units/second" ± torso ± -50_life
Note
How the log look isn't as important, but it must be easy to distinguse the different sections from each other.
I was actually planning to do the same thing, but with exams coming up I do not think I have enough spare time.
However I will help if I can and I might even write a log file parser/analyser for the new logs
My suggestions
Basically I would like the log to look more or less like the old quake 3 log (especially the osp), with some improvements:
* As with osp put a timestamp in front of every sentence
* Use guid instead of player name to keep track of who does what.
* Make a reference from guid to the player name and if player name change.
* Every shot that are made and with what type of gun, if it hit a player/bot where it hit

* Where in the game a player was killed
* IP
* Ping
* Chatting

* Kills

* Picking up items, weapons, flags, life, etc..
* Points made

* Voting
* Kicking, banning
* Speed

*In the or on the ground.

Log format
* Use easy and simple key words so it is easier to track and understand what is happening:
* Use "one words"
- dark_matter_gun or DARK_MATTER_GUN instead of » Dark Matter Gun
- not_used or NOT_USED instead of not used
* Use a separator such as ¦,¡,±,½,»,;, or other almost never used chars
example
time ± player_id ± location ± position ± speed ± action ± (depending on action: ± type ± value ± weapon ± pray ± location ± position ± speed ± hit ± consequents )
* Suicide:
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± shoot ± rocket_launcher ± 4721A7D0A5450374784B7285888444B4 (guid) ± "coordinate" ± ground ± "units/second" ± ground ± suicide
* Chat:
03/04/2005 - 19:38:35 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± say ± team ± "HELP, PEOPLE ARE KILLING EACH OTHER HERE"
* Item
03/04/2005 - 19:38:45 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± item ± red_armour ± 150 (life)
* Kill
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± units/second ± shoot ± rocket_launcher ± 1345B68VHW545037474677N858457904 (guid) ± "coordinate" ± air ± "units/second" ± torso ± kill
* Shoot, miss
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± units/second ± shoot ± rocket_launcher ± air ± miss
* Shoot, but not kill
03/04/2005 - 19:38:25 ± 4721A7D0A5450374784B7285888444B4 (guid) ± ground ± "coordinate" ± "units/second" ± shoot ± rocket_launcher ± 1345B68VHW545037474677N858457904 (guid) ± "coordinate" ± air ± "units/second" ± torso ± -50_life
Note
How the log look isn't as important, but it must be easy to distinguse the different sections from each other.
-
- Posts: 13
- Joined: Mon Feb 09, 2004 8:00 am