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

[L4D2] Map Exploit Detector


Post New Thread Reply   
 
Thread Tools Display Modes
Author
AbyssStaresBack
Junior Member
Join Date: Jan 2011
Location: Texas, USA
Plugin ID:
2294
Plugin Version:
1.0.2
Plugin Category:
General Purpose
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Detects map exploits and punishes players who use them
    Old 04-01-2011 , 23:25   [L4D2] Map Exploit Detector
    Reply With Quote #1

    L4D2 Map Exploit Detector 1.0.2

    Tired of people skipping parts of Dead Center 1 or No Mercy 1? This plugin aims to address those (and many other) map exploits, without requiring modifications to the map or direct admin intervention. It does so by automatically punishing players who use such exploits.

    How the plugin works

    When each map loads, the plugin checks to see if it has any exploit locations defined. Each exploit location is defined as an infinite plane parallel to the floor (at a given Z-coordinate). For example, on Dead Center 1, there is an exploit plane defined just below the floor of the initial level. Each exploit plane also has exceptions. On Dead Center 1, a survivor can take the stairs from the initial floor to the elevator floor, but cannot drop from a window or ledge. If a survivor passes through an exploit plane, but not through an exception, he/she is (by default, temporarily) banned. I have some ideas for improvements to the punishment system, which I talk about in the Future Plans section below.

    On any map that has detected exploits, this plugin optionally announces itself to each survivor as they load in, and tells them that they may use "!mapexploits" in chat to get a list of detected exploits. This plugin also records data about the players it bans and their locations, primarily for debugging purposes. If you believe that my plugin banned someone incorrectly, be sure to include addons/sourcemod/data/mapexploitdetector_bans.txt in your post. NOTE: bans are still recorded in the usual place, so deleting lines from that file will not remove the ban, but you can manually un-ban the SteamIDs listed in the file.

    Exploits currently detected:
    • Dead Center 1 - Drop from initial floor to elevator floor
    • Dead Center 1 - Drop from elevator floor to lower floors
    • No Mercy 1 - Dropping off of the starting area

    Exploits that will be detected in future releases (more will be added as people remind me of them):
    • Dark Carnival 3 - Assorted rollercoaster-skipping exploits
    • Swamp Fever 2 - Skipping the plane event

    It does not count as an exploit if a survivor...
    • Is being charged or was just hit by a charger.
    • Is being smoked or jockied.
    • Falls to his/her death.
    • Travels upward through the exploit plane.
    • Is no-clipping.
    • Is an admin.

    How to test the plugin without starting a versus game
    1. Set mapexploitdetector_immunity to 0 (either in the cfg, or in-game).
    2. Load up a campaign on the map you want to test.
    3. Set sb_all_bot_game to 1 and mp_gamemode to versus.
    4. Exploit the map!
    5. The server should ban you (temporarily, by default) in 6 seconds.
    6. To remove the ban, either manually unban yourself, or restart the server (if you don't have a plugin that saves temp bans to disk).

    Known issues
    1. If a player is teleported (or respawned, if the respawn teleports) through an exploit plane, it will count as if they exploited the map. Workaround: admins should disable exploit punishment (through sm_mapexploitmenu) before teleporting players, and then re-enable it afterwards.
    2. If the server is paused in a way that doesn't stop it from ticking (e.g., L4D2 Pause) after a player suicide jumped through an exploit plane, but before they died from fall damage, it will count as a map exploit. I have some ideas for fixing this that I'll add in a future release.
    3. {FIXED} If a player exploits the map (and lands safely), and then jumps to his/her death within 6 seconds, it will not count as a map exploit. I plan on fixing this in the next release.

    Commands

    Admin (GENERIC flag):
    • sm_mapexploitmenu - Displays a menu allowing admins to enable/disable punishment, un-ban players banned by this plugin, or list the current map's exploits.

    Anyone:
    • sm_mapexploits - Lists the bannable exploits for the current map.

    Cvars
    • mapexploitdetector_ver - Version of this plugin.
    • mapexploitdetector_bantime (default 3600) - Number of seconds to ban exploiters.
    • mapexploitdetector_banmessage (default 1) - Determines who sees the message when a player is banned. If 1, all players; if 2, only admins; if 0, nobody.
    • mapexploitdetector_announce (default 1) - Determines if the plugin announces itself as survivors load in.
    • mapexploitdetector_immunity (default 1) - Determines if admins are immune to punishment.

    Installation
    • Download the data file below (mapexploitdetector.txt) and place it in addons/sourcemod/data.
    • Get the plugin below and drop mapexploitdetector.smx into addons/sourcemod/plugins.

    Changelog
    • 1.0.2 - Added admin immunity cvar
    • 1.0.1 - Added announce cvar; added No Mercy 1 exploit; fixed Known Issue #3
    • 1.0.0 - Initial release

    Future Plans

    Besides just detecting more exploits, there is definitely room for improvement in the punishment system. The current system simply bans the offender, which is effective, but still leaves the offending team with more points than they should have at that time. This is especially a problem when a tank should have blocked the survivors' path, but is bypassed (or forced to spawn downstairs).

    In an attempt to balance this problem, and to further convince people not to exploit, I plan on adding a score penalty for each player that exploits the map. In addition, I may also add a feature to teleport the exploiting player back to where they should be.
    Attached Files
    File Type: txt mapexploitdetector.txt (654 Bytes, 886 views)
    File Type: sp Get Plugin or Get Source (mapexploitdetector.sp - 1821 views - 29.5 KB)

    Last edited by AbyssStaresBack; 04-05-2011 at 20:58. Reason: Added how to test the plugin
    AbyssStaresBack is offline
    PpZ | Iconoclast
    Senior Member
    Join Date: Feb 2008
    Old 04-04-2011 , 10:01   Re: [L4D2] Map Exploit Detector
    Reply With Quote #2

    REALLY interesting idea...I'd like to give this a try on my L4D2 server later tonight!

    Here are a couple things that I would like to see also added in a future release if you are able:

    1. Configurable cvar to enable/disable the plugin "announcements" as you called them
    WHY: I try to keep the chatbox text as minimally-spammy as possible - I know a lot of players who feel the same way. I think this plugin would be equally effective if players weren't aware that it was active (in other words, anyone who might try to exploit the map may not do it if they know there is a plugin on the server that will stop them)

    2. Configurable action to take when an exploit is detected - for example, if there isn't an admin connected to the server, then proceed with an automatic slay/kick/ban (again, it would be nice to be able to select the desired punishment via cvar...I wouldn't necessarily want to BAN someone for exploiting a map, but a slay or kick would certainly be deserved). However, if an admin IS connected, it would be cool if it would just print a line of text in the chatbox (visible only to admins of course) telling you who exploited the map but take no action - this way, you could choose whatever punishment you see fit.
    WHY: I'd say 90% of the time, server admins aren't present during L4D2 matches, which means that there's a LOT of people who end up getting away with either hacking, cheating, or exploiting like this. This plugin seems like a great step in the right direction to putting an end to some of these people, at least.

    Also, looking forward to the addition of map exploits on some of the other campaigns!
    __________________
    PpZ | Iconoclast is offline
    AbyssStaresBack
    Junior Member
    Join Date: Jan 2011
    Location: Texas, USA
    Old 04-04-2011 , 23:27   Re: [L4D2] Map Exploit Detector
    Reply With Quote #3

    First of all, Version 1.0.1 is up. Changes for this release: Added announce cvar; added No Mercy 1 exploit; fixed Known Issue #3. Since I added a new cvar, you need to delete cfg/sourcemod/mapexploitdetector.cfg. Also, since I added detection of the No Mercy 1 exploit, you'll need to get mapexploitdetector.txt again.

    Quote:
    Originally Posted by PpZ | Iconoclast View Post
    Configurable cvar to enable/disable the plugin "announcements" as you called them
    Done.

    Quote:
    Originally Posted by PpZ | Iconoclast View Post
    Configurable action to take when an exploit is detected - for example, if there isn't an admin connected to the server, then proceed with an automatic slay/kick/ban (again, it would be nice to be able to select the desired punishment via cvar...I wouldn't necessarily want to BAN someone for exploiting a map, but a slay or kick would certainly be deserved).
    This one might warrant some discussion. I feel like Slay isn't very useful in L4D2, because unlike TF2 or CSS, having a player die basically cripples the survivor team. Also, I often see one single idiot...I mean, player...exploiting the map, while the rest of their team chooses not to exploit (and sometimes kicks the player that exploited). Slaying an exploiting player could very well turn this into a griefer's paridise...exploiting equals a free death.

    The only issue I have with simply Kicking a player, is that it is easy to reconnect to the server you were kicked from (and even easier if you have friends on the server). The default punishment is only a 1 hour ban, not a permanent one, but there's a cvar if you want to lower it to 5 minutes or something. I feel like a temporary ban is necessary to keep a team from deciding, "Let's have two guys exploit, get kicked and rejoin, and then the other two will do the same."

    But hey, that's just my point of view...let me know what you think!

    Quote:
    Originally Posted by PpZ | Iconoclast View Post
    However, if an admin IS connected, it would be cool if it would just print a line of text in the chatbox (visible only to admins of course) telling you who exploited the map but take no action - this way, you could choose whatever punishment you see fit.
    I didn't really want an admin to have to get involved at all, but this might work. If someone passes through an exploit plane without being charged, jockied, etc, then I know right away, but I wait for 6 seconds to see if they just suicide jumped. In that time, I could bring up an admin menu with:

    Player X might have exploited
    Press 1 to ignore
    1. Ignore exploit

    If the admin does nothing, the player will/will not be punished as usual, but if the admin hits Ignore, then even if the player DID exploit, they won't be punished. The only downside, is that it clutters up the screen, and would override any other menu currently visible.

    In any case, thanks for the feedback...let me know how the games on your server go!
    AbyssStaresBack is offline
    kkw
    Junior Member
    Join Date: Feb 2011
    Old 04-05-2011 , 03:03   Re: [L4D2] Map Exploit Detector
    Reply With Quote #4

    I tested
    Dead Center 1 - Drop from initial floor to elevator floor
    Dead Center 1 - Drop from elevator floor to lower floors
    not work

    No Mercy 1 - Dropping off of the starting area
    Is the work of
    kkw is offline
    PpZ | Iconoclast
    Senior Member
    Join Date: Feb 2008
    Old 04-05-2011 , 09:17   Re: [L4D2] Map Exploit Detector
    Reply With Quote #5

    Hey mate, ran out of time last night but I'm hoping to get it working tonight instead!

    Quote:
    Originally Posted by AbyssStaresBack View Post
    Done.
    Excellent - this will really come in handy as far as keeping the server free of plugin announcements and chatbox spam. Always good to see plugin developers willing to add it!


    Quote:
    Originally Posted by AbyssStaresBack View Post
    This one might warrant some discussion. I feel like Slay isn't very useful in L4D2, because unlike TF2 or CSS, having a player die basically cripples the survivor team. Also, I often see one single idiot...I mean, player...exploiting the map, while the rest of their team chooses not to exploit (and sometimes kicks the player that exploited). Slaying an exploiting player could very well turn this into a griefer's paridise...exploiting equals a free death.

    The only issue I have with simply Kicking a player, is that it is easy to reconnect to the server you were kicked from (and even easier if you have friends on the server). The default punishment is only a 1 hour ban, not a permanent one, but there's a cvar if you want to lower it to 5 minutes or something. I feel like a temporary ban is necessary to keep a team from deciding, "Let's have two guys exploit, get kicked and rejoin, and then the other two will do the same."

    But hey, that's just my point of view...let me know what you think!
    You make a very good point - to be honest, I didn't really think about that. You're quite right, though - a slay WOULD almost certainly screw over the rest of the team, even if they weren't doing anything wrong. I didn't know that the ban was only temporary (I thought it was permanent by default), so it seems like you've gone with the best option. I see you've already added a cvar that will let you set the ban time manually - this was going to be my only other suggestion, but you've already covered it!


    Quote:
    Originally Posted by AbyssStaresBack View Post
    I didn't really want an admin to have to get involved at all, but this might work. If someone passes through an exploit plane without being charged, jockied, etc, then I know right away, but I wait for 6 seconds to see if they just suicide jumped. In that time, I could bring up an admin menu with:

    Player X might have exploited
    Press 1 to ignore
    1. Ignore exploit

    If the admin does nothing, the player will/will not be punished as usual, but if the admin hits Ignore, then even if the player DID exploit, they won't be punished. The only downside, is that it clutters up the screen, and would override any other menu currently visible.

    In any case, thanks for the feedback...let me know how the games on your server go!
    Again, you make a very good point here. I think I would much prefer it without the menu...especially if it means that it will override any menu that is already open.


    I'll hopefully get to test it out on my server tonight and see how it works...I guess I need to test it with someone who DOESN'T have admin privileges on my server, right? Otherwise the admin flags might prevent whatever action from being taken?

    Also, just another question before I've actually tried using it, when the plugin detects someone using an exploit and takes action (i.e. ban), does it announce this publicly in the server? If so, again, it would be great if any/all plugin announcements could be kept to a minimum (I only ask because I'm not sure if your announcement cvar would cover this as well).

    Just as a side note, I read that you can unban players through the plugin menu that have been banned for exploiting...this is a WONDERFUL feature, as this will make testing a breeze!

    Cheers!
    __________________
    PpZ | Iconoclast is offline
    Growit
    Junior Member
    Join Date: Mar 2011
    Old 04-05-2011 , 11:21   Re: [L4D2] Map Exploit Detector
    Reply With Quote #6

    Hey, this looks nice!

    Idea for the punishment system:
    Make exploiders go B&W with just one hp after using shorcuts...
    (and remove medkit&pills)

    Last edited by Growit; 04-05-2011 at 11:59.
    Growit is offline
    ProdigySim
    SourceMod Plugin Approver
    Join Date: Feb 2010
    Old 04-05-2011 , 14:01   Re: [L4D2] Map Exploit Detector
    Reply With Quote #7

    This looks cool.
    Another good idea for punishment might just be to make a Forward OnPlayerExploitsMap(client), so other plugins can read this information and apply their own punishment.
    ProdigySim is offline
    AbyssStaresBack
    Junior Member
    Join Date: Jan 2011
    Location: Texas, USA
    Old 04-05-2011 , 21:19   Re: [L4D2] Map Exploit Detector
    Reply With Quote #8

    Quote:
    Originally Posted by kkw View Post
    I tested
    Dead Center 1 - Drop from initial floor to elevator floor
    Dead Center 1 - Drop from elevator floor to lower floors
    not work

    No Mercy 1 - Dropping off of the starting area
    Is the work of
    Quote:
    Originally Posted by PpZ | Iconoclast View Post
    I guess I need to test it with someone who DOESN'T have admin privileges on my server, right? Otherwise the admin flags might prevent whatever action from being taken?
    After reading those two comments, I decided to make it a bit more clear how to test my plugin as an admin. Version 1.0.2 just adds the mapexploitdetector_immunity cvar to enable/disable admin immunity to punishment. I also added the following step-by-step guide:

    Quote:
    Originally Posted by AbyssStaresBack View Post

    How to test the plugin without starting a versus game
    (Make sure you have version 1.0.2 or later)
    1. Set mapexploitdetector_immunity to 0 (either in the cfg, or in-game).
    2. Load up a campaign on the map you want to test.
    3. Set sb_all_bot_game to 1 and mp_gamemode to versus.
    4. Exploit the map!
    5. The server should ban you (temporarily, by default) in 6 seconds.
    6. To remove the ban, either manually unban yourself, or restart the server (if you don't have a plugin that saves temp bans to disk).
    Quote:
    Originally Posted by PpZ | Iconoclast View Post
    Also, just another question before I've actually tried using it, when the plugin detects someone using an exploit and takes action (i.e. ban), does it announce this publicly in the server? If so, again, it would be great if any/all plugin announcements could be kept to a minimum (I only ask because I'm not sure if your announcement cvar would cover this as well).
    The cvar mapexploitdetector_banmessage controls the behavior you're talking about. What's cool, is that if you have a plugin like Connect Announce, and you have the "Reason" field set for disconnects, the disconnect message will read "Player X disconnected. Reason: Automatically banned for using a map exploit." Since I have Connect Announce, I set the mapexploitdetector_banmessage cvar to 0 and let Connect Announce handle displaying the messages to players.

    Quote:
    Originally Posted by Growit View Post
    Make exploiders go B&W with just one hp after using shorcuts...
    (and remove medkit&pills)
    While this would certainly be funny, I think the earlier argument against using Slay works here, too.

    Quote:
    Originally Posted by ProdigySim View Post
    Another good idea for punishment might just be to make a Forward OnPlayerExploitsMap(client), so other plugins can read this information and apply their own punishment.
    Good call...I'll definitely look into that.
    AbyssStaresBack is offline
    EHG
    Senior Member
    Join Date: May 2009
    Location: 127.0.0.1
    Old 04-06-2011 , 00:27   Re: [L4D2] Map Exploit Detector
    Reply With Quote #9

    Instead of detecting and punishing a player you could spawn brushes and effectively "fix" the map yourself. Would make for a much cleaner method

    http://forums.alliedmods.net/showthread.php?t=129597
    EHG is offline
    AbyssStaresBack
    Junior Member
    Join Date: Jan 2011
    Location: Texas, USA
    Old 04-06-2011 , 01:12   Re: [L4D2] Map Exploit Detector
    Reply With Quote #10

    Quote:
    Originally Posted by EHG View Post
    Instead of detecting and punishing a player you could spawn brushes and effectively "fix" the map yourself. Would make for a much cleaner method

    http://forums.alliedmods.net/showthread.php?t=129597
    Interesting...I wasn't aware that was possible. I'm not sure about it being cleaner, though. (For the record, I've never messed with map-making, so I could be totally off here.) In Dead Center 1, for example, I think I would have to make brushes for each side of the building that has windows and along all the ledges. I'd also have to make sure that they allow normal use, like death charges, as well as hanging animations, and that they don't open up even more exploits.

    All of that to replace 1 floating point number for the exploit plane and 4 floating point numbers for the exception. Now granted, my code doesn't look simple, but I'm pretty much just tracking the player's position compared to their last position, seeing if they passed through an exploit plane but not an exception, making sure they did so willingly, and then punishing them.

    Now for an exploit like skipping the Swamp Fever plane event, adding brushes could be a valid option, since you could probably construct a single wall to prevent survivors from passing over it. That would only work, of course, if the infected could be allowed to pass through unaffected, as I certainly don't want to add more invisible walls to this game.

    In any case...I'd be interested to hear discussion about this between people who know mapping better than I do!
    AbyssStaresBack 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 16:20.


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