Jump to content
The Dark Mod Forums

Recommended Posts

Posted (edited)

The issues with the Flashbombs are multiple:

  • You can throw Flashbombs through doors/walls...
  • ... therefore you can blind NPCs through doors/walls
  • Because there is no indicator of any kind it is impossible to learn/predict where Flashbombs will land
  • Hold "Use" enough time and you can throw Flashbombs to the other side of the map
  • Flashbombs won't work if AI is not looking directly at them when they bang...
  • ...and even if AI is looking directly at them but their weapon or prop gets in the way the bang won't work...
  • ... and I think there is an issue as well if "opaque" models such as foliage get in the way
  • Sitting/sleeping NPC behavior is weird/buggy when blinded
  • Blind animations don't last long enough, and AI freezes afterwards: weird.
  • It is hard to KO an NPC that has just been blinded, you only have a split second and even then, you may very well fail: unreliable.
  • getting yourself blinded sucks 😆

I did the field work on Flashbombs long ago and I am sure I missed something.

Edited by snatcher
typos!

TDM Modpack

  • 3 months later...
  • 2 weeks later...
Posted
On 6/10/2025 at 3:54 AM, Wellingtoncrab said:

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.

  Reveal hidden contents
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:

  Reveal hidden contents
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.

Found a reference to #3431 in the relevant code section.

Quote

Since the blind state lasts 4s more than the blind anim, added code to make the AI stare down for the remainder of the state after the anim finishes, as if he’s waiting to regain his sight. Looks better than staring straight ahead like a dummy.

So, it seems that - at least to some degree - there was some intention behind the current behavior. Sadly, no further details on why the animation was not extended. Did that simply not occur to grayman?

  • Thanks 1
  • Confused 1

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

    • Ansome

      Terribly difficult juggling map designing with work, but I'm still alive and chipping away at something very special. I'm actually making a collaboration of sorts with a friend, I make the map itself and he acts as my "Chief Scope Creep Consultant" that checks in every so often to make sure this project isn't getting out of hand. It's a good system!
      · 0 replies
    • JackFarmer

      We don't need artificial intelligence; we need artistic intelligence. 
      Ralf Hütter, Kraftwerk
      · 5 replies
    • taaaki

      The post editor for the dark themes should be working again. Apologies for the inconvenience.
      · 1 reply
    • jaxa

      Talk GabeCube:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/39/#findComment-508710
      · 3 replies
    • The Black Arrow

      Things have been so bad these days for me...
      Just a year ago, I've been feeling dizzy, I thought it was nothing, today's stress, that type of thing, went to sleep...Still dizzy! 9 more days dizzy, went to doctor (I would have gone on the first day if NOT for the long appointment time)
      Said it may be Neck Dizziness...I did exercises for 6 months, no changes.
      Went to a Physical Therapist, went to another, no changes.
      I've asked my doctor for a full check this time.
      I hated yesteryear so much due to personal reasons, this year might be the same.
      To be brutally honest, I'd rather have cancer or/and chronic pain than suffer dizziness any second longer, especially when nothing helps.
      Hard to enjoy Thief when you're dizzy so I was hoping this year, Winter will be best for me.
      · 7 replies
×
×
  • Create New...