Jump to content

Spawn Errors

Pending 2.8.3

Somescrub
Somescrub

Posted

Getting this semi-frequently in console:

Failed to call hook 'SpawnNpc' on plugin 'NpcSpawn v2.8.4' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.NpcSpawn+CustomScientistNpc.UpdateInventory () [0x00116] in :0 at Oxide.Plugins.NpcSpawn+CustomScientistNpc.ServerInit () [0x00164] in :0 at BaseNetworkable.Spawn () [0x0004f] in :0 at BaseEntity.Spawn () [0x00000] in :0 at Oxide.Plugins.NpcSpawn.CreateCustomNpc (UnityEngine.Vector3 position, Oxide.Plugins.NpcSpawn+NpcConfig config) [0x0007b] in :0 at Oxide.Plugins.NpcSpawn.SpawnNpc (UnityEngine.Vector3 position, Newtonsoft.Json.Linq.JObject configJson) [0x00008] in :0 at Oxide.Plugins.NpcSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000b0] in :0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in :0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in :0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0

aimacak

Posted (edited)

On 11/17/2025 at 3:25 PM, Somescrub said:

Getting this semi-frequently in console:

Failed to call hook 'SpawnNpc' on plugin 'NpcSpawn v2.8.4' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.NpcSpawn+CustomScientistNpc.UpdateInventory () [0x00116] in :0 at Oxide.Plugins.NpcSpawn+CustomScientistNpc.ServerInit () [0x00164] in :0 at BaseNetworkable.Spawn () [0x0004f] in :0 at BaseEntity.Spawn () [0x00000] in :0 at Oxide.Plugins.NpcSpawn.CreateCustomNpc (UnityEngine.Vector3 position, Oxide.Plugins.NpcSpawn+NpcConfig config) [0x0007b] in :0 at Oxide.Plugins.NpcSpawn.SpawnNpc (UnityEngine.Vector3 position, Newtonsoft.Json.Linq.JObject configJson) [0x00008] in :0 at Oxide.Plugins.NpcSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000b0] in :0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in :0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in :0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0

Hello, most likely you made a mistake in the configuration of the NPC in any plugin that uses NpcSpawn, try to remember what you last edited before this error appeared, I can also recommend finding the `jsonlint` resource in the search engine, you can check the configuration for syntax, and if it is incorrect, it will indicate your mistake..

Edited by aimacak
Somescrub

Posted

On 12/10/2025 at 3:44 PM, aimacak said:

Hello, most likely you made a mistake in the configuration of the NPC in any plugin that uses NpcSpawn, try to remember what you last edited before this error appeared, I can also recommend finding the `jsonlint` resource in the search engine, you can check the configuration for syntax, and if it is incorrect, it will indicate your mistake..

This is occurring across plugins that leverage NPC Spawn and those that do not - which tells me it is a coding issue holistically. For instance, the same behavior is being identified with Botrespawn and ZombieHorde NPCs, but those do not leverage the NPC Spawn plugin. This seems to be a more holistic issue with custom NPC spawning in general, but does warrant some additional investigation on the part of the spawn plugin devs. 

