TruePVE

Better PVE/PVP implementation

Total Downloads: 4,637 - First Release: Mar 25, 2016 - Last Update: Mar 7, 2018

5/5, 26 likes
  1. Stones and Wood upgrade. I attached my JSON file. pls check. I did what Krazy J told me to do and even tried copying the text many times but still doesn't work.
     

    Attached Files:

  2. Just found a bug that was blocking authorized damage - I will upload a fix very shortly...
     
  3. ignignokt84 updated TruePVE with a new update entry:

    0.7.3

     
  4. Thank you! Now fixed. ^_^
     
  5. here you go.. the plugins work fine tho.. it's been working great atm.. but still the "Failed to call hook 'OnServerInitialized' on plugin 'TruePVE v0.7.3' (InvalidOperationException: Operation is not valid due to the current state of the object)" message pop up when i load the plugin.. but it still works :)

    ... well after the update to 0.7.3 it doesn't work now :(
    could it be another plugin is not compatible with TruePVE?
     

    Attached Files:

    Last edited by a moderator: Mar 10, 2017
  6. @ignignokt84

    not sure if you already found this OnEntityDamage problem. but here ya go.
     

    Attached Files:

  7. ignignokt84 updated TruePVE with a new update entry:

    0.7.4


    [DOUBLEPOST=1489178607][/DOUBLEPOST]
    I've still not been able to replicate this issue - can you provide me with more details? Does it happen in a particular zone? When attacking a specific entity or entities? Or with a specific weapon/damage type?
    [DOUBLEPOST=1489178897][/DOUBLEPOST]
    It should be fixed with the last update. Also, you don't need all those entries in your schedule... The entries below will have the same effect. If you have two sequential schedule entries that reference the same RuleSet, you can delete the second. You only need schedule entries to define points where the RuleSet changes.
    Code:
        "entries": [
          "1.00:00 default PVE environment enabled!", // monday at midnight use "default"
          "5.22:00 pvprules PVP enabled!" // friday at 22:00 use "pvprules"
        ]
     
    Last edited by a moderator: Mar 10, 2017
  8. ok, so I have 0.7..3 installed. I needed to do a quick update and on bootup I saw this:

    Code:
    (12:18:45) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:18:46) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:18:46) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:18:46) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:19:07) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:19:07) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:19:07) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3' (NullReferenceException: Object reference not set to an instance of an object)(12:19:07) | Failed to call hook 'CanBeTargeted' on plugin 'TruePVE v0.7.3'
    Is this something fixed in 0.7.4???

    The other error I sent you yesterday was for the "raidable zones" I have. (OnEntityTakeDamage) or something like that.

    I entered the "Raidable zones" I have, tested c4 on foundations which I was trying to get them to stop taking damage, but still do. anyways, I haven't tested much else as of yet because of timing. I'll test more for you tonight if you need more testing done.
     
  9. @Krazy J - The CanBeTargeted NRE should be fixed. Have you updated to 0.7.4 yet? Looking at your config, your RuleSets for your raid/pvp zones won't work - they set defaultAllowDamage to true, but then they still have rules defined that implement some PVE behavior. Also, you don't need a copy of a RuleSet for each zone, if two zones will use the same damage control config then they both just need to reference it in Mappings:
    Code:
      "Mappings": {
        "default": "default",
        "pvp": "pvp",
        "1932484": "ArenaRules", // arena ruleset
        "48690131": "ArenaRules", // same arena ruleset as above
        "79316008": "RaidZoneRules", // raid zone ruleset
        "4277451": "RaidZoneRules" // same raid zone ruleset as above
      }
     
  10. ok so, I figured I'm doing it all wrong as I said I'm as confused as a chicken with no head. And no I haven't updated just yet... lol but im going to.


    "Mappings": {
    "default": "default",
    "1932484": "ArenaRules", <---------- I understand this part now
    "48690131": "ArenaRules",
    "79316008": "RaidZoneRules",
    "4277451": "RaidZoneRules"

    {
    "name": "ArenaRules",
    "enabled": true,
    "defaultAllowDamage": true,
    "flags": "SuicideBlocked, HumanNPCDamage, LockedBoxesImmortal, LockedDoorsImmortal",
    "rules": [
    "anything can hurt dispensers",
    "anything can hurt players",
    "players cannot hurt players",
    "anything can hurt traps",
    "traps cannot hurt players",
    "players can hurt barricades",
    "barricades cannot hurt players",
    "highwalls cannot hurt players",
    "anything can hurt heli"
    ]
    },
    {
    "name": "RaidZoneRules",
    "enabled": true,
    "defaultAllowDamage": true, << ----------- this from what I understand allows all damage. of course
    "flags": "HumanNPCDamage, LockedBoxesImmortal, LockedDoorsImmortal", <---- I tried without these (empty) it reset the config.
    "rules": [
    "anything can hurt dispensers",
    "anything can hurt players",
    "players cannot hurt players",
    "anything can hurt traps",
    "traps cannot hurt players", <<<<<<<<<<< --------- these are rules that I can replace with what ? This is what I don't understand
    "players can hurt barricades",
    "barricades cannot hurt players",
    "highwalls cannot hurt players",
    "anything can hurt heli"
    ]
    }
    ],

    Example of my understanding:

    default changed
    "anything can hurt dispensers", "anything cannot hurt dispensers",
    "anything can hurt players", "anything cannot hurt players",
    "players cannot hurt players", "players can hurt players",
    "anything can hurt traps", "anything cannot hurt traps",
    "traps cannot hurt players", "traps can hurt players",
    "players can hurt barricades", "players cannot hurt barricades",
    "barricades cannot hurt players", "barricades can hurt players",
    "highwalls cannot hurt players", "highwalls can hurt players",
    "anything can hurt heli" "anything cannot hurt heli"

    Where are the rules outlined that you can change to or are these it ?
     
  11. Oh yeah, i've already changed it to that actually xD, i've just added all those schedule to test the "broadcast" actually xD because the broadcast only happens when the mapping changed.. thanks a lot..
     
  12. @Krazy J: Well, you can change whatever you like - you could even clear all the rules out... But here's the kind-of-long explanation...

    Ignoring for now the name and enabled fields on the RuleSet, as those are self-explanatory - there are 3 sections of a RuleSet:
    1. defaultAllowDamage - This flag is the "catch-all" of your rules. If you want a RuleSet that primarily allows damage, you set this to true, otherwise, you set it to false.
    2. flags - These are flags that do some advanced damage control. Essentially, these are things that are too difficult or impossible to write a rule for, so I create a flag that handles it. For all intents and purposes, flags are built-in rules.
    3. rules - Rules are essentially some specialized damage control that you want that isn't covered by the defaultAllowDamage. The rules override the defaultAllowDamage flag, making it so you don't have to define ALL of the individual entities and what they can/cannot hurt.

    To start off, say you only want standard PVP behavior without any customization, then you don't need ANY flags or rules entries. But say you wish to have PVP, but don't want turrets to be able to hurt any players - first you define what entities make up "players" and "turrets" (that's what Entity Groups are). Then you use those entity group names to write out your rule: "turrets cannot hurt players".

    When it comes to defining your RuleSet, start with the overall damage handling (defaultAllowDamage), then narrow down what you want to happen. If your overall damage handling is set to true to allow all damage, then normally you don't have to write rules to allow damage.

    An exception to the previous assumption is when you need to override a broader rule. For example, in the "default" RuleSet we have defaultAllowDamage set to false - so block all damage. Then there's a rule "anything can hurt players", because we want players to be able to take damage overall (from falling, temperature, animals, hunger, etc). This rule is broad because it says anything can hurt players. But since we don't want to allow damage from other players, then we have to define yet another more specific rule to override the "anything can hurt players" rule, but only for players. So we say "players cannot hurt players". When TruePVE then processes the damage for a player attacking another player, it first gets the Entity Groups - attacking player is in group "players", and target player is also in group "players". Then it checks to see if there is a rule directly linking the two groups. The first rule it sees is "players cannot hurt players", which it uses as a basis to nullify the damage. If the "players cannot hurt players" rule did not exist, then TruePVE would check first if there is a "players (attacking player group) can/cannot hurt anything" rule, and then "anything can/cannot hurt players (target player group)" rule. And, assuming none of those rules existed or matched, the defaultAllowDamage flag is used - false - which will nullify the damage.

    :)
     
  13. [

    One question, ............. ok maybe 2

    I have the flag NoHeliDamage placed in "default"

    but people are telling me that it still damages bases.
    Since there is no Rule for that, The flag is supposed to stop the damage to bases? Or can I just add an entry into Entity Groups to set a rule that defines what the heli cannot damage ?

    My other question is: this is the default Ruleset, Do I have to change what the rules are and get the same outcome as I did from older versions ?
    {
    "name": "default",
    "enabled": true,
    "defaultAllowDamage": false,
    "flags": "NoHeliDamage, HumanNPCDamage, LockedBoxesImmortal, LockedDoorsImmortal, AdminsHurtSleepers",
    "rules": [
    "anything can hurt dispensers",
    "anything can hurt players",
    "players cannot hurt players",
    "anything can hurt traps",
    "traps cannot hurt players",
    "players can hurt barricades",
    "barricades cannot hurt players",
    "highwalls cannot hurt players",
    "anything can hurt heli"
    ]
    },
     
  14. I'm testing out the NoHeliDamage flag now - but the default config is meant to be the same as previous versions.
    [DOUBLEPOST=1489235349][/DOUBLEPOST]I don't see any issues with NoHeliDamage - successfully defended against a heli with a twig base and nary a scratch on it.
     
  15. what am i doing wrong? this is my Zonemanager
    {
    "AutoLights": {
    "Lights Off Time": "8.0",
    "Lights On Time": "18.0"
    },
    "Chat": {
    "Prefix": "<color=#FA58AC>ZoneManager:</color> "

    },
    "Mappings": {
    "default": "default",
    "pvp": "pvp",
    "9209590": "DM-Arena" // exclude zone from TruePVE handling
    }

    trying to get a pvp zone set up. here is my TruePVE config
     

    Attached Files:

  16. In your config you're pointing zone 9209590 to RuleSet DM-Arena, but that RuleSet won't allow players to damage eachother (it has the rule "players cannot hurt players").
     
  17. but when i try an load the above zone manager config it says it corrupted. i will remove players cannot hurt players
     
  18. There isn't anything to put in the ZoneManager config.
     
  19. Oh ok so its all done it TruePVE. ok well let me try again
     
  20. Is it possible to use both the Schedule and the Zones feature? Since I do an alternating cycle of PVE and PVP, I would still like the rad towns to be PVP areas. So all I need to do in theory is create a zone around a monument and map it to truepve and have no rulesets in it right? Or would the schedule take over and make the zones irrelevant?