Skip to content

Disappearing NPCs

Druncan124Druncan124 Member Posts: 3
edited April 2023 in Troubleshooting
Hey, I'm having trouble with a minor bug in BGEE.

Instead of walking off screen after finishing dialogue, a lot of the NPCs just despawn on the spot. At first I thought it might be because of a mod but even after uninstalling all of them it still happens. Anybody have an idea how to fix this?

Comments

  • jmerryjmerry Member Posts: 3,822
    What happens to NPCs after they say their piece depends entirely on how they're scripted. Some head off toward the nearest exit and despawn. Some don't move, and despawn after a timer. Some get fancy visual effects to indicate them teleporting away. Some stick around without leaving at all.

    Note that in all of these cases where they do something and then despawn, they despawn even if whatever they were trying to do is prevented. If you get in the way of that character that's trying to reach an exit, they'll still vanish after a bit. A timer is set when the action is initiated, and when that timer is up they're gone one way or another.

    So ... depending on what exactly you're seeing here, it might not even be a bug.
  • Druncan124Druncan124 Member Posts: 3
    jmerry wrote: »
    What happens to NPCs after they say their piece depends entirely on how they're scripted. Some head off toward the nearest exit and despawn. Some don't move, and despawn after a timer. Some get fancy visual effects to indicate them teleporting away. Some stick around without leaving at all.

    Note that in all of these cases where they do something and then despawn, they despawn even if whatever they were trying to do is prevented. If you get in the way of that character that's trying to reach an exit, they'll still vanish after a bit. A timer is set when the action is initiated, and when that timer is up they're gone one way or another.

    So ... depending on what exactly you're seeing here, it might not even be a bug.

    They're NPCS that, as far as i know should walk to the edge of your visible area and then despawn. I have been testing it on Kolssed outside of Candlekeep, but other NPCs do it too, although for example Parda does walk into the closest door and despawn, so it doesn't affect every NPC exit. But for some, once you close the dialogue box they just immediately despawn.

    It's not a Game breaking bug as far as I can tell (although I don't know if that behavior could mess with some specific quest) it's just a bit immersion breaking if you talk to someone and when they're finished they just vanish in front of you.
  • The_Baffled_KingThe_Baffled_King Member Posts: 147
    I can verify that EscapeArea() behaves inconsistently and sometimes produces the results that the OP has reported (an NPC disappearing literally as soon as the dialogue box is closed).

    What I've noticed in the case of Kolssed is that his disappearing act appears to correlate with the zoom factor - if I am zoomed out as far as possible, or nearly at that point, then he always disappears instantaneously. However, if I am not zoomed far out, then Kolssed always wanders off before disappearing. In contrast, I can generally talk to Binkos in the same area, at the same level of zoom, and have him wander off as normal before eventually disappearing. I think I've seen other NPCs pull off the instantaneous post-dialogue disappearance, but Kolssed does it reliably.

    OP, note that I am not really disagreeing with anything that jmerry said about how EscapeArea() is meant to work and generally does work. NPCs don't really wait until they are at the edge of your visible area before despawning - you can test this yourself by chasing an NPC that is following its post-dialog exit routine, or by surrounding an NPC with your party so that the AI cannot plot a path to an exit at the point that the EscapeArea() action is initiated.
  • The_Baffled_KingThe_Baffled_King Member Posts: 147
    It gets even weirder once you take into consideration the behaviour of Kolsseds spawned via the console... Kolsseds spawned in Beregost (the exterior map) execute EscapeArea() normally, even at minimum zoom. Kolsseds spawned in his default area (Lion's Way) but away from the Kolssed Actor's starting location also execute EscapeArea() normally, even at minimum zoom. However, any Kolsseds spawned when the active player is close to the Kolssed Actor's starting location are created at the Kolssed Actor's starting location (or at a marginal offset, if the original Kolssed is still there), and these Kolsseds do disappear literally instantaneously upon closing the dialogue box - but only when zoom is at minimum, or fairly close to it. As before, once I zoom in a little further, these Kolsseds will EscapeArea() with the normal wander and delayed disappearance. It's bizarre!
  • Druncan124Druncan124 Member Posts: 3
    I can verify that EscapeArea() behaves inconsistently and sometimes produces the results that the OP has reported (an NPC disappearing literally as soon as the dialogue box is closed).

    What I've noticed in the case of Kolssed is that his disappearing act appears to correlate with the zoom factor - if I am zoomed out as far as possible, or nearly at that point, then he always disappears instantaneously. However, if I am not zoomed far out, then Kolssed always wanders off before disappearing. In contrast, I can generally talk to Binkos in the same area, at the same level of zoom, and have him wander off as normal before eventually disappearing. I think I've seen other NPCs pull off the instantaneous post-dialogue disappearance, but Kolssed does it reliably.

    OP, note that I am not really disagreeing with anything that jmerry said about how EscapeArea() is meant to work and generally does work. NPCs don't really wait until they are at the edge of your visible area before despawning - you can test this yourself by chasing an NPC that is following its post-dialog exit routine, or by surrounding an NPC with your party so that the AI cannot plot a path to an exit at the point that the EscapeArea() action is initiated.

    Thanks for the comment, yes the zoom factor seems to be the culprit, I suppose I'll just play a bit more zoomed in than I'm used to. Though it would be nice if there was a way to fix it.
  • The_Baffled_KingThe_Baffled_King Member Posts: 147
    You're welcome. Sorry I couldn't be more help regarding a way to fix it. It's seriously weird behaviour, though! I didn't think it happened very often, but I vary the zoom factor, so perhaps it would have happened more often for me if I kept the game at minimum zoom at all times.
Sign In or Register to comment.