Failed to call hook 'OnServerInitialized' ... (NullReferenceException

Getting this error on startup ... settings file is properly formetted JSON.  Not sure what the issue is.

Failed to call hook 'OnServerInitialized' on plugin 'TruePVE v2.3.5' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.TruePVE+Rule.GetHashCode () [0x00000] in <6b3f71abf1454a74ba941291403924a3>:0
at System.Collections.Generic.ObjectEqualityComparer`1[T].GetHashCode (T obj) [0x0000a] in <f98723dd4586469db5213ec59da723ca>:0
at System.Collections.Generic.HashSet`1[T].InternalGetHashCode (T item) [0x0000a] in <8b0c76c7efa244bc95eeee75bf1314cd>:0​


"RuleSets": [
    {
      "name": "default",
      "enabled": true,
      "defaultAllowDamage": false,
      "flags": "AnimalsIgnoreSleepers,HumanNPCDamage,LockedDoorsImmortal,NpcsCanHurtAnything,PlayerSamSitesIgnorePlayers,ProtectedSleepers,SelfDamage,TrapsIgnorePlayers,TurretsIgnorePlayers,TwigDamageRequiresOwnership,VehiclesTakeCollisionDamageWithoutDriver,WoodenDamageRequiresOwnership",
      "rules": [
        "animal damage",
        "anything can hurt heli",
        "anything can hurt npcs",
        "fire cannot hurt players",
        "guards cannot hurt players",
        "heliturrets cannot hurt players",
        "junkyard can hurt cars",
        "npcs can hurt players",
        "players cannot hurt players",
        "players cannot hurt traps",
        "traps cannot hurt players"
      ]
    }
  ],​

hi,
"animal damage",
this is invalid and animal damage is handled by the plugin by default already.

Deleted & recreated the settings file and updated various boolf flags. 

Made sure animal damage wasn't in my rules list.

Is ther a complete list of available rules somewhere?  And if so where can I find it?

Thank You!!!



Merged post

Only problem I'm seeing now is the Attack Heli isn't firing Incindeary Rockets.  :(

Standing by for the next update ... Thanks again for ALL you do!!!

hi, truepve wouldn't cause the attack heli to not fire incendiary rockets. that's another plugin, even if unloading fixes it. another plugin can tell truepve to block it, but it's more likely a plugin blocking it outright. some heli behavior can be altered with server convars too.

there's too many rules to list them all. we're talking thousands. no one wants to look through that, and if it were possible then people would bloat their config with them by adding any rule that looked useful to them. but most rules are not necessary. this is why the default config was carefully written to manage as much damage using the least amount of rules and flags. there are some exceptions where redundancy was used to serve as examples for new users. 

follow these steps to allow players to damage a specific entity. most importantly, if you add a class or name to a new entity group then you must remove that class or name from any existing entity groups or it will conflict. in this example, Bike should be removed from "cars" entity group.

Step 1:
Use /tpve_prod on the entity. it will output the class type and the name. for example, if you use /tpve_prod on a bike then it will output something like "Prod results: type=Bike, prefab=motorbike"

If you create an entity group called bikes with Bike as a member then it will include all bikes without requiring you to specify all of the names: motorbike, motorbike_sidecar, pedalbike, pedaltrike.

This allows you a few different choices to pick from.

Step 2 (choice A, include all bikes):

    {
      "name": "bikes",
      "members": "Bike",
      "exclusions": ""
    },


Step 2 (choice B, two specific bikes):

    {
      "name": "bikes",
      "members": "motorbike, motorbike_sidecar",
      "exclusions": ""
    },

Step 2 (choice C, include all bikes except for pedalbike and pedaltrike):

    {
      "name": "bikes",
      "members": "Bike",
      "exclusions": "pedalbike, pedaltrike"
    },

As you can see, listing all of these for every rule would be unrealistic. It's much easier to do this yourself. You have a default config already, so adding one or two new entity groups on occassion takes minimal effort.

Step 3: Creating a rule

Rules for bikes and players are straight forward:
players can hurt bikes
players cannot hurt bikes
bikes can hurt players
bikes cannot hurt players
bikes can hurt bikes
bikes cannot hurt anything
bikes can hurt nothing

Strike-through are for rules that shouldn't be necessary, but it depends on your use case.

Step 4: Conflicts or overrides

This is where you need to read the documentation, too, as certain flags like AuthorizedDamage, AuthorizedDamageRequiresOwnership and so forth can and will override rules. It's often better to use a flag when the goal is to allow a broad range of damage such as owners (and ally of the owner) damaging their own entities but not others. As stated above, if you've created an entity group for Bikes or any specific bike then ensure it is removed from all other entity group's members and exclusions.