Aller au contenu

Photo

Custom Module causing major lag in single player


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
BillHoyt

BillHoyt
  • Members
  • 109 messages
While I am loth to put HELP in a message title in capital letters, if I were ever to do so, it would be in this message.

I just plugged a custom mod into single player (It's the Lay By http://social.biowar...m/project/2869/) for beta testing and the module is causing major lag problems in single player even if you don't go to the mod area.

The mod is basically 4 small areas (2 outdoors), 5 quests, one battle, 4 cutscenes, one custom animation (an ambient dog), and a handful of custom treasure items. Not a big mod all things considered. There are no 2DAs, no PRCSCRs, one map file with no plot trigger. It's basically a lot of puzzles and dialogue (downloadable test plan is on the project site if you want to see it).

Everything seems to run fine within the mod (which is why I did not suspect a big problem). You can travel to and from it just fine. But the problem is that when anyone plays elsewhere, cutscenes slow to a crawl.  I started a new human noble four times and only once managed to get through the larder to the main hall battle, but the rest of the time it starts to sputter and eventually stops.

My problem is: I simply don't know where to start looking for a problem like this. Before I do anything drastic, I wanted to ask here what kinds of things can cause a module to do this? Any help would be greatly appreciated, as I am frankly stumped and do not even know where to start looking.

Thanks in advance.

#2
Phaenan

Phaenan
  • Members
  • 315 messages
My guess would be the module core script throwing unhandled events back to the generic core. Doing so actually forces every module bound event to be handled twice by the generic module_core ; each module already receives a "copy" of the module events, so it's basically not necessary to redirect the unhandled events to module_core script unless you're building a standalone module with a custom core.

Anyhoo.
I just had a look at your module and it'd seem that what's going on. You should remove the lines 47-49 from lay_scr_module_core.nss :

{
          HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
}

Although I didn't check the other scripts and something else may be going hairy, that part can't help anyway. :o

Modifié par Phaenan, 01 août 2010 - 09:58 .


#3
BillHoyt

BillHoyt
  • Members
  • 109 messages
Thanks, Phaenan. That was a problem (which was also causing the dreaded "double attribute when you level up" bug. And I appreciate you taking the time to dig through my code. Sorry about the mess ;)



But here's the weird thing: I had already pulled the script on my machine hoping to isolate the problem that way. That didn't solve it, neither did removing everything custom, from animations to head morphs. So I finally uninstalled the module completely from my machine, added a new area with a single waypopint, and pointed the map file to it. I exported it so that was the only thing in my toosetexpot directory. Then I create XMLs, fired up a save game, and travelled to it. No problem. Then I started a new character and by the larder scene it was crawling again.



Thus far I have been very successful at discovering what the problem is not. I just haven't a clue what it is.

#4
Phaenan

Phaenan
  • Members
  • 315 messages
Well, in hindsight simply throwing the module events back to module_core wouldn't have such severe consequences. As a matter of fact I just tried to get to the larder scene using your beta package (without fixing the event double handling) and it worked correctly until the end. Moreover, I didn't catch anything out of place in the logs generated by my own debug stuff. (double events aside, obviously)

So in the end I'm not sure the issue lies with that package. Maybe you have something else in the override conflicting severely with it, or messing things up on its own ? :o

Modifié par Phaenan, 01 août 2010 - 01:07 .


#5
BillHoyt

BillHoyt
  • Members
  • 109 messages
Thanks, Phaenan, I really appreciate your help. Can you do me a favor and leave it in for a week? You don't have to go there (though based on your avatar, you'd be most welcome), but others are reporting slowdowns/lags in other places (e.g. Circle Tower, Lothering) as well. Besides, just think how fast your attributes are going to climb ;)



I'm going to rip out all the mods on my machine and try it again from scratch and see if I can notice anything different. But I'm going to do it tomorrow. Trying to get it ready for release has consumed far too much of my time, based on the condition of my lawn.

#6
Phaenan

Phaenan
  • Members
  • 315 messages
Ah, a tad too late for that. I removed it the second I finished my quick larder test. I don't have the time to actually play the game truth be told. Most of the time I just launch the game, log in, quickly type a runscript phaecmd debug, alt+F4 out the game (faster) look at the log and go back to whatever editor I was using 10s before. Basically I wouldn't be a good betatester for anyone but myself.



Good luck looking for that bug. :o

#7
BillHoyt

BillHoyt
  • Members
  • 109 messages
Thanks for your honesty ;)

#8
BillHoyt

BillHoyt
  • Members
  • 109 messages
*bump* - in case someone else has the same problem

OK, here's what the error turned out to be: character codices. Right before the problem appeared, I had added just over half a dozen codices to the Lay By, for the bartenders, for the important NPCs, and for certain "custom" items like the guest registry. I'm not sure if I ran off the end of a table somewhere or if there was some other issue with them, but the cuts that were reported to hang tended to be those which introduced new characters (in the Larder, Dog, in Lothering, Leliana) and therefore also unveiled codices.

FWIW, I still don't know if other mods they had installed also created character codices, which means I don't know how many "free spots" are available. But once I deleted all of ours I was able to run the game just fine from that point and no one else has reported the problem since. So there may or not be a limit to the number of new codices that may be introduced, but adding a load of new codices might just cause your users to have problems. Just an FYI.

Modifié par BillHoyt, 15 août 2010 - 05:18 .