Jump to content

Using ZoneMangager / Death Backpacks

Closed 1.0.32

Clay
Clay

Posted

1) DEATH BACKPACKS

When a player's body disappears or it is harvested, a backpack appears. It is lootable no matter what the config says. It is in my config to protect item_drop_backpack. Still lootable. I've seen this mentioned before, and I've not been able to get this to function properly. Is this something I can get to work? I do know that the backpack has no "owner", I'm imaginging that is the problem.

2) USING ZONEMANAGER

I'm attempting to have a setup where the map is PvE except for PvP zones (NextGenPvE and DynamicPvP). I want all lootables protected UNLESS a player is killed in a PvP zone, then I want their body / backpack to be lootable. 

In the config, when I have UseZoneManager set to true, items that would normally be protected when it is set to false, can be looted. In fact, everything can be looted, everywhere. Looted entities give this message in the log with ZoneManager enabled:

[2023-02-16 22:09:05] Player [admn] Clay looting StorageContainer furnace
[2023-02-16 22:09:05] CheckCupboardAccess:     Unable to find authorized cupboard for furnace.
[2023-02-16 22:09:05] Player [admn] Clay not in a zone we control, or in a zone we have disabled.
[2023-02-16 22:09:06] Player [admn] Clay looting StorageContainer furnace
[2023-02-16 22:09:06] CheckCupboardAccess:     Unable to find authorized cupboard for furnace.
[2023-02-16 22:09:06] Player [admn] Clay not in a zone we control, or in a zone we have disabled.

This is me attempting (and succeeding) to loot another player's furnace in their base that is protected with a TC.
It's claiming that I'm not in a zone the plugin controls, or in a zone that is disabled. This is true, it's not in a zone listed in the config, but there is no zone for ALL-PvE-AREAS.

How do I set the plugin up so that it functions in the way I desire? I want to have Loot Protection enabled MAP-WIDE and only use ZoneManager to DISABLE LootProtection for PvP zones.

 

Attached are my configs I'm using when I'm getting the log messages above.
Also - please see the "Zones": {} section of the LootProtect config. Why are there three sections? One for "Zones", "EnabledZones", and "DisabledZones"? This is confusing. Is this where my issue is coming from? I've been testing with many different configurations without any luck other than disabling all "UseXXX" and having LootProtect run always, everywhere.

NextGenPVE.json LootProtect.json

Clay

Posted

Also, when "UseZoneManager" is set to true - we get these errors in console when looting happens:

 

[Oxide] 22:44 [Error] Failed to call hook 'CanLootEntity' on plugin 'LootProtect v1.0.32' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.LootProtect.CanAccess (System.String prefab, System.UInt64 source, System.UInt64 target) [0x0022d] in <7a52d363aff7411e90871e70dd5a5d95>:0
  at Oxide.Plugins.LootProtect.CanLootEntity (BasePlayer player, DroppedItemContainer container) [0x000ac] in <7a52d363aff7411e90871e70dd5a5d95>:0
  at Oxide.Plugins.LootProtect.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0109a] in <7a52d363aff7411e90871e70dd5a5d95>:0                                                         17kb/s in, 59kb/s out
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <d5f57e12edfe4fa0b5c5dbdd9b51eff8>:0
[Oxide] 22:44 [Error] Failed to call hook 'CanLootEntity' on plugin 'LootProtect v1.0.32' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.LootProtect.CanAccess (System.String prefab, System.UInt64 source, System.UInt64 target) [0x0022d] in <7a52d363aff7411e90871e70dd5a5d95>:0
  at Oxide.Plugins.LootProtect.CanLootEntity (BasePlayer player, DroppedItemContainer container) [0x000ac] in <7a52d363aff7411e90871e70dd5a5d95>:0
  at Oxide.Plugins.LootProtect.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0109a] in <7a52d363aff7411e90871e70dd5a5d95>:0                                                        16kb/s in, 108kb/s out
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <d5f57e12edfe4fa0b5c5dbdd9b51eff8>:0
[Oxide] 22:44 [Error] Failed to call hook 'CanLootEntity' on plugin 'LootProtect v1.0.32' (NullReferenceException: Object reference not set to an instance of an object)
  at Oxide.Plugins.LootProtect.CanAccess (System.String prefab, System.UInt64 source, System.UInt64 target) [0x0022d] in <7a52d363aff7411e90871e70dd5a5d95>:0
  at Oxide.Plugins.LootProtect.CanLootEntity (BasePlayer player, DroppedItemContainer container) [0x000ac] in <7a52d363aff7411e90871e70dd5a5d95>:0
  at Oxide.Plugins.LootProtect.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x0109a] in <7a52d363aff7411e90871e70dd5a5d95>:0                                                         17kb/s in, 69kb/s out
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <09575a60985045248bcb43b20faeeb99>:0
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <d5f57e12edfe4fa0b5c5dbdd9b51eff8>:0

 

RFC1920

Posted

I can work on that error.

In NextGenPVE, DynamicPVP should manage it's own zone collection name, typically called "exclude".  This should manifest in NextGenPVE as a ruleset called exclude.

