Jump to content

NRE error as follows

Closed 1.2.4 1.2.5

JessieJane
JessieJane

Posted

(15:19:46) | Failed to call hook 'OnEntitySpawned' on plugin 'HuntsMan v1.2.4' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.HuntsMan.OnEntitySpawned (NPCPlayerCorpse corpse) [0x0005d] in <3d21dacd6c46468a962708746c2df8c4>:0 
  at Oxide.Plugins.HuntsMan.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002d5] in <3d21dacd6c46468a962708746c2df8c4>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <60c318df79ed41688ea59335e48d61ad>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <9882f28dc2204b4dba514a9ad18f5042>:0 

Krungh Crow

Posted

you  get this with backpack drop false also ? (disabled)

JessieJane

Posted

Will check but updating the .CS should not have reset my config settings.   I had it set to drop the backpack

 

JessieJane

Posted

{
  "Use Debug": false,
  "Animals to trigger HuntsMan": {
    "Bear": true,
    "Boar": true,
    "Chicken": true,
    "Horse": true,
    "Stag": true,
    "Wolf": true
  },
  "Hunter Settings": {
    "Custom Hunter Name": "HuntsMan",
    "spawn chance (1-100%)": 10.0,
    "Spawn Amount": 1,
    "spawn radius": 25,
    "Health": 200,
    "Max Roam Distance": 20,
    "Damage multiplier": 0.6,
    "Lifetime (minutes)": 10.0,
    "Use kit (clothing)": true,
    "Kit ID": [
      "huntsman"
    ],
    "Show messages": true,
    "Hunters drop a Backpack with loot": true,
    "Use Random Skins": true,
    "Spawn Min Amount Items": 4,
    "Spawn Max Amount Items": 6,
    "Loot Table": [

Krungh Crow

Posted

have you changed the loottable ? any spaces behind the item shortname will throw a NRE if the backpack drops

JessieJane

Posted

I will check that as well.  I didn't make any intentional changes since yesterday when it was working fine.

It does validate with a json linter.

 

Here is the entire config.json file:   

{
  "Use Debug": false,
  "Animals to trigger HuntsMan": {
    "Bear": true,
    "Boar": true,
    "Chicken": true,
    "Horse": true,
    "Stag": true,
    "Wolf": true
  },
  "Hunter Settings": {
    "Custom Hunter Name": "HuntsMan",
    "spawn chance (1-100%)": 10.0,
    "Spawn Amount": 1,
    "spawn radius": 25,
    "Health": 200,
    "Max Roam Distance": 20,
    "Damage multiplier": 0.6,
    "Lifetime (minutes)": 10.0,
    "Use kit (clothing)": true,
    "Kit ID": [
      "huntsman"
    ],
    "Show messages": true,
    "Hunters drop a Backpack with loot": true,
    "Use Random Skins": true,
    "Spawn Min Amount Items": 4,
    "Spawn Max Amount Items": 6,
    "Loot Table": [
      {
        "shortname": "ammo.rifle",
        "amount": 200,
        "skin": 0,
        "amountMin": 200
      },
      {
        "shortname": "ammo.rifle.hv",
        "amount": 100,
        "skin": 0,
        "amountMin": 100
      },
      {
        "shortname": "electric.battery.rechargeable.large",
        "amount": 1,
        "skin": 0,
        "amountMin": 1
      },
      {
        "shortname": "locker",
        "amount": 1,
        "skin": 0,
        "amountMin": 1
      },
      {
        "shortname": "lowgradefuel",
        "amount": 300,
        "skin": 0,
        "amountMin": 300
      },
      {
        "shortname": "rifle.m39",
        "amount": 1,
        "skin": 0,
        "amountMin": 1
      },
      {
        "shortname": "sign.neon.125x215.animated",
        "amount": 1,
        "skin": 0,
        "amountMin": 1
      },
      {
        "shortname": "halloween.lootbag.medium",
        "amount": 3,
        "skin": 0,
        "amountMin": 2
      },
      {
        "shortname": "barricade.metal",
        "amount": 4,
        "skin": 0,
        "amountMin": 2
      },
      {
        "shortname": "ammo.rifle.explosive",
        "amount": 100,
        "skin": 0,
        "amountMin": 100
      },
      {
        "shortname": "explosive.timed",
        "amount": 75,
        "skin": 0,
        "amountMin": 75
      },
      {
        "shortname": "explosives",
        "amount": 100,
        "skin": 0,
        "amountMin": 100
      },
      {
        "shortname": "rifle.l96",
        "amount": 1,
        "skin": 0,
        "amountMin": 1
      },
      {
        "shortname": "black.raspberries",
        "amount": 200,
        "skin": 0,
        "amountMin": 200
      }
    ]
  }
}

Krungh Crow

Posted

Changed Status from Pending to Work in Progress

LizardMods

Posted

I have the same thing and I suspect Alpha loot. I am currently having a similar problem with zombie horde loot table and  HuntsMan loot table. both use NPCPlayerCorpse for the loot table. I am going to put in a ticked with the Alpha loot as I suspect this is an unintended behaver. 

Krungh Crow

Posted

started setting up alphaloot on testserver aswell see if i can replicate this

  • Love 1
LizardMods

Posted

the big guy updated Zombie Horde today and this is what he had to say about loot tables and Alpha loot. "AlphaLoot doesn't override other plugins, it spawns loot in place of Rusts default loot spawn. If other plugins don't want AL to populate a container they can use the (object)CanPopulateLoot(LootContainer) hook"

so I guess this is not a bug, but rather a request to support Alpha loot. any was love what your doing and thanks for providing us with this cool mod. 🙂

Krungh Crow

Posted

yes populating loot and blocking alphaloot from populating it is possible but players want alphaloot to populate it which would be a global thing since you cant hookup a custom profile for in this case the hunter corpse only

Krungh Crow

Posted

Changed Status from Work in Progress to Closed

Changed Fixed In to 1.2.5

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.