Jump to content

Guess i messed up a Preset loot table.

Closed 3.5.0

DrayTemplar
DrayTemplar

Posted

Im guessing i messed up a loot table for an NPC preset. but no idea how to see which preset i need to fix.

Failed to call internal hook 'OnServerInitialized' on plugin 'NpcSpawn v3.5.0' [352240293] (Unexpected end when deserializing object. Path 'LootTable', line 459, position 1.)

at void Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ThrowUnexpectedEndException(JsonReader reader, JsonContract contract, object currentObject, string message)

at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, string id)

at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)

at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, object existingValue)

at object Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, bool checkAdditionalContent)

at object Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)

at object Newtonsoft.Json.JsonSerializer.Deserialize(JsonReader reader, Type objectType)

at object Newtonsoft.Json.JsonConvert.DeserializeObject(string value, Type type, JsonSerializerSettings settings)

at NpcConfig Newtonsoft.Json.JsonConvert.DeserializeObject<NpcConfig>(string value, JsonSerializerSettings settings)

at NpcConfig Oxide.Core.Configuration.DynamicConfigFile.ReadObject<NpcConfig>(string filename) in /home/runner/work/Carbon/Carbon/src/Carbon.Components/Carbon.Common/src/Oxide/Configuration/DynamicConfigFile.cs:line 30

at NpcConfig Oxide.Core.DataFileSystem.ReadObject<NpcConfig>(string name) in /home/runner/work/Carbon/Carbon/src/Carbon.Components/Carbon.Common/src/Oxide/Configuration/DataFileSystem.cs:line 63

at void Oxide.Plugins.NpcSpawn.LoadFile(string folderName, string fileName) in C:/TCAFiles/Users/gary5/202054/carbon/plugins/NpcSpawn.cs:line 294

at void Oxide.Plugins.NpcSpawn.LoadFolder(string folderName) in C:/TCAFiles/Users/gary5/202054/carbon/plugins/NpcSpawn.cs:line 288

at void Oxide.Plugins.NpcSpawn.LoadPresets() in C:/TCAFiles/Users/gary5/202054/carbon/plugins/NpcSpawn.cs:line 274

at void Oxide.Plugins.NpcSpawn.OnServerInitialized() in C:/TCAFiles/Users/gary5/202054/carbon/plugins/NpcSpawn.cs:line 5021

at object Oxide.Plugins.NpcSpawn.InternalCallHook(uint hook, object[] args) in NpcSpawn.cs/Internal:line 1461

NpcSpawn v3.5.0 by KpucTaJl hook 'OnServerInitialized' took longer than 100ms [1310ms]

aimacak

Posted

Hello, since at the moment NpcSpawn presets are used only by BetterNpc (I do not know about others), can you tell me if you have a problem with it?

There is a 459 line in your logs, in my opinion the most effective way would be to check this line in all presets that you have recently made changes to, unfortunately, just like you, I cannot point you to a specific file.
But you can examine the logs after restarting BetterNpc, if the problem is in it, in more detail, most likely the problem will be in one of the presets that is used in the next alphabetically spawn point, after the last successful server loaded in your logs.

DrayTemplar

Posted

thanks for the suggetion, I will have a look at line 459 line in some of my npc preset loot tables.

DrayTemplar

Posted (edited)

[BetterNpc] File Bradley has been loaded successfully!
Failed to call internal hook 'RegisterPresetUsage' on plugin 'NpcSpawn v3.5.0' [1061036887] (Unexpected end when deserializing object. Path 'LootTable', line 459, position 1.)

[BetterNpc] File Helicopter has been loaded successfully!
Failed to call internal hook 'RegisterPresetUsage' on plugin 'NpcSpawn v3.5.0' [1061036887] (Unexpected end when deserializing object. Path 'LootTable', line 459

Think i may have been my "Marksmen", or "Armyman",

 

They are the only preset that are used by  the Bradley and  Helicopter events. 

 

I think im try to do the multiply loot prefabs wrong..

like: ------------------------------------------------
    "PrefabsTable": {
      "IsEnabled": true,
      "MinPrefabsAmount": 2,
      "MaxPrefabsAmount": 2,
      "Prefabs": [
        {
          "PrefabName": "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_bradley_heavy.prefab",
          "Chance": 100.0,
          "MinAmount": 1,
          "MaxAmount": 1
        },
        {
          "PrefabName": "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_oilrig.prefab",
          "Chance": 100.0,
          "MinAmount": 1,
          "MaxAmount": 4
        }
      ]

 

maybe it should be --------------------------------------------------------------

"PrefabsTable": {
  "IsEnabled": true,
  "MinPrefabsAmount": 2,
  "MaxPrefabsAmount": 2,
  "Prefabs": [
    {
      "PrefabName": "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_bradley_heavy.prefab",
      "PrefabName": "assets/rust.ai/agents/npcplayer/humannpc/scientist/scientistnpc_oilrig.prefab"
      "Chance": 100.0,
      "MinAmount": 2,
      "MaxAmount": 4
    }

Edited by DrayTemplar
aimacak

Posted (edited)

Can you send some presets?

and yours first case is correct

Edited by aimacak
aimacak

Posted (edited)

Also i think that in order by alphabet after Helicopter will loading files from Monument folder, in this folder first Tunnel

image.png

image.png

image.png

Edited by aimacak
  • Like 1
DrayTemplar

Posted

think i found my error, or one of my errors it was in my armyman preset - messed a copy and paste in the prefabs table and doubled part of it up,

 

image.png.ba5a5f49cb879e3b69a03bf134f9265a.png

DrayTemplar

Posted

you can close this one, all fixed, thanks heaps for you help

 

  • Love 1
aimacak

Posted

Changed Status from Pending to Closed

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
3.3m
Total downloads
Customers
12.4k
Customers served
Files Sold
175.5k
Total sales
Payments
3.8m
Processed total
×
×
  • 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.