Jump to content

NullReferenceException on respawn

Closed 1.1.8

Laminin
Laminin

Posted (edited)

NPC's on Giant Excavator Pit won't respawn if their AI is active. Not sure if it's the map I'm using or what but when it hits the timer for their respawn, console just throws "NullReferenceException" and nothing else. If I vanish and their AI isn't active because no player is around, they'll respawn normally with no error.

I thought at first it was a position/navmesh issue, but I swapped in the default configuration for this monument and it still throws the same error with their AI active.

This only happens on Giant Excavator, all other monuments, including custom ones, respawn normally with no error.

Edited by Laminin
Jbird

Posted

I looked into this a bit and it finally dawned on me I think I have information that will help. Check to see if you have any of these locations, and remove all of them. I made a list and added them to Discord but couldn't figure out what would be causing this for you. I think these might be causing the problem you're having. They were placed on moving parts of the excavator and end up floating when the arm moves and they respawn back where it used to be.

oxide/data/BetterNpc/Monument/Giant Excavator Pit.json

NPC Set # 2 "Workman"

Position # 14 "(54.9, 15.1, -31.4)",
Position # 15 "(53.3, 17.6, -38.6)",
Position # 16 "(38.5, 17.6, -36.0)",
Position # 17 "(43.3, 17.6, -43.5)",
Position # 18 "(50.4, 22.1, -39.5)",
Position # 19 "(41.6, 22.1, -41.5)",
Position # 20 "(40.4, 24.6, -33.7)",
Position # 21 "(39.6, 24.6, -20.6)",
Position # 22 "(30.7, 30.1, -0.4)",
Position # 23 "(27.2, 31.1, 8.3)",
Position # 24 "(26.1, 35.6, -8.0)",
Position # 25 "(21.2, 35.7, 5.1)",
Position # 26 "(28.5, 35.7, 8.1)", 

NPC Set # 3 "Porter"

Position # 1 "(61.0, 10.0, -89.6)",
Position # 2 "(78.6, 10.0, -81.1)",

 

If that doesn't help though let me know and we will continue to look into the source of the issue.

Laminin

Posted

Huh, yeah that did it. Strange as I used those same coords on the last like 3 wipes and never noticed they didn't respawn lol.
To test, I just turned on random position spawning and set the respawn timer to 60 seconds to see if they'd respawn, and sure enough they did. Went ahead and removed the default coordinates, then set custom coordinates for each NPC without putting any on the moving parts of the excavator and now they respawn correctly.
Thank you for looking into this for me, was really scratching my head on this one!

Jbird

Posted

Well it took me long enough! I was trying a few things and looking into it with my changed version as well. Did similar work on mine moved them around so of course I'm not gonna see anything. Finally the light bulb turned on though. haha

Glad that sorted it out for ya!

  • Like 1
KpucTaJl

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

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.