Soo, the plugin doesn't seem to work. Everything works like the gui, commands, but the protection doesn't. Any idea why?
NullReferenceException at StartCollectingError
Any errors in the console? Just updated to 2.1.3 which should fix some issues.
Otherwise, make sure you have a protection level assigned.
Failed to call hook 'OnServerInitialized' on plugin 'RaidProtection v2.1.3' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.RaidProtection.StartCollecting () [0x0001c] in :0
at Oxide.Plugins.RaidProtection.OnServerInitialized () [0x0010d] in :0
at Oxide.Plugins.RaidProtection.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001c1] 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) [0x000d8] in :0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0
at Oxide.Plugins.RaidProtection.OnServerInitialized () [0x0010d] in :0
at Oxide.Plugins.RaidProtection.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001c1] 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) [0x000d8] in :0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in :0
Loaded plugin Raid Protection v2.1.3 by mr01sam
Failed to run a 1.00 timer in 'RaidProtection v2.1.3' (NullReferenceException: Object reference not set to an instance of an object) at Oxide.Plugins.RaidProtection+ProtectedCupboard.UpdateHighestProtectionLevel () [0x000c5] in :0
at Oxide.Plugins.RaidProtection+ProtectedCupboard..ctor (BuildingPrivlidge priv) [0x000c4] in :0
at Oxide.Plugins.RaidProtection+ProtectedCupboard.InitCupboard (BuildingPrivlidge priv) [0x00030] in :0
at Oxide.Plugins.RaidProtection.m__0 () [0x0002b] in :0
at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in :0
Not sure if im missing something in config file but getting this error in console.
{
"General settings": {
"Currency item ID (if not using economics)": -932201673,
"Use economics balance (requires economics plugin)": false,
"Use reward points (requires server rewards plugin)": true
},
"Protection settings": {
"Protection levels": {
"0": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0
},
"1": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0,
"Hourly building cost" : 0,
"Hourly base cost" : 0,
"Cost per damage": 0
}
},
"Cost settings": {
"Material cost multipliers": {
"twig": 1.0,
"wood": 1.0,
"stone": 1.0,
"metal": 1.0,
"armored": 1.0
},
"Default hourly building cost": 1.0,
"Default hourly base cost": 9.0,
"Default structure damage cost": 0.0
},
"Indicator settings": {
"Enabled": true,
"Persistent": false,
"Image url": "https://i.imgur.com/ue05FGg.png"
}
}
at Oxide.Plugins.RaidProtection+ProtectedCupboard..ctor (BuildingPrivlidge priv) [0x000c4] in :0
at Oxide.Plugins.RaidProtection+ProtectedCupboard.InitCupboard (BuildingPrivlidge priv) [0x00030] in :0
at Oxide.Plugins.RaidProtection.m__0 () [0x0002b] in :0
at Oxide.Core.Libraries.Timer+TimerInstance.FireCallback () [0x00018] in :0
Not sure if im missing something in config file but getting this error in console.
{
"General settings": {
"Currency item ID (if not using economics)": -932201673,
"Use economics balance (requires economics plugin)": false,
"Use reward points (requires server rewards plugin)": true
},
"Protection settings": {
"Protection levels": {
"0": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0
},
"1": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0,
"Hourly building cost" : 0,
"Hourly base cost" : 0,
"Cost per damage": 0
}
},
"Cost settings": {
"Material cost multipliers": {
"twig": 1.0,
"wood": 1.0,
"stone": 1.0,
"metal": 1.0,
"armored": 1.0
},
"Default hourly building cost": 1.0,
"Default hourly base cost": 9.0,
"Default structure damage cost": 0.0
},
"Indicator settings": {
"Enabled": true,
"Persistent": false,
"Image url": "https://i.imgur.com/ue05FGg.png"
}
}
I'll get to the bottom of it, once again thanks for posting, we'll get this thing stable one day!
Merged post
Oozle, your config is missing some elements under the Protection Settings section. I'm surprised the console didn't give you a warning. Any ways, copy this into your config and you should be okay:
{
"General settings": {
"Currency item ID (if not using economics)": -932201673,
"Use economics balance (requires economics plugin)": false,
"Use reward points (requires server rewards plugin)": true
},
"Protection settings": {
"Protection levels": {
"0": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0
},
"1": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0,
"Hourly building cost": 0,
"Hourly base cost": 0,
"Cost per damage": 0
}
},
"Delay after taking damage (seconds)": 10,
"Delay for offline protection (seconds)": 600,
"Protect buildings and deployables (true/false)": true,
"Protect players (true/false)": true,
"Protect vehicles and horses (true/false)": true,
"Protect traps and electronics (true/false)": true
},
"Cost settings": {
"Material cost multipliers": {
"twig": 1.0,
"wood": 1.0,
"stone": 1.0,
"metal": 1.0,
"armored": 1.0
},
"Default hourly building cost": 1.0,
"Default hourly base cost": 9.0,
"Default structure damage cost": 0.0
},
"Indicator settings": {
"Enabled": true,
"Persistent": false,
"Image url": "https://i.imgur.com/ue05FGg.png"
}
} 16:16 [Error] Failed to call hook 'OnServerInitialized' on plugin 'RaidProtection v2.1.3' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.RaidProtection.StartCollecting () [0x0001c] in <c9692e367454495788bc4e5afb855ea0>:0
at Oxide.Plugins.RaidProtection.OnServerInitialized () [0x0010d] in <c9692e367454495788bc4e5afb855ea0>:0
at Oxide.Plugins.RaidProtection.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x001c1] in <c9692e367454495788bc4e5afb855ea0>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <31122a27a2414cd799150f8677cf39d4>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <0fbce81d88d64454b3e7abb24df7026b>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <0fbce81d88d64454b3e7abb24df7026b>:0
Wasn't able to reproduce this, but changes in v2.1.4 might help, try it out.