[L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
2 Attachment(s)
I made this plugin because I wanted to improve the stupid survivor bots as much as possible.
Mainly improves mouse operation of clients. Please note that this plugin does not completely improve the bots. And, This is the limit of my power and I can't add any further improvement points maybe... About: - Main items that can be improve bots by introducing this plugin.
- Sourcemod ver 1.10 is required. - Recommended for combined use with other infinite ammo plugins. How to use:
- Select the improved bot with the following CVars.
- For 1 and 2, bots that improve after left the safe room are selected. CVars: PHP Code:
Change Log: Code:
1.00 (09-September-2021) Installation:
|
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Wow cool, i've been waiting for some improved bots plugin for too long, and now this appear, i really appreciate it.
|
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Nice!
There's also a list of cvars that can be changed to make bots respond faster in various situations. I don't have the list here but can probably be found easily on google. Some notes on code: - "PrefetchSound" - don't see the point of this when you have "PrecacheSound". - "PrecacheSound" - should be moved to OnMapStart(). - "OnEntityCreated" - Don't use "StrContains" this is very inefficient especially in this function that's triggered so often. Use: if (g_hEnabled && strcmp(classname, "witch") == 0) - You'll probably want to add the g_hEnabled check to make it more efficient when the plugins disabled. - "OnEntityDestroyed" - I personally prefer to do "static char classname[32];" instead of creating the string every time to avoid creating a null string each time. This kind of optimization is noticeable on servers near the bottleneck of their CPU with lots of plugins, and best when those plugins are also optimized as such. - "SetCommandFlags(command, flags^FCVAR_CHEAT);" is wrong, you're flipping the bit, some servers might have removed the cheat flag and you've just added it back. Do "SetCommandFlags(command, flags & ~FCVAR_CHEAT);" - Instead of "SetCommandFlags(command, flags | FCVAR_CHEAT);" just do "SetCommandFlags(command, flags)" because some servers might have stripped the cheat flag which you've just added back when it didn't exist. - "if (staggerPos[0] != 0.0 && staggerPos[1] != 0.0 && staggerPos[2] != 0.0) return true;" - seems wrong, maybe sometimes a player can stagger and one of the variables is exactly 0.0, however rare that maybe. I would put || instead of && for the checks. - Things like "new String:sub_weapon[128];" is inefficient, again you could use "static" instead of "new" to stop creating them over and over in expensive functions like the one being used, and also 128 is overkill when the longest string is 12 characters or something, the longest weapon classname is 29, so put [32] instead. - Same as "decl String:sWeaponName[256];" and probably other strings. - You have lots of these types of checks: PHP Code:
PHP Code:
- You have many things like "Format(bufferChat, 512", instead of hard coding 512, do "sizeof(bufferChat)" instead. The compiler then changes that to 512, so if someone wants to modify the string size they only need to change 512 once. - In "AskPluginLoad2" you may want to restrict the plugin to L4D2 like my plugins do for example. - You can change the whole "PrimaryExtraAmmoCheck" function with what I use in the "Switch Upgrade Ammo Types" plugin - the "GetOrSetPlayerAmmo" function. It's not necessary to check all the weapon strings and hard code the offsets. - Lastly, using old syntax :twisted: why are you writing that? These are just some of the things I checked while skimming through, not everything. |
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Cool plugin!
Just a request but can i also have option to turn off/hide the text/hint when the game start? And also stop bots standing on flame/fires and suicide (This mostly happen on molotov and explosion car) Update: I test it with single player but when i play the game, i can feel the fps dropped or something. Can someone confirm if this is only happened to me? |
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
There is a good workshop addon that improves the bots and gets updated often, but its really command heavy and I find that takes away from it being the best it can be. Sure you can deal with binds and whatnot, but its just more hassle than its worth in game JMO.
https://steamcommunity.com/sharedfil...earchtext=bots There was also another plugin from a few years back that just basically made the bots over the top, but I don't think its as functional in recent years with all the updates and whatnot. https://forums.alliedmods.net/showthread.php?p=2609058 |
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Anyone tested ?
|
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Prompt, this line should be AutoExecConfig (false, "l4d2_sb_fix"); I mean false or should it be true?
|
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Tested and works great that being said i have few things to say on this
1. needs a way to make it where the promp for saying "what type of bots are being enabled at the start of each round to be removed by cvar if able" 2. this plugin seems to fight with https://forums.alliedmods.net/showthread.php?p=2685812 from { Silvers } as one part makes the AI/Bots to aim at {Tank Rock} to shoot at it and the {Anomaly} has the model of a {Tank Rock} so the AI/Bots are endlessly attacking at it in fact they dont attack anything else besides the {Anomaly} nor do they leave until the {Anomaly} gets out of range 3. the % for {Stunblocking} hunters / Jockeys doesnt seem to matter what % you put it at as it seems 100% of the time they block it unless something else is in the way such as a common hitting them and the AI/Bot is set on the common so timing it for the Hunter/jockey seems the onlyw ay they can pin the AI/Bots now though the % doesnt mean anything as far as ive seen other then those 3 i think the plugin is great even if it looks odd when AI/Bots are being overwelmed by commons i dont think its normal for the head to move in that way let alone the body e.e lol but its good upside to this the AI/Bots take stances which is nice like 2 would go infront and use melee while the rest stay in the back with guns and ive seen few times AI/Bots would duck near doorways nice touch but not used offen which is fine though they also coner themselfs to fight off common/mobs and they stop reviving other survivors if a threat [common/SI] come in range which i greatly like however they still dont care for the spitter's spit and will stand in it picking up another survivor which offen lead to both becoming incapped great plugin so far as seeing this is {v1.00} i look forword to what next updates would be =p PS. cake |
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
L 09/11/2021 - 13:04:42: [SM] Exception reported: Entity -1 (-1) is invalid
L 09/11/2021 - 13:04:42: [SM] Blaming: l4d2_sb_fix.smx L 09/11/2021 - 13:04:42: [SM] Call stack trace: L 09/11/2021 - 13:04:42: [SM] [0] GetEntPropString L 09/11/2021 - 13:04:42: [SM] [1] Line 766, /groups/sourcemod/compiler-1.10/include/entity.inc::GetEntityClassname L 09/11/2021 - 13:04:42: [SM] [2] Line 1938, /home/forums/content/files/3/1/4/9/1/4/191277.attach::OnEntityDestroyed L 09/11/2021 - 13:55:56: Error log file session closed. |
Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Quote:
|
All times are GMT -4. The time now is 08:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.