Raised This Month: $32 Target: $400
 8% 

[DoD:S] Stats with awards, captures, headshots & more (1.9.3)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Plugin ID:
3147
Plugin Version:
1.9.3
Plugin Category:
Statistical
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
    8 
    Plugin Description:
    A stats plugin (SQLite/MySQL) with many features, full point customization and GunGame/DeathMatch support
    Old 08-11-2012 , 04:42   [DoD:S] Stats with awards, captures, headshots & more (1.9.3)
    Reply With Quote #1

    Hello comrades!
    This time I learned to stats, databases and stuff like that.

    So, I created a DoD:S Stats plugin

    This plugin is using award system written by Misery's stats plugin

    Original message:
    Quote:
    A plugin young of statistics with as novelty a system of awards on the players. The principle is simple, the players who play many are rewarded by an awards of the army.
    How work the awards ? And indeed, it is also simple. The player who kills a lot and who takes flags, has of maids luck(chance) to rise quickly, but the players who are not PGM is also rewarded if they take many of flags. This plugin is a good means of know the players who pull, because it rewards as well the average players as the big players.
    Warning, by speaking about big players. There is a condition to be among the first ones of the classification. So well obviously it is necessary to kill a lot, it is also necessary to have a minimum of flag (that is 1 flag for 3 kills) to cross(spend) an award, here is the board below.
    ConVars:
    dodstats_announce "1" = Whether or not print player's information when connected ( points and grade )
    dodstats_hidechat "0" = Whether or not hide chat triggers ( rank/stats/session/notify/top/topgrades/topgg )
    dodstats_purge "0" = Number of days to delete inactive players from the database. Set to 0 to disable purge
    dodstats_bonusround "1" = Whether or not enable stats during bonusround
    dodstats_minplayers "4" = Minimum players required to record stats. Set to 0 to disable this feature

    dodstats_start_points "1000" = Sets the starting points for a new player
    dodstats_points_min "2" = Sets the minimum points to take on kill. Set 0 to disable kill points at all
    dodstats_multipler_melee "2" = Sets the multipler for killing by melee weapons (such as knife, spade and punch)
    dodstats_points_teamkill "8" = Amount of points to take on team kill (TNT kills will be ignored)
    dodstats_points_suicide "5" = Amount of points to take on suicide
    dodstats_points_capture "2" = Amount of points to give for capturing area
    dodstats_points_block "2" = Amount of points to give for blocking capture
    dodstats_points_explode "3" = Amount of points to give for exploding an objective
    dodstats_points_plant "2" = Amount of points to give for planting a TNT
    dodstats_points_defuse "2" = Amount of points to give for defusing a TNT
    dodstats_points_headshot "1" = Amount of points to add for a headshot kill
    dodstats_points_victory "1" = Amount of points to give to all members of team which has won the round

    dodstats_gg_levelsteal "5" = Amount of points to give for stealing a level (Requires GG 4.2 and newer)
    dodstats_gg_leveldown "5" = Amount of points to take on level lost (Requires GG 4.2 and newer)
    dodstats_gg_victorypoints "10" = Amount of points to give to a GunGame winner (Requires GG 4.2 and newer)

    Set to 0 to disable scoring for _action (but kills/deaths/captures etc still will be tracked)

    Admin commands:
    sm_resetstats = Reset all stats
    sm_resetplayer "STEAM_ID" = Delete a player from the database

    Client commands:
    rank = Show rank in chat (position, points, points to next rank, kills, deaths)
    stats = Display stats (grade, points, headshots, time played, objects captured/blocked, bombs planted/defused, kills, deaths KDR, TKs etc...)
    session = Display session (points earned, kills, deaths, headshots, KDR)
    top = Display top ten players, their points and KDR (sorted by points)
    topgrades = Display top ten players, their awards & kills (sorted by kills)
    topgg = Display top ten GunGame players, their rounds won and levels stolen (sorted by rounds won)
    notify = Toggle stats notifications

    Database settings:
    You can use both database types (SQLite or MySQL). By default is SQLite. If you will not setup database config, all stats will be saved in sourcemod/data/sourcemod-local.sq3
    Take a look at sourcemod/configs/example_database.cfg if you want to use separate db for stats.

    Notes:
    -Plugin requires More Colors and Updater for compilation
    -This plugin is fully supporting GunGame and DeathMatch, so you dont need to setup anything, plugin will do it automatically!
    -In DeathMatch or GunGame award system is calculating by kills only.
    -Stats is not immediately updating after every kill for obvious reasons, so dont afraid if top10 tables wont update
    -Plugin is multilinguage!

    Servers with this plugin

    Download plugin
    Browse source code
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 01-21-2014 at 11:31.
    Root_ is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 08-11-2012 , 04:43   Re: [DoD:S] Stats with awards, captures, headshots & more
    Reply With Quote #2

    Screenshots:
    Top grades

    Top10 players by points

    Stats

    Session stats

    Rank stats

    Notify

    Notify toggle

    Notify examples (with team-colored messages)

    Name colored depends on victim's team
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 04-21-2013 at 14:19. Reason: Updated 1.7 screenshots
    Root_ is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 08-11-2012 , 06:05   Re: [DoD:S] Stats with awards, captures, headshots & more
    Reply With Quote #3

    Changelog
    Code:
    0.9
    -Added session
    -Fixed some bugs (my bad)
    -Improved code
    -Updated translations
    
    0.91
    -Added ELO-ranking 
    -Removed old cvars (sm_dodstats_points_death, sm_dodstats_points_kill, melee points etc)
    -Added point limits
    -Awards: reduced minimum flag ratio (now ~1/5)
    -Fixed 'unrecognized token' in database
    -Minor changes
    
    0.92
    -Imprived ELO rating
    -Added cvar 'sm_dodstats_start_points' = Sets the starting points for a new player
    -Once again and finally fixed 'unrecognized token' error (appears when clients joined with nickname, contained ' or cyrillic symbols)
    -Removed geoip extension
    -Updated translations
    -Improved events and tracking
    -Minor changes
    
    0.93
    -Much improved SQL database
    -Added MySQL support (not tested yet)
    -'sm_dodstats_purge' is server variable now (not tested yet)
    -Reduced divider for ELO calculating
    -Fixed some string arrays
    -Fixed 'notify' command when clients had cyrillic or other symbols in nickname
    -Fixed bug with 'sm_dodstats_start_points'
    -Make SQL safer via SQL_EscapeString
    
    0.94
    -Added cvar 'sm_dodstats_points_min'*, which set minimum points on kill (because sometimes you can got 0 points)
    For example, when you killed a noob
    -Added quotes for dbname (for MySQL)
    -Added 'silent' triggers. (/rank /top/ top10/ /session /statsme)
    -Slightly optimized plugin
    -Now for deleting player from database you should use STEAM_ID instead of nickname (safer & better)
    
    0.99
    -Added gungame & deathmatch support
    -Added cvar to enable/disable stats tracking on bonusround
    -Updated translations
    -Bugfix
    -Fixed small issue with gungame mode
    -Fixed deletion from database
    -Fixed bug when tracking was not working after bonusround.
    -Mod checking now performs at map start, not plugin start
    -Slightly improved some events (roundstart, roundend, hurt & death)
    -Increased array size for UTF8 query (because I really don't want to take any chances)
    
    1.0
    -Optimized plugin.
    -Added position & points showing on connect!
    -Renamed admin commands (just removed sm_ prefix)
    -Fixed some errors with admin commands
    -Fixed some issues with events
    -Updated translations
    -(gungame) Added gg_win event and cvar sm_dodstats_points_ggwin "#" - Number of points to give to GG winner (default 25)
    -(deathmatch) Fixed headshot logging
    
    Hotfix:
    -Removed tracking bots at all
    -Removed position announcement (i think that was pointless)
    -SQL_TQuery now used a bit more
    -Fixed missed phrase
    
    1.1
    Database:
    -Improved UTF8 encoding for MySQL
    -Awards: For DM & GG grades defined only by kills now, because in these mods you could not capture flags.*
    *In normal gameplay awards still defined by kills & captures.
    
    Menus:
    -Updated 'statsme' for gungame & deathmatch (captures, blocks, planted & defused bombs will not be shown)
    -(gungame) Added rounds played/rounds won tracking (will be shown in menu)
    -(gungame) Now if friendlyfire is off, Teamkills/Teamkill will not be shown.
    -Fixed bug when 'pstats <target>' command shows admin stats, not target 
    
    Other:
    -Fixed bug when headshots was not working in gungame & normal mode.
    -Fixed bug when 'Private' grade shows on player's connect, but client was >Private
    -Now if client already turn on notifications, welcome message will not be shown
    -Improved events. For example, if player reached max level in gungame - he will take points for killing & victory
    -Minor changes.
    
    1.2
    -Fixed some errors
    -Added 'level steal/lost' events for gungame
    -Added full translations support (except grades)
    -Returned nickname to 'statsme'
    -Statsme: some actions (like planted/defused) will be hidden until player will do this action (plant or defuse bomb)
    
    1.3
    -Fixed issue with gungame
    -Fixed minor bugs with some events
    -Improved performance
    -Changed buffer size for displaying objects
    -Added new grade - Marshal
    -Minor changes
    
    1.4
    -All cvars was renamed!*
    -Added new cvar: dodstats_points_levelsteal
    -Added more logs, especially for errors
    -Added support for older gungame versions
    -Removed prefix
    -Optimized plugin
    -Fixed encoding to UTF8 (MySQL)
    -Fixed purge error
    -Fixed issue when notify trigger wasnt hidden
    -Fixed issue when difference to next rank was always = 1
    -Fixed issue when target's stats was shown to all players on a server, but not admin
    -Fixed other small bugs
    -Improved logging on admin commands
    -Improved db tables creating
    -Improved MySQL database (now UTF-8 charset will be enabled as default)
    -Improved 'Levels stolen/Levels lost' tracking for GunGame
    -Improved menu displaying (top/top10)
    -Improved headshot detection
    -Updated translations
    -Other minor changes
    *Actually only 'sm_' prefix was removed, because convar names was too long
    
    1.5
    -Added german translations (thanks darkranger!)
    -Added french translations (thanks vintage!)
    -Added new cvar: dodstats_points_victory - Amount of points to give for members of team which won the round
    -Added more explanation in the logs
    -Cvar dodstats_points_levelsteal renamed to dodstats_points_lvlsteal
    -Removed !pstats command
    -Fixed a bug when headshots was count for a teamkill...
    -Improved purge
    -Improved headshot event
    -Improved performance for DeathMatch gameplay
    -Improved performance at saving player stats, especially for objectives
    -Reduced number of checks - optimization
    -Statsme:
     *Completely changed statsme panel (see screenshots)
     *Added rank (place) to a stats panel
     *Added headshot/kill ratio
     *Some other improvements
    -Other changes
     *Now stats will NOT be shown at game over event
     *Now teamkills will not be count if teammates died by TNT
     *Now player stats will not be saved at any event. Saving will be performed only when client disconnects and at game over event - optimization
     *And more...
    
    1.6
    FIXES:
    -Fixed major bugs with MySQL database (purge, global player count, buffer etc)
    -Fixed an issue when session stats was reset after mapchange
    -Fixed an issue when stats of all connected players was shown after mapchange, when it shouldn't
    -Fixed minor bug at death event
    
    INNOVATIONS:
    -Added more logs
    -Added topgrades triggers
    -Added new grade - Civil (first)
    -Returned !pstats command
    
    CHANGES:
    -Session command
     *Now session stats will NOT be reset after mapchange. It will return 0 only when client disconnects from the server
     *Added headshots till session tracking and H/K ratio for session stats
     *Returned timestamps
    -Headshot/kill ratio will be shown as percent now instead of ratio
    -Changed default point values for some actions
    
    OTHER CHANGES:
    -Greatly optimized plugin*
    -Improved database tracking
    -Improved headshot event
    -Updated translations
    -And much more...
    
    1.7
    -Added new cvar: 'dodstats_minplayers' - Minimum players required to record stats
    -Fixed small issue with purging MySQL database
    -Fixed small issues and bugs
    -Slightly optimized plugin
    -Updated translations
    -Other minor changes that I cant remember
    
    1.8
    -Returned GunGame stats and added convars: dodstats_points_levelup, dodstats_points_leveldown and dodstats_points_ggvictory
    -Added Updater support
    -Added morecolors support (since it supports DoD:S team colors)
    -Added accuracy stats
    -Added topgg/top10gg stats, which is showing best gungame leaders by gungame wins and stolen levels
    -Added more safe checks for database stuff
    -Added 'topkills' trigger as replacement for 'top' for grades
    
    -Improved point calculation formula (formula was taken and modified from SoD Player Stats)
    -Improved performance at plugin startup
    -Improved performance for grade definition
    -Improved single database queries (like get global player count and reset stats)
    -Improved timestamps within a database, possibly fixed error with 15635 days
    -Enabled chat notifications by default (requested by krispx)
    -Moved 'top' trigger for showing top ten players by skill
    -Renamed plugin config to from plugin.dodstats to dod_stats.cfg
    -Removed convar: dodstats_k_value
    -Ignored bots from stats at all
    -Fixed double event firing (for example capture/block events will not be called with bomb explosion or bomb defuse)
    -Fixed bug that vintage said
    -Fixed other minor bugs related to databases and stats displaying
    -Updated translations
    
    NOTE: To proper GunGame support you must use version 4.2 and above!
    
    1.9
    -Fixed critical issue when database tables could be corrupted by connected player!
    -Plugin is now using new ConVar handling style (for optimizations and better reading)
    -Removed 'sm_pstats' admin command
    -Disabled chat notifications by default
    -Used Trie to store chat triggers - optimizations
    -Renamed ConVars:
    dodstats_tk_penalty > dodstats_points_teamkill
    dodstats_points_levelup > dodstats_gg_levelsteal
    dodstats_points_leveldown > dodstats_gg_leveldown
    dodstats_points_ggvictory > dodstats_gg_victorypoints
    -Updated translations (thanks krispx for updated french translations!)
    -Other minor changes and optimizations
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot

    Last edited by Root_; 01-23-2013 at 04:44. Reason: Added 1.9 changelog
    Root_ is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 09-06-2012 , 16:16   Re: [DoD:S] Stats with awards, captures, headshots & more (updated)
    Reply With Quote #4

    I've tested plugin at popular servers and tested performance. 'heavy' servers could crash at map start, because there was performed purge and not threaded global player count calculation.
    Attention! You should delete your old database if you want to use latest version of DoD:S Stats!
    I think I am done with stats, because its very well optimized and tested for long time. Now its stable and fast as never before. Have fun!
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 10-21-2012 , 11:33   Re: [DoD:S] Stats with awards, captures, headshots & more (version 1.7)
    Reply With Quote #5

    Updated plugin to version 1.7, see changelog

    I started a GitHub repository for all my plugins, include DoD:S Stats. For the latest news and updates you can go there
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    Jay Dogg
    Senior Member
    Join Date: Jan 2009
    Old 11-09-2012 , 14:53   Re: [DoD:S] Stats with awards, captures, headshots & more (1.7.3)
    Reply With Quote #6

    Hey Root_ I have a quick question about your Formula: "1 / (Pow (10 * (victim points - attacker points) / 100) + 1)" when I look up Pow on http://docs.sourcemod.net/api/ it is formatted like this and always take two values "Pow(Float:value, Float:exponent);" but I do not see the two values in your formula and can't see to get a valid answer to Scoring = K-Value * (1 - Formula result).

    Can you supply me with the correct Formula or if I'm doing something wrong explain it a little better and answer this:
    1 / (Pow (10 * (1855 - 1525) / 100) + 1)
    5 * (1 - Formula result)

    Thanks Jay
    Jay Dogg is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 11-13-2012 , 10:45   Re: [DoD:S] Stats with awards, captures, headshots & more (1.7.3)
    Reply With Quote #7

    Sorry for the late reply, Jay
    I've just taken the formula from ELO rating plugin. I will improve it in version 1.8, which is coming soon

    I want to say so this one is working fine. If you are in top10, you'll need to
    improve/increase your KPD, otherwise you will lost points fast. If you will be an active player (capturing/defusing/blocking etc) + do some headshots with same KPD, you will not lost points. So that's formula is pretty good atm. (with default config values)
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    CassePied
    New Member
    Join Date: Dec 2012
    Old 12-01-2012 , 07:41   Re: [DoD:S] Stats with awards, captures, headshots & more (1.7.3)
    Reply With Quote #8

    Hi,
    I've instal your plugin in my server (in OVH), but it don't save the stats. Can you explain to me how to instal your plugin ? Maybe I've forget one step.
    CassePied is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 01-13-2013 , 07:30   Re: [DoD:S] Stats with awards, captures, headshots & more (1.7.3)
    Reply With Quote #9

    Quote:
    Originally Posted by CassePied View Post
    Hi,
    I've instal your plugin in my server (in OVH), but it don't save the stats. Can you explain to me how to instal your plugin ? Maybe I've forget one step.
    Probably you have not enough players on a server (you was alone but dodstats_minplayers value was equal to 4) - It means stats will work only if there is at least 4 players on a server.

    A huge update is coming! I need to do more tests and create proper natives
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    vintage.59
    Junior Member
    Join Date: Jul 2008
    Location: France
    Old 01-13-2013 , 13:01   Re: [DoD:S] Stats with awards, captures, headshots & more (1.7.3)
    Reply With Quote #10

    Awesome plugin Root !
    Still some bugs that make the counts not corrects...

    At this moment by the plugin I was playing 15364 days on the server (that's too much ! lol)

    Thks for your job !

    Last edited by vintage.59; 01-13-2013 at 13:02.
    vintage.59 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 06:30.


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