Jump to content

Version 2.1.3 won't load NPCs

Closed 2.1.3

Terceran
Terceran

Posted

Everything was great with 2.1.2 and then I upgraded to 2.1.3. Now when the plugin loads, it ends with "NullReferenceException: Object reference not set to an instance of an object", and the NPCs fail to load at any of the monuments or anywhere else that are specified in the data files. Assistance would be immensely appreciated.

aimacak

Posted (edited)

1 hour ago, Terceran said:

Everything was great with 2.1.2 and then I upgraded to 2.1.3. Now when the plugin loads, it ends with "NullReferenceException: Object reference not set to an instance of an object", and the NPCs fail to load at any of the monuments or anywhere else that are specified in the data files. Assistance would be immensely appreciated.

Hello, how exactly did you update to version 2.1.3? Did you just transfer the new BetterNpc.cs file or follow the instructions in the archive?
Can you send all messages from the console after o.reload NpcSpawn and o.reload BetterNpc? And just in case, please send the folders oxide/data/BetterNpc and oxide/data/NpcSpawn, and the configuration files NpcSpawn.json and BetterNpc.json

Edited by aimacak
Terceran

Posted (edited)

Yes, I followed the instructions. I reverted back to my old LootManager, NpcSpawn, and BetterNpc and did the steps below, and reproduced the issue but captured the steps and errors. The attached files are what are present at the time of the failure.

Doing Step 1:
[CSharp] Started Oxide.Compiler v successfully
UpdaterBetterNpc was compiled successfully in 1453ms
Unloaded plugin UpdaterBetterNpc v1.1.1 by KpucTaJl
Failed to call hook 'OnServerInitialized' on plugin 'UpdaterBetterNpc v1.1.1' (IOException: Cannot create a file when that file already exists.)
  at System.IO.FileSystem.MoveDirectory (System.String sourceFullPath, System.String destFullPath) [0x00040] in <f98723dd4586469db5213ec59da723ca>:0 
  at System.IO.Directory.Move (System.String sourceDirName, System.String destDirName) [0x000ed] in <f98723dd4586469db5213ec59da723ca>:0 
  at Oxide.Plugins.UpdaterBetterNpc.ReadAndRenameConfigOldNpcSpawn () [0x0092d] in <fd53c598446741899c6c4a1818488ac5>:0 
  at Oxide.Plugins.UpdaterBetterNpc.OnServerInitialized () [0x00014] in <fd53c598446741899c6c4a1818488ac5>:0 
  at Oxide.Plugins.UpdaterBetterNpc.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0148c] in <fd53c598446741899c6c4a1818488ac5>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <15f61ddda771464d8246ebdce8ff4811>:0 
  at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0 
Loaded plugin UpdaterBetterNpc v1.1.1 by KpucTaJl
Calling 'Unload' on 'NpcSpawn v2.8.4' took 140ms
Unloaded plugin NpcSpawn v2.8.4 by KpucTaJl
Unloaded plugin BetterNpc v1.3.3 by KpucTaJl

NOTE: UpdaterBetterNpc.cs does not disappear from the oxide/plugins folder.

