Problems with making NPCs sit down...

Post » Fri Jun 26, 2015 6:52 pm

This problem is a little complex, so apologies for the long write-up, but it's necessary to get how things have gone wrong.

So I decided that to liven up the faction headquarters of a mod I'm working on, I'd add some levelled lists which have a random chance of spawning different NPCs sitting down on chairs/tables around the place.

I'm using the meshes from GhanBuriGhan's http://mw.modhistory.com/download-53-16 (there are some screenshots there so you can get an idea of what it looks like).

The meshes are basically pants which artificially force the "legs" of the NPC into a "sitting down" shape, while leaving the feet untouched. So in order to use them, you basically have to assign them to the NPC in the CS, and them move them down so that their feet are below the ground (and hence invisible), and their "fake legs" take the place of their normal legs.

Screenshots for clarity:

https://drive.google.com/file/d/0B0ss6y_pJT86SFBnbkpqS0paN0U/view?usp=sharing. The screenshot is taken from the ground level. As you can see, the NPC's z position is lowered so that the feet are underground, with some collision walls beneath them. For some unimportant reason, the fake legs don't show in the CS, but in-game, it looks like https://drive.google.com/file/d/0B0ss6y_pJT86cS1EYWtITEt5azA/view?usp=sharing. As you can see, the fake legs have replaced the "real legs", giving the illusion of sitting.

So, my problem is that with the levelled lists, the NPCs spawned are initially in the correct positions, but if I come back to the cell after some time away, some of them have a random chance of screwing up https://drive.google.com/file/d/0B0ss6y_pJT86LTV2WjItNml3QTg/view?usp=sharing. What's happened is that the NPC's z position has reset so that their feet are on the ground rather than below it. This raises the NPC's z level, giving them the appearance of floating in the air.

If I disable the chair the NPC is supposed to be sitting on, you can see the feet https://drive.google.com/file/d/0B0ss6y_pJT86V2ozUHhZUnRZTDQ/view?usp=sharing. Their real legs are still replaced by the clothing item, hence the weirdness.

This happens randomly (i.e. not to all NPCs at once), and is fairly uncommon. However, it's resistant to console commands like 'ra' and modding the z position manually. And it's so weird and ugly, that even though it doesn't happen often, I'd rather ditch all the sitting NPCs altogether than running the risk of it happening at all.

So, how can I get around this issue? It seems to only happen for levelled list spawned NPCs vs hand-placed NPCs, but it's hard to say because of how infrequent it happens (i.e. it could also happen for hand-placed NPCs and I just haven't seen it happen yet).

User avatar
Angela Woods
 
Posts: 3336
Joined: Fri Feb 09, 2007 2:15 pm

Return to III - Morrowind