Jump to content
The Dark Mod Forums

Recommended Posts

Posted

The AI's use of the elevators seems arbitrary and even whimsical. I'm using the prefab 3-floor elevator, modified only in height to fit my map. It works perfectly for the player, but the AI are afraid to take it. I do have other AI on each floor, so the AAS pathfinding should happen. I also tried adding an aas32_flood entity, but that didn't help.

I copied my elevator into a test map for faster iterations and made a little landing for each floor for the AI to exit. Here the AI seems to feel it is safer to ride! But even so, the AI will not go to each floor. I have a path loop to instruct him to go from 1 to 2 to 3 and back to 1, then repeat. He'll just go from 1 to 2 and stop.  Sometimes he'll ride directly from 1 to 3, but not 2 to 3, nor will he come back down to 1. Depending on his mood, after reaching a floor he may get off or sometimes just stay on the elevator. It's like rolling the dice on every dmap.

I also tested the unmodified elevator prefab and it works a bit better (perhaps the shorter floor heights are more to the AI's liking). Here the AI will merrily do the complete loop nearly twice, but fail to return to the ground floor after the second trip and just stands on the top floor. I can't imagine why😵‍💫

image.thumb.png.e05e542665c3bf7a9f904dd1dedaa079.png

 

Posted

Not to be discouraging, but I couldn't get them to work properly with AI in my last 2 FMs and just decided to monsterclip them off.  There were a lot of other problems than just AI not following paths (e.g. falling into the shaft and dying, getting slammed by opening/closing doors and dying, etc).

So if you have a complicated setup it might take a lot of work to get it bug-free.

If that's a test map you have there, it might be worth raising a bug report and attaching it.  One of my main pet peeves with TDM is bugs that limit design choices.  IMO these should be high priority for fixing over all these graphics features that keep getting introduced.

 

  • Like 4

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Posted
12 hours ago, grodenglaive said:

The AI's use of the elevators seems arbitrary and even whimsical. I'm using the prefab 3-floor elevator, modified only in height to fit my map. It works perfectly for the player, but the AI are afraid to take it. I do have other AI on each floor, so the AAS pathfinding should happen. I also tried adding an aas32_flood entity, but that didn't help.

I copied my elevator into a test map for faster iterations and made a little landing for each floor for the AI to exit. Here the AI seems to feel it is safer to ride! But even so, the AI will not go to each floor. I have a path loop to instruct him to go from 1 to 2 to 3 and back to 1, then repeat. He'll just go from 1 to 2 and stop.  Sometimes he'll ride directly from 1 to 3, but not 2 to 3, nor will he come back down to 1. Depending on his mood, after reaching a floor he may get off or sometimes just stay on the elevator. It's like rolling the dice on every dmap.

I also tested the unmodified elevator prefab and it works a bit better (perhaps the shorter floor heights are more to the AI's liking). Here the AI will merrily do the complete loop nearly twice, but fail to return to the ground floor after the second trip and just stands on the top floor. I can't imagine why😵‍💫

image.thumb.png.e05e542665c3bf7a9f904dd1dedaa079.png

 

 

:(  Oh dear, please check the following

- make sure, that the surrounding brushwork is snapped to grid 8 or 16.

- make sure that the vertical bars are snapped to grid

- make sure that the green AAS brushes are snapped to grid

- make sure to have portals in the openings that are snapped to grid


If that does not help, then you can PM me a download link and I will have a look later today.

 

11 hours ago, Frost_Salamander said:

Not to be discouraging, but I couldn't get them to work properly with AI in my last 2 FMs and just decided to monsterclip them off.  There were a lot of other problems than just AI not following paths (e.g. falling into the shaft and dying, getting slammed by opening/closing doors and dying, etc).

So if you have a complicated setup it might take a lot of work to get it bug-free.

If that's a test map you have there, it might be worth raising a bug report and attaching it.  One of my main pet peeves with TDM is bugs that limit design choices.  IMO these should be high priority for fixing over all these graphics features that keep getting introduced.

 

Yeah, the elevators are "good" if you want to provoke strange AI behaviour. When on alert mode, they fall through openings, they kill each other by pressing the buttons (while others on deeper floors stand in the shaft), etc.. A consequent overhaul should be considered as (as you say) this problem limits mission design significantly.

  • Thanks 1
Posted
3 hours ago, JackFarmer said:

 

:(  Oh dear, please check the following

- make sure, that the surrounding brushwork is snapped to grid 8 or 16.

- make sure that the vertical bars are snapped to grid

- make sure that the green AAS brushes are snapped to grid

- make sure to have portals in the openings that are snapped to grid


If that does not help, then you can PM me a download link and I will have a look later today.

 

Yeah, the elevators are "good" if you want to provoke strange AI behaviour. When on alert mode, they fall through openings, they kill each other by pressing the buttons (while others on deeper floors stand in the shaft), etc.. A consequent overhaul should be considered as (as you say) this problem limits mission design significantly.

Ah, grid snapping - I never thought to check that. I hope it helps, I'll try that today. Thanks!

Posted
2 hours ago, datiswous said:

I wonder if placing a hidden staircase behind the elevator could work. Ai uses the staircase, player uses the elevator.

I might be able to shoehorn a staircase into the design.🤔 It isn't necessary for the gameplay to have the AI to move between these floors though. I just thought it would be nice to see them use the elevator.  

Posted

The one and only time I tried making AIs use an elevator, the chance one of them would fall down the shaft and get squashed by it increased dramatically the longer the play time went on. Then of course all the other AIs would spot the corpse and blame the player for his death.

  • Haha 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted
2 hours ago, thebigh said:

The one and only time I tried making AIs use an elevator, the chance one of them would fall down the shaft and get squashed by it increased dramatically the longer the play time went on. Then of course all the other AIs would spot the corpse and blame the player for his death.

And then the bodies piled in the shaft prevent the elevator from landing properly and the two forces fight to the death until something gives way and the game crashes because either elevator or corpse pile got thrown into the stratosphere at the speed of sound.

Posted

Haha, I haven't seen that!

  • Like 1

My missions:           Stand-alone                                                      Duncan Lynch series                              

                                      Down and Out on Newford Road              the Factory Heist

                                The Wizard's Treasure                             A House Call

                                                                                                  The House of deLisle                                                                                                  

                              

Posted (edited)

OK, I've got it mostly working on the test map. The grid snapping checked out, but I foolishly made a mistake in the path corner targets, so the 2nd floor was legitimately being skipped.🙄 The AI will now ride from floor 1 ->2 ->3 and back down 3 ->2 ->1.

One remaining hurtle is the AI should repeat this loop indefinitely in this test, but occasionally he will stop at a random floor and not get off the elevator or continue. This could happen during the first loop or it could be several before it fails. Each dmap turns out differently. It seems like a bug.

(wow, youtube really butchered the playback quality!)

Edited by grodenglaive
Posted
47 minutes ago, grodenglaive said:

OK, I've got it mostly working on the test map. The grid snapping checked out, but I foolishly made a mistake in the path corner targets, so the 2nd floor was legitimately being skipped.🙄 The AI will now ride from floor 1 ->2 ->3 and back down 3 ->2 ->1.

One remaining hurtle is the AI should repeat this loop indefinitely in this test, but occasionally he will stop at a random floor and not get off the elevator or continue. This could happen during the first loop or it could be several before it fails. Each dmap turns out differently. It seems like a bug.

(wow, youtube really butchered the playback quality!)

Have you tried

  • tdm_ai_debug_blocked  or
  • tdm_ai_showdest or
  • tdm_ai_showtasks

for further investigation?

Posted

What is tdm_ai_debug_blocked supposed to do? It sounded useful so I set up 2 scenarios that 'blocked' the AI from getting to a path_corner, and in both of them it didn't seem to help:

  • I put the path_corner in place too narrow for the AI to reach, so they just did that shuffling thing they do and couldn't reach it
  • I encased the path_corner in monster clip. The AI just stood there as expected because he couldn't reach it.

Both just seemed to report 'ENotBlocked'

image.png.0d9c6ba7ccf4510c1293263768235d95.png

TDM Community Github: https://github.com/thedarkmodcommunity

My fan missions: The Hare in the Snare, Part 1

The Lieutenant Series: In Plain Sight  High Expectations Foreign Affairs

Posted
1 hour ago, Frost_Salamander said:

What is tdm_ai_debug_blocked supposed to do?

 

 

That*s a good question, and I wished I had a good answer for you (I only used the other two methods in the past).

@nbohr1more: I cannot find a description for tdm_ai_debug_blocked in the wiki. Do you know what it is supposed to do?

 

@grodenglaive

There is another cvar you could try:

tdm_ai_showelevator - Debug output during operating elevators.

 

  • Thanks 1
Posted

It enables a visualization of the blocking object and the AI direction arrow.

Search: cv_ai_debug_blocked in our github repo:

https://github.com/search?q=repo%3Astgatilov%2Fdarkmod_src cv_ai_debug_blocked&type=code

 

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

Here he is stuck on the elevator at the bottom floor. The yellow pyramid by his foot indicates to me that his destination (which should be outside on the floor landing) did not update when the elevator reached the floor. Normally the pyramid immediately jumps to the next destination each time he arrives.

image.thumb.jpeg.dd7df023add0462d64bb8e8ca50c5d0b.jpeg

Posted

wait, here it is with the handy tdm_ai_showelevator debug. This time we're stuck on the second floor.

image.thumb.jpeg.2245e564c47b175ea8fda7cb075baedc.jpeg

So it looks like it's telling him to get off the elevator, but the destination is not updating.

Posted (edited)
On 2/27/2025 at 2:38 PM, grodenglaive said:

stopped at the 3rd floor this time

So, this isn't always the same problem? AI refuses to enter the floors completely arbitrarily?

Edited by JackFarmer

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.

×
×
  • Create New...