Raised This Month: $ Target: $400
 0% 

[L4D2] Max Common (0.5) [2024-06-03]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ball2hi
Senior Member
Join Date: Feb 2010
Plugin ID:
8706
Plugin Version:
0.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Limits number of common infected to 'z_common_limit', attempts to avoid vanilla director conflict.
    Old 05-25-2024 , 18:55   [L4D2] Max Common (0.5) [2024-06-03]
    Reply With Quote #1

    Description:

    This plugin aims to clamp the amount of common infected to the 'z_common_limit' without interfering with the AI director on default campaigns (or any campaign that doesn't force spawn common infected). It does this by giving an initial leniency, and if that leniency is passed then a short timer is started before checking if the amount of common infected is still above the `z_common_limit` threshold. It will delete the common infected above 'z_common_limit', and then keep deleting any common that spawns if the total common exceeds 'z_common_limit'. After enough time has passed that no common infected has been deleted, it will disable instant deletion of common infected.

    By Default:
    • The leniency amount is 5 (30 + 5 = 35) before it creates a timer.
    • The timer is 3.0 seconds, before instant deleting.
    • The instant deleting disables after 5.0 seconds have elapsed without any deletions occurring.

    Features:

    sm_common_limit - Prints the current amount of common infected, max common infected, and leniency.

    Thanks:
    • Silvershot - Initial plugin
    • Addie - Helping on Discord

    Changelog:

    Code:
    0.5 (03-Jun-2024)
        - Console messages are now prefixed by "[Max_Common]".
        - Removed a check on initial clean-up loop, so that common amount is reduced to z_common_limit (not with leniency).
        - Moved some code around, so that OnEntityDestroyed also checks the elapsed time to deactive the hard lock and instant delete.
        - sm_common_limit will now print if instant destruction is active.
    
    0.3 (25-May-2024)
        - Initial release.
    Reason:

    This plugin is heavily inspired by Silvers's plugin: [L4D & L4D2] Common Limiter and has a lot of similarities.

    Silver's plugin was a lifesaver for custom campaigns like Wormwood that could spawn infinite amount of common infected, causing the server to stutter and or become unresponsive. However, I noticed with his plugin that instantly removing common infected caused issues with the AI director on default (and other campaigns).

    If you are in a multi-floored building, or are around the corner filled with common infected, the common count is going to be max (30/30) since the room next is filled with all the naturally spawned common infected. However, if the AI director spawns a horde (which it does on timer intervals, based on difficulty), it will spawn slightly over the `z_common_limit` reaching up to 33 or 34. As it does this, it slowly overtime deletes common infected that are idle and not part of the horde it just spawned.

    Because of this AI director behavior, plugins that instantly delete common infected will cull the horde amount that spawns. Resulting in much weaker hordes than vanilla's director intended.

    Note(s):

    This plugin does not prevent custom campaigns from changing z_common_limit through ConVar.SetValue() or through director script options. This is also my first plugin. So hopefully there are no issues. I am running this on my public servers.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2_max_common_spawn.sp - 33 views - 4.8 KB)

    Last edited by ball2hi; 06-03-2024 at 21:55. Reason: Releasing 0.5 version.
    ball2hi is offline
    kayletid201
    Junior Member
    Join Date: Nov 2023
    Old 05-31-2024 , 18:21   Re: [L4D2] Max Common (0.3) [2024-05-25]
    Reply With Quote #2

    Will try your plugin, hope it won't be as funny as Silver's plugin. I say that because I used his plugin before, and encountered a funny situation where a zombie automatically disappeared when it came close to me before I could shoot it. I don't know if it's a bug or because of the plugin's default, but I want a plugin that only limits the "z_common_limit" and not interfere with the director during the spawning of zombies because that's a bit annoying to me. Anyway as long as the limit is no more than the set "z_common_limit", it's good for playing low-quality custom maps. I hope your plugin will be what I need. Hope so xD
    P:s If there is any problem I will let you know
    kayletid201 is offline
    ball2hi
    Senior Member
    Join Date: Feb 2010
    Old 06-03-2024 , 21:12   Re: [L4D2] Max Common (0.3) [2024-05-25]
    Reply With Quote #3

    Quote:
    Originally Posted by kayletid201 View Post
    Will try your plugin, hope it won't be as funny as Silver's plugin. I say that because I used his plugin before, and encountered a funny situation where a zombie automatically disappeared when it came close to me before I could shoot it. I don't know if it's a bug or because of the plugin's default, but I want a plugin that only limits the "z_common_limit" and not interfere with the director during the spawning of zombies because that's a bit annoying to me. Anyway as long as the limit is no more than the set "z_common_limit", it's good for playing low-quality custom maps. I hope your plugin will be what I need. Hope so xD
    P:s If there is any problem I will let you know
    This plugin might do this more than Silver's. I'm not sure how you would run into that issue with Silver's unless you were using his "timer" one. I say this because by default, his would instantly delete a common infected upon spawning, which would be out of your range. His "timer" one would essentially mark something for deletion and then delete it.

    Mine will run a timer, and at the end of that timer, iterate through the oldest entities backwards and delete them until we reach the amount of common necessary. This could cause those issues, assuming you don't kill common infected enough.

    I am working on another plugin that prevents custom campaigns from changing the "z_common_limit" to be past the vanilla amount. I'll probably release it here in a few.
    ball2hi is offline
    JamesDonohue
    New Member
    Join Date: May 2024
    Old 06-14-2024 , 10:04   Re: [L4D2] Max Common (0.5) [2024-06-03]
    Reply With Quote #4

    Thanks for sharing it with us.
    JamesDonohue 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 07:12.


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