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. You can toggle the HUD for the reason that there is already a lot of preexisting huds! I can agree that the head-tags are glitchy and i'm trying to see if I can find a work around maybe. The better-chat implementation is a issue i'm working on. @LaserHydra do you have any idea why it is not working? Maybe the assigned priority is too high/low?!?
     
  2. There is no maximal / minimal priority in BetterChat.
     
  3. Hmm. Ill have to test it tomorrow and screw around with it till it works.
     
  4. Any progress with the tags and / or priority for betterchat?
    Would love to have that fixed, so I can use it on my server :)
     
  5. The plugin isnt spawning in Zombies for me D: is there something i am doing wrong?
     
  6. yeah lol, your playing the wrong game if you want zombies. this plugin is for nametags so people can see if your a raider or defender.
    Zombies are long-gone :)

    EDIT: I've seen something about the NPC plugin where you can ad zombies, you should check that out if you realy want zombies
     
    Last edited by a moderator: Sep 6, 2016
  7. ah okay, thanks dude. i would be keen to look it up
     
  8. So the Hero and Bandit groups are showing up properly for this plugin with BetterChat, however the Neutral tag is not unless I physically add someone to that group. Help?
     
  9. Hey was looking to have your HUD appear automatically.

    inside OnPlayerInit(BasePlayer player)

    I added: RenderUI(player);

    but I cannot get it to show the HUD, any suggestions?
    I have tried to add at the top and after RankAlgorithm(player);

    Hook.
     
  10. You can not render the GUI on Init, as the client is not ready for GUI Rendering there yet.
    You gotta do it OnPlayerSleepEnded
     
  11. thanks Laser, added the following and appears to work without error.

    // / // / // / // / // /
    //OnPlayerSleepEnded //
    // / // / // / // / // /

    void OnPlayerSleepEnded(BasePlayer player)
    {
    RenderUI(player);
    }

    perhaps the author could add a config for me to allow a load on by default.
     
  12. Is this still a problem?

    Anyone know how to fix it?

    So if I understand this plugin correctly, you loose humanity for killing neutral/heroes but gain humanity for killing bandits until you become a hero?
     
  13. I think it's correct, but it's really hard to become a Hero xD
     
  14. Any update? :) <3
     
  15. Haven't updated it in a long time. Hence the error you posted in april. I've been slowly working on a new function calculate points and what not but its gonna take time.
     
  16. @DylanSMR Looks like BetterChat does not have the API calls anymore to add and remove users to and from BetterChat groups, (looks like it does stuff by Oxide permissions/groups now?)

    Change:
    API_IsUserInGroup
    API_AddUserToGroup
    API_RemoveUserFromGroup

    To?
    permission.UserHasGroup()
    permission.AddUserGroup()
    permission.RemoveUserGroup()
     
    Last edited by a moderator: Jun 4, 2017
  17. Code:
    public object RankAlgorithm(BasePlayer player)
            {
                if (players.Find(player) == null) OnPlayerInit(player);
                players playerData = players.Find(player);
                if(playerData.Humanity <= -2500)
                {
                    if (permission.UserHasGroup(player.UserIDString, "neutral")) { permission.RemoveUserGroup(player.UserIDString, "neutral"); }
                    if (permission.UserHasGroup(player.UserIDString, "hero")) { permission.RemoveUserGroup(player.UserIDString, "hero"); }
                    if (playerData.Rank == 2 || permission.UserHasGroup(player.UserIDString, "bandit")) { return "Bandit"; }
                    permission.AddUserGroup(player.UserIDString, "bandit");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Hero")) == true) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "Hero");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Neutral")) == true) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "Neutral");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Bandit")) == true || playerData.Rank == 2) return "Bandit";
                    //BetterChat?.Call("API_AddUserToGroup", player.UserIDString, "Bandit");           
                    humanityData.playerH[player.userID].Rank = 2;
                    SendReply(player, lang.GetMessage("NowA", this), "Bandit");
                }
                else if(playerData.Humanity >= 2500){
                    if (permission.UserHasGroup(player.UserIDString, "bandit")) { permission.RemoveUserGroup(player.UserIDString, "bandit"); }
                    if (permission.UserHasGroup(player.UserIDString, "neutral")) { permission.RemoveUserGroup(player.UserIDString, "neutral"); }
                    if (playerData.Rank == 1 || permission.UserHasGroup(player.UserIDString, "hero")) { return "Hero"; }
                    permission.AddUserGroup(player.UserIDString, "hero");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Bandit"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "Bandit");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Neutral"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "Neutral");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Hero")) || playerData.Rank == 1) return "Hero";
                    //BetterChat?.Call("API_AddUserToGroup", player.UserIDString, "Hero");           
                    humanityData.playerH[player.userID].Rank = 1;
                    SendReply(player, lang.GetMessage("NowA", this), "Hero");
                }
                else{
                    if (permission.UserHasGroup(player.UserIDString, "bandit")) { permission.RemoveUserGroup(player.UserIDString, "bandit"); }
                    if (permission.UserHasGroup(player.UserIDString, "hero")) { permission.RemoveUserGroup(player.UserIDString, "hero"); }
                    if (playerData.Rank == 1 || permission.UserHasGroup(player.UserIDString, "neutral")) { return "Neutral"; }
                    permission.AddUserGroup(player.UserIDString, "neutral");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Bandit"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "Bandit");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Hero"))) BetterChat?.Call("API_RemoveUserFromGroup", player.UserIDString, "Hero");
                    //if(Convert.ToBoolean(BetterChat?.Call("API_IsUserInGroup", player.UserIDString, "Neutral")) || playerData.Rank == 0) return "Neutral";
                    //BetterChat?.Call("API_AddUserToGroup", player.UserIDString, "Neutral");           
                    humanityData.playerH[player.userID].Rank = 0;
                    SendReply(player, lang.GetMessage("NowA", this), "Neutral");
                }
                SaveData();
                return true;
            }
    Replaced commented out code with new code, tested on server, works :)
     
  18. DrawChatMessage() function has
    Code:
    nearby.SendConsoleCommand("ddraw.text", 0.1f, messageColor, player.transform.position + new Vector3(0, 1.9f, 0),"<size=25>" + rank + "</size>");
    So I believe the <size> is the issue, but I also believe Ddraw is either broken or invisible to non-admins right now,
    so this functionality can be disabled in config/HumanitySystem.json by setting ---> "HeadText": false,
     
  19. So, my players love abusing whatever I give them, with Humanity System, (some players are killers and want to be labeled as bandits), but I know others want to be labeled Hero publicly, as a guise, and still want ability to do bad things,

    So I assume clans will have 1 person who is a bandit, and the other clan members will constantly kill that 1 bandit clan member over and over, so they they can all become heros, heros with lots of humanity points, which gives them ability to do more bad things (killing neutrals, other heros, etc) and still be labeled a hero.

    To combat this we could add clan support to the plugin, but that will be abused too, clanmates leave the clan to bypass that check

    So we have to make death cost a lot more, ppl will keep respawning in over and over.

    Options:
    - no sleeping bags, they have run long distance to come back to base
    - permadeath, 1 life, multiple lives, timed ban per death, make death have meaning
    - penalty for leaving clan, or somehow keep track of what clans players used to be in

    Any ideas?