Project

General

Profile

Bug #4098

[Mod] South Wall, Den of Iniquity: collisions cause a huge fps drop

Added by Randy Davin 2 months ago. Updated 2 months ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Physics
Target version:
-
Start date:
09/13/2017
% Done:

0%

Reproducibility:
Always
Operating system:
Other
Severity:
Normal

Description

Using this mod->http://mw.modhistory.com/download-15-13449
The physic increase a lot, wait in the south wall until around nighttime.

OpenMW v0.42 no nightlies

tested in vanilla morrowind, no lag, no problem.
See the picture

screenshot004.png View - Look the picture (493 KB) Randy Davin, 09/13/2017 02:18 AM

History

#1 Updated by Dark Locq 2 months ago

Quick questions:
  • How many people are in AIWander mode in there?
  • Are any of them walking into walls or furniture (i.e., are there pathgrid problems)?
  • Is there any novel and animated "widget" in here, like some bobbing chandelier, a rotating platform, or other moving object a modder is experimenting with?
  • Are there any mirrors?
    These provide hints as to the four most frequent "slow to a crawl" problems I encounter in mod testing. The solution for the first two is AIWander,0,0,0 to make people stand still. The fix for the last two is Disable.

A fifth common problem is some kind of script (e.g. checking for a condition) that is running constantly, many times per second, instead of in a more constrained manner. This is sometimes caused by if/endif problems. I've run into many mods that intend "if ... elseif ... endif" but instead have "if ... elseif ... endif endif", mistaking elseif as something that needs its own endif. This has the result of closing the if early and applying the second endif to another if surrounding that entire structure, terminating it early as well, often thus breaking logic that had to do with doOnce kinds of checks. This double-endif thing can really wreck a script.

#2 Updated by Dark Locq 2 months ago

I did "Verify" on it in OpenMW-CS. The two script errors it identified don't seem likely to be the culprit. The script _Bal_Gath is apparently unused anyway, and the _Bal_Thumbscrew_Mumbling one seems to pertain to the torturer only. However, I do see this line in the latter:

"_Bal_Prisoner4"-> Disable ;make her script stop firing

after If ( OnDeath == 1 ). So, curious if the lag problem stops if you kill the torturer and the prisoners are consequently killed or disabled by this script. Maybe _Bal_Prisoner4 having a script that fires constantly is the issue.

#3 Updated by Chris Robinson 2 months ago

Dark Locq wrote:

So, curious if the lag problem stops if you kill the torturer and the prisoners are consequently killed or disabled by this script. Maybe _Bal_Prisoner4 having a script that fires constantly is the issue.

According to the screenshot it's the physics causing the lag, so it's unlikely to be script related. Issues like this usually crop up when there's one or more highly-detailed models that don't have an explicit collision shape defined. A collision shape is generated from the mesh, resulting in a collision shape that's far more detailed than it needs to be. When an actor is near such a problem object it causes physics processing to take more time than it has allotted for the frame, so the next frame has to do more to catch up with real-time which makes physics take even longer (the so-called physics death spiral; slow physics update slows down the frame update, which slows down the physics more, which slows down the frame more, which slows down the physics even more, etc).

You can use the TCG command to see the collision shapes (as wireframe overlaid on the scene). If there's any objects that have a lot of small triangles for a collision shape, that's possibly the culprit.

#4 Updated by Randy Davin 2 months ago

Chris Robinson wrote:

You can use the TCG command to see the collision shapes (as wireframe overlaid on the scene). If there's any objects that have a lot of small triangles for a collision shape, that's possibly the culprit.

I wonder how vanilla morrowind handles this issue, tested the mod in vanilla, and not a single lag moment was felt.
It almost impossible to wander around the place with such low framerate. The experience is frustrating.

#5 Updated by Dark Locq 2 months ago

Testing so far with "South Wall, Den of Iniquity" installed in-game:
  • Slow-down only happens when the modified South Wall Corner Club enters night mode, at (I think) 6pm. You can enter a little before then and just wait for the patrons and dancers to appear, then all of a sudden the frame rate drops through the floor. One might be inclined to blame the animated dancers, but it's not their fault.
  • The new corner club has lots of "The Regulars" at night, i.e. sitting NPCs on stools, borrowed from the mod of the same name. Like virtually all mods with that feature [only exception I've ever seen is Kat's Kastle, which has other, different issues], they're not in their chairs but floating in the air. Really wish the "levitating Regulars" bug would get fixed, since it affects lots of other mods that have sitting NPCs using code from The Regulars.
  • These "Regulars" cannot just be Disabled in console (they instantly reappear). If you do SetHealth,0 then Disable on each in turn, you can get rid of them. When the last is gone, the frame rate goes back to normal again. One is kind of hard to find, almost entirely in the ceiling, near the bar. No other changes need to be done, so they are definitely the cause of the frame-rate problem, though I have no idea why. Other levitating Regulars in other mods don't seem to cause FR problems.
  • You don't have to do anything about the ones named "Patron". Like the minstrels, they are not real NPCs, but are decoration. Just delete the ones that have their own names. You can't talk to them. You can't even loot their corpses. But they are real NPCs and seem to be sucking up resources, somehow – a whole lot.
  • There's another sitting NPC in a cell in the dungeon, but getting rid of her doesn't seem necessary. The dungeon has another glitch, in that a non-sitting Breton Camonna Tong prisoner (which is lore-wrong - the CT are all anti-outlander Dunmer), is half in the ceiling. Fixable by Disableing the stool in her cage, and using Move to put her into the cage properly.
  • The new sewer area and Thieves Guild lair all seemed to work fine.
  • The new dancers, cook, standing patron, torturer, and guildmembers don't seem to have any negative effect. The dancers and cook won't talk to you, but they're not killing the frame rate.
  • Picking up the Indoril Helmet from the shelf in the downstairs locked area in the corner club (behind the kitchen) crashed the game to desktop in one case but did not in another. It may be nothing to do with the helm at all but with the alarm-then-attack of the hiding thieves behind the tapestries when you steal something in there and they notice. Anyway, save first before doing stuff in this mod.
  • An exterior Balmora save I made after adding this mod also does a CTD, but that might be coincidence. I loaded an earlier one (that also post-dated addition of this mod), and went back to Balmora and did another save and that one worked fine. Even the CTD'ing one also worked, a long as I loaded another first then loaded that one. I've had OpenMW do this before, where a save wasn't loadable as the first one after starting the game app, but only as the second or later one.

#6 Updated by Alexei Dobrohotov 2 months ago

Almost all new NPCs use special scripts which, among other things, disable any interaction with them. For immersion purposes, according to author's script comments. Whatever.
Also, for example, legionnaires (_bal_Legionnaires script) and thieves (_bal_Thieves) and dancers too are disabled or enabled depending on the time and whether or not they disabled yet. I believe these checks run every frame. Nothing else is special about them, well, if you don't count that they have unique animations like Animated Morrowind NPCs.

#7 Updated by Andrei Kortunov 2 months ago

  • Subject changed from Extreme lag - unknown reason to [Mod] South Wall, Den of Iniquity: collisions cause a huge fps drop
  • Category set to Physics
  • Status changed from New to Confirmed
  • Priority changed from High to Normal
  • Operating system changed from Windows to Other

Looks like this slowdown is caused by a lot of sitting NPCs, colliding with furniture (they are present only at night).
Also a new location is a quite large and has a lot of objects.

Note: this mod is not fully compatible with the OpenMW due to #3803.

Also available in: Atom PDF