Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Analyzing COD2/COD4 logfiles; Documentation out there?

  1. #1
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    76
    Thanks
    38
    Thanked 28 Times in 23 Posts

    Analyzing COD2/COD4 logfiles; Documentation out there?

    I'm trying to analyze logfiles produced by our COD2 and COD4 servers and I was wondering if there is any documentation out there that tells me how to interpret the logs.
    I know the game engine/server is based upon the quake 3 engine (sort of) but I can't seem to find any documentation regarding the logfiles it produces.
    For example;



    Thanks!
    Slow and Steady wins the race

  2. #2
    Corporal voron00's Avatar
    Join Date
    Nov 2014
    Posts
    248
    Thanks
    64
    Thanked 216 Times in 116 Posts
    There is proably no documentation about that but il' try to explain (for CoD2):

    K - kill
    PHP Code:
    timestring;K;victim_guid;victim_slot;victim_team;victim_name;attacker_guid;attacker_slot;attacker_team;attacker_name;attacker_weapon;damage;damage_type;damage_location 
    D - damage
    PHP Code:
    timestring;D;victim_guid;victim_slot;victim_team;victim_name;attacker_guid;attacker_slot;attacker_team;attacker_name;attacker_weapon;damage;damage_type;damage_location 
    Last edited by voron00; 24th September 2015 at 02:25.

  3. The Following 3 Users Say Thank You to voron00 For This Useful Post:

    CaptainSlow (24th September 2015),kung foo man (24th September 2015),Ni3ls (24th September 2015)

  4. #3
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by CaptainSlow View Post
    I'm trying to analyze logfiles produced by our COD2 and COD4 servers and I was wondering if there is any documentation out there that tells me how to interpret the logs.
    I know the game engine/server is based upon the quake 3 engine (sort of) but I can't seem to find any documentation regarding the logfiles it produces.
    For example;



    Thanks!
    I can't improve on voron00's post as regards the log string, but just for future reference:

    1. starting in 2003, COD1 used a HEAVILY MODIFIED Quake 3 engine (the engine was given to them by Activision, and it is the exact same engine-base as used in Return to Castle Wolfenstein - which was already a heavily modified Q3 engine before it got to Infinity Ward). So, you can't expect to find exact matches to the COD1 engine functions anywhere else other than IW themselves. As such, the logging function in COD1/UO is unique - you cannot find Quake 3 documentation on it because Quake 3 did not have this function.

    2. Starting in 2005 with COD2, Infinity Ward wrote their own engine. COD2 has bits of old Quake 3 legacy code in it, but a good 80% of it is brand new - the graphics engine in particular is built from the ground up. As is the AI engine, the animation engine (IW created their own Motion Capture system for use in COD2), and the effects engine.

    3. When you get to COD4, even less Quake 3 can be found in it.

    So, in future, don't expect to find anything in Quake 3 documentation for the COD2/COD4 engine. It hasn't been Quake 3 engine since 2005.
    Last edited by Tally; 24th September 2015 at 09:07.

  5. The Following 2 Users Say Thank You to Tally For This Useful Post:

    CaptainSlow (24th September 2015),kung foo man (24th September 2015)

  6. #4
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Why not look at the code that actually produces said logs?

    Onconnect:
    PHP Code:
    logPrint("J;" lpselfguid ";" lpselfnum ";" self.name "\n"); 
    Ondisconnect:
    PHP Code:
    logPrint("Q;" lpselfguid ";" lpselfnum ";" self.name "\n"); 
    Ondamage:
    PHP Code:
    logPrint("D;" lpselfGuid ";" lpselfnum ";" lpselfteam ";" lpselfname ";" lpattackGuid ";" lpattacknum ";" lpattackerteam ";" lpattackname ";" sWeapon ";" iDamage ";" sMeansOfDeath ";" sHitLoc "\n"); 
    Onkill:
    PHP Code:
    logPrint("K;" lpselfguid ";" lpselfnum ";" lpselfteam ";" lpselfname ";" lpattackguid ";" lpattacknum ";" lpattackerteam ";" lpattackname ";" sWeapon ";" iDamage ";" sMeansOfDeath ";" sHitLoc "\n"); 
    (note: in both ondamage/onkill self is the victim
    deathmatch onwingame:
    PHP Code:
    logPrint("W;;" guid ";" name "\n"); 
    team deathmatch onwin/onlosegame
    PHP Code:
            logPrint("W;" winningteam winners "\n");
            
    logPrint("L;" losingteam losers "\n"); 
    in which the losers/winners are formatted as following:
    PHP Code:
                if((isDefined(player.pers["team"])) && (player.pers["team"] == winningteam))
                        
    winners = (winners ";" lpGuid ";" player.name);
                else if((
    isDefined(player.pers["team"])) && (player.pers["team"] == losingteam))
                        
    losers = (losers ";" lpGuid ";" player.name); 
    sd onbombplanted:
    PHP Code:
    logPrint("A;" lpselfguid ";" lpselfnum ";" other.pers["team"] + ";" other.name ";" "bomb_plant" "\n"); 
    sd onbombdefused:
    PHP Code:
    logPrint("A;" lpselfguid ";" lpselfnum ";" other.pers["team"] + ";" other.name ";" "bomb_defuse" "\n"); 
    I dont see anything in the source code for ctf or hq related gametypes so it might be impossible to catch those events by just looking at the logs
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  7. The Following 3 Users Say Thank You to IzNoGoD For This Useful Post:

    CaptainSlow (24th September 2015),kung foo man (24th September 2015),Ni3ls (24th September 2015)

  8. #5
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    You can also just look how B3 does it, also I made a small B3 tutorial some time ago: http://killtube.org/showthread.php?1...Command-Adding!
    timescale 0.01

  9. The Following User Says Thank You to kung foo man For This Useful Post:

    CaptainSlow (24th September 2015)

  10. #6
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    76
    Thanks
    38
    Thanked 28 Times in 23 Posts
    Many many thanks for all the replies! It's good to see that the COD2/4 community is still alive.
    I have enough information for now, many thanks!
    Slow and Steady wins the race

  11. #7
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    76
    Thanks
    38
    Thanked 28 Times in 23 Posts
    I'm currently trying to analyze why Statsgen2 reports that 2 players have been teamkilling each other with a sniper rifle, which should be impossible since FF is off on our COD4 servers.

    The gametype was sabotage (on COD4) and in in the serverlog, I find the following lines:

    Code:
     39:51 K;0000000046b1d170fcea01807b71cdda;7;;Nad3r77;0000000046b1d170fcea01807b71cdda;6;;MrTALAL-77;m40a3_mp;147;MOD_HEAD_SHOT;head
     40:37 K;0000000046b1d170fcea01807b71cdda;6;;MrTALAL-77;0000000046b1d170fcea01807b71cdda;7;;Nad3r77;m40a3_mp;107;MOD_RIFLE_BULLET;torso_lower
    According to the posts above by IzNoGod and voron00 (tnx), the teams of both players are blank. Is that why Statsgen reports it as a teamkill?

    Here's another interesting one:
    Code:
     90:17 D;00000000f36948fa19f10f4e4042b1e7;6;allies;DAVESSON;0000000026d3972828f323e89cb9e561;7;axis;belzebass;concussion_grenade_mp;1;MOD_GRENADE_SPLASH;none
     90:18 K;00000000f36948fa19f10f4e4042b1e7;6;;DAVESSON;0000000026d3972828f323e89cb9e561;7;;belzebass;deserteagle_mp;44;MOD_HEAD_SHOT;head
    In the first line the team is logged, second line and the team is empty again... Why and how is this possible?
    Slow and Steady wins the race

  12. #8
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    There are some "bugs" in the system, e.g. you can through a grenade and switch fast to spectator. CoD won't save the old player team in the grenade entity, but will use the newest state, which is then "spectator" (empty string) I guess.

    That would at least explain the MOD_GRENADE_SPLASH (just try it out to confirm), I don't know about the sniper kills, maybe some openscriptmenu bug/"hack", which spawns a player without select a team first (often seen in CoD2 at least).
    timescale 0.01

  13. The Following User Says Thank You to kung foo man For This Useful Post:

    CaptainSlow (4th October 2015)

  14. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by CaptainSlow View Post
    I'm currently trying to analyze why Statsgen2 reports that 2 players have been teamkilling each other with a sniper rifle, which should be impossible since FF is off on our COD4 servers.

    The gametype was sabotage (on COD4) and in in the serverlog, I find the following lines:

    Code:
     39:51 K;0000000046b1d170fcea01807b71cdda;7;;Nad3r77;0000000046b1d170fcea01807b71cdda;6;;MrTALAL-77;m40a3_mp;147;MOD_HEAD_SHOT;head
     40:37 K;0000000046b1d170fcea01807b71cdda;6;;MrTALAL-77;0000000046b1d170fcea01807b71cdda;7;;Nad3r77;m40a3_mp;107;MOD_RIFLE_BULLET;torso_lower
    According to the posts above by IzNoGod and voron00 (tnx), the teams of both players are blank. Is that why Statsgen reports it as a teamkill?

    Here's another interesting one:
    Code:
     90:17 D;00000000f36948fa19f10f4e4042b1e7;6;allies;DAVESSON;0000000026d3972828f323e89cb9e561;7;axis;belzebass;concussion_grenade_mp;1;MOD_GRENADE_SPLASH;none
     90:18 K;00000000f36948fa19f10f4e4042b1e7;6;;DAVESSON;0000000026d3972828f323e89cb9e561;7;;belzebass;deserteagle_mp;44;MOD_HEAD_SHOT;head
    In the first line the team is logged, second line and the team is empty again... Why and how is this possible?

    Looks like some players have switched teams. The logprint() will record it as a death (player suicide passes through the callback_playerKilled method), but no team will show because there is no logging method to store previous team vs new team.

  15. The Following User Says Thank You to Tally For This Useful Post:

    CaptainSlow (4th October 2015)

  16. #10
    Private CaptainSlow's Avatar
    Join Date
    Nov 2014
    Posts
    76
    Thanks
    38
    Thanked 28 Times in 23 Posts
    Thanks guys. Well, nothing I can do about it. Too bad it messes up the stats (not that anyone looks at them besides me).
    Slow and Steady wins the race

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •