• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

NPCMod and Addons

Hello, I've come across an extremely tricky issue here, and the problem is as follows: I added a few firearm mods on top of an existing save, but I can't remember whether the issue occurred right after adding the firearms or after exiting, modifying the number of attachment slots on the firearms, and then reloading the save. Then, I suddenly noticed that NPCs could no longer interact normally. For both the existing NPCs and the naturally spawned but not yet recruited NPCs, there's only one option left: "never mind." I found that even after removing these firearm mods, the problem persists. However, when I added those firearm mods normally and switched to a new save, the NPCs were able to interact normally again. Could you please tell me why this is happening and what exactly is causing this nasty bug?

 
Last edited by a moderator:
Hello, I've come across an extremely tricky issue here, and the problem is as follows: I added a few firearm mods on top of an existing save, but I can't remember whether the issue occurred right after adding the firearms or after exiting, modifying the number of attachment slots on the firearms, and then reloading the save. Then, I suddenly noticed that NPCs could no longer interact normally. For both the existing NPCs and the naturally spawned but not yet recruited NPCs, there's only one option left: "never mind." I found that even after removing these firearm mods, the problem persists. However, when I added those firearm mods normally and switched to a new save, the NPCs were able to interact normally again. Could you please tell me why this is happening and what exactly is causing this nasty bug?
Adding mods to an existing save will often break that saved game.   The 'why' varies depending on the mods involved, but the advice you will get is always start a new save game when adding or removing mods.  

 
What are the error exactly.   If it cant find the templates in the NPCCore, then the core isnt loading or something overwrote its xml. 
After a lot of extensive testing... I have finally found what was causing the main errors for me... and it's downright silly, lol.

I like to keep everything neatly archived and in its place to pick and choose to play with a type of playthrough, so I am constantly changing my mod repository structure.
Usually its I've had it in the Alpha-Numeric format with the letter designator in front for a category with the numbers in blocks of 1000s for types to 6digits, like M-013055 Zombie (modpack name).  Well, late last year I flipped it around to be numeric with the 6 digits in from and the letter afterwards....  That seems to be the problem IF there is a ZERO in front.

Tested it a few times in different formats but it always messed up if it had a "0" in front. Silly me, I've been going over the guts of the xmls thinking the problem was there pulling my hair out and it was the "0" at the beginning of the mod name that was causing the problems.
*facepalm*

Hope this helps anyone in the future if they have similar issues.  Thanks again Xyth for your patience and work!

 
Hello, when I use too many NPCs, their teleportation causes the game to stuttering. Is there a way to turn off teleportation?

niubia1231 said:
Hello, when I use too many NPCs, their teleportation causes the game to stuttering. Is there a way to turn off teleportation?
 or increase their teleportation distance so that they no longer teleport frequently,thanks

 
Hello, I have problem with NPCcore mod. When it is installed zombies spawn but when they try to attack me, they don't hurt, but when i uninstall NPCCore, zombies and other entities dont spawn. Is there any solution for this problem?

 
Are you using the latest version of SCore and NPCCore?  Using any other mods?  Likely one of those is causing the issues.  

Uploaded version 1.3.0.2, very, very minor update, save safe.  Just fixed a seldom used flying enemy template.

 
Hello, I have problem with NPCcore mod. When it is installed zombies spawn but when they try to attack me, they don't hurt, but when i uninstall NPCCore, zombies and other entities dont spawn. Is there any solution for this problem?


You can't install NPC Core into an existing game. It causes issues like this. You have to start a new game.

 
Quick question, in the V1.0 version & up, the NPCs can't open doors & gates, right? Just want to be sure. I know a few alphas ago they could open some modded ones, which I kind of expect, but just in general, they can't. Correct? Thanks!

 
Quick question, in the V1.0 version & up, the NPCs can't open doors & gates, right? Just want to be sure. I know a few alphas ago they could open some modded ones, which I kind of expect, but just in general, they can't. Correct? Thanks!


I thought they could still open doors, but not locked doors.

 
Hello!

 

Summary: When I applied the optional mod to disable default NPCs in NPCCore, I get an error parsing spawning.xml, mentioning EXC duplicate id hash ' ' in biome 'pine_forest'
this reminds me I read few days ago in Nexus somebody mentioning recent update to the game that the spawning.xml now uses different code, could it be the optional mod hasn't been updated yet?

Game Version: V1.3

Platform: PC

Video Settings: High
[SIZE=14.6px]Game mode: SP[/SIZE]

Did you start a new game? Yes  

Did you validate your files? Yes

Are you using any other mods? Yes, but also tested with just the core mods, and then applying the option mod 

EAC off?  EAC is off

Bug Description:
 

2025-03-28T15:34:49 107.093 ERR XML loader: Loading and parsing 'spawning.xml' failed
2025-03-28T15:34:49 107.096 EXC Duplicate id hash '' in biome 'pine_forest'
at BiomeSpawningFromXml+<Load>d__0.MoveNext () [0x00102] in <cf106f0fabce4b568ad6c0e783024e88>:0
at ThreadManager+<CoroutineWrapperWithExceptionCallback>d__51.MoveNext () [0x00044] in <cf106f0fabce4b568ad6c0e783024e88>:0
UnityEngine.StackTraceUtility:ExtractStringFromException(Object)
Log:Exception(Exception)
<>c__DisplayClass51_0:<loadSingleXml>b__4(Exception)
<CoroutineWrapperWithExceptionCallback>d__51:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)




Detailed steps to reproduce the bug:

  • start the game with the 2 core mods, after checking the logs I exited the game
  • applying the 1-XNPCCore-NoCoreHumanNPCs mod into the Mods folder, then start the game again
  • after loading a new game, when I check the log it will say the above error

Actual result: spawning.xml failed to load and there seems to be nothing spawning in the world

Expected result: the human default human NPC to not spawn, but I should still see animals and the zombies spawning

at the moment I have removed the option no human NPC mod and edited the spawning.xml inside NPCCore mod itself, setting the maxcount for every id in every biome to 0, but I'm afraid I end up removing the fluffy fox as well (are they one of the dn/nnFriendlyCore01/2/3 ?).

Thank you in advance!

 
I just tested this and cant reproduce that error.  Did you unpack the .zip file first and then put that mod in the Mods folder?  

 
Hello!

 

Summary: When I applied the optional mod to disable default NPCs in NPCCore, I get an error parsing spawning.xml, mentioning EXC duplicate id hash ' ' in biome 'pine_forest'
this reminds me I read few days ago in Nexus somebody mentioning recent update to the game that the spawning.xml now uses different code, could it be the optional mod hasn't been updated yet?

Game Version: V1.3

Platform: PC

Video Settings: High
[SIZE=14.6px]Game mode: SP[/SIZE]

Did you start a new game? Yes  

Did you validate your files? Yes

Are you using any other mods? Yes, but also tested with just the core mods, and then applying the option mod 

EAC off?  EAC is off

Bug Description:
 

2025-03-28T15:34:49 107.093 ERR XML loader: Loading and parsing 'spawning.xml' failed
2025-03-28T15:34:49 107.096 EXC Duplicate id hash '' in biome 'pine_forest'
at BiomeSpawningFromXml+<Load>d__0.MoveNext () [0x00102] in <cf106f0fabce4b568ad6c0e783024e88>:0
at ThreadManager+<CoroutineWrapperWithExceptionCallback>d__51.MoveNext () [0x00044] in <cf106f0fabce4b568ad6c0e783024e88>:0
UnityEngine.StackTraceUtility:ExtractStringFromException(Object)
Log:Exception(Exception)
<>c__DisplayClass51_0:<loadSingleXml>b__4(Exception)
<CoroutineWrapperWithExceptionCallback>d__51:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)




Detailed steps to reproduce the bug:

  • start the game with the 2 core mods, after checking the logs I exited the game
  • applying the 1-XNPCCore-NoCoreHumanNPCs mod into the Mods folder, then start the game again
  • after loading a new game, when I check the log it will say the above error

Actual result: spawning.xml failed to load and there seems to be nothing spawning in the world

Expected result: the human default human NPC to not spawn, but I should still see animals and the zombies spawning

at the moment I have removed the option no human NPC mod and edited the spawning.xml inside NPCCore mod itself, setting the maxcount for every id in every biome to 0, but I'm afraid I end up removing the fluffy fox as well (are they one of the dn/nnFriendlyCore01/2/3 ?).

Thank you in advance!
It's the spawning.xml inside the zip in the options folder that is the problem I just dl'ed again to test it doesn't have the new "spawn id=" just the old "spawn "

I fixed it like this just made up id's :

    <append xpath="/spawning/biome[@name='pine_forest']">
        <spawn id="aaa01" maxcount="1" respawndelay="1" time="Any" entitygroup="npcAnimalsAny" notags="commercial,industrial,downtown"/>
        <spawn id="aaa02" maxcount="1" respawndelay="1" time="Any" entitygroup="npcAnimalsAny" tags="commercial,industrial" notags="downtown"/>
        <spawn id="aaa03" maxcount="1" respawndelay="1" time="Any" entitygroup="npcAnimalsAny" tags="downtown"/>
    </append>
 

and so on for every line that contains spawn

 
I just tested this and cant reproduce that error.  Did you unpack the .zip file first and then put that mod in the Mods folder?  
Hello! Yes, I unpacked the .zip file first and then put it in the Mods folder.
just incase I might be using the wrong version, XNPCCore version is 1.3.03, and the XNPCCore-NoCoreHumanNPCs is version 1.1.0.0
 

It's the spawning.xml inside the zip in the options folder that is the problem I just dl'ed again to test it doesn't have the new "spawn id=" just the old "spawn "

I fixed it like this just made up id's :

    <append xpath="/spawning/biome[@name='pine_forest']">
        <spawn id="aaa01" maxcount="1" respawndelay="1" time="Any" entitygroup="npcAnimalsAny" notags="commercial,industrial,downtown"/>
        <spawn id="aaa02" maxcount="1" respawndelay="1" time="Any" entitygroup="npcAnimalsAny" tags="commercial,industrial" notags="downtown"/>
        <spawn id="aaa03" maxcount="1" respawndelay="1" time="Any" entitygroup="npcAnimalsAny" tags="downtown"/>
    </append>
 

and so on for every line that contains spawn
Hello! I have edited the spawning.xml by following the example you provided, and is now able to load it fine into the game without any error

Thank you both for the replies!

 
You are correct, that file wasn't updated on the repo.  My local copy was updated but not pushed to the repo.  Glad you sorted it.  

Update pushed to repo.  <Version value="1.3.04" />

 
Last edited by a moderator:
Hi, I have a very strange behavior of the NPC with a grenade launcher. The weapon often disappears from the hands of the NPC. Sometimes the opportunity to talk to him disappears. And the NPC shoots for no reason. Such strange behavior is observed only with a grenade launcher. (0-SCore-1.2.61.2007)

 
Last edited by a moderator:
Hi, I have a very strange behavior of the NPC with a grenade launcher. The weapon often disappears from the hands of the NPC. Sometimes the opportunity to talk to him disappears. And the NPC shoots for no reason. Such strange behavior is observed only with a grenade launcher. (0-SCore-1.2.61.2007)
The launcher model blocks the ability to talk to the NPC, so there is a buff that when the NPC enters chat range and idles, the weapon is hidden so you can enter dialog with it.  Not sure why it would shoot for no reason, but its been a long time since I tested that weapon on them.

 
The launcher model blocks the ability to talk to the NPC, so there is a buff that when the NPC enters chat range and idles, the weapon is hidden so you can enter dialog with it.  Not sure why it would shoot for no reason, but its been a long time since I tested that weapon on them.


I think I figured out why the NPC shoots. I tried to make a short video about it. And I recorded this moment, and when I watched it again, I realized that at the moment of the shot I got experience. It turns out that the NPC shoots at zombies so quickly that they don’t have time to appear in the game, it’s better not to give the grenade launcher to the NPC, otherwise the whole territory will be in pits. 😂

 
Back
Top