Jump to content

[LE] How do i know if my mod is crashing because of too many npcs and is there a way to fix this?


Recommended Posts

I noticed with the mod I am creating that it works fine until i have entered a cell such as a city where a battle is taking place. My mod has a few different factions. Each faction has a fort, camp, fleet or camp that they spawn from and each has a target location to travel to. Amazon have a cave whose entrance is located in a camp in each of the nine holds. They are in three groups of 8. One group stays and guards the camp one group on monday, wednesday, and friday goes to the Main fort of the hold. one tuesday and thursday the other group goes to the Draconian castle. Draconians spawn in a castle .One group stays behind to guard the castle one group goes to the Amazon camp and the last one goes to the fort. Bandit hunter groups go from their hall to the draconian and the amazon camps. Imperials travel from their camp every two days to the hold fort. Stormcloaks do the same. I added borderguard posts and which are guarded by guards who have shifts. There are pirates who attack certain remote locations along the coast where shipwrecks are located and there are coast guards who attack them. There are hold police that go back and forth from a house to the borderguard post during the day and inquisitors do the same at night. There are rangers who hunt animals in the wilds around their camps. Each hold has a Troll, bear, wolf, spider, chaurus, and saber cat cave where the animals leave at the time they are normally active to hunt. There are three merchant groups who travel to the border post, fort and town inns to act as delivery people. each city has an elite guard. Most travel in a group of 8 plus a leader. The Draconians have a dragon with each group. I also have 5 companions in each city who basically hang out in the shops and inns during the day and are at home to sleep. AT night a few nights of week Draugrs travel from their barrows and attacks a settlement or for.They have the ability to spawn skeleton warriors and will return home in the morning. I have noticed that the mods runs without problems until I get close to a city or town where their is a battle taking place. I have recently got a new computer. I have 8 gbs vram, 16 GB ram and have an i3-7300 processor at 4Ghz. i am curious if this is happening because of a hard limit of npcs? I recently read skyrim has a hard limit for npcs and when that is reached the game will crash. I understand that civil war mods have 200+ characters in one cell at a time. Also would adding occlusion planes in cells where forts, border posts, and where npcs exit and enter their buildings alleviate strain. the game skyrim

Edited by Russia2012
Link to comment
Share on other sites

As a quick test, try moving the Actor Fade slider in System/Settings/Display all the way down to zero. Does it make any difference? If it does, that tells you that it's the number of NPCs the engine is rendering simultaneously that is the problem. It probably won't make any difference, but eliminate that as a factor, first.

Link to comment
Share on other sites

I don't know if Skyrim has a hard actor count cap, but I had similar issues on Fallout 4 pushing uGridsToLoad past 25 which activated too many actors in the world and caused out of resource / memory allocation errors that crashed to the desktop. I know its actors and not general scenery rendering because removing excess actors from the active radius cleared the problem.

Link to comment
Share on other sites

Are you running your mod on vanilla/unmodded skyrim?

 

If not, it is going to be a crapshoot as it could be interaction with any other mod you have installed that is causing crashes.

 

Second, if you are, NPCs take up a lot more resources than just cost to render - every NPC is running AI packages, evaluating navmesh when moving, etc.

Active travel packages and quests (with the NPCs aliased in the quest) make the load even heavier as the NPCs need to be kept in memory as otherwise the game has no way to track their progress.

 

This is computationally very expensive. At some point your PC specs will not matter, the engine will not be able to handle it.

 

I have not seen mods that add hundreds of fighting civil war PCs in a single cell, even Warzones is quite conservative with number of NPCs in a single cell at any given time.

 

in my own testing once you go upwards of 80-100 total NPCs - including animals etc which are all NPCs in the 5 cells loaded around the player, you typically start seeing floating NPCs and other fun stuff. I have not pushed it further as that already was a bad state. I have my doubts about whatever mod you are talking about.

 

The fix would be less NPCs :)

 

Reading your post in more detail, that plus the vanilla wildlife and NPCs really sounds pretty heavy. Occlusion planes just alleviates rendering cost, not AI etc cost.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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