Step 2 appears to run fine:
[CSharp] Started Oxide.Compiler v successfully
NpcSpawn was compiled successfully in 1676ms
[NpcSpawn] Config update detected! Updating config values...
[NpcSpawn] Config update completed!
[NpcSpawn] Loading custom navigation mesh files...
[NpcSpawn] File AirEvent_Floor1 has been loaded successfully!
[NpcSpawn] File AirEvent_Floor2 has been loaded successfully!
[NpcSpawn] File WaterEvent_Floor1 has been loaded successfully!
[NpcSpawn] File WaterEvent_Floor2 has been loaded successfully!
[NpcSpawn] File WaterEvent_Outside has been loaded successfully!
[NpcSpawn] All custom navigation mesh files have loaded successfully!
[NpcSpawn] List of biome positions: Arid = 1611, Temperate = 1202, Tundra = 467, Arctic = 705, Jungle = 663
[NpcSpawn] List of road positions: ExtraWide = 1387, Standard = 1891, ExtraNarrow = 2087
[NpcSpawn] 3006 railway positions found
Calling 'OnServerInitialized' on 'NpcSpawn v3.1.7' took 1732ms
Loaded plugin NpcSpawn v3.1.7 by KpucTaJl
[NpcSpawn] Image Preset_KpucTaJl download is complete
[NpcSpawn] Image Find_KpucTaJl download is complete
[NpcSpawn] Image Delete_KpucTaJl download is complete
[NpcSpawn] Image Indicator_KpucTaJl download is complete
[NpcSpawn] Image Back_KpucTaJl download is complete
[NpcSpawn] Image Copy_KpucTaJl download is complete
[NpcSpawn] Image coconut-underwear download is complete
[NpcSpawn] Image femaleunderwear_mummywraps.icon download is complete
[NpcSpawn] Image maleunderwear_mummywraps.icon download is complete
[NpcSpawn] Image pink_bikini download is complete
[NpcSpawn] Image rapido_male download is complete
[NpcSpawn] Image swimwear_gradient_female download is complete
[NpcSpawn] Image swimwear_gradient_male download is complete
[NpcSpawn] Image swimwear_palmleaves_female download is complete
[NpcSpawn] Image swimwear_palmleaves_male download is complete
[NpcSpawn] Image swimwear_scribble_female download is complete
[NpcSpawn] Image swimwear_scribble_male download is complete
[NpcSpawn] Image twitchunderwear_female download is complete
[NpcSpawn] Image twitchunderwear_male download is complete
[NpcSpawn] Image underwear_default_female download is complete
[NpcSpawn] Image underwear_default_male download is complete
[NpcSpawn] Image grassskirt-underwear-female download is complete
[NpcSpawn] Image grassskirt-underwear-male download is complete
Calling 'OnNpcTarget' on 'NpcSpawn v3.1.7' took average 1739ms

Step 3 appears to run fine:
[CSharp] Started Oxide.Compiler v successfully
LootManager was compiled successfully in 1438ms
Unloaded plugin LootManager v1.0.9 by Adem
Loaded plugin LootManager v1.1.0 by Adem


