No Fixed Cook Grenades AI 1.0.0

Do not ask when mod authors will update their mods or if they can upload older versions of their mods.
Bothering mod authors will lead to warnings and repeat offenses will lead to bans.
Due to an unusually high volume of traffic, our site may be experiencing intermittent slowdowns. If you notice any issues, log out of your account and browse anonymously so you can better utilize caching or try using forge.sp-tarkov.com to search for and download mods.

Remove AI default cooks grenades

A simple mod that stops AI from cooking grenades for ~0.4 seconds before throwing, ensuring instant throws.


Overview

AI in the game uses QuickGrenadeThrowHandsController, which by default cooks grenades for ~0.4 seconds. This mod removes that for AI.


Observed Cooking Times

When logging grenade creation times from BaseGrenadeHandsController.vmethod_2(), AI cooks for ~0.4s, while players cook for 0s:


Log

[Info :CookingGrenadesAI] Bot7: 0.417

[Info :CookingGrenadesAI] Bot13: 0.416

[Info :CookingGrenadesAI] Bot11: 0.417

[Info :CookingGrenadesAI] Bot4: 0.421

[Info :CookingGrenadesAI] Bot23: 0.417

[Info :CookingGrenadesAI] Bot12: 0.419

[Info :CookingGrenadesAI] Bot10: 0.418

[Info :CookingGrenadesAI] Bot4: 0.429

[Info :CookingGrenadesAI] Bot6: 0.416

[Info :CookingGrenadesAI] Bot7: 0.417

[Info :CookingGrenadesAI] Bot10: 0.417

[Info :CookingGrenadesAI] Bot11: 0.4229999

[Info :CookingGrenadesAI] PlayerSuperior(Clone): 0 <- Player

[Info :CookingGrenadesAI] PlayerSuperior(Clone): 0 <- Player

How It Works

Resets the cooking timer to 0 before throwing via a PatchPrefix on OnDropGrenadeAction().


Default Behavior

  1. In StartCountdown(), the controller initializes a countdown timer from -1 to 0.
  2. During each update, the controller accumulates time to the timer.
  3. When OnDropGrenadeAction() is called to create and throw the grenade, it uses the accumulated time as the cooking duration.


Mod Behavior

This mod uses a PatchPrefix on QuickGrenadeThrowHandsController.Class1162.OnDropGrenadeAction() to reset the accumulated cooking time to 0 before the grenade is thrown, effectively eliminating the AI's default 0.4-second cooking delay.


Visual Reference

test


Credits

  • Amazing .csproj Support: Huge thanks to Michael P. Starkweather and CJ for their fantastic .csproj files, which made this mod possible. Your help is truly appreciated!
  • SPT Modding Community: I referenced the source code of many mods for learning purposes while creating this mod. Sincere thanks to the community for making their mods open-source and helping me learn.
  • Grok AI: An all-knowing friend who answers any question I have.
  • I must say I am dumb, I dont get it. I thought we all would like scavs to NOT throw nades so fast... but to indeed LEAVE the delay... make it even bigger actually... before the throw... as IRL... you gotta take the nade -> take the pin off -> aim -> throw... it takes time... I am not being sarcastic, I really dunno what this mod means. Cooking nade - like it will blow faster? But dont I read that they also will throw the nades faster? Which I would not like.
    Anyway, I myself am confused :)