Bothering mod authors will lead to warnings and repeat offenses will lead to bans.
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
- In
StartCountdown()
, the controller initializes a countdown timer from -1 to 0. - During each update, the controller accumulates time to the timer.
- 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
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.
-
Version 1.0.0
- November75
- 572 Downloads
echOo.
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