Left 4 Dead 2

Left 4 Dead 2

Left 4 Bots 2
Vanilla Preferences +Plus+
I have found a way to make bots use weapons based on tiers not what weapon to use in the preference settings. It's a bit wonky, maybe not that well built but it gets the job done in my opinion. If someone can make it work better please do so! I made it with the help of this little thing right here [ ,* ] and somehow it works, bots will pick up and recognize what they usually use based on the priority list, but will also recognize the fact that any weapon in said tier is the same for them, like the vanilla ones.
For example, on a table there will be one AK and one M16 and one Autoshotty. Bots would usually go for the AK but with this they will use either one regardless of preferences in the files, but will also make Coach for example pick the autoshotgun while the rest hold on to their weapons.

So I made it like this:
Rifle Bots ( Bill, Louis, Nick, Rochelle )

rifle_m60,grenade_launcher,*,rifle_ak47,rifle_sg552,rifle_desert,rifle,*,autoshotgun,shotgun_spas,*,sniper_military,hunting_rifle,sniper_scout,sniper_awp,*,smg_mp5,smg_silenced,shotgun_chrome,smg,pumpshotgun
chainsaw,*,pistol_magnum,pistol,*,machete,golfclub,katana,fireaxe,crowbar,cricket_bat,baseball_bat,tonfa,shovel,electric_guitar,knife,frying_pan,pitchfork,riotshield
*,molotov,pipe_bomb,vomitjar
first_aid_kit,defibrillator,upgradepack_explosive,upgradepack_incendiary
*,pain_pills,adrenaline

Shotgun Bots ( Francis, Coach)
rifle_m60,grenade_launcher,*,autoshotgun,shotgun_spas,*,rifle_ak47,rifle_sg552,rifle_desert,rifle,*,sniper_military,hunting_rifle,sniper_scout,sniper_awp,*,shotgun_chrome,smg_mp5,pumpshotgun,smg_silenced,smg
chainsaw,*,pistol_magnum,pistol,*,machete,golfclub,katana,fireaxe,crowbar,cricket_bat,baseball_bat,tonfa,shovel,electric_guitar,knife,frying_pan,pitchfork,riotshield
*,molotov,pipe_bomb,vomitjar
first_aid_kit,defibrillator,upgradepack_explosive,upgradepack_incendiary
*,pain_pills,adrenaline

Sniper Bots (Zoey, Ellis)
rifle_m60,grenade_launcher,*,sniper_military,hunting_rifle,sniper_scout,sniper_awp,*,rifle_sg552,rifle_desert,rifle_ak47,rifle,*,shotgun_spas,autoshotgun,*,smg_mp5,smg_silenced,smg,shotgun_chrome,pumpshotgun
chainsaw,*,pistol_magnum,pistol,*,machete,golfclub,katana,fireaxe,crowbar,cricket_bat,baseball_bat,tonfa,shovel,electric_guitar,knife,frying_pan,pitchfork,riotshield
*,molotov,pipe_bomb,vomitjar
first_aid_kit,defibrillator,upgradepack_incendiary,upgradepack_explosive
*,pain_pills,adrenaline

Feel free to help make this better, Cheers!
Last edited by Pensie; 8 Mar @ 4:04am
< >
Showing 1-15 of 23 comments
4512369781  [developer] 8 Mar @ 6:53am 
Hey, this looks good, but it won't work, "*" only works when it is in the start, the flag indicates whether the priority of the weapons in WeapPref for that slot must be ignored
Pensie 8 Mar @ 6:54am 
Originally posted by 4512369781:
Hey, this looks good, but it won't work, "*" only works when it is in the start, the flag indicates whether the priority of the weapons in WeapPref for that slot must be ignored
I tried doing it like this for them to recognize the priority of tier rather than weapons. I tried putting that at the start but in my case it would actually mean they won't pick up T2 or T3 weapons at all
Pensie 8 Mar @ 6:55am 
Originally posted by 4512369781:
Hey, this looks good, but it won't work, "*" only works when it is in the start, the flag indicates whether the priority of the weapons in WeapPref for that slot must be ignored
Otherwise please, tell me, how could I use the Vanilla preferences and T3 at the same time? I tried thinking about a couple of things and I only came up with this
Pensie 8 Mar @ 7:17am 
Better yet, what combinations of scripts could I use to make them recognize weapons based on tiers rather than weapon X being higher than weapon Y
4512369781  [developer] 8 Mar @ 7:21am 
there is no such feature now.
but it is a good idea, I will write it on my to-do list.:cozybethesda:
Pensie 8 Mar @ 7:45am 
Originally posted by 4512369781:
there is no such feature now.
but it is a good idea, I will write it on my to-do list.:cozybethesda:
Even better, thanks for the help! Keep up the amazing work 🙏🏻
wait actually yeah, this would be awesome to have added!
Pensie 8 Mar @ 10:59am 
Originally posted by Phoenix‎ Rose:
wait actually yeah, this would be awesome to have added!
Can't wait to see how it will work, I would love to change around some things haha
4512369781  [developer] 9 Mar @ 12:17pm 
Done, please test it.
Unzip and copy the left4bots_afterload.nut file into the left4dead2\scripts\vscripts directory.
Support Vanilla Weapon Preference [github.com]
Last edited by 4512369781; 9 Mar @ 12:27pm
Pensie 9 Mar @ 12:32pm 
Hey! Give me a minute and I will come back with feedback <3
Pensie 9 Mar @ 12:57pm 
Originally posted by 4512369781:
Done, please test it.
Unzip and copy the left4bots_afterload.nut file into the left4dead2\scripts\vscripts directory.
Support Vanilla Weapon Preference [github.com]
Ok after some testing, it seems to be working just fine actually! I will fiddle around with preferences when it comes to melee weapons, but other than that, they all want to use T3 when they come across one. I tested the finales of No Mercy and Dead Center, bots only, and once they picked up based on tier, they never picked anything else unless they had no ammo left. Awesome!
my gosh, this combined with T3 ammo for bots in the settings, they just will constantly use the nade launcher and spam it at any common with these prefs lol. the amount of nade launcher booms ive heard is insane lol. and when they run out of ammo, instead of picking up another weapon, they instead just swap to pistols and or melee until they come across an ammo pile oddly.
It is probably because with this setting, only the T3 weapons are register by the game. The star is place after them, after all.
4512369781  [developer] 28 Mar @ 12:48am 
Originally posted by Phoenix‎ Rose:
my gosh, this combined with T3 ammo for bots in the settings, they just will constantly use the nade launcher and spam it at any common with these prefs lol. the amount of nade launcher booms ive heard is insane lol. and when they run out of ammo, instead of picking up another weapon, they instead just swap to pistols and or melee until they come across an ammo pile oddly.
I didn't reproduce the problem, maybe it's about settings. If "pickups_wep_replace_ammo" is 0, bots will not pickup low-level weapons even has zero ammo.
Originally posted by 4512369781:
Done, please test it.
Unzip and copy the left4bots_afterload.nut file into the left4dead2\scripts\vscripts directory.
Support Vanilla Weapon Preference [github.com]

By that directory, do you mean the game's directory itself, or into the mod's directory before packing it into a vpk?
< >
Showing 1-15 of 23 comments
Per page: 1530 50