View Single Post
Author Message
ConnerRia
Junior Member
Join Date: Mar 2018
Old 04-02-2018 , 01:04   [L4D2] 200 IQ Bots: AI Tank Haymakers And More!
Reply With Quote #1

200 IQ Bots

Intended for L4D2.
Untested on L4D. It should work as long as survivors are considered team 2 and not team 1.


Summary

This is a set of plugins I've made to improve the ai in the game. There are currently three but I may or may not make more in the future.

With cvars tweaks and various bot improving plugins, survivor bots are usually *okay* in most situations. In some aspects they are even better than real players! However, the biggest issue with them is that the AI isnt equipped to deal with bosses (ie tanks and witches). The AI seem to have no conception that approaching a tank is a very bad idea, or that blocking a startled witch will make them the witch target. This is very problematic in Realism Expert, where both bosses are particularly dangerous. The following plugins seek to address this issue.

Bot haymakers is a silly idea that materialized while I was watching a player destroy my team in versus mode with multiple haymakers. I thought to myself "hey wouldnt it be cool if the tanks in my Realism Hard Eight server could do that too?"


Plugin #1: Bot Haymakers

Does what it says on the tin. When punching, AI tanks will now do a rock throw in the same frame as well. All regular rock throws are not affected.


Plugin #2: Fly You Fools

A complement to the aforementioned plugin, survivor bots will now maintain a safe distance away from the tank instead of blindly following you like a bunch of idiots. Note that the ai isnt perfect and can still be cornered by the tank.

A caveat is that bots still prioritise reviving incapped survivors over everything else. I cant seem to work around this.

I had the intention of making this plugin regulate survivor bot healthkit and meds usage during tank fights before publishing it, but thats a fair bit of work and testing that im too lazy to do right now.


Plugin #3: Dont Fuck With Her Man

Similar to Fly You Fools but for witches. In Realism Expert, crowning witches is impossible. There are still many strategies to deal with witches, from molotoving them to hiding behind doors. However, it seems that no matter what you try, the survivor bots will fuck shit up by inadvertently blocking the witch's path and consequently getting killed.

But no more! With this plugin, survivor bots will treat a startled witch with caution and retreat if she comes too close. Obviously, this means that if you fuck up, a survivor bot will not die in your place and YOU will die!


Convars

200IQBots_HaymakerChanceFactor
//Default 1
//Factors the chance of tanks doing haymakers on each punch by the value. A value of one means all AI tank punches are haymakers. A value of 2 means 50% of punches are haymakers, 4 means 25% of punches are haymakers, etc.

200IQBots_WitchDangerRange
// Default 500
// The range by which survivors bots will detect the presence of witch and retreat.


200IQBots_TankDangerRange
// Default 800
// The range by which survivors bots will detect the presence of tank and retreat.


Recommended Mods

Competitive Bots +: A set of cvar tweaks that improves survivor and si bots. The cvar tweaks are added to gamemodes.txt. If you have any other mod that modifies the aforementioned file, I recommend opening up the vpk and copypasting the cvars into your server.cfg. Of course, sm_cvar will have to be added to each line. Using Notepad++'s column editor, you can do that for every line at once.

Shoot At It FFS by AtomicStryker and Merudo: My plugins are heavily based on this code.

Max Intensity: Removes sv_cheat flag from the max intensity command. At this point, nobody really knows if force_max_intensity even does anything, but it is a good placebo. Note that "sb_force_max_intensity" has to be entered without the sm_cvar in front.

Gear Transfer: One of the most popular L4D2 plugins. Not much has to be said, its extremely dope.

Either Tank Damage Modifier or Modified Infected Damage.: Haymakers are pretty unfair - if the punch connects, the rock throw will most likely connect too, if it doesnt, you still have to dodge a rock in close quarters, which is pretty difficult. These plugins will allow you to regulate damage done by tanks. The latter plugin allows you to set rock damage differently from punch damage.


Changelog
2nd April 2018: Switched to Timocop's stock function for logic_script entity.
3nd April 2018: I noticed a peculiar bug where setting all bot AI actually causes SI bots to spawn with tank once a survivor is incapped. Fly You Fools no longer resets bot AI.
8nd April 2018: Plugin now resets survivor bot AI whenever a player gets incapped during a tank fight. Should not cause any bugs.
Attached Files
File Type: sp Get Plugin or Get Source (200IQBots_DontFuckWithHerMan.sp - 9344 views - 3.9 KB)
File Type: sp Get Plugin or Get Source (200IQBots_BotHaymakers.sp - 7578 views - 1.7 KB)
File Type: sp Get Plugin or Get Source (200IQBots_FlyYouFools.sp - 8957 views - 4.0 KB)
__________________

Last edited by ConnerRia; 04-08-2018 at 02:53.
ConnerRia is offline