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

[NMRiH] Simple NMRiH Stats (v.0.5 12/22/13)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
StevoTVR
Senior Member
Join Date: Oct 2008
Plugin ID:
3978
Plugin Version:
0.5
Plugin Category:
Statistical
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    57 
    Plugin Description:
    Basic point-based stats for No More Room in Hell
    Old 11-25-2013 , 19:21   [NMRiH] Simple NMRiH Stats (v.0.5 12/22/13)
    Reply With Quote #1

    Simple NMRiH Stats
    This is a basic point-based stats plugin for No More Room in Hell, with rank and top10 commands. Stat data is stored in a configurable database.

    Default Configuration:
    • Zombie kill: +1
    • Headshot bonus: +1
    • Death: -20
    • Team kill: -20
    • Extraction: +50

    Configuration
    The plugin uses the default local sqlite database by default. To change this, create a database configuration called nmrihstats with your connection details.

    Code:
    // This file was auto-generated by SourceMod (v1.6.0-dev+4172)
    // ConVars for plugin "nmrihstats.smx"
    
    
    // Points to award for getting killed
    // -
    // Default: "-20"
    sm_stats_deathpoints "-20"
    
    // Points to award for getting extracted
    // -
    // Default: "50"
    sm_stats_extractionpoints "50"
    
    // Bonus points to award for headshots on top of sm_stats_killpoints
    // -
    // Default: "1"
    sm_stats_headshot_bonus "1"
    
    // Points to award for a zombie kill
    // -
    // Default: "1"
    sm_stats_killpoints "1"
    
    // New players start with the average of all player scores (0 = players start at 0)
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    sm_stats_start_at_avg "1"
    
    // Points to award for killing a teammate
    // -
    // Default: "-20"
    sm_stats_tkpoints "-20"
    Commands
    • sm_rank - Displays your current rank
    • sm_top10 - Lists top 10 players
    • sm_stats_setpoints <points> <#userid|name> - Set a player's stat points
    • sm_stats_setpoints_id <points> <steamid> - Set a SteamID's stat points
    • sm_stats_reset [code] - Reset all stats. Use once to get code, use with code to confirm.
    Todo
    • More customizations
    • Tracking of more actions
    • Translations
    • Configurable point decay over time
    Changelog
    • 11/25/13 - v.0.1
      • Initial release
    • 11/27/13 - v.0.2
      • Added sm_stats_startpoints ConVar
      • Added stat notifications in players' chat area
      • Fixed race condition with database connection
      • Only updates names when needed
      • Only allows loading on NMRiH
    • 12/01/13 - v.0.3
      • Added detection of fire kills
      • Added headshot bonus
      • Added point award for getting extracted
      • Added team point award for completing an objective
      • Added chat triggers for rank and top10
    • 12/11/13 - v.0.4
      • Added commands to set players' point values manually
      • Added command to reset the stats database
      • Removed sm_stats_startpoints ConVar
        • New players now start at the average score of all players
      • Fixed server being able to call rank and top10 commands
      • Fixed plugin overriding database changes from other sources
    • 12/22/13 - v.0.5
      • Added sm_stats_start_at_avg ConVar to toggle players starting at the average or 0
      • Players cannot start with negative points
      • Fixed bug with sm_stats_setpoints targetting
      • Disabled reward for objectives due to game event unreliability
      • Adjusted default reward values (-20 for death, +50 for extraction)
    Attached Files
    File Type: sp Get Plugin or Get Source (nmrihstats.sp - 3763 views - 22.0 KB)

    Last edited by StevoTVR; 12-22-2013 at 17:28.
    StevoTVR is offline
    KrazyEpicTurtle
    New Member
    Join Date: Nov 2013
    Old 11-26-2013 , 04:58   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #2

    Working amazingly on my server ! No bugs or errors to report !
    KrazyEpicTurtle is offline
    Stings2pee
    Junior Member
    Join Date: Jun 2011
    Old 11-27-2013 , 01:03   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #3

    StevoTVR is a pretty brilliant. I contacted him a week ago requesting a stats plugin for NMRiH and 2 or 3 days later, he sent me the first copy for testing. He didn't even accept any payment for his work. This guy is a real class act. Much respect, Stevo!

    Anyways, about the plugin:

    I've been using this for the past few days and it's working perfectly!

    I've been thinking though... Since NMRiH is also about supporting your team and not necessarily all about killing as many zombies as possible, I think it would be a good idea to have points awarded for doing supportive tasks. Such as:

    - placing boards/planks on windows and doors
    - placing FEMA bags in a zone with low % (survival mode only)
    - sharing supplies (weapons, ammo, pills, bandages, med kits)
    - using a flare gun to call for supply drops (survival mode only)
    - completing objectives
    - getting to the extraction point successfully
    - placing medical boxes into the "ghost entity" (survival mode only)

    I don't know if SourceMod can track players sharing supplies (since it's basically drop trading) but I assume a simple solution would be tracking whenever an item is dropped from a player's inventory. So when <X> number of items are dropped (say 20), then award that player <Y> points.

    Obviously players can exploit supportive roles to boost their rank over players earning points by killing zombies... So to prevent this, perhaps make supportive points significantly harder to earn.

    Example:
    2 boards placed = 1 point
    20 items dropped = 3 points
    1 FEMA bag placed inside a zone = 5 points
    When a player uses a flare gun to call for a supply drop helicopter = 10 points
    Completing an objective = 5 points
    Extraction = 30 points
    Placing medical box = 5 points

    Last edited by Stings2pee; 11-27-2013 at 09:57.
    Stings2pee is offline
    Stings2pee
    Junior Member
    Join Date: Jun 2011
    Old 11-27-2013 , 01:15   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #4

    Quick question about the database:

    Will current player stats reset if I transfer an undated version of the plugin into the plugins folder?
    It would be nice if it didn't make users lose their progress.

    Last edited by Stings2pee; 11-27-2013 at 01:15.
    Stings2pee is offline
    StevoTVR
    Senior Member
    Join Date: Oct 2008
    Old 11-27-2013 , 16:58   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #5

    Quote:
    Originally Posted by Stings2pee View Post
    Quick question about the database:

    Will current player stats reset if I transfer an undated version of the plugin into the plugins folder?
    It would be nice if it didn't make users lose their progress.
    No, it should retain all the data.
    StevoTVR is offline
    StevoTVR
    Senior Member
    Join Date: Oct 2008
    Old 11-27-2013 , 23:59   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #6

    Updated to 0.2:
    • Added sm_stats_startpoints ConVar
    • Added stat notifications in players' chat area
    • Fixed race condition with database connection
    • Only updates names when needed
    • Only allows loading on NMRiH
    Quote:
    Originally Posted by Stings2pee View Post
    I've been thinking though... Since NMRiH is also about supporting your team and not necessarily all about killing as many zombies as possible, I think it would be a good idea to have points awarded for doing supportive tasks. Such as:

    - placing boards/planks on windows and doors
    - placing FEMA bags in a zone with low % (survival mode only)
    - sharing supplies (weapons, ammo, pills, bandages, med kits)
    - using a flare gun to call for supply drops (survival mode only)
    - completing objectives
    - getting to the extraction point successfully
    - placing medical boxes into the "ghost entity" (survival mode only)

    I don't know if SourceMod can track players sharing supplies (since it's basically drop trading) but I assume a simple solution would be tracking whenever an item is dropped from a player's inventory. So when <X> number of items are dropped (say 20), then award that player <Y> points.

    Obviously players can exploit supportive roles to boost their rank over players earning points by killing zombies... So to prevent this, perhaps make supportive points significantly harder to earn.

    Example:
    2 boards placed = 1 point
    20 items dropped = 3 points
    1 FEMA bag placed inside a zone = 5 points
    When a player uses a flare gun to call for a supply drop helicopter = 10 points
    Completing an objective = 5 points
    Extraction = 30 points
    Placing medical box = 5 points
    Good ideas. I'll have to see if any of that is possible...
    StevoTVR is offline
    StevoTVR
    Senior Member
    Join Date: Oct 2008
    Old 12-01-2013 , 15:03   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #7

    • 12/01/13 - v.0.3
      • Added detection of fire kills
      • Added headshot bonus
      • Added point award for getting extracted
      • Added team point award for completing an objective
      • Added chat triggers for rank and top10
    StevoTVR is offline
    ys24ys
    Junior Member
    Join Date: Nov 2013
    Old 12-03-2013 , 01:21   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #8

    Amazing plugin. Thanks for providing a good resource.
    I'm not good at English. So please note that English is awkward.
    I have a few of the features you want to offer more.

    Add Cvar :
    - sm_rankpointset <target> <point> : set point(Hack or bug for users who using.)
        (ex : sm_rankpointset player 0 = 0 point set.)
    - sm_rankpointadd <target> <point> : add point(Users with great ideas draft.)
    - sm_rankautokick(or ban) 0/1 : 0=off / 1=on
        (ex : -100point(team kill etc) users autokick or ban.)

    Add Function :
    - Shop : First, it can be divided into two groups.
    1.Rank shop feature points can be used.
        *ex : say '!shop(/shop)', Shop by pressing the ESC button can be used.
            (command type: give ~(fa_1911 / me_axe_fire / ~~))
    2.Top10 shop is available to provide a point.
        *ex : Rank1 is 10 Point add(1 item buy = 1 point reduction)
            Rank2 is 9 Point add
            ...
            Rank10 is 1 Point add
    - Name Tag : Top10 a name tag for them. say chat.
        *ex : [FirstClass]
            [Rank 1]
    - StartItem : Top10 weapons specified in the beginning to be built.

    What you think?

    Last edited by ys24ys; 12-03-2013 at 07:10.
    ys24ys is offline
    Stings2pee
    Junior Member
    Join Date: Jun 2011
    Old 12-03-2013 , 05:24   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #9

    @ys24ys

    I like these ideas except for spending the points to buy weapons. This really destroys the game. Might as well turn on sv_cheats and give everyone godmode while you're at it.
    Perhaps using points to purchase minor perks would be acceptable such as boosting a player's stamina or inventory space temporarily...

    If you want to ruin your server by allowing players to spawn their own weapons and ammo.... there's already a plugin available for NMRiH that has you covered! Check it out: https://forums.alliedmods.net/showthread.php?t=212705
    Stings2pee is offline
    ys24ys
    Junior Member
    Join Date: Nov 2013
    Old 12-03-2013 , 07:08   Re: [NMRiH] Simple NMRiH Stats
    Reply With Quote #10

    @Stings2pee

    I know.
    But many people are questioned about ranking system.
    Top10 preference for many users wanted.

    I am also not very fond of this feature.
    By Admin, but also can not ignore the needs of the user.
    Only because I want to feature On / Off setting to be able to do nothing if you think the problem is not.

    And I'm already using a different shop functions.
    This shop offers a point. I think it has been linked with jotgetdaneun Rank plug-in I've done it to.
    ys24ys 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 02:40.


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