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

[L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Omixsat
Member
Join Date: Jul 2022
Plugin ID:
8167
Plugin Version:
1.6.8b
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    27 
    Plugin Description:
    Survivor bots will avoid any tank within a specified range
    Old 08-31-2022 , 11:28   [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
    Reply With Quote #1

    Inspired by the 200 IQ Bots of ConnerRia.

    Summary
    This is my version of ConnerRia's Fly You Fools plugin. Instead of focusing on the latest tank spawn, I added an algorithm where it records all spawned living tanks in an array and compare it to each Survivor bot position.

    Versions
    Type A - An L4D2 exclusive
    Code:
    - Makes use of vscript commands exclusive to only L4D2
    - Optimized code for seamless tank avoidance.
    - Retains ConnerRia's original premise which requires bot AI reset on incapacitation
    Type B - Applicable to both L4D1/2
    Code:
    - Requires SM 1.10+
    - Optimized algorithm. Tank detection will not reset anymore unlike Type A
    - L4D1 implementation included
    - Survivor AI will not reset on incapacitation.
    - Refactored entire tank spawn listing algorithm
    
     Bugs 
    - [FIXED] Does not detect player controlled tanks (Type B is currently not recommended for VS modes)
    - [FIXED] Algorithm's indexing errors in relation to players/bots
    ConVars
    Saved to l4d_dynamictankavoidance.cfg in your servers ..\cfg\sourcemod\ folder.
    Code:
    //Print [L4D] Dynamic Tank Avoidance Version
    l4d_dynatankavoid_version
    
    //The range the survivor bots must keep a distance from any incoming tank.
    //Default is 300
    l4d_dynatankavoidancerange
    Recommended Settings
    Code:
    //A range between 100 to 225 hammer units is recommended for multi-tank maps such as Tank Challenge, Tank Arena, and Tanks Playground by Obez
    
    I.E.
    //For extremely crowded areas with tanks(Tanks > 2 with limited movement space)
    l4d_dynatankavoidancerange 100
    
    //A bit spacey but a lot of tanks(Tanks > 2 with a considerable movement area)
    l4d_dynatankavoidancerange 225
    
    //Recommended default for using Valve's original tank spawn settings which is a maximum of 2 simultaneous tank spawns per map like in Swamp Fever
    l4d_dynatankavoidancerange 300
    
    //My own recommended settings for ANY type of game involving a huge pool of tanks or otherwise
    l4d_dynatankavoidancerange 135
    Changelog - Date format is MM/DD/YYY
    Code:
     Version 1.6.8b - 09/22/2022
            - L4D1 method now fully functioning.
    
     Version 1.6.7b - 09/22/2022
            - Optimizations / Refactored algorithm
    
     Version 1.6.6b - 09/22/2022 ~ 5 views
            - Optimizations
            - Improved tank spawn listing algorithm for VS modes
    
     Version 1.2.3a - FINAL - 09/22/2022 
            - A few more optimizations
    
     Version 1.2.1a - 09/17/2022 ~ 29 views
            - Optimized tank avoidance algorithm for TYPE A
            - Tiny correction on tank detection(V1.2.2a)
    
     Version 1.6.1b - 09/17/2022 ~ 26 views
            - Optimized algorithm further.
            - Now detects player tanks.
            - No more errors on tank deletion from spawn list
    
     Version 1.5.1b - 09/16/2022 ~ 10 views
            - New tank detection method done on the fly.
            - Doesn't waste precious milliseconds rebuilding tank list unlike TYPE A.
            - Removed debug reporting in chat (Version 1.5.2b)
    
     Version 1.2a - 09/09/2022 ~ 38 views
            - Updated to new transitional 1.7 syntax.
            - Removed "L4D1 implementation"
            - An L4D2-exclusive plugin (Type A)
    
     Version 1.1 - 9/02/2022 ~ 29 views
            - Added support for L4D1. It appears command a bot doesn't function as intended on L4D1.
            TO DO: Will create another implementation for L4D1
    
     Version 1.0 - 8/31/2022 ~ 31 views
            - Supports only L4D2.
            - Initial release
    Credits
    Code:
    Timocop(indirectly) ~ for the L4D2 stock
    ConnerRia ~ For the original implementation where I figured out what to improve on.
    Attached Thumbnails
    Click image for larger version

Name:	20220831202713_1.jpg
Views:	815
Size:	97.4 KB
ID:	196595  
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_dynatankavoid_a.sp - 1102 views - 5.1 KB)
    File Type: sp Get Plugin or Get Source (l4d_dynatankavoid_b.sp - 631 views - 11.0 KB)
    __________________
    My Plug-Ins
    Plug-in lookup
    My Forks
    [1] [2]

    Last edited by Omixsat; 09-23-2022 at 20:42. Reason: Updated Plugin
    Omixsat is offline
    WhatsAnName
    Member
    Join Date: Jun 2018
    Old 09-17-2022 , 05:52   Re: [L4D(2)] Dynamic Tank Avoidance (v1.6.1b), 17-Sep-2022)
    Reply With Quote #2

    looks interesting gonna try it

    edit: well it works great and even more with the witch avoidance plugin as well

    Last edited by WhatsAnName; 09-18-2022 at 21:49.
    WhatsAnName is offline
    Nexedail
    Junior Member
    Join Date: Dec 2020
    Location: Italy
    Old 10-24-2022 , 21:33   Re: [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
    Reply With Quote #3

    So...
    Which version is better for L4D2?
    Does version B do something version A doesn't?
    Nexedail is offline
    Omixsat
    Member
    Join Date: Jul 2022
    Old 11-24-2022 , 15:36   Re: [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
    Reply With Quote #4

    Quote:
    Originally Posted by Nexedail View Post
    So...
    Which version is better for L4D2?
    Does version B do something version A doesn't?
    Both versions feature-wise should accomplish the same thing with a few minor differences.

    Version B is primarily supposed to be a bleeding edge version of type A (A.K.A - A different implementation with the same goal in mind including backward compatibility for L4D1). If you primarily play L4D2, it does not matter which version you'd take as any would do.

    By default, you should stick to type A if you only play L4D2.
    __________________
    My Plug-Ins
    Plug-in lookup
    My Forks
    [1] [2]
    Omixsat is offline
    Gento_aki
    New Member
    Join Date: Apr 2023
    Location: indonesia, bali, denpasa
    Old 08-17-2023 , 09:09   Re: [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
    Reply With Quote #5

    Could you create a survivor bot that can evade special infected?
    Gento_aki 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 00:34.


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