[FUN/MISC] joerep v0.5 - Simple player driven reputation system [740]

Discussion in 'Inactive/Unsupported Plugins' started by JoeJoeMcBean, Apr 11, 2011.

  1. Offline


    joerep - A simple player driven reputation system.
    Version: v0.5

    Uses Permissions (Tested with v2.7 Phoenix).
    Uses sqlite or mysql.

    Allows players to give and take reputation points from each other based on their interactions. Don't like that someone pvp'd you - take a rep point from them! Feeling generous give someone some rep. Over time players will be able to see how others 'feel' about each other based on their chat name color.

    Default: ( @overlordror - Thanks for the scale!)
    [-40 : -31] Grey - Criminal
    [-30 : -21] Dark Red - Evil
    [-20 : -11] Light Red - Despised
    [-10 : -1] Gold - Hated
    [0 : 10] Yellow - Neutral
    [11 : 20] Dark Green - Liked
    [21 : 30] Light Green - Loved
    [31 : 40] White - Divine (white not black, otherwise can't see on this background.)

    Show Spoiler

    • Use ~PN for PlayerName, ~REP for reputation and ~0-f for colors in the ranks.config file. Easily build fairly complex display names with suffix, prefix, colors, etc.
    • Based on the number of points you have your chat name may be a different color, have a prefix or suffix or even have the chat text a different color
    • The plugin can add a [#] to the chatname allowing others to see your exact number of reputation points. For example JoeJoeMcBean[50]: Hi There! by using the ~REP option in the ranks. config file.
    • Players can display the top 1 best and worst reps, as well as a top/worst number of reps (rankings).
    • Cannot give or take rep from yourself.
    • Can only give or take reputation once per configurable time frame per player.
    • Admins can set player reputation, and reset their re-use timer.
    • Admins can generate a report to list players and reputation to a log file.
    • Source included in jar.

    Download jar's here (or from attached file below):
    Show Spoiler


    Show Spoiler

    Copy the joerep.jar file to your plugins directory. The plugin will create the plugins/joerep folder, joerep.db, joerep.config, and ranks.config.
    Copy sqlite.jar or mysql.jar to the main server folder or to the plugins/joerep folder (if you do not already have).

    Show Spoiler



    Show Spoiler

    /rep me
    /rep best [#] # is optional; /rep best 10 will show top 10 rankings, otherwise just top 1.
    /rep worst [#]
    /rep give <playername>
    /rep take <playername>

    /rep info <playername> Display player reputation info.
    /rep set <playername> <rep #> Sets player repution.
    /rep resetuse <playername> Sets use timer back a day so player can give or take reputaion point.
    /rep report Dumps DB PlayerName and Reputation to joerep_report.log

    Show Spoiler

    Clean up code.​

    Show Spoiler

    Version 0.5
    Allow players to give rep more than once in the time period but only to different players.​
    Version 0.4
    Added mysql support.​
    Simplified re-use time setting in the joerep.config​
    Version 0.3
    Greatly simplified display name configuration in the config (Thanks @Valrix code for getting me pointed in the right direction.)​
    Version 0.2
    Added customizable configs.​
    Added ability to not use color. (May conflict with plugins that change DisplayName, untested)​
    Added ability to set re-use time (milliseconds)​
    Added ability to set each rank level and color.​
    Added prefix, suffix and color choices for each.​
    Added joerep_report.log​
    Version 0.1

    Attached Files:

  2. Offline


  3. Offline


    This system is really interesting and I'd love to use it, but I want to be able to customize the reputation colors before I install it. A few people who frequently play on my RPG-like server remember the old days of Ultima Online and one of its indie derivatives, Dransik. Dransik had a reputation system similar to what you are proposing, but the colors functioned in this manner:

    Grey - Criminal
    Dark Red - Evil
    Light Red - Despised
    Gold - Hated
    Yellow - Neutral
    Dark Green - Liked
    Light Green - Loved
    White - Divine

    So any time I see a reputation system, I immediately associate that color scale with it. Looking forward to the customizable version.
  4. Offline


    Overlordor has a great idea and a great color system there im wondering if you could implement a permision or perhaps another plugin to give people abilities based on their standing?
  5. Offline


    color change is nice, but could u perhaps add a prefix to someone's name based on rep?

    also, is it possible to disable the color changing? I have ColorMe installed right now, not sure how it would interfere

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  6. Offline


    Thanks for all the feedback!
    I've made many of the changes you have all proposed. Please feel free to let me know if I hit the mark.
  7. Offline


    I have a few more suggestions.
    Have you thought about making it configurable with Towny to allow players to rep Towns and Nations?

    Also, let Admins add categories to Rep. Perhaps an Overall Rep, but also reps that admins can name, like "Job Rep" or "Trade Rep" so people can know whether to trust someone before hiring them or trading with them. People would just do /rep job give [playername] instead.

    Perhaps also make it so that you can't +Rep or -Rep the same players more than once every "x" number of reps, configurable by Admin.
  8. Offline


    Awesome, glad to see you added a configuration option. It's late here and I haven't slept yet, but I will be installing on my server tomorrow to test it out.
  9. Offline


    I added that color scale you mentioned as the default. Hope you don't mind! Looking forward to your testing results, thanks!

    Another update.
    Simplified the config setup.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  10. Offline


    Thanks for the mention :)
  11. Offline

    tha d0ctor

    any possibility for mysql in the future? would love to integrate with phpbb3 +rep system and with webstats!
  12. Offline


    @JoeJoeMcBean I had the chance to install this on my server this morning and it works beautifully. I played around with setting my rep and such and those functions work well. When I have more players on I'll inform them of the changes and let them use them as they see fit.

    The only thing I noticed that was wrong in the config file is you had the color scale reversed for the "negative" reps. The scale should go like this:

    [-31 - -40] Grey - Criminal
    [-21 - -30] Dark Red - Evil
    [-11 - -20] Light Red - Despised
    [-1 - -10] Gold - Hated
    [0 - 10] Yellow - Neutral
    [11 - 20] Dark Green - Liked
    [21 - 30] Light Green - Loved
    [31 - 40] White - Divine

    As you can see, having it laid out like that (aside from white which I can't show here) follows the stoplight pattern of good and bad, which most people have ingrained in their brains from an early age. :)
  13. Offline


    Awesome thanks for taking the time to test, I appreciate it. I'll update the color scale in the default setup. I'm not sure if you reversed the individual line numbers from the post above in your config as well, the over all order shouldn't matter but they need to be lower:higher for each rank. (And if you didn't I'll explain anyway for others that may get caught up-)

    Something to watch for on how it looks for the rank to use, the code goes something like:
    my_rep >= config.repleftside && my_rep <= config.reprightside
    So if you have -35 rep and it runs through the [-31 - -40] Grey - Criminal check:
    -35 >= -31 is false && -35 <= -40 is false. check fails.

    Where as [-40 - -31] Grey - Criminal check:
    -35 >= -40 is true && -35 <= -31 is true. check succeeds.

    I just try and remember zero is greater than a negative number, so the closer you are to zero the bigger your negative number.

    Made me think maybe another use could be to identify yourself as [OP] with white brackets and green OP (saw you mention this in another post of yours while I was in prefixer thread.)
    9999:9999,~f[~2OP~f] ~PN

    This is only a pain if you actually wanted to participate in the player driven rep system. Well I suppose you could make another scale in the 9000 - 10000 range for your OP's and they could have their own rep color codes, would just need to makes sure they didn't get too low or high in reputation.

    Hiya Doc,
    I do plan on adding mysql support soon. I'll try to get that wrapped up in the next day or so.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  14. Offline


    I didn't reverse the order oft he ranks, just the colors, since the highest negative number should be the worst rank. Also, I changed the code around so that there are no prefixes supplied by the rep plugin, since I just wanted the colored name functionality. JoeRep and Prefixer play well together, as it's what I'm currently using to signify OPs and MODs on the server while still preserving their rep functionality.

    Having a MOD who loves to PVP others should definitely let those people rep him into red to let people know he's quite dangerous, but can help you if you have any problems game-wise. :p

    The only thing that would make this plugin the complete experience is the ability to color names overhead in accordance to their rep, but I'm sure that's probably a limitation of the game itself and nothing you code will fix that. Seeing someone running at you with a red or grey name will instantly let you know they're probably not going to help you kill that skeleton you're fighting.
  15. Offline


    I agree and you're right. As far as I can tell changing the in-game over the head name is not possible (yet?), at least as far as my ability to code that goes. I'll keep my eye open for that though and add it!
  16. Offline

    tha d0ctor

    great many thanks! prefixes would definately be a win too and I know It might be a stretch but if you released an API someone could do something with achievements plugin and make achievements for different level or rep,
  17. Offline


    The plugin is already set up to handle prefixes by default and Joe has included them with the naming conventions I mentioned in the original post. When you install the plugin for the first time and type something into chat, your message will appear as:

    [Neutral] <overlordror>: Hey guys!

    The config file he included lets you customize it any way you choose, so I've got mine customized on my server so that when I personally type something, it appears like this:

    [OP] <overlordror>: Hey guys!

    Really is a top notch plugin. :)

    @JoeJoeMcBean My users and I have spent some more time playing around with this, and it seems as though it's set up so that you can only award one person rep in a 12 hour period? As an example, one of my OPS was extremely helpful so I gave her some rep and then one of the members filled the newbie center so I wanted to rep him, but it said I had already given rep during the period.

    I feel like it should work so that I can only rep each individual person once in a 12 hour period, instead of just choosing one person to rep.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  18. Offline


    @tha d0ctor
    MySQL support online with v0.4
    Please let me know if you run into any issues. I only tested here on my w7 box.

    As an admin you can use the /rep set <playername>, or /rep resetuse.

    I assume though you are looking to have each 'user' be able to give rep to different players in the time period. I set it up that way so i did not need to keep track of who gave to whom. I suppose I could though if thats what you're looking for.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  19. Offline


    Yep, that's what I was hoping for, since I don't want players to feel like they're "wasting" rep if they give good rep to PlayerA for helping them, when PlayerB comes along a few hours later and kills them. Most people would reserve their reps for when bad things happen.
  20. Offline


    Yeah that makes good sense, I'll get started on that. v0.5 here we come!

    @overlordror , Okay v0.5 is up. I did some quick testing and things seem fine, but a little tired so we'll see what you can dig up. :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016
  21. Offline


    @JoeJoeMcBean Man that was quick! I wasn't expecting to see a new version today. I'm tired myself so this will have to wait until tomorrow to be installed, but as soon as I do I'll report back and let you know how things have gone.
  22. Offline


    Can someone say pls how to edit file to color name only? When i try ~c~PN it doesnt work neither ~c~PN~f
  23. Offline


    @BorderKeeper ,
    What you have there should work. For example in my ranks.config i have a line for
    That shows my (zero to ten rep) player with a red name and white chat text.
    Another thing to maybe double check in your joerep.config, is this set to true?
    Use color in display name
  24. Offline


    That should work. Like JoeJoe said, make sure you've edited the config file so that colors are set to true. Here's what my config file looks like:

    0:10, ~e~PN~f
    11:20, ~2~PN~f
    21:30, ~a~PN~f
    31:40, ~f~PN~f
    -10:-1, ~6~PN~f
    -20:-11, ~c~PN~f
    -30:-21, ~4~PN~f
    -40:-31, ~7~PN~f
    Also, thanks for the database update, @JoeJoeMcBean my users have been playing around with it and appreciate the ability to multi-rep people within one time frame.
  25. Offline


  26. Offline


    Hi, this plugin looks very interesting. Unfortunately I keep getting errors and I can't try it

    After looking for the sqlite jar file...I also got an error

  27. Offline


    @kmccmk9 , sorry to hear you're running into issues. Quick question-
    1. Where is your sqlite.jar located?
  28. Hi, could you help me figure out the problem with this?
    I'm running CB build 670, i'm hoping this isn't the problem, I have many other CB#677 Plugins and they seem to work.
    This is the error I am receiving when running CB:
    I have just made my server and is yet to become public but I would like to gather some good plugins first and came across this so i'm not an expert with plugins.
    Any help is appreciated :D

    P.S. I have configured the config file to run with MySQL and have set the user and pass for the MySQL DB.
  29. Offline


    It is with all the other plugins
  30. Offline


    Would you mind trying to move the sqlite.jar to your main folder (where craftbukkit.jar lives) to see if that helps?

    @L4w3s , I'll probably be going over some of the obvious but may as well ask :)
    Does the user have permissions to create a db in your mysql server?
    I assume its on the same machine, so are you still pointing to localhost?
    And you know the server is responding? via mysql workbench or similar?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 13, 2016

Share This Page