The Forge is currently under construction. Data is synchronized with the hub every 30 minutes. Help report issues!

Mod Details

No Fixed Cook Grenades AI

No Fixed Cook Grenades AI 1.0.0

Created by November75

254 Downloads

SPT 3.11.3 Compatible

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.

Version 1.0.0
Download Mod Version

SPT 3.11.3

Latest Compatible SPT Version

254 Downloads

Created Apr 18th, 1:03 PM

Updated Apr 18th, 1:03 PM

Virus Total Results

Not quite yet...