Step 4 fails at 27%:
[CSharp] Started Oxide.Compiler v successfully
BetterNpc was compiled successfully in 1512ms
[BetterNpc] Config update detected! Updating config values...
[BetterNpc] Config update completed!
[BetterNpc] Starting plugin initialization process...
[BetterNpc] File Abandoned Cabins has been loaded successfully!
Loaded plugin BetterNpc v2.1.3 by KpucTaJl
[BetterNpc] File Abandoned Military Base A has been loaded successfully!
[BetterNpc] File Abandoned Military Base B has been loaded successfully!
[BetterNpc] File Abandoned Military Base C has been loaded successfully!
[BetterNpc] File Abandoned Military Base D has been loaded successfully!
[BetterNpc] File Abandoned Supermarket has been loaded successfully!
[BetterNpc] File Airfield has been loaded successfully!
[BetterNpc] File Arctic Research Base has been loaded successfully!
[BetterNpc] File Ferry Terminal has been loaded successfully!
[BetterNpc] File Giant Excavator Pit has been loaded successfully!
[BetterNpc] File HQM Quarry has been loaded successfully!
[BetterNpc] File Jungle Ziggurat has been loaded successfully!
[BetterNpc] File Junkyard has been loaded successfully!
[BetterNpc] File Large Harbor has been loaded successfully!
[BetterNpc] File Large Oil Rig has been loaded successfully!
[BetterNpc] File Launch Site has been loaded successfully!
[BetterNpc] File Lighthouse has been loaded successfully!
[BetterNpc] File Military Tunnel has been loaded successfully!
[BetterNpc] File Mining Outpost has been loaded successfully!
[BetterNpc] File Missile Silo has been loaded successfully!
[BetterNpc] File Oil Rig has been loaded successfully!
[BetterNpc] File Oxum's Gas Station has been loaded successfully!
[BetterNpc] File Power Plant has been loaded successfully!
[BetterNpc] File Radtown has been loaded successfully!
[BetterNpc] File Satellite Dish has been loaded successfully!
[BetterNpc] File Sewer Branch has been loaded successfully!
[BetterNpc] File Small Harbor has been loaded successfully!
[BetterNpc] File Stone Quarry has been loaded successfully!
[BetterNpc] File Sulfur Quarry has been loaded successfully!
[BetterNpc] File The Dome has been loaded successfully!
[BetterNpc] File Train Yard has been loaded successfully!
[BetterNpc] File Water Treatment Plant has been loaded successfully!
[BetterNpc] File Wild Swamp has been loaded successfully!
[BetterNpc] Plugin loading progress at 8%
[BetterNpc] File module_1200x1200_1way has been loaded successfully!
[BetterNpc] File module_1200x1200_1way_ladder has been loaded successfully!
[BetterNpc] File module_1200x1200_3way has been loaded successfully!
[BetterNpc] File module_1200x1200_3way_ladder has been loaded successfully!
[BetterNpc] File module_1200x1200_4way has been loaded successfully!
[BetterNpc] File module_1200x1200_4way_ladder has been loaded successfully!
[BetterNpc] File module_1200x1800_2way has been loaded successfully!
[BetterNpc] File module_1200x600_2way_corridor has been loaded successfully!
[BetterNpc] File module_1500x1500_4way_lshaped has been loaded successfully!
[BetterNpc] File module_1500x1500_ladder has been loaded successfully!
[BetterNpc] File module_1500x1800_2way_ladder has been loaded successfully!
[BetterNpc] File module_1500x600_2way_corridor has been loaded successfully!
[BetterNpc] File module_1800x1800_4way_lshaped has been loaded successfully!
[BetterNpc] File module_2100x600_3way_corridor has been loaded successfully!
[BetterNpc] File module_900x900_1way has been loaded successfully!
[BetterNpc] File module_900x900_1way_ladder has been loaded successfully!
[BetterNpc] File module_900x900_2way_moonpool has been loaded successfully!
[BetterNpc] File module_900x900_3way has been loaded successfully!
[BetterNpc] File module_900x900_3way_ladder has been loaded successfully!
[BetterNpc] File module_900x900_4way has been loaded successfully!
[BetterNpc] File module_900x900_4way_ladder has been loaded successfully!
[BetterNpc] File moonpool_1200x1500_1way has been loaded successfully!
[BetterNpc] File moonpool_1200x1500_2way has been loaded successfully!
[BetterNpc] File moonpool_1200x1500_3way has been loaded successfully!
[BetterNpc] File moonpool_1200x1800_ladder has been loaded successfully!
[BetterNpc] Plugin loading progress at 14%
[BetterNpc] File curve-ne-0 has been loaded successfully!
[BetterNpc] File curve-ne-1 has been loaded successfully!
[BetterNpc] File curve-nw-0 has been loaded successfully!
[BetterNpc] File curve-nw-1 has been loaded successfully!
[BetterNpc] File curve-se-0 has been loaded successfully!
[BetterNpc] File curve-se-1 has been loaded successfully!
[BetterNpc] File curve-sw-0 has been loaded successfully!
[BetterNpc] File curve-sw-1 has been loaded successfully!
[BetterNpc] File intersection-e has been loaded successfully!
[BetterNpc] File intersection-n has been loaded successfully!
[BetterNpc] File intersection-s has been loaded successfully!
[BetterNpc] File intersection-w has been loaded successfully!
[BetterNpc] File intersection has been loaded successfully!
[BetterNpc] File station-sn-0 has been loaded successfully!
[BetterNpc] File station-sn-1 has been loaded successfully!
[BetterNpc] File station-sn-2 has been loaded successfully!
[BetterNpc] File station-sn-3 has been loaded successfully!
[BetterNpc] File station-we-0 has been loaded successfully!
[BetterNpc] File station-we-1 has been loaded successfully!
[BetterNpc] File station-we-2 has been loaded successfully!
[BetterNpc] File station-we-3 has been loaded successfully!
[BetterNpc] File straight-sn-0 has been loaded successfully!
[BetterNpc] File straight-sn-1 has been loaded successfully!
[BetterNpc] File straight-sn-2 has been loaded successfully!
[BetterNpc] File straight-sn-3 has been loaded successfully!
[BetterNpc] File straight-sn-4 has been loaded successfully!
[BetterNpc] File straight-sn-5 has been loaded successfully!
[BetterNpc] File straight-we-0 has been loaded successfully!
[BetterNpc] File straight-we-1 has been loaded successfully!
[BetterNpc] File straight-we-2 has been loaded successfully!
[BetterNpc] File straight-we-3 has been loaded successfully!
[BetterNpc] File straight-we-4 has been loaded successfully!
[BetterNpc] File straight-we-5 has been loaded successfully!
[BetterNpc] Plugin loading progress at 23%
[BetterNpc] Plugin loading progress at 27%
[BetterNpc] File AirDrop has been loaded successfully!
[BetterNpc] File Bradley has been loaded successfully!
[BetterNpc] File CH47 has been loaded successfully!
NullReferenceException: Object reference not set to an instance of an object

