TruePVE

Better PVE/PVP implementation

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

5/5, 26 likes
  1. Great Work ignignokt84! But now it looks like I'm to stupid to implement the mappings right. The XXXXX is replaced with the Zone-ID from ZoneManager of the corresponding Zone. But I can not get hurt by other players, or by a flameturret in this zone. If anybody has the final hint for me, I would deeply grateful!
    Here the whole config:

    Code:
    {
      "config": {
        "allowSuicide": true,
        "authDamage": false,
        "corpseLooting": true,
        "handleDamage": true,
        "handleLooting": true,
        "heliDamage": true,
        "heliDamageLocked": false,
        "heliDamagePlayer": true,
        "humanNPCDamage": true,
        "immortalLocks": true,
        "sleeperAdminDamage": false,
        "sleeperLooting": false,
        "sleeperProtection": false,
        "useZones": true
      },
      "data": {
        "global": {
          "name": "global",
          "description": "Global damage handling",
          "prefabs": [],
          "types": [],
          "links": {
            "global": false,
            "dispenser": true,
            "player": true,
            "traps": true,
            "heli": true
          },
          "enabled": true
        },
        "dispenser": {
          "name": "dispenser",
          "description": "Entities with ResourceDispenser",
          "prefabs": [],
          "types": [
            "TreeEntity",
            "BaseResource",
            "BaseCorpse",
            "HelicopterDebris"
          ],
          "links": {},
          "enabled": true
        },
        "player": {
          "name": "player",
          "description": "Players",
          "prefabs": [],
          "types": [
            "BasePlayer"
          ],
          "links": {
            "player": false,
            "barricades": true
          },
          "enabled": true
        },
        "traps": {
          "name": "traps",
          "description": "Traps, landmines, and spikes",
          "prefabs": [
            "spikes.floor"
          ],
          "types": [
            "AutoTurret",
            "BearTrap",
            "FlameTurret",
            "Landmine"
          ],
          "links": {
            "player": false
          },
          "enabled": true
        },
        "barricades": {
          "name": "barricades",
          "description": "Barricades",
          "prefabs": [],
          "types": [
            "Barricade"
          ],
          "links": {
            "player": false
          },
          "enabled": true
        },
        "highwalls": {
          "name": "highwalls",
          "description": "High external walls",
          "prefabs": [
            "wall.external.high.stone",
            "wall.external.high.wood"
          ],
          "types": [],
          "links": {
            "player": false
          },
          "enabled": true
        },
        "heli": {
          "name": "heli",
          "description": "Heli",
          "prefabs": [],
          "types": [
            "BaseHelicopter"
          ],
          "links": {},
          "enabled": true
        }
      },
      "zoneData": {
        "XXXXXXX": {
          "global": {
            "name": "global",
            "description": "Global damage handling",
            "prefabs": [],
            "types": [],
            "links": {
              "global": false,
              "player": true
        },
            "enabled": true
          },
          "player": {
            "name": "player",
            "description": "Players",
            "prefabs": [],
            "types": [
              "BasePlayer"
            ],
            "links": {
              "global": false,
              "player": true
        },
            "enabled": true
          }
        }
      }
    }
     
  2. Have you changed the ZoneManager plugin
     
  3. Is it not possible to make TruePVE work with Zonemanager "out of the box" ?
     
  4. That config won't allow you to be hurt by turrets, only players. I'm assuming you've added the new procedure to the ZoneManager plugin? Also, have you changed handleDamage and handleLooting to true in TruePVE? And can you confirm that you're indeed using the zone ID and not the zone name? Oh, and also make sure useZones is set to true, since it's turned off by default.
    No. ZoneManager doesn't have a built-in procedure that can provide TruePVE with the necessary information.
     
  5. There's no programming involved when it comes to configuration, it's all just logic. There is a basic explanation of configuration (with examples) in the TruePVE plugin description, but below is an elaboration. As far as a tutorial, if you have a specific damage setup you don't know how to configure, please post what you're trying to do as well as the configuration you've tried, and I will try to help you out.

    The way the configuration works is by setting up containers and mapping them to other containers, with a flag determining whether to allow or disallow damage. The containers specify which in-game entities can damage which other in-game entities. (An "entity" is basically anything in-game, including NPC animals, players, resource nodes, barrels, crates, buildings, deployables, etc) The mapping is basically creating a rule saying "in-game entities in container A can/cannot damage in-game entities in container B". With this basic rule system you can create as simple or complex a damage control system as you wish.

    As far as knowing how to determine what in-game objects you wish to affect, I've created a chat command - /tpve_prod - which will tell you the object type and prefab name, either of which can be used to define an entity. The difference between the "type" and "prefab" is that the type can refer to many entities and the prefab is normally a single entity. For example, a type of BaseOven encompasses large furnaces, small furnaces, and ceiling lights (and probably other entities), whereas a prefab named "furnace.large" only refers to large furnaces. There can be some ambiguity as to whether to use type vs prefab, but using the /tpve_prod command on various in-game entities can give you an idea of what each type/prefab is, and can be very helpful in determining why a particular configuration does not behave exactly as planned.
     
  6. Thanks to both of you! It was really the missing procedure in ZoneManager. I must have overwritten it with an old version - I'm an idiot :D So, it works now!
    PS: I get damage by flameturrut with this config
     
  7. Glad you got it working! Regarding the flameturret - I just realized the config is slightly incorrect - you can delete the "players" = true line in the zone global config and you should be good to go:
    Code:
        "XXXXXXX": {
          "global": {
            "name": "global",
            "description": "Global damage handling",
            "prefabs": [],
            "types": [],
            "links": {
              "global": false, // remove the comma here
              "player": true // delete this line
            },
     
  8. I am so confused on setting up the PvP arena...lol.

    I added the lines to ZoneManager, but I cannot get PvP to work in the zone.
     
  9. I am obviously stupid when it comes to coding. What do I need to add in TruePvE to make the zone I created a PvP arena?
     
  10. What have you done so far? Can you upload your TruePVE json here?
     
  11. Hello, I'm running a fairly new PVE server and have managed to get all other plugins working fine. However, I can't get ZoneManager to overrule TruePVE's PVE settings. I've configured a zone, set all the necessary flags (I think?) And inserted the extra procedure into ZoneManager's .CS file. However, no matter how hard I try my PVP arena won't allow damage.

    Any ideas what I'm doing wrong? I've attached my .json config to the post, thank you for taking a look for me.
     

    Attached Files:

    Last edited by a moderator: Feb 8, 2017
  12. Well your rules for the zone in your TruePVE.json config are working fine, but they prevent all damage. The link "global": false in both the global and player containers are saying "no one can damage anything", and "players cannot damage anything", respectively.

    If you want to allow all damage and have the zone only controlled by ZoneManager flags, you can remove the zone rules and just have:
    Code:
    "31372984": {}
    Or if you wish to allow only player-to-player damage, you can modify your zone rule by changing the "global": false statement to "player": true in your config (line 131). Thusly:
    Code:
        "31372984": {
          "global": {
            "name": "global",
            "description": "Global damage handling",
            "prefabs": [],
            "types": [],
            "links": {
              "global": false // prevent all damage
            },
            "enabled": true
          },
          "player": {
            "name": "player",
            "description": "Players",
            "prefabs": [],
            "types": [
              "BasePlayer"
            ],
            "links": {
              "player": true // allow player damage to other players, changed from "global": false
            },
            "enabled": true
          }
        }
     

  13. Sorry to ask again, but even with this configuration I still can't damage players inside the arena. Could there be anything else I've missed out? Thanks.
     

    Attached Files:

  14. Is "31372984" the zone name or zone ID? It should be the zone ID. Other than that, the config should work.
     

  15. 31372984 is the ZoneID, perhaps its the zonemanager.cs file... Sorry to be a pain, but is there any way you could send me a copy of ZoneManager with the procedure included? Just incase I put it in the wrong place. I've attached my ZoneManager.cs file. The plugin is definitely loaded serverside, though. If that doesn't work, then I know the problem lies with something else. Thanks again, all help is much appreciated.
     

    Attached Files:

    Last edited by a moderator: Feb 8, 2017
  16. Your ZoneManager.cs looks fine to me. I don't know what else could be the problem. Are you seeing any errors in the console?
     
  17. I have done nothing to the TruePvE.json that I know of. Any changes I tried to make were rewritten to defaults when I did reload TruePVE. I can only imagine I was adding something in incorrectly and it was just failing.

    Here is my json file though.
     

    Attached Files:

  18. Alas, no errors here. Looks like it'll be PVP for this server haha
     
  19. Ah, there's your issue - looks like you need to set useZones to true.
     
  20. Ugg....yeah. I feel stupid. I had changed it before, but when I messed up other parts, it reset it again.

    I got it working now.

    Thanks!