Raised This Month: $51 Target: $400
 12% 

Insurgency 2014 Log Parser


Post New Thread Reply   
 
Thread Tools Display Modes
Author
jballou
Member
Join Date: Jul 2013
Plugin ID:
4455
Plugin Version:
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 12-17-2014 , 13:50   Insurgency 2014 Log Parser
    Reply With Quote #1

    I have been hacking and updating Brutus' code since July, he appears to be off the grid so I have forked this myself. I have expanded it quite a bit, including just about every event that I think is worth logging, and has just been neatened up as much as I can. I'd really appreciate some more seasoned SM coders to comb through it and check my work before approval, I'm still pretty new at this and I'm looking to see what else we can tighten up here.

    Other than the basic "it logs Insurgency" stuff from the original, new features/improvements are:
    • Removal of the static config file for weapon names, the plugin now adds any existent weapons at load, and if it finds a weapon not in the list it adds it to the trie and adjusts counters. I haven't seen any issues from this, and it just makes way more sense to me rather than having to keep the config up to date (and then being on the hook for translation)
    • Added the following events:
    • ControlPointCaptured (Fixed code to only give credit to the players who capture it)
    • ControlPointEndTouch, ControlPointNeutralized, ControlPointStartTouch,
    • GameEnd, GameNewMap, GameStart,
    • GrenadeDetonate, GrenadeThrown, MissileDetonate, MissileLaunched,
    • ObjectDestroyed (gives credit to destroyer and assister)
    • PlayerAvengedTeammate
    • PlayerHurt (Major refactor of weapon tracking, the original would give credit for whatever weapon the attacker last fired. So if you throw a grenade and fire the knife, you can get credited for a knife kill. The new system records the last weapon which caused damage and credits properly)
    • PlayerPickSquad (Role and team logging support)
    • PlayerSuppressed (new PlayerPlayer action)
    • RoundBegin, RoundEnd, RoundLevelAdvanced (Survival levels)RoundStart

    CVAR/Command list
    Just sm_inslogger_enabled that turns it on or off and sm_inslogger_version for tracking

    Changelog
    Coming soon

    Dependencies
    Loghelper and Wstats include files to compile

    Plans
    Finish all events, bugfixes. Integrate further with my Insurgency HLStatsX fork to add as much logging ability as possible.
    Attached Files
    File Type: inc wstatshelper.inc (8.1 KB, 308 views)
    File Type: inc loghelper.inc (8.9 KB, 295 views)
    File Type: smx ins_logger.smx (26.7 KB, 277 views)
    File Type: sp Get Plugin or Get Source (ins_logger.sp - 301 views - 29.4 KB)

    Last edited by jballou; 01-13-2015 at 11:48.
    jballou is offline
    Icettiflow
    Senior Member
    Join Date: Jan 2009
    Old 12-21-2014 , 14:01   Re: Insurgency 2014 Log Parser
    Reply With Quote #2

    Gonna check this out now, if I can compile it since the web compiler doesn't work. You might want to upload the smx file.

    Thanks.

    Last edited by Icettiflow; 12-21-2014 at 14:02.
    Icettiflow is offline
    jballou
    Member
    Join Date: Jul 2013
    Old 12-23-2014 , 22:08   Re: Insurgency 2014 Log Parser
    Reply With Quote #3

    Uploaded includes and the compiled plugin. Thanks for the heads up!
    jballou is offline
    Icettiflow
    Senior Member
    Join Date: Jan 2009
    Old 01-05-2015 , 00:13   Re: Insurgency 2014 Log Parser
    Reply With Quote #4

    Sorry for the late reply, but so far so good. Everything seems to be parsing as expected.
    Icettiflow is offline
    Icettiflow
    Senior Member
    Join Date: Jan 2009
    Old 01-09-2015 , 00:57   Re: Insurgency 2014 Log Parser
    Reply With Quote #5

    L 01/08/2015 - 21:56:14: [SM] Native "GetClientAuthString" reported: Client index 0 is invalid
    L 01/08/2015 - 21:56:14: [SM] Displaying call stack trace for plugin "ins_logger.smx":
    L 01/08/2015 - 21:56:14: [SM] [0] Line 180, ins_logger.sp::Event_ControlPointCaptured()

    And now that I've had a time to watch it's hit or miss as to the weapon names. I've got some in here as the default like M249<37>, M16a4<21>, etc.

    Last edited by Icettiflow; 01-09-2015 at 01:19.
    Icettiflow is offline
    jballou
    Member
    Join Date: Jul 2013
    Old 01-12-2015 , 16:29   Re: Insurgency 2014 Log Parser
    Reply With Quote #6

    Yup, I'm having some trouble with the attacker parsing in the ObjectDestroyed handler. Any chance you know Pawn and can take a look and see if anything looks wrong? I had originally had a bug where I was using the index of the byte from the array of people to give credit to instead of their actual user/client IDs, but I'm still having trouble. As to the weapon names, the way it collects them is that an array is checked for the value. If the weapon name is in there, it returns the index, otherwise it adds that name to the array and returns the index of the new entry. I did this because myself and a lot of other people make modified theaters, so supporting all the weapons via a static config file caused a lot of problems. I believe that this method works without issue; I have not had any players or events credited to the incorrect weapon, and the weapon stats have all been working. If you see a specific error related to it, I'll look into it.

    I have edited the first post to replace the plugin and source with the current version I am testing. It has a debug message in the ObjectDestroyed function to dump information for me to check. I keep the Github version up to date, at https://github.com/jaredballou/insurgency-sourcemod - this mod has a way to go until it's ready to be ready for approval, so for the time being that will always be the best place to grab the latest version. Thanks for the feedback, I appreciate it.

    Last edited by jballou; 01-12-2015 at 16:36.
    jballou is offline
    jballou
    Member
    Join Date: Jul 2013
    Old 01-13-2015 , 11:50   Re: Insurgency 2014 Log Parser
    Reply With Quote #7

    I'm not sure if the event parameter changed or I just goofed it up, but I was expecting to get a user ID from the object_destroyed event, but now it's the client index? So I switched the logic around and it seems to be OK. Github and first post updated.
    I am noticing that on custom maps at least blowing up a cache actually calls it for two entities. Not sure if that's normal, but I'm looking into it.
    jballou is offline
    Reply



    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:45.


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