Jump to content

Game freezing from scripted mod I'm making, could use debugging help


Recommended Posts

Hi, I've been working on a mod that involves giving all nearby actors a perk with a script which (among other things) gives the actor a different perk with a script dependent on their Race. I have been working on this for some time and I seemed to have it all working well but recently I've found sometimes something in my mod crashes the game. It doesn't CTD but the program stops responding indefinitely. I've noticed it happen when I spawn a bunch of NPCs at once. I think this happens more or might only happen if they enter combat immediately. I've noticed it also doing this sometimes later during combat instead of immediately after the NPCs spawn but haven't been able to reproduce that for a while. I'm not sure if spawning a lot of NPCs at once is overloading something (haven't seen any stack dumps) or just making whatever is crashing it more likely to happen.

 

From testing, I'm pretty sure something on the race-specific script is causing the issue. The "Initialize" function that sets the script up when it starts and the NPC is ready seems to either be the culprit or set the stage for whatever is causing it, but I'm having trouble narrowing it down. I've added traces to every event and function in these two major scripts, and even but a trace on every line for that Initialize function. I still have not seen any last trace show up consistently, so I'm not sure how that function could be causing this issue. Spawning a bunch (5 or 10 each) of two types of NPCs hostile to each other (I've been experimenting with Tower Tom 4b0bf and Settler 20593) seems to make it crash pretty much immediately but other situations are less predictable. If anyone else interested in helping, I'll share the source of my scripts and try to figure out more details. Thanks for any help, this has been frustrating to me.

 

Update: I've narrowed it down to the part adding perks for each body part. So the script itself is fine, it's just something wrong with the perks. I haven't figured out why this is causing the problem and why it's only crashing when it's a bunch of NPCs spawned together.

Edited by TheIrontoads
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...