Since DynamicPVP calls out specifically to NextGen and the other pve plugin, it does not try to work with LootProtect or any other plugin afaik.

So, in LootProtect, I think you should set EnabledZones back to null.  I am not sure if DynamicPVP now names its zones as you specified in your config.  But, I think having both EnabledZones and DisabledZones configured is not going to work.

For where to disable it (DisabledZones), we would have to know the zones that DynamicPVP sets for each monument, etc.  I can check with the current maintainer to see if they agree that the logic of calling specific plugins for those functions is no longer importatnt.  This would allow us to automate the population of DisabledZones.

RFC1920

Posted

I have reached out to the maintainer.  Testing my changes locally does actually update the list automatically, so hopefully he'll oblige.

Clay

Posted

Thanks for the rapid response. I really really appreciate it. I've been struggling with this for a while now.

 

Quote

In NextGenPVE, DynamicPVP should manage it's own zone collection name, typically called "exclude".  This should manifest in NextGenPVE as a ruleset called exclude.

Do you think that I can reference "exclude" from within lootprotect and it function properly? I was using "default" because that's what I saw... Now I realize I should've been attempting "exclude"

Quote

 I am not sure if DynamicPVP now names its zones as you specified in your config.

I think you're referring to how it's actually named based on the location instead of just an numerical ID - I believe this is done by the ZoneManagerAutoZones plugin.
kJ7LAlO.png

Quote

But, I think having both EnabledZones and DisabledZones configured is not going to work.

This gives me hope. So if I only list DisabledZones, then it should function everywhere? I guess I was thinking I needed to provide ALL the information. I will test out a few things and report back.
Again, thank you so much.

 

Clay

Clay

Posted

Also, I want to ask: 

using the "enabledzones" section of the config, to do so, I have to set "UseZoneManager" to true, correct?

 

So it looks like when I have the plugin setup as follows:

{
  "Options": {
    "RequirePermission": false,
    "protectedDays": 0.0,
    "useZoneManager": false,
    "useSchedule": false,
    "useRealTime": false,
    "useFriends": false,
    "useClans": true,
    "useTeams": true,
    "useNextGenPVE": true,
    "HonorRelationships": true,
    "OverrideOven": false,
    "OverrideTC": true,
    "StartEnabled": true,
    "StartLogging": true,
    "LogToFile": true,
    "AdminBypass": false,
    "BuildingShareRange": 150.0,
    "BShareIncludeSigns": false,
    "BShareIncludeLights": false,
    "BShareIncludeElectrical": false,
    "TCAuthedUserAccess": true,
    "useHammerForShareStatus": false,
    "respondToActivationHooks": true,
    "allowLootingInPVPAreas": true,
    "allowLootingOfflineOwner": false
  },
  "Rules": {
    "abovegroundpool.deployed": true,
    "bbq.deployed": true,
    "box.wooden.large": true,
    "button": true,
    "campfire": true,
    "cursedcauldron.deployed": true,
    "fridge.deployed": true,
    "fuelstorage": true,
    "furnace.large": true,
    "furnace.small": true,
    "hopperoutput": true,
    "item_drop_backpack": true,
    "lock.code": false,
    "lock.key": false,
    "mixingtable.deployed": false,
    "murderer_corpse": false,
    "paddlingpool.deployed": true,
    "player": true,
    "player_corpse": true,
    "recycler_static": false,
    "refinery_small_deployed": true,
    "repairbench_deployed": false,
    "researchtable_deployed": false,
    "scientist_corpse": false,
    "sign.hanging": true,
    "sign.huge.wood": true,
    "sign.large.wood": true,
    "sign.medium.wood": true,
    "sign.pictureframe.landscape": true,
    "sign.pictureframe.portrait": true,
    "sign.pictureframe.tall": true,
    "sign.pictureframe.xl": true,
    "sign.pictureframe.xxl": true,
    "sign.small.wood": true,
    "vendingmachine.deployed": false,
    "woodbox_deployed": true,
    "workbench1.deployed": true,
    "workbench2.deployed": true,
    "workbench3.deployed": true
  },
  "Zones": null,
  "EnabledZones": null,
  "DisabledZones": [
    "exclude"
  ],
  "Schedule": "",
  "Version": {
    "Major": 1,
    "Minor": 0,
    "Patch": 32
  }
}

It actually works backwards. Looting is enabled in PvE zones and Disabled in PvP zones. No other combination of settings I tried would get it to function correctly. We tested MANY different options.

It seemed that the console was reporting that a player was "NOT in PVE zone" when they were in a PVE zone, and vice versa when they were in PVP.

RFC1920

Posted

I don't see "NOT in PVE zone" or even "NOT in" in any of my plugins.  However, I do see a problem in NextGenPVE regarding the hook we use to determine ruleset/zone status (to be fixed in 1.4.4).

Yes, you need to enable useZoneManager.

DynamicPVP does name their zones as you showed, but they manage the NextGenPVE ruleset called 'exclude' last time I looked.

RFC1920

Posted

NextGenPVE was fixed for part of this list of problems.  However, I have received no response from the maintainer of DynamicPVP.

RFC1920

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.