View Issue Details

IDProjectCategoryView StatusLast Update
0006635The Dark ModDesign/Codingpublic21.01.2026 16:00
Reporterchumbucket91 Assigned ToSTiFU  
PrioritynormalSeveritynormalReproducibilityalways
Status feedbackResolutionopen 
Product VersionTDM 2.13 
Target VersionTDM 2.14Fixed in VersionTDM 2.14 
Summary0006635: Make Flashbombed AI's become Blackjackable
DescriptionCopied/lightly edited from https://forums.thedarkmod.com/index.php?/topic/22738-proposal-flashbombed-ais-become-blackjackable/

The usability and efficacy of Flashbombs in TDM feels underwhelming, and could use some developer love.

To wit, many players and mappers seem to think they're kinda bad because they're just a stun, which still requires you to hide in a very narrow time frame and then wait for the AI to cool off after use. One of the big upsides of flashbombs in TG/T2 was that, if you had alerted human enemies chasing you, you could drop a flashbomb and then turn around and blackjack them to non-lethally remove them from play. It was an inventory-limited opportunity to recover from failure and continue playing the game, as opposed to reloading a save. This is a fun and proactive interaction that keeps the flow of the game going, and I propose that we add it to TDM.

I think this could be accomplished with minimal code. After a read through the public TDM git repository, I think the most appropriate change would be to adjust the condition here: https://github.com/stgatilov/darkmod_src/blob/ac0a286561630eefee1cbb44d09d77128cd3d8e7/game/ai/AI.cpp#L11892 to read as follows:
```
  if ((GetMoveType() == MOVETYPE_SLEEP || // grayman 0003951
         GetMind()->GetState()->GetStr() == "Blinded") && // proposed - maybe there's a better way to write this condition like checking the type or something?
        ((minDotVert != 1.0f) && (minDotHoriz != 1.0f))) // cos(DEG2RAD(0.0f)) indicates elite faceguard helmet
    {
```
Currently, this check does not pass for blinded AIs and they move to the if-else branch at L11903, and since they're very alert because they were actively chasing the player, they cannot be blackjacked. This change should give a flashbomb-blinded AI the same knockout vulnerability angle as a sleeping AI. Helmeted human AIs (and undead/magical AIs because they can't enter that particular mind state) retain their blackjack immunity, and everyone else can be clunked in the face as a reward to the player for spending a limited resource, not flashing themselves, and having the quick thinking to turn around and draw the blackjack. The blinded mind state lasts for about 8 seconds (I forget where I found that but its a hardcoded magic number in a Damage() function somewhere), which feels a bit short but about right, and then when the state changes the player's window of opportunity is lost.
Steps To ReproduceIn any TDM mission, drop a flashbomb while being chased by a guard, then pull out the blackjack and attempt to hit them while they are stunned. The arm-raise animation cue will never play, and the AI will never be knocked out.

After making this change, the expectation would be: you must still aim at the guard's head, but they would be blackjackable and crumple to the floor after being struck, as long as they are still stumbling around in the "blinded" state. This strategy should also work with flashmines, which apply the same state as flashbombs(? I think?). This is _not_ expected to work on fully helmeted guards, or enemies that cannot be blinded.
TagsNo tags attached.

Relationships

related to 0006636 new Flashbomb Blinded animation does not loop properly for the lifetime of the Blinded state 

Activities

STiFU

STiFU

18.01.2026 10:05

developer   ~0017132

For a brief duration after the flash, non-elity AIs can now be KOed from any direction. This duration is controled by the cvar tdm_ai_ko_susceptibility_after_flash_duration, which is currently set to 1.5 s. The duration is limited to avoid KOing entiry rooms of AI with a single Flashbomb. The duration is subject to balancing changes and shall be evaluated during 2.14 beta.
chumbucket91

chumbucket91

20.01.2026 19:29

reporter   ~0017135

So, after the flash, AIs that are blinded play a blinded animation for roughly 8 seconds? (Or at least they probably should - see the related issue attached to this one)

Also, if my reading of tdm_gui01.pk4\guis\playertools\flashbomb.gui is correct, the player can blind themselves for 4 seconds (I'm reading the 4000's in the file as milliseconds?) with a mis-thrown flashbomb.

Given the above, I think the new 1.5 second cvar will probably feel too short. I'm not even entirely convinced that it should have a separate cvar from the animation duration, although I would accept that the current 8 second duration may be too long. though maybe a separate cvar is good for balancing or code architecture in a way that I don't appreciate because I am not the programmer :) .
STiFU

STiFU

21.01.2026 07:10

developer   ~0017136

If you set the cvar to infinity, the AI will be blackjackable for as long as it is blinded. We will test all this in beta. :-)

Issue History

Date Modified Username Field Change
14.07.2025 19:35 chumbucket91 New Issue
14.07.2025 19:54 Amadeus Relationship added related to 0006636
14.01.2026 21:48 STiFU Assigned To => STiFU
14.01.2026 21:48 STiFU Status new => confirmed
18.01.2026 10:05 STiFU Status confirmed => feedback
18.01.2026 10:05 STiFU Fixed in Version => TDM 2.14
18.01.2026 10:05 STiFU Target Version => TDM 2.14
18.01.2026 10:05 STiFU Note Added: 0017132
20.01.2026 19:29 chumbucket91 Note Added: 0017135
20.01.2026 19:29 chumbucket91 Status feedback => assigned
21.01.2026 07:10 STiFU Note Added: 0017136
21.01.2026 16:00 STiFU Status assigned => feedback