Humanity System

A humanity system based off of the DayZ mod

Total Downloads: 1,598 - First Release: Jul 6, 2016 - Last Update: Aug 6, 2016

5/5, 6 likes
  1. :) just updated new config/data.

    Now its the other way around. Player who killed me got a kill + a death. I was killed no got no death count or humanity -+
     
  2. Love the idea! One issue I found is HumanNPC kills are being counted as normal players. They show up in the data file so I could adjust them to be bandits but even setting them to -15000 does nothing it seems. Still get -50 and one kill and one death. Is there any way to toggle them to true/false once everything is sorted? However, I also like the idea as setting the hostile NPCs as bandits.
     
  3. Well I have not planned on using Human NPC's in this yet. Also I was not aware a NPC counted as a baseplayer :p
     
  4. I've Heavily modified your plugin, and made it, so the amount of humanity you lose / gain depends on the guy you killed / you got killed from.

    I've also changed the position of the Humanity box, and also slightly modified it.
     
  5. Cool. I added 4 different positions in a earlier update for the HUD incase anyone wanted to move it. If you moved it a different way its fine.
     
  6. DylanSMR updated Humanity System with a new update entry:

    1.0.9

     
  7. Could someone explain exactly what the humanity system is? I've never played DayZ.
     
  8. Basically its a system that ranks a player. So if a player kills a lot then he is a bandit(someone who kills a lot). If he does not kill then he is a neutral or civilian. Now if a person kills bandits he is a hero(killing bandits). Basically it just ranks people on how they preform in the field and how many people they kill and what types of people are they.
     
  9. Oh ok! Thats a really awesome idea/plugin! Does this tie in with the Bounty plugin? Cause if it doesn't, it totally should, and I'd pay to see that happen!
     
  10. Not currently but I possibly could tie it in one day.
     
  11. It ruined my whole betterchat :( Changed the color of the chat etc)
     
  12. Propably the priority is of the groups you create is higher than of other groups.
     
  13. And idea how to lower the priority? C:
     
  14. use API_ChangeGroupSetting, would only do that on freshly created groups though.
     
  15. object API_SetGroupSetting(string groupName, string key, string value) that? If value is priority then what is key?
     
  16. API_SetGroupSetting("mygroup", "Priority", 100);
     
  17. DylanSMR updated Humanity System with a new update entry:

    1.1.0

     
  18. DylanSMR updated Humanity System with a new update entry:

    1.1.1


    [DOUBLEPOST=1469692995][/DOUBLEPOST]
    So that works. Not sure if this will work though just kinda messed with it lol: BetterChat?.Call($"Groups.Updated()");
    [DOUBLEPOST=1469693693][/DOUBLEPOST]Right laser I just realized this but im gathering a error when I set a groups priority:
    Code:
    [Oxide] 03:13 [Error] Failed to call hook 'API_SetGroupSetting' on plugin 'BetterChat v4.2.2' (InvalidCastException: Cannot cast from source type to destination type.)
    [Oxide] 03:13 [Debug]   at Oxide.Plugins.BetterChat.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
    [Oxide] 03:13 [Info] [Humanity System] Created betterchat group - Neutral
                                                                                     
    from
    Code:
            public void CreateGroup(string groupName)
            {
                if(Convert.ToBoolean(BetterChat?.Call($"API_GroupExists", ""+groupName+"")) == true) return;
                BetterChat?.Call($"API_AddGroup", ""+groupName+"");
                BetterChat?.Call($"Groups.Updated()");
                BetterChat?.Call($"API_SetGroupSetting",""+groupName+"", "priority", 100);
                if(Convert.ToBoolean(BetterChat?.Call($"API_GroupExists", ""+groupName+"")) == false) Puts($"Failed to create betterchat group - "+groupName+"");
                else Puts($"Created betterchat group - "+groupName+"");
                return;
            }
     
  19. You should not need to call Group.Updated() also I doubt it works like that.
    -> You do indeeed after using setting the priority as I forgot to put that in. Will update BetterChat in a few minutes for that. So you don't need it at all.

    You do not need to put == true in for the if check. As its a boolean, it works just fine like this.
    For false, just put a ! in front.
    Further, you don't need to put groupName between two empty string. It makes absolutely no sense to do so. You can just put in the variable like it is.
    Also you don't need to call GroupExists again. AddGroup returns a boolean if it succeeded. (true if succeeded, false if already exists)
    No need to "return" at the end of your method either as it stops there anyways. >_<
    To fix the InvalidCastException, change 100 to a string: "100"

    Code:
    public void CreateGroup(string groupName)
    {
        if(Convert.ToBoolean(BetterChat?.Call($"API_GroupExists", groupName))) 
            return;    BetterChat?.Call($"API_AddGroup", groupName);
        BetterChat?.Call($"API_SetGroupSetting", groupName, "priority", 100);
        Puts($"Created betterchat group - {groupName}");
            }
    
    This should work just fine after I updated BetterChat.