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.