Jump to content
The Dark Mod Forums

AI uses elevator up, but not down


PranQster

Recommended Posts

I have an AI which uses an elevator to reach his path on a second floor. I put an aas32_flood on that floor to get it to work. I made a path back to his starting point as well (I tried with fewer path_corners for his return and also with the same amount, spaced the same). He does not use the elevator to return to the first floor though. I even tried putting an aas flood on the lower floor to help him, but no luck. Elevator call buttons have enough room around them. But still, the AI just walks between it's last 2 path corners on the second floor.

What might I have done wrong, and how can I coax him to use the elevator again?

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Yeah, the elevator works great. It's the 3-floor prefab one. All buttons work, including the call buttons. Could a visportal interfere if it is between floors with the nodraw side facing down (visportal texture facing up)? <<< ignore that, I had not put them there.

I have triple-checked my path targeting to make sure the path is not broken. The return path corners are sitting right next to the path corners of the initial path. The AI goes through the path, up the elevator and then to the last path corner and path wait before going to the next path corner, which is the first in the return path. But he stands at that path corner by the elevator, as though there was a path wait there. Then he turns around and walks to the previous path corner and path wait.... he just goes between 2 corners, waiting at each one (even though only one of those corners is targeted at a wait.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

I remember the same problem in Chalice of Kings even when I blocked off the stairs with stone (AI always currently choose to walk if it's possible which is why they don't use the elevator in Outpost too.) I recall testing the original test map and that worked OK yet I was certain I had it set up correctly in Chalice but he never would come down and I didn't have time to do more on it (we were preparing to release TDM1)

 

Sorry I've not time to experiment with this but I can only suggest you make an ultra simple test map and insert the prefab. I don't know if our test map was ever made public. I could check that again. You see what I generally do with faults like this is find a working version and gradually modify it to do what I want until it breaks. The point where it breaks should indicate the problem. If it doesn't break then I use the new version. :)

Link to comment
Share on other sites

When I began testing interleaved thinking with an elevator, I found that the test elevator map has the same problem. The AI would take the elevator to the top, but not come down.

 

I never investigated this, because my own test map with an interleaved-thinking AI using the prefab elevator worked fine.

 

The reason your AI waits at both path_corners up top is because when he can't reach the next path corner, he'll still do what the "non-walking" path* entities tell him to do. So if there's a path_wait on the path_corner at the bottom, he'll see it and do what it says. This behavior can also be seen when AI decide to sit down in the middle of nowhere; they're executing the sitting instructions parked next to the chair they're supposed to be sitting on, elsewhere in the map.

Link to comment
Share on other sites

Cool. Thanks guys. I'll tinker with it in my 'workshop' map until I either fix it, or decide a different plan of action for the AI. I might build a new elevator from scratch and see if I get different results than with the prefab, and then apply the change to the 3-story elevator.

If I can make it work with a simple 2-story elevator but not the 3-floor, then I may just end up using 2 'lifts' side by side with the second floor being common to both of them. I may do that anyway now that I think about it.

Progress is being made, all objectives are in place (and satisfactory at the least) and the mission is very playable. Now it is down to mostly making an intro and work on aesthetics, audio, details and making it more challenging. I promise some interesting and unique things and, hopefully, generating some smiles (and more successfully than my horse poop fiasco). blink.gif

 

I'll also test it with a different AI. Maybe the commoner I'm using is a bit dim. LOL

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Aha!

It would seem, and it makes sense, that the AI won't make proper use of the elevators if the floors are not completely sealed from each other. Like if there was a lover floor with a loft/balcony above which is open to the lower floor, the AI can't do the proper pathfinding.

That is the problem I have in my map is a portion of the second floor which has a balcony-like area looking down upon the lower floor.

My workshop map has nothing but one platform, floating in space with a big brush room around it. I was only using it to test models and prefabs and to build things without the clutter of my main map.

I added the elevator prefab and cloned the first platform for a second floor. The AI did nothing but pace on the first floor. I slapped up a third floor, walls and a ceiling... and presto, the AI used the elevator both up and down.

I'm hoping not to have to isolate my second floor balcony area with a solid brush... I kind of want a possible rope repel option from that area, but I'll experiment with non-solid brushes... perhaps monster_clip will be enough to remove the confusion from the AI.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Fixed!

It wasn't the open area to blame. I had tried closing it, even with solid wood textured brush, and the AI still didn't use the elevator going down.

What did the trick was to remove the visportals I had placed in front of each elevator level opening. Strange that the AI would use the elevator even one way since no matter which way he was going, he'd approach the nodraw side of the visportal first when entering the elevator. I figured that if he could use the elevator up that the visportals were not the problem.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Sounds like a good find although I don't see why the AI wouldn't go through a visportal in this case. However we know that sometimes they won't so maybe that applies here.

 

I can't remember in Chalice but maybe it's the same problem. I think I have at least one horizontal visportal in the shaft.

 

It seems there is no bug with the elevator but it's just one of the old pathing difficulties. :)

Link to comment
Share on other sites

Sounds like a good find although I don't see why the AI wouldn't go through a visportal in this case. However we know that sometimes they won't so maybe that applies here.

 

I can't remember in Chalice but maybe it's the same problem. I think I have at least one horizontal visportal in the shaft.

On one of my earlier attempts to fix it I had removed only the visportal on floor 2. The AI still use the elevator up but not down. Since the visportal surface was facing the elevator shaft on both visportals, I figured the AI would have no trouble with the visportal on the lower floor because he had navigated through both to get to the upper floor. Because of this I had ignored the visportals while trying to fix the problem and had not tried removing both at the same time.

 

It seems there is no bug with the elevator but it's just one of the old pathing difficulties. :)

It's a pretty good elevator. I'll probably make my own custom call buttons for it but the rest of it works for me with just an mild adjustment of the brick textures.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

The orientation of the visportal face shouldn't matter. Dmap only considers the face with the vp texture on it, and discards the remaining faces. One bug we found, though, was that if any of those discarded faces use a texture other than a nodraw, the AI won't go through the vp. You need to be careful when clipping visportals, because DR paints the cut faces with caulk by default, which will cause the problem.

Link to comment
Share on other sites

The orientation of the visportal face shouldn't matter. Dmap only considers the face with the vp texture on it, and discards the remaining faces. One bug we found, though, was that if any of those discarded faces use a texture other than a nodraw, the AI won't go through the vp. You need to be careful when clipping visportals, because DR paints the cut faces with caulk by default, which will cause the problem.

 

Good to know about the other faces being discarded in dmap. These visportals had not been clipped either. When needed, I resize visportals by dragging their edges rather than clipping to avoid exactly that. These were brushes created to exact fit and then done with 'make visportal' from the right mouse context menu. But yes, I had experienced the clipped brush caulk texture elsewhere and am used to re-texturing the clipped faces.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

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

    • The Black Arrow

      Hey @nbohr1morehow come the zombies in The Dark Mod don't have a "resurrection" mechanic to it, similar to how Thief has it?
      They're quite a weak creature as of right now, it's merely a walking corpse that slashes you, making attacking them to kill them an actual strategy.
      Would be better if they had some cool mechanism to it that truly makes them a danger, such as the resurrection idea itself.
      · 2 replies
    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 4 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
×
×
  • Create New...