Jump to content
The Dark Mod Forums

Recommended Posts

Posted

Personally I would love to see this change - as it would great to have another way beyond gas arrows to open up alert AI to KO.

It feels like there is very little reason as is for a player to invest in flashbombs at all and it’d be one more option for players that might provide one less reason to just reload the game.

  • Like 3

-=  IRIS  =-    ♦    = SLL =

Posted (edited)

I totally support this change. The way it is now, flashbombs are absolutely useless in TDM.

Flashbombs are parcticularly useful in Thief 1/2 for multiple guards which face each other, and are not blackjackable in other ways without alerting them to your presence. As it is now, there is no practical way to get rid of them in TDM.

Typically, you won't need more than 1 or 2 flashbombs in any Thief 1/2 mission, so, they are rare, and the use cases are also rare anyway. Another use for them in Thief 1/2 is against undead, of course, but, I don't even know if they do anything against them in TDM, where the undead are even less killable than in Thief 1/2 (another one of those things which actually need a change, but, let's not open that "box" for now ;) ).

Edited by chakkman
  • Like 2
Posted

@chumbucket91Not sure if in the code you can see anything that might cause some of the other polish issues with the flashbombs - such as the bizarre hit detection , "blinded" animation not looping properly on affected ai, and blind timer seemingly not working at all (the default duration for ai to blinded is supposed to be 8 seconds base + 1-4 of random time, but they seem to come out of it in maybe 4)

 

 

-=  IRIS  =-    ♦    = SLL =

Posted (edited)
1 hour ago, OrbWeaver said:
GetMind()->GetState()->GetStr() == "Blinded"

We use string comparisons to check AI states? 😮

Ya I saw that state class and wasn't sure what exactly the canonical way to interact with it was. I imagine there must be a better way - maybe dynamic_pointer_cast<BlindState>(GetMind()->GetState()); would be a better check? But I figured that was best left to the dev who ends up having to compile and implement the change. I wrote it that way just to illustrate the point.
If I end up drafting the actual PR instead of just a forum post, I'll try to do better than string comparison haha - or at least extract the magic string from the class instead of just hard coding it in to the AI code.

 

43 minutes ago, Wellingtoncrab said:

@chumbucket91Not sure if in the code you can see anything that might cause some of the other polish issues with the flashbombs - such as the bizarre hit detection , "blinded" animation not looping properly on affected ai, and blind timer seemingly not working at all (the default duration for ai to blinded is supposed to be 8 seconds base + 1-4 of random time, but they seem to come out of it in maybe 4)

Not sure about the animation loop or the timer, but the bizarre hit detection is probably caused somewhere in https://github.com/stgatilov/darkmod_src/blob/trunk/game/ai/States/State.cpp#L489-L515 . In TDM, it looks like instead of dropping a flashbomb near-ish the AI, you have to drop it inside their vision cone in order for it to be effective, and they also have to pass a line of sight check to the bomb. That... might be too finicky or elaborate for the gameplay purpose of the flashbomb? Maybe it should be simplified to a radius or have more generous vision checks or something - there appears to be an else branch trying to do this in some cases. Or maybe there's a subtle math bug in one of those FOV checks or something?

Edited by chumbucket91
  • Thanks 1
Posted (edited)
28 minutes ago, chumbucket91 said:

In TDM, it looks like instead of dropping a flashbomb near-ish the AI, you have to drop it inside their vision cone in order for it to be effective, and they also have to pass a line of sight check to the bomb. 

FWIW, the former is the way it worked in the original Thiefs as well, I think. Makes perfect sense to me, a flashbomb which isn't exploding in your vision cone won't be as effective.

Edited by chakkman
Posted

Not sure what all it would take but that would be a very welcome addition. Would really boost the utility of the flashbomb.

Modeler galore & co-authors literally everything

 

 

Posted

I like it!

Now we gotta get some mission authors to chime in.

I don't know if any missions that rely on guards being BJ immune during flashbomb for proper difficulty but I'm no expert on difficulty tuning. Probably should have a CVAR to enable the behavior change.

  • Like 1

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Posted
On 5/31/2025 at 12:20 PM, chakkman said:

FWIW, the former is the way it worked in the original Thiefs as well, I think. Makes perfect sense to me, a flashbomb which isn't exploding in your vision cone won't be as effective.

Did some testing on this, and indeed in TG and T2 you have to land the flashbomb in front of the ais. "In front" is pretty generous, though - its like a 180 degree cone. So that part staying as-is in TDM makes sense, and it looks like that's whats intended by this line: https://github.com/stgatilov/darkmod_src/blob/trunk/game/ai/States/State.cpp#L510 (distVec * owner->viewAxis.ToAngles().ToForward() ) > 0 is a vector dot product to figure out that 180 degree cone).

Improving the feeling of flashbombs in general might be a follow up proposal, but I'll keep one improvement suggestion to one topic. It'll be easier to narrow down exactly what else about flashbombs is funky when people have more incentive to use them in FMs and play around with them in the first place!

Posted

The "issue" with the animation at least appears to be on the script side, so even those of us who only know enough to be dangerous can still play with it. In "tdm_ai_base.script" there are blocks to specify how animations are handled when an ai is blinded. It only plays the animation once across the torso and legs channels and the ends regardless if the ai is still blind or not.

Spoiler
void ai_darkmod_base::Torso_Blinded() 
{
    // play the blinded animation
    playAnim( ANIMCHANNEL_TORSO, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_TORSO, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }

    finishAction( "blinded" );
    animState( ANIMCHANNEL_TORSO, "Torso_Idle", 4 );
}

void ai_darkmod_base::Legs_Blinded() 
{
    // play the blinded animation
    playAnim( ANIMCHANNEL_LEGS, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_LEGS, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }

    finishAction( "blinded" );
    animState( ANIMCHANNEL_LEGS, "Legs_Idle", 4 );
}

The result is it that rather quickly after the animation is complete, the ai seems to snap to idle and it is imo very hard to tell what state the ai is actually in. You kind of expect them to snap out of it, but they are actually still blind and just standing there:

I am a very bad scripter, but by copy pasting the torso channel animations a few times and adding some pauses in between for the leg channel you already get what is imo a not perfect but a much more legible "I'm blind" response: The ai is covering their eyes the entire time, they switch between stumbling forward and standing in place, they change direction, etc. You can also much more clearly see the difference from the randomization at the end the blind timer:

Spoiler
void ai_darkmod_base::Torso_Blinded() 
{
    // play the blinded animation
    playAnim( ANIMCHANNEL_TORSO, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_TORSO, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    
    playAnim( ANIMCHANNEL_TORSO, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_TORSO, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    
    playAnim( ANIMCHANNEL_TORSO, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_TORSO, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    
    playAnim( ANIMCHANNEL_TORSO, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_TORSO, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    
    playAnim( ANIMCHANNEL_TORSO, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_TORSO, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    
    finishAction( "blinded" );
    animState( ANIMCHANNEL_TORSO, "Torso_Idle", 4 );
}

void ai_darkmod_base::Legs_Blinded() 
{
    // walk forward play the blinded animation
    playAnim( ANIMCHANNEL_LEGS, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_LEGS, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    // wait a cycle before walking again
    sys.wait(animLength(ANIMCHANNEL_LEGS, "walk_blind") + 0.0166667);
        
    // walk forward play the blinded animation
    playAnim( ANIMCHANNEL_LEGS, "walk_blind" );
    
    while( !animDone( ANIMCHANNEL_LEGS, 4 ) ) {
        // waitFrame();
        sys.wait(0.0166667);
    }
    // wait a cycle before walking again
    sys.wait(animLength(ANIMCHANNEL_LEGS, "walk_blind") + 0.0166667);
    
    finishAction( "blinded" );
    animState( ANIMCHANNEL_LEGS, "Legs_Idle", 4 );
}

Again very bad at scripting. There is probably a much better way to handle this. For example it'd probably be better to pull the blind duration spawnargs from the ai and loop the animations for that length specifically and not repeat so many lines. Maybe introduce some kind of randomization to try and break up the "synchronized swimmer" look.

  • Like 2

-=  IRIS  =-    ♦    = SLL =

Posted
1 hour ago, nightmare said:

Could you also reduce or make a scale from 0-1 how strong is flash screen effect? 

Some games do make it a black flash instead of white in the accessibility options, couldn't be too hard to implement (I say, with no experience in implementing anything).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 0 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
    • jivo

      I just uploaded a new version of the Visible Player Hands mod. It's been updated for TDM 2.13 and has new animations. Check out the post if you're interested!
      · 0 replies
×
×
  • Create New...