NpcSpawn.zip NpcSpawn.json BetterNpc.zip BetterNpc.json

Edited by Terceran
aimacak

Posted (edited)

@Terceran

I studied your files and made the updating data files of BetterNpc to the new version myself, you need to delete 2 folders in the oxide/data directory: BetterNpc and NpcSpawn, and upload the folders from the archive I attached instead, and delete the BetterNpc configuration (oxide/config/BetterNpc.json - because it's broken, check your settings in new configuration after successfully loading BetterNpc), then just upload the latest version of BetterNpc 2.1.3 to the server and make sure that you didn't have any errors in console, then check the correctly work of the NPC and their loot in the game.

data.zip

Edited by aimacak
Terceran

Posted

That worked! Thank you for taking the time to repair it and respond.

  • Like 1
aimacak

Posted

1 minute ago, Terceran said:

That worked! Thank you for taking the time to repair it and respond.

No problem, the main thing is not to follow the instructions for the next updates 🙂 Just replace *.cs files.

Terceran

Posted

Will do! Quick follow up question. I'm not seeing any of my previous loot settings in the LootManager data. How do I get that ported over?

aimacak

Posted

21 minutes ago, Terceran said:

Will do! Quick follow up question. I'm not seeing any of my previous loot settings in the LootManager data. How do I get that ported over?

It turns out that you sent me the standard BetterNpc folder, if you have a Backup of your settings before updating, send them, I will update them for you and everything will be saved.. if you did not send me standard files, but your own, I will try to find a mistake in my actions, I apologize in advance)

Terceran

Posted

Sorry about that, here is my BetterNpc data directory before I upgraded beyond 1.3.3. If you could recover my loot data for LootManager, I would be greatly appreciative.

BetterNpc.zip

  • Like 1
aimacak

Posted

23 minutes ago, Terceran said:

Sorry about that, here is my BetterNpc data directory before I upgraded beyond 1.3.3. If you could recover my loot data for LootManager, I would be greatly appreciative.

BetterNpc.zip 187.52 kB · 1 download

Check it out, you didn't have a Custom folder (BetterNpc/Custom) in the last archive, so the update plugin caused an error. Try never to delete folders that are attached to plugins in the archive, even if they are empty and you don't understand what they are for 🙂

data4.zip

Terceran

Posted

Fair enough, I won't touch the folders going forward. Thanks again for all of your help!

  • Like 1
KpucTaJl

Posted

Changed Status from Pending to Closed

2.2m

Downloads

Total number of downloads.

10.3k

Customers

Total customers served.

149k

Files Sold

Total number of files sold.

3.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.