AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022] (https://forums.alliedmods.net/showthread.php?t=339308)

Omixsat 08-31-2022 11:28

[L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
 
3 Attachment(s)
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.


WhatsAnName 09-17-2022 05:52

Re: [L4D(2)] Dynamic Tank Avoidance (v1.6.1b), 17-Sep-2022)
 
looks interesting gonna try it

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

Nexedail 10-24-2022 21:33

Re: [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
 
So...
Which version is better for L4D2?
Does version B do something version A doesn't?

Omixsat 11-24-2022 15:36

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

Originally Posted by Nexedail (Post 2791555)
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.

Gento_aki 08-17-2023 09:09

Re: [L4D(2)] Dynamic Tank Avoidance [v1.6.8b] | [24-Sep-2022]
 
Could you create a survivor bot that can evade special infected?


All times are GMT -4. The time now is 04:01.

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