Monthly Target: $400 Donations: $25
 6% 

SuperLogs: TF2 2.0.26 (updated 2011-01-22)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
cmptrwz
Member
Join Date: Dec 2008
Plugin ID:
1542
Plugin Version:
2.0.26
Plugin Category:
Statistical
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Approver:
    Plugin Description:
    Advanced logging for TF2. Generates auxilary logging for use with log parsers such as HLstatsX and Psychostats
    Servers with this Plugin:
    737 
    Old 03-20-2010 , 19:41   SuperLogs: TF2 2.0.26 (updated 2011-01-22)
    Reply With Quote #1

    SuperLogs: TF2

    This is one of a series of plugins for many mods to enable more detailed logging, all in HL Log Standard.

    This plugin replaces the 1.x series by psychonic: http://forums.alliedmods.net/showthread.php?t=98684

    These plugins give the ability to track many things not normally logged by the game in log parsers such as HLstatsX:CE, Psychostats, and others.

    Events

    A collection of additional information events, split into three categories.
    The following normal player events are available:
    • air2airshot_pipebomb
    • air2airshot_rocket
    • air2airshot_sticky
    • airshot_arrow
    • airshot_flare
    • airshot_headshot
    • airshot_pipebomb
    • airshot_rocket
    • airshot_sticky
    • airshot_stun
    • buff_deployed
    • crit_kill
    • dalokohs
    • dalokohs_healself
    • dalokohs_healthboost
    • defended_medic
    • drowned
    • escort_score
    • first_blood
    • force_suicide
    • killed_by_horseman
    • mvp1
    • mvp2
    • mvp3
    • rocket_failjump
    • rocket_jump
    • rocket_jump_kill
    • rocket_jumper_kill
    • sandvich
    • sandvich_healself
    • steak
    • sticky_failjump
    • sticky_jump
    • sticky_jump_kill
    • sticky_jumper_kill
    • teleport
    • teleport_again
    • teleport_self
    • teleport_self_again
    • teleport_used
    • teleport_used_again

    The following Player/Player events are available:
    • airblast_player
    • backstab
    • deflected_arrow
    • deflected_baseball
    • deflected_flare
    • deflected_jarate
    • deflected_pipebomb
    • deflected_rocket
    • deflected_rocket_dh
    • headshot
    • jarate
    • madmilk
    • shield_blocked
    • steal_sandvich
    • stun

    The following special case player events are available:
    • healed - Amount healed in life for non-medics or medics who did not die before spawning (changed class, etc)
    • player_loadout - Similar to weapon stats, but provides information whenever a player changes their current loadout*
    • weaponstats - Individual weapon statistics* for accuracy, kills, deaths, etc (see below)

    Ex.
    Code:
    L 07/16/2009 - 21:28:21: "Xibalba<138><STEAM_0:0:23333692><Red>" triggered "crit_kill"
    L 07/16/2009 - 21:28:30: "neG:. peEtr<118><STEAM_0:0:5191121><Blue>" triggered "backstab" against "Agent Cthulhoo<146><STEAM_0:1:16842486><Red>"
    L 07/16/2009 - 21:28:30: "armistice<144><STEAM_0:0:18260028><Red>" triggered "healed" (heal "510")
    L 07/16/2009 - 21:35:46: "Narcoleptic Squirrel<149><STEAM_0:1:13876794><Red>" triggered "teleport"
    Weapon Stats*

    TF2 does not normally provide weapon statistics. When enabled the weaponstats action will fire dumping information about the weapons used during that life, as well as the weapon that killed the player (if tracked).

    This is not all that accurate without SDKHooks, and a number of things won't be tracked at all without SDKHooks.

    The following weapons are tracked for weaponstats:
    • ambassador
    • ball
    • blutsauger
    • deflect_arrow
    • deflect_flare
    • deflect_promode
    • deflect_rocket
    • flaregun
    • force_a_nature
    • minigun
    • natascha
    • pistol
    • pistol_scout
    • revolver
    • scattergun
    • shotgun_hwg
    • shotgun_primary
    • shotgun_pyro
    • shotgun_soldier
    • smg
    • sniperrifle
    • syringegun_medic
    • tf_projectile_arrow
    • tf_projectile_pipe
    • tf_projectile_pipe_remote
    • tf_projectile_pipe_remote_sr
    • tf_projectile_rocket
    • tf_projectile_rocket_dh

    Ex.
    Code:
    L 07/23/2009 - 20:11:36: "nNnl Gun's'n'Butter<55><STEAM_0:1:15976406><Blue>" triggered "weaponstats" (weapon "scattergun") (shots "9") (hits "6") (kills "2") (headshots "0") (tks "0") (damage "375") (deaths "0")
    L 07/23/2009 - 20:24:36: "breadpudding<66><STEAM_0:1:24867371><Red>" triggered "weaponstats" (weapon "sniperrifle") (shots "2") (hits "1") (kills "1") (headshots "1") (tks "0") (damage "188") (deaths "1")
    Logging "Fixes"
    • Builtobject is no longer logged when re-placing a building after moving
    • Mini sentry guns are now logged as obj_sentrygun_mini when building/destroying
    • Fire Arrow kills are logged as weapon tf_projectile_arrow_fire instead of tf_projectile_arrow
    • Medic taunt kill is logged properly
    • Class changes are no longer logged until player spawns as new class
    • Object destruction (sentry, etc.) is logged when switching teams/classes (includes sappers)
    • Logs a "Started Map:..." line for the first map of the server (would normally happen too early to be logged)

    Cvars (1 = on, 0 = off)
    • superlogs_actions - Enable logging of most player actions, such as "stun" (default on)
    • superlogs_teleports - Enable logging of teleports (default on)
    • superlogs_teleports_again - Enable logging of repeated teleporter use with _again (default on, requires superlogs_teleports)
    • superlogs_headshots - Enable logging of headshot player action (default off)
    • superlogs_backstabs - Enable logging of backstab player action (default on)
    • superlogs_sandvich - Enable logging of sandvich eating (default off)
    • superlogs_fire - Enable logging of fiery arrows as a separate weapon from regular arrows (default on)
    • superlogs_wstats - Enable logging of weapon stats (default on, only works when tf_weapon_criticals is 1)
    • superlogs_heals - Enable logging of healpoints upon death (default on)
    • superlogs_rolelogfix - Enable delay of logging class change until first spwan as new class (default on)
    • superlogs_objlogfix - Enable logging of owner object destruction on team/class change (default on)

    Changes

    2.0.6 - Fixed possible RTE with invalid client index in loadout timer callback

    2.0.5 - Stupid me, wasn't paying enough attention, mix and matched some HL log stuff with non-HL log stuff I was fighting with this week from work. player_loadout should now follow the standard when logging.

    Thanks
    Thanks to Psychonic for the original plugin, the people on IRC for any random questions I may have asked.

    Thanks to Tsunami for the building-checking code in TF2 Build Restrictions plugin. Also thanks Packhead, KingJ, HLDS.pl, and WMD Gaming for help testing and reporting feedback.

    Also see
    SuperLogs: L4D
    SuperLogs: Insurgency
    SuperLogs: NeoTokyo
    SuperLogs: Age of Chivalry
    SuperLogs: Fistful Of Frags
    SuperLogs: GoldenEye: Source
    SuperLogs: CSS
    SuperLogs: DODS
    SuperLogs: Generic
    SuperLogs: ZPS
    SuperLogs: HL2DM/SourceForts
    SuperLogs: CSpromod
    SuperLogs: PVKII


    Compiling Notes
    SuperLogs: TF2 requires loghelper to be in the scripting/include directory when compiling, and therefore, will not compile on the web compiler.

    * SDK Hooks here is required for damage to log in weapon stats, as well as for some loadout logging and more accurate events. Some weapons may not log properly without SDK Hooks, if at all.

    The attached binary is compiled with SDKHooks support for 1.3
    Source: http://code.google.com/p/hlstatsxcom...gs%2Fscripting
    Binary : http://nicholashastings.com/temp/superlogs-tf2.smx

    Last edited by psychonic; 03-12-2012 at 19:31. Reason: fixed source link
    cmptrwz is offline
    SuperShadow
    SourceMod Donor
    Join Date: Jun 2008
    Location: Westminster, MD
    Old 03-22-2010 , 20:09   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #2

    cmptrwz, thanks for extending the work that psychonic has done. Looking forward towards the next version of hlstatsx:ce to show the aditions.
    SuperShadow is offline
    Onedda
    Senior Member
    Join Date: May 2009
    Old 03-24-2010 , 02:56   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #3

    is this anythin to worry about ?

    L 03/23/2010 - 21:53:15: Info (map "ctf_turbine") (file "errors_20100323.log")
    L 03/23/2010 - 21:53:15: [SM] Native "GetPlayerWeaponSlot" reported: Entity index 0 is not a valid client
    L 03/23/2010 - 21:53:15: [SM] Displaying call stack trace for plugin "superlogs-tf2.smx":
    L 03/23/2010 - 21:53:15: [SM] [0] Line 983, superlogs-tf2.sp::CheckPlayerLoadout()
    L 03/23/2010 - 22:08:17: Error log file session closed.

    linux server
    SM 1.3.1
    MM 1.8

    cheers
    Onedda
    __________________
    Onedda is offline
    willy1234x1
    Senior Member
    Join Date: Jun 2008
    Old 03-25-2010 , 03:46   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #4

    Is there a way to log the number of pellets that hit? Since the shotguns have pellets I'd like to parse these stats to figure out how often people are getting meatshots.
    willy1234x1 is offline
    cmptrwz
    Member
    Join Date: Dec 2008
    Old 03-25-2010 , 09:20   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #5

    Quote:
    Originally Posted by Onedda View Post
    is this anythin to worry about ?

    L 03/23/2010 - 21:53:15: Info (map "ctf_turbine") (file "errors_20100323.log")
    L 03/23/2010 - 21:53:15: [SM] Native "GetPlayerWeaponSlot" reported: Entity index 0 is not a valid client
    L 03/23/2010 - 21:53:15: [SM] Displaying call stack trace for plugin "superlogs-tf2.smx":
    L 03/23/2010 - 21:53:15: [SM] [0] Line 983, superlogs-tf2.sp::CheckPlayerLoadout()
    L 03/23/2010 - 22:08:17: Error log file session closed.

    linux server
    SM 1.3.1
    MM 1.8

    cheers
    Onedda
    Don't worry about it, but I will have it stop doing that in the next release.

    Quote:
    Originally Posted by willy1234x1 View Post
    Is there a way to log the number of pellets that hit? Since the shotguns have pellets I'd like to parse these stats to figure out how often people are getting meatshots.
    Not really. I think even the minigun fires 4 "bullets" per "shot". The game only fires one event that has all bullets in it, as far as I know. But I can see if I can find a way to check that (although it will likely only work with sdkhooks, if I even attempt to put it in the non-sdkhooks code).
    cmptrwz is offline
    Onedda
    Senior Member
    Join Date: May 2009
    Old 03-26-2010 , 02:35   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #6

    thank you cmptrwz
    __________________
    Onedda is offline
    naris
    SourceMod Donor
    Join Date: Dec 2006
    Old 03-31-2010 , 00:54   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #7

    You need to check that the clientid is valid in CheckPlayerLoadout() to prevent spamming this:
    Code:
    L 03/31/2010 - 03:53:29: [SM] Native "GetPlayerWeaponSlot" reported: Entity index 0 is not a valid client
    L 03/31/2010 - 03:53:29: [SM] Displaying call stack trace for plugin "superlogs-tf2.smx":
    L 03/31/2010 - 03:53:29: [SM]   [0]  Line 983, superlogs-tf2.sp::CheckPlayerLoadout()
    naris is offline
    cmptrwz
    Member
    Join Date: Dec 2008
    Old 03-31-2010 , 01:22   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #8

    Quote:
    Originally Posted by naris View Post
    You need to check that the clientid is valid in CheckPlayerLoadout() to prevent spamming this:
    Code:
    L 03/31/2010 - 03:53:29: [SM] Native "GetPlayerWeaponSlot" reported: Entity index 0 is not a valid client
    L 03/31/2010 - 03:53:29: [SM] Displaying call stack trace for plugin "superlogs-tf2.smx":
    L 03/31/2010 - 03:53:29: [SM]   [0]  Line 983, superlogs-tf2.sp::CheckPlayerLoadout()
    I am aware of that. I have fixed that locally, but need to test some other changes before posting the new version. See a couple posts up where I already said it would stop in the next release.
    cmptrwz is offline
    fail
    Junior Member
    Join Date: Feb 2009
    Old 04-21-2010 , 14:31   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #9

    I posted this here http://forums.alliedmods.net/showthr...t=98684&page=9

    Quote:
    Originally Posted by fail View Post
    any chance of making weaponstats work when tf_weapon_criticals is 0?
    Quote:
    Originally Posted by psychonic View Post
    1) This is the correct thread for SuperLogs TF2 now http://forums.alliedmods.net/showthread.php?p=1123825
    2) No, not unless you'd like to find another function that gets called on every shot from every weapon and would like to write an extension to detour it.
    I looked at the code, and it looked like it was just checking to see if cvar tf_weapon_criticals is set to true, or 1. I just changed line 233 from

    cvar_crits = FindConVar("tf_weapon_criticals");
    to
    cvar_crits = FindConVar("tf_damage_disablespread");

    and it is dumping the weaponstats (logging damage )

    Hope this helps someone else... maybe change it to some obscure cvar thats always true? Or just remove it?
    fail is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 04-21-2010 , 14:42   Re: SuperLogs: TF2 2.0.5 (updated 2010-3-20)
    Reply With Quote #10

    Quote:
    Originally Posted by fail View Post
    I posted this here http://forums.alliedmods.net/showthr...t=98684&page=9



    I looked at the code, and it looked like it was just checking to see if cvar tf_weapon_criticals is set to true, or 1. I just changed line 233 from

    cvar_crits = FindConVar("tf_weapon_criticals");
    to
    cvar_crits = FindConVar("tf_damage_disablespread");

    and it is dumping the weaponstats (logging damage )

    Hope this helps someone else... maybe change it to some obscure cvar thats always true? Or just remove it?
    Thank you for assuming that I don't know what I'm talking about.

    The weaponstats are disabled for a reason when tf_weapon_criticals is disabled. This is because the TF2_CalcIsAttackCritical forward will never be called (because crits are disabled) and thus, no shots will be tracked. That alone isn't a huge issue except that hits will continue to be tracked. If you aggregate data, you will get things like 0 shots, 4,348 hits with (however-you-handle-dividing-by-zero accuracy).
    psychonic is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 19:06.


    Powered by vBulletin®
    Copyright ©2000 - 2015, vBulletin Solutions, Inc.
    Theme made by Freecode