View Issue Details

IDProjectCategoryView StatusLast Update
0006635The Dark ModDesign/Codingpublic14.07.2025 19:54
Reporterchumbucket91 Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status newResolutionopen 
Product VersionTDM 2.13 
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

There are no notes attached to this issue.

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