TruePVE

Better PVE/PVP implementation

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

5/5, 26 likes
  1. I did it like this:

    1. /zone_add
    2. /zone_edit <id of the zone>
    3. /zone pvpgod false

    am i doing it right?
     
  2. No, all that's doing is setting ZoneManager flags - it doesn't affect TruePVE. Please take a look at this post regarding setting up PVP zones: TruePVE | Page 18 | Oxide There have also been a few discussions regarding zones since that post, so I recommend going over the past few pages of this thread.
     
  3. after the last update sleeping players take damage
     
  4. Hi, somehow i can't get the scheduler to work at the moment.. since for the timebeing it keeps being PvE instead of PvP, do i have to put in each day which mode is active?

    EDIT : Now the Schedules work apparently the 24hr doesn't detect 00:00.. so yea.. but the damage handler doesn't work :| how do i make another ruleset actually??
     
    Last edited by a moderator: Mar 4, 2017
  5. The new version 0.6.6 is attached,

    When you asked me to delete everything in "data" I did that... but ended up causing an error so it failed to initialize. so what I did was delete everything and started over including the old config.

    I let the new .cs version create config which it did. I edited it with the new zone inserted. I didn't notice at first if the mappings were right or not, so I reloaded the .cs and looked at the config and saw the mappings were missing after testing on animal, node. by the second time I redid it, I had saved a copy of the config that I wanted to keep (The new one with my zones in) then I would reload again. and the mappings for global were gone again.

    By this time I was frustrated and had tried this a few times. I even stopped using filezilla and went to my hosts ftp and tried, to no avail...no luck. so...

    I went in manually without copying the whole file in I opened up the file in the hosts ftp and edited the file that was there. saved and then reloaded. It seemed to work and has been working since. If I reload it again, it may disappear. I don't know for sure.
     

    Attached Files:

  6. so glad i'm not the only one having the same issue and still couldnt make it work even through host' panel. will give it a try again later
     
  7. Deleting everything in "data" shouldn't have caused an error unless the bracketing was incorrect, or unless "mappings" was also empty (which wasn't the case in the json version you uploaded). If you're trying to copy old configs into a new config, you need to make sure that bracketing is correct, and that there are values for the rulesets in the "mappings" (which in the latest json you've uploaded, there is not entry for "default").

    To elaborate - on startup, TruePVE uses the value of "defaultKey" to point to a mapping, which in turn points to a ruleset to use. The mapping is there so that if you're using zones, you could set up a ruleset and point multiple zones to the same ruleset. However, there MUST be a mapping entry from the value of defaultKey to the "mappings", and then to a ruleset. If there's not a mapping, TruePVE will not load any rules or enforce any damage restrictions.
     
  8. yeah, the error was user caused. lol I must have deleted a bracket I wasn't supposed to.
     
  9. Keep in mind, the config is really quite "dumb", so any unexpected formatting or out-of-place brackets, quotes, etc, can cause problems. :(
    [DOUBLEPOST=1488659432][/DOUBLEPOST]Testing various config "failure" scenarios showed some odd side-effects in the config - I'm recombobulating some parts and hopefully that will resolve some of these issues (like "global" losing mappings). Updated version to come...
     
  10. ignignokt84 updated TruePVE with a new update entry:

    0.6.7

     

  11. Thanks, Ill let you know how it plays out.
     

  12. Looks like the update fuxed it. :)

    Thanks man for the update.
     
  13. ok so i run a pve server, i am using this mod, and server.pve false, how do i make a zone that is pvp?
     
  14. you need to edit your TRUE PVE config. find the info in your config below.

    "useZones": true << ----- set this to TRUE

    "mappings": {
    "1932484": "1932484", <<------- this is my zone.
    "default": "default" << ---- do not touch this.
    },

    You also need to input some code into the ZoneManager.cs

    ---------------------------
    Building Wrapper code <<< if you want to wrap a arena in a zone. (Insert all the info beflow between where it says Insert before and after ....)
    ---------------------------
    insert after case "radius":
    editvalue = zone.Radius = Convert.ToSingle(args[i + 1]);
    break;
    ------------------------------------
    case "rotation": (this code replaces the exisiting code fyi)
    // handle rotation parameter for BuildingWrapper
    float rotation = Convert.ToSingle(args[i + 1]);
    if(rotation != null)
    zone.Rotation = Quaternion.AngleAxis(rotation, Vector3.up).eulerAngles;
    else
    { // default rotation handling
    zone.Rotation = player?.GetNetworkRotation() ?? Vector3.zero;/* + Quaternion.AngleAxis(90, Vector3.up).eulerAngles*/
    zone.Rotation.x = 0;
    }
    editvalue = zone.Rotation;
    break;
    -----------------------------------
    insert before case "location":


    ---------------------------
    True PVE 0.5.1 Integration
    ---------------------------
    Insert after: ZoneFieldList (Insert all the info beflow between where it says Insert before and after ....)
    ---------------------------
    // added for TruePVE
    private List<string> GetEntityZones(BaseCombatEntity entity)
    {
    if(entity == null) return null;

    HashSet<Zone> zones = null;
    if(entity is BasePlayer)
    playerZones.TryGetValue(entity as BasePlayer, out zones);
    if(zones == null)
    if(!otherZones.TryGetValue(entity as BaseEntity, out zones))
    buildingZones.TryGetValue(entity as BaseCombatEntity, out zones);

    List<string> zoneIds = new List<string>();
    if(zones != null)
    foreach(Zone zone in zones)
    zoneIds.Add(zone.Info.Id);
    if(zoneIds == null || zoneIds.Count == 0) return null;
    return zoneIds;
    }
    ---------------------------
    insert before: GetPlayersInZone
    ---------------------------

    then Reload Zone Manager and TruePVE and you should be able to have a working zone.
     
  15. i cant understand a word of that
    [DOUBLEPOST=1488676295][/DOUBLEPOST]can you show what that looks like after you enter that, im so confused
     
  16. Assuming you've made the required code change to ZoneManager (and also that you're using ZoneManager), the attached config should provide an example of an essentially default PVE setup with a "PVP" zone (which allows normal Rust behavior). It's quite simple assuming you don't want special behavior. You can really just copy lines 30 and 33 into your config (don't forget the comma on 29), and change them to be your own zone ID.
     

    Attached Files:

  17. if you need a zonemanager file, that's easy......... I can post it if Im allowed. (because we cant post random files) or u can add me on steam and I can get it to you another way.
     
  18. alright ill try this and see how it works, sorry if i sound like a noob, i dont do much with coding or anything like this
    [DOUBLEPOST=1488691375][/DOUBLEPOST]could use that, whats your steam username?
     
  19. @ignignokt84 I have some spamming errors (I think its due people removing entities.)

    (15:54:43) | Failed to call hook 'OnEntityTakeDamage' on plugin 'TruePVE v0.6.7' (KeyNotFoundException: The given key was not present in the dictionary.)
     
  20. Could you upload your json please? Any idea of what type of entity is being damaged when this exception pops out?