Inactive [RPG/MISC] BetterLeveling v1.1 - Makes Player Levels Useful [1.4.5-R0.3]

Discussion in 'Inactive/Unsupported Plugins' started by monstuhs, Apr 15, 2012.

  1. Offline

    monstuhs

    BetterLeveling - Make Minecraft player levels useful
    Version: v1.0
    Author: monstuhs

    Resurrected this plugin from the grave. I spent all my time tonight fixing maven dependencies issues so I only had time to compile and ever-so-gently smoke test this with 1.4.5. No clue where I was at with this when I left off so please let me know if you find any bugs.

    BetterLeveling allows you to factor in vanilla Minecraft level to various activities. This uses the vanilla level mechanics so it doesn't rely on it's own built-in leveling system such as mcMMO

    Features:
    • Additional health regeneration per level
    • Chance to crit on attack based on your level
    • Chance to dodge when attacked based on your level
    • Chance to double-drop ore's when mined based on your level
    • Chance to instabreak certain blocks based on your level
    • Can configure the amount of XP lost and dropped on player death
    • Everything is configurable!
    Download BetterLeveling
    View the Source Code

    Configuration
    Code:
    settings:
      WorldName: world
      combat:
        PercentageDamageFromDodge: 75
        PercentageDamageFromCrit: 200
        PercentageDamageFromHeadshot: 200
        MaximumChanceForCrit: 75.0
        MaximumChanceForDodge: 75.0
      death:
        PercentageOfXPDropped: 100
        PercentageOfXPRetained: 0
    activity:
      mining:
        PercentageChancePerLevelToDoubleDrop: 1.0
        PercentageChancePerLevelToInstaBreak: 1.0
      combat:
        PercentageChancePerLevelToDodge: 2.0
        PercentageChancePerLevelToCrit: 2.0
      passive:
        regeneration:
          RegenIntervalInSeconds: 20
          HalfheartsPerLevel: 0.5
    localization:
      stats:
        ChanceToCrit: Chance To Crit
        ChanceToDodge: Chance To Dodge
        ChanceToDoubleDrop: Chance To Double-Drop
        ChanceToInstaBreak: Chance To Insta-Break
        ExtraRegenPerSecond: Extra Regen Per Second
      combat:
        CriticalHit: Critical Hit!
        Dodge: Dodge!
        HeadShot: Headshot!
    Changelog:

    Version 1.1
    * Made "ChanceToDoubleDrop" and "ChanceToInstaBreak" double precision (meaning you can do 0.42 or 3.14159) if you want.

    Version 1.0
    * Updated to 1.4.5 R0.3


    [​IMG]

    Show Spoiler

    Version 0.6 & 0.6.2
    * Insta-break no longer works on blocks connected to things like levers, buttons, doors, etc.
    * Insta-break only works when you are using the appropriate tool (spade for dirt/grass/sand/etc, pick for ore/stone/cobble/etc and axe for wood/logs/etc)
    * Configurable percentage of XP retained on death (default 0%)
    * Configurable percentage of player XP dropped on death (default 100%)
    * All player messages are configurable (which allows localization). You can set the messages in the configuration file (default messages are US English)
    * The "/stats" command now shows the maximum values for crit and dodge chance
    * Changed the "percentage per level" for crit and dodge to be double precision so you can use values like "0.42" or "4.20" or whatever your little heart desires
    * Critical Hit, Dodge, and Headshot messages sent to players can be turned off by specifying '' or "" in the corresponding localization node.

    Version 0.5
    * Updated to bukkit 1.2.5 R3.0
    * Fixed bug where setting chance to instabreak to 0 didn't always work (I'm going to add an on/off configuration setting in the next version)
    * Instabreak only works on Ore blocks now (I plan to make this configurable in the next version)
    * Fixed "ConcurrentModificationException" error
    * Fixed "NagAuthor" warning on disable
    * Fixed bug where "/stats" command would ignore server's maximum value for each stat
    * Download link now uses public dropbox

    Version 0.4
    * Added command: "stats" that shows your current stats
    [​IMG]

    Version 0.3
    * Added regeneration-per-level support (configurable)
    * (Regen per level * player level) is always rounded down

    Version 0.2
    * Fixed bug where skeletons were attempting to make headshots

    Version 0.1
    * Initial Version
     
  2. Offline

    JohnLeeboy09

    Whenever I Edit my config file, it resets itself to the original settings when I turn the server on. Anyway to fix this?
     
  3. Offline

    dureiken

    Hi there, great plugin. Does it support multiworld ?

    Thanks for your work
     
  4. Offline

    Beimeith

    Hello, I like your plugin, and I have a bug for you:

     
    Zenithas likes this.
  5. Offline

    Lilerem94

    Nice Plugin ! :)
    ... Wich Texture Pack was that :)?!
     
  6. Offline

    ChaoSXDemon

    Can I use this with McMMO ?

    Thanks
     
  7. Offline

    mastermanu

    Could you make a config file to change the display message in game ?
    I would like to chance the language for my community.

    It would be nice if you could do it.
     
  8. Offline

    Twippin

    What if I die , does the level stay there or dispar asusual? If it does disapear then theres a suggestion. ;)

    Please Respond.
     
  9. Offline

    Zenithas

    Getting the same bug on my server.
     
  10. Offline

    Solidgeek

    Hey looks like a awesome plugin, but do you lose your levels then you die, or keep them? It could be awesome if you maybe just lose some exp then you die, but don't all your levels :D!?
     
  11. Offline

    mike8420

    Can the plugin to be made when your starving the regeneration from your level is overruled. Right now people need to eat but stay alive with max heath without needing to eat.
     
  12. Offline

    Beimeith

    You still lose your levels when you die, and therefore lose the benefits from those levels.

    One other issue with the /stats command: It doesn't show limits.

    Example:
    A player has 2% crit chance and a cap at 75%.
    If they are level 50 and use /stats, they see they have 100% crit chance, even though they are really capped at 75%.

    Can you please add a message displaying the cap as well? And maybe while you are at it, have it show the crit damage/dodge % since I changed it from 200 to something else.

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

    ftfc

    I would find it usefull if the increments could be set below 1.0.
    eg:

    mining:
    PercentageChancePerLevelToDoubleDrop: 0.2
    PercentageChancePerLevelToInstaBreak: 0.15
    combat:
    PercentageChancePerLevelToDodge: 0.9
    PercentageChancePerLevelToCrit: 0.45

    at the moment it seems that '1' is the lowest value that works on these stats for me
     
  14. Offline

    ftfc

    Also wondering if in a future update there could be the option in config to swap from an experience based level system to currency based. Based on the amount of money being held on player and not what banked.
     
  15. Offline

    marubal21

    I have this particular error constantly popping up, and i noticed that it runs my core usage up 90%~95% on all four cores when it starts to pop up the error.


    11:27:52 [SEVERE] java.util.ConcurrentModificationException
    11:27:52 [SEVERE]at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
    11:27:52 [SEVERE]at java.util.AbstractList$Itr.next(Unknown Source)
    11:27:52 [SEVERE]at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:628)
    11:27:52 [SEVERE]at me.monstuhs.betterleveling.Runnables.RegenerationTask.run(RegenerationTask.java:26)
    11:27:52 [SEVERE]at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    11:27:52 [SEVERE]at java.lang.Thread.run(Unknown Source)
    11:27:55 [SEVERE] java.util.ConcurrentModificationException
    11:27:55 [SEVERE]at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
    11:27:55 [SEVERE]at java.util.AbstractList$Itr.next(Unknown Source)
    11:27:55 [SEVERE]at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:628)
    11:27:55 [SEVERE]at me.monstuhs.betterleveling.Runnables.RegenerationTask.run(RegenerationTask.java:26)
    11:27:55 [SEVERE]at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    11:27:55 [SEVERE]at java.lang.Thread.run(Unknown Source)

    does anyone know the root cause or a possible solution?
     
  16. Offline

    maitkarro

    Ok I found why that error
    12:48:44 [SEVERE] java.lang.NullPointerException
    12:48:44 [SEVERE] at me.monstuhs.betterleveling.Runnables.RegenerationTask.run(RegenerationTask.java:26)
    12:48:44 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    12:48:44 [SEVERE] at java.lang.Thread.run(Unknown Source)
    happens it's because of RegenIntervalInSeconds: 20 if I set the time to 0 it will spam my log with that error. I'm not getting the error when my World is named ADVENTURE, if I rename it to something else even slightly I'm getting the error, if I make a totally new world with a new world name then I'm getting the error, but when I rename the new world to ADVENTURE I'm not getting the error anymore. I downloaded the previous version of bukkit 1.2.5-R.1.0 and still getting the error that is caused by RegenIntervalInSeconds: 20 in folder Better Leveling by file config.yml. So you gonna have to fix it somehow or bukkit has to fix something they did somewhere so that only the original world can use your plugin without errors.
     
  17. it would be nice if you didn't lost your level when you die :(
     
  18. Offline

    mike8420

    Will this be updated to the latest craftbukkit?
     
  19. Offline

    monstuhs

    Wow... first off, sorry everyone... for some reason I stopped getting emails when this thread was updated so I thought no one was even using it. I've already fixed a couple of bugs for someone that private messaged me, and all of the other issues should be really easy to fix. I'll fix them and push out a new version (updated for 1.2.5 r3) tonight!

    Thanks for all of the positive feedback. I was a little bummed because I thought nobody was even using this!

    None taken at all. Thanks for reporting this. I'll put in an on/off switch in the config and I'll also add a section where you can configure what blocks it works on.

    My fix for Alxxx's suggestion should take care of this too. Once I get a chance to get to it tonight.

    Great idea! I'll add functionality to allow you to set a percentage of XP you lose when dying via config.

    Thanks! I'll get that issue fixed tonight

    This is fixed on my local machine... Just never pushed it out to github. I'll do it tonight

    Thanks! Misa I believe (it's been a while since I took that screenshot)

    Good question. I don't know. :confused:

    Sure thing

    C
    Could be tricky but I'll certainly give it a try

    Yeah I can do that. I didn't want people to get confused and think that 0.5 was "50%" instead of "0.5%".

    Yes, tonight

    Interesting... I'll get it fixed

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

    ftfc

    Hey,
    Thanks for getting back onto this plugin, lots of people are loving it!

    you can use it with mcmmo, i did for a while and then thought.. whats the point really :p
    .

    monstuhs,
    would it be possible to have the choice to set the plugin to 'Money mode' rather than experience ?
    so your skills get better based on the amount of money your holding on your character instead of the level of XP your holding?

    I imagine this would tie in well with other plugins let people kill others to take their money, or a portion of it.

    Thanks, great little plugin.
    ftfc.
     
  21. Offline

    monstuhs

    1. Thanks!
    2. Yeah, I could start working on trying to integrate it into one of the economy mods. Alternatively, I could make it so a configurable percentage of someone's XP drops when they are killed. Which would you prefer?
     
  22. Offline

    nhoclesnar

    Yay i'm glad to see that you haven't abandoned this plugin. Great job monstuhs :D
     
  23. Offline

    monstuhs

    Fixed

    I totally agree with your first paragraph. That's one of the reasons I decided to hook into the vanilla leveling system; it gives a lot more value to staying alive. Your second paragraph is a very good point though; some people might not like this, or they may at least want to limit the amount of XP lost when you die.

    I've made the XP loss on death configurable in the latest version (default is 100 percent).

    Setting it to 0 works now

    Done. There's a localization section in the config file now

    Setting to 0 works now

    I just updated 0.6 again to allow you to use double precision for the 2nd two (chance per level to dodge and crit). So you should be able to use 0.9 and 0.45 or whatever now. I can set the double drop and instabreak for double precision too very easily but with all of the work I did on instabreak tonight I need time to test it. I'll try to have it updated tomorrow night

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

    nhoclesnar

    Oh my gawh, nice. Suggestion: Increase hunger bar and melee damage on leveling up?
     
  25. Offline

    ChaoSXDemon

    The download link gives me a plugin with v0.5 when loading?
     
  26. Offline

    monstuhs

    My bad... forgot to update the plugin.yml file. It actually is 0.6.

    Alright I updated the plugin.yml file and reuploaded. It should display 0.6 in your server console now

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

    ChaoSXDemon

  28. Offline

    ftfc

    hey, doing lots of work on the mod!
    thanks for all the updates, its nice to see someone doing their best to please the crowd!

    I wouldnt mind seeing the option to switch between economy and XP although im assuming most people come to this mod looking for ways to improve/ mix up their server with an XP mod.
    My reasoning is simply that it may encourage pvp on the servers with this mod and allow XP to be reserved for enchanting. Its great to get to a high enough lvl to get decent skill perks, but to enchant then puts your skills back a bit (based on the cost of xp used to enchant) while if intergrated with money the most powerfully skilled player can have high lvl enchants because their skill lvl is based on their monetary holdings.
    It would also put an emphasis on survival on servers that force its players to rely more heavily on money than XP and ones that make players drop money when killed.

    :)

    -ftfc
     
  29. Offline

    monstuhs

    I see your points. My initial vision was that enchanting would become rarer and more valuable if doing so meant you lose XP that would otherwise gain you the benefits that this mod provides. But again, I understand where you're coming from. What I'll do is research what it would take to integrate this with iConomy and, if that plugin is available, allow you to switch between XP and Money via configuration.

    I'm not sure on a timeline for this, but I'll keep you updated. Meanwhile I'll continue to work on other enhancements as well!
     
  30. Offline

    marubal21

    How do i edit what the messages say? Every time i reload or stop and start the server the revert to default.

    localization:
    stats:
    ChanceToCrit: Chance To Crit
    ChanceToDodge: Chance To Dodge
    ChanceToDoubleDrop: Chance To Double-Drop
    ChanceToInstaBreak: Chance To Insta-Break
    ExtraRegenPerSecond: Extra Regen Per Second
    combat:
    CriticalHit: Critical Hit!
    Dodge: Dodge!
    HeadShot: Headshot!
     
  31. Offline

    monstuhs

    That only happens when the config.yml file gets malformed. You aren't copying and pasting that into the file right? Are you using Notepad++ to edit it?
     

Share This Page