Left 4 Dead 2

Left 4 Dead 2

344 个评价
Bots Throw Grenades (Vscript)
   
奖励
收藏
已收藏
取消收藏
Game Content: Scripts
Game Modes: Single Player, Co-op
Weapons: Throwable
文件大小
发表于
更新日期
28.911 KB
3 月 5 日 下午 4:06
6 月 15 日 上午 9:45
6 项改动说明 ( 查看 )

订阅以下载
Bots Throw Grenades (Vscript)

在 kurochama 的 1 个合集中
Useful "Side-Dish" Mods (Especially for Bots)
61 件物品
描述
This was originally a feature from "Cruel Bots", but as there's a request on gamemaps, so I made a standalone version. This mod allows bots to throw grenades, in simple ways.

Q: "How is it compared to the grenade feature on Left 4 Bots?"
A: "This mod is way simpler, like there are only 5 features to set. & bot's throwing direction follows where bots are looking at when they're preparing the grenades. More info will be explained below."


List of features available on "bots throw grenades.txt" cfg file:
  1. Grenadier Bots: When enabled, bots will be able to throw grenades.

  2. MobSize To Throw Grenade: How many zombies in a group until bots prepare to throw grenades. Default= 6 (6 zombies in a group). Max= no limit.

  3. Use Pipe Bomb: When enabled, bots will pick & use pipe bomb.

  4. Use Molotov: When enabled, bots will pick & use molotov. The value affects the molotov targets (common only/ tank only/ common + tank).

  5. Use Vomitjar: Same as molotov, but for bile bomb.

  6. Grenade Auto Give: Enabled by default. Bots will give a grenade to a survivor player they're looking at when that player doesn't have a grenade.


Simple mechanisms of this mod:
  • When "Grenadier Bots" is set to 1 & certain features of grenades are set to 1 or above, bots will start to pick grenades,

  • Bots will pick a grenade automatically when they walk close to it.

  • Shove a bot near grenade spot to force him to pick a grenade (in case if he refuses to pick).

  • To receive a grenade from a bot, there are 2 ways:
    1. Keep looking at a bot until he gives you one (if "Grenade Auto Give" is enabled).
    2. Shove him to take the grenade immediately.

  • Bots will throw grenades at a zombie they're looking at a zombie in medium range (around 4x melee range ahead).

  • Bots won't throw molotov at tank that's already on fire, but they'll still throw bile at the tank even if he's on fire.

  • Bots only throw grenades if certain conditions are met. The conditions are controlled by "MobSize To Throw Grenade" & the value on certain grenade features. Examples: If "Use Molotov" is set to 2, bots only throw molotov on a tank. If it's set to 1, they only throw at common infected. If "MobSize To Throw Grenade" is set to 10, they only throw a molotov at common infected when they detect 10 or more common infected at where they're looking.


Q: "Does this mod solve a problem about bots throwing molotov under your feet?"
A: "I'm not sure about that, but this should solve it because bot's throwing target is a zombie they're looking at, not the ground. But it also means than the molotov throw can miss & burn what behind the zombies instead if the zombies are too close. At least that won't burn your feet, as long as you're not near the zombie that the bot is throwing molotov at, hehehe..."


NOTES:
  • A video preview will be added later (maybe after ugc server bug on my Workshop Manager is fixed, as I used Crowbar Tool temporarily).
  • A known bug: Sometimes bots refuse to pick grenades. If this happens, just shove the bots when they're standing near a grenade on the ground or table.
  • Value no. 2 & 3 of "Use Pipe Bomb" are pretty useless on normal pipebomb because normal pipebomb only deals small damage on tank & special infected so it's a waste of pipebomb because bots will throw it at tank & it has high chance to miss because it takes time to explode. If you use normal pipe bomb, set "Use Pipe Bomb" to 1. You can set it to 2 or 3 only if you use custom pipebomb mods that can deal damage to tank, like "Saiyan Pipebomb", or "Laser Pipebomb" or other custom pipebomb mods.
93 条留言
kurochama  [作者] 10 月 23 日 上午 3:39 
@cowabunghole , the pickup range is not wide, as it's just 150 or around 2x melee range. They only pick if they have no grenade.
cowabunghole 10 月 23 日 上午 3:18 
is there a way to make the pickup radius smaller or even disable auto pickup, because items will just disappear even when the bots are not nearby
o_-KILLJOY-_o 10 月 5 日 下午 9:39 
@kurochama thanks! i am actually wrong in your script they actually do not shoot the pipebomb you throw, they just look at it but other wise thanks.
kurochama  [作者] 9 月 28 日 下午 1:57 
@ o_-KILLJOY-_o , probably that can be solved by temporarily disabling bot's fire button by using "m_afButtonDisabled" netprops for the duration of pipebomb tick when they detect a player throwing pipebomb, & then enable the disabled button again afterwards.
o_-KILLJOY-_o 9 月 28 日 下午 1:26 
So I've noticed in this script when bots throw pipebombs they do don't shoot at the infected going for the pipebomb they threw but when you throw your pipebomb they just clean house and thats always been the case even on vanilla, is there any way to make something similar where AI just ignore your pipebomb??
Hoodwink 9 月 18 日 上午 1:02 
@kurochama Thank you, this one i didn't know about. Thanks. <3 <3
kurochama  [作者] 9 月 17 日 下午 11:31 
@ Hoodwink , you don't need to change the vpk. Search in "Left 4 Dead 2/ left4dead2/ems/" & you'll find a folder with similar name to this mod. That folder contains the cfg file. Just change it from the cfg file instead.
Hoodwink 9 月 17 日 下午 10:05 
Very good mod you have made there. I love it. I love also the other mod where the bots run away from fire.
But i got only one problem: Because when i tried to change the number in the script for the grenades or molotov. My game crashes and say not the correct version with the apk.
I do it wrong probably. The game only works if i install your mod and don't change anything to the apk. Can someone help me please?
kurochama  [作者] 7 月 6 日 上午 12:43 
I think you can disable certain grenades on L4B2 & this mod. Both can't be active at the same time so you need to choose which one you need to disable (examples: You can use pipebomb from this mod, & then use L4B2 for the rest of grenades by setting "UsePipeBomb 1", "UseMolotov 0" & "UseVomitjar 0" on the cfg of this mod)
Thunder Wolf VX 7 月 5 日 下午 11:13 
So I ran into a slight hiccup here that probably I am the only moron who cares about such a small issue, but here it is.
Long story short, Bots Throw Grenades overwrites the bot preferences I set up in Left 4 Bots 2, and I don't know if there's a way around that. I know, it's dumb, but I'd prefer to have Duke Nukem be the only one who uses his Pipe Bombs.