These issues surfaced after the November update - @Steenamaroo attempted some fixes for BotReSpawn, but I am still seeing the issue occur even with the fix version in place (haven't had a chance to open a support ticket on that one).

  • Administrator
Steenamaroo

Posted

Hi,

The error you pasted is in custom behaviour code for NPCSpawn npcs.
You won't see that error in relation to BotReSpawn or ZombieHorde npcs, as they won't have that custom component.

If you're seeing a different error with BotReSpawn npcs please do let me know, but all issues arising from November wipe userID changes have been fixed, to the best of my knowledge.

  • Administrator
Steenamaroo

Posted

and I agree - looking at the error and the code, you most likely have a config file issue.
Undoing your last changes and/or checking with jsonlint.com is good advice. 👍

  • Like 1
aimacak

Posted

14 minutes ago, Somescrub said:

This is occurring across plugins that leverage NPC Spawn and those that do not - which tells me it is a coding issue holistically. For instance, the same behavior is being identified with Botrespawn and ZombieHorde NPCs, but those do not leverage the NPC Spawn plugin. This seems to be a more holistic issue with custom NPC spawning in general, but does warrant some additional investigation on the part of the spawn plugin devs. 

These issues surfaced after the November update - @Steenamaroo attempted some fixes for BotReSpawn, but I am still seeing the issue occur even with the fix version in place (haven't had a chance to open a support ticket on that one).

I also have my own server and have been using NpcSpawn, BetterNpc and some events that use NpcSpawn for a long time, I have not seen such an error, so I assumed an error in recent changes.
You can provide your configuration/data files, and I can help you with the search if you want.

Somescrub

Posted (edited)

24 minutes ago, Steenamaroo said:

Hi,

The error you pasted is in custom behaviour code for NPCSpawn npcs.
You won't see that error in relation to BotReSpawn or ZombieHorde npcs, as they won't have that custom component.

If you're seeing a different error with BotReSpawn npcs please do let me know, but all issues arising from November wipe userID changes have been fixed, to the best of my knowledge.

I realize the error is specific to NPCSpawn, hence why opening the ticket here. To your point though, I am seeing the same behavior with BotReSpawn NPCs and also got a report today for ZombieHorde NPCs being invisible. Identical behavior happening across multiple plugins that spawn NPCs, but leveraging different spawn methods. 

The JSON checks out, at least for the BossMonster files. I haven't made any recent changes to BotReSpawn or ZombieHorde since November that would explain those. 

These invisible NPCs also happen randomly. It is not an entire profile or anything that it triggers exclusively to, or an entire profile population. Just a random one here or there across the map. 

I attached a boss config for reference (the one in the provided screenshots over on my BossMonster ticket: https://codefling.com/files/support/25268-invisible-bosses/).

Cobalt Captain Kael Durn(1).json

Edited by Somescrub
Added config file for reference
  • Administrator
Steenamaroo

Posted

Sounds like you've got more than one issue going on,
but for the immediate issue, it would be NPCSpawn's config file you'd need to verify.

aimacak

Posted

8 minutes ago, Somescrub said:

I realize the error is specific to NPCSpawn, hence why opening the ticket here. To your point though, I am seeing the same behavior with BotReSpawn NPCs and also got a report today for ZombieHorde NPCs being invisible. Identical behavior happening across multiple plugins that spawn NPCs, but leveraging different spawn methods. 

The JSON checks out, at least for the BossMonster files. I haven't made any recent changes to BotReSpawn or ZombieHorde since November that would explain those. 

These invisible NPCs also happen randomly. It is not an entire profile or anything that it triggers exclusively to, or an entire profile population. Just a random one here or there across the map. 

I attached a boss config for reference (the one in the provided screenshots over on my BossMonster ticket: https://codefling.com/files/support/25268-invisible-bosses/).

Cobalt Captain Kael Durn(1).json 12.68 kB · 0 downloads

It's a bit of a strange question, but is the weapon visible to all invisible NPCs? Have you checked if they are invisible to all players, or only to some? For example, if both screenshots with an invisible boss and screenshots with invisible NPCs were sent to you by the same player, it is possible that this player has problems with the client and he should try reinstalling the game, I heard about a situation where one player did not see Lightsight, and I was even shown a screenshot 🙂 If they're invisible to everyone, and you're pretty sure of it, I guess it gets harder.. As the developer told me, making everything invisible is not so difficult, but making only the NPC texture invisible, but leaving the weapon visible is difficult)

Somescrub

Posted

2 minutes ago, Steenamaroo said:

Sounds like you've got more than one issue going on,
but for the immediate issue, it would be NPCSpawn's config file you'd need to verify.

That checked out as well - I don't think I ever edited it from default to be honest. Attached it for reference.

NpcSpawn.json

Somescrub

Posted

5 minutes ago, aimacak said:

It's a bit of a strange question, but is the weapon visible to all invisible NPCs? Have you checked if they are invisible to all players, or only to some? For example, if both screenshots with an invisible boss and screenshots with invisible NPCs were sent to you by the same player, it is possible that this player has problems with the client and he should try reinstalling the game, I heard about a situation where one player did not see Lightsight, and I was even shown a screenshot 🙂 If they're invisible to everyone, and you're pretty sure of it, I guess it gets harder.. As the developer told me, making everything invisible is not so difficult, but making only the NPC texture invisible, but leaving the weapon visible is difficult)

It is happening to multiple players - I have experienced it myself several times, and the screenshots I provided over at my other support ticket were taken by me. All reports, with the exception of today's for zombiehorde, have been for invisible Botrespawn npcs and Bossmonster npcs.

aimacak

Posted

8 minutes ago, Somescrub said:

It is happening to multiple players - I have experienced it myself several times, and the screenshots I provided over at my other support ticket were taken by me. All reports, with the exception of today's for zombiehorde, have been for invisible Botrespawn npcs and Bossmonster npcs.

I'll try to play with your preset on my server.. And when you took screenshots of the invisible boss in another ticket, was he initially invisible? If not, maybe you can remember some small nuances before he became invisible?

2.1m

Downloads

Total number of downloads.

9.8k

Customers

Total customers served.

142.7k

Files Sold

Total number of files sold.

3m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.