Filled [REQUEST] Virtual XP System (no orbs!)

Discussion in 'Archived: Plugin Requests' started by Nuinbot, Sep 18, 2013.

  1. Offline

    Nuinbot

    I am finding that a lot of XP systems offer different features, but none remove the orbs. You know, those pesky glowing balls you sometimes can't loot from mobs because they are busy swirling around or getting stuck in weird places!

    This plugin should do the following:
    • Prevent XP orbs from dropping (mobs, ores, furnaces)
    • Killing a mob will assign the XP directly to the player that makes the kill shot
    • Modifies the behavior of XP pots in that they are not thrown but drunk to gain the XP inside
    • Option to turn on/off XP loss on death
    • If XP loss is turned on, a certain percentage is lost (via configs)
    • If a player kills another player, the victor will get the amount the other player lost
    • Optional: Allow the XP gained from mobs to be changed (via configs)
    • Add a /reload command for the plugin
    Examples:
    1. Player kills a zombie. XP orbs do not drop and the XP is given directly to the player.
    2. Player dies by zombie. They lose 10% of their XP.
    3. Player A kills Player B. Player B loses 10% of their XP and Player A gets that amount. (If player B had 250 XP, they lose 25 and now have 225 XP. Player A gains 25 XP.)
    I used to use a mod called ControlORBle but that has been updated in quite some time. Let's get rid of those pesky orbs and make something we can all use!

    If you are willing to code this, I will be happy to test it and document it for you so that you can easily upload it to BukkitDev.
     
  2. Offline

    Vandrake

    Interesting :3 name for it? NuinXP?

    Add me on skype to discuss the details "mirovandrake"

    <Removed double post - Use edit button to edit your post - Necrodoom>
     
    timtower likes this.
  3. Offline

    CeramicTitan

    Vandrake?!?! I thought you were missing?
     
  4. Offline

    Vandrake

    In action? eheh I'm still alive xD I gave my computer away, so I'm using a weaker one not so good to code. I'm buying a new one in January so till then, I'm stuck with it :p
     
  5. Offline

    CeramicTitan

    It's good to see you :p
     
  6. Offline

    Vandrake

    Thanks xD I'll be coding a bit more from now, after this request I'll update my plugins and delete some old ones
     
  7. Offline

    AndyMcB1

    Vandrake Good work on giving your computer away :) Nice to see people like you in this world. Keep at it.
     
    Vandrake likes this.
  8. Offline

    Nuinbot

    Haha, no. Call it anything, you don't need my name in it. Perhaps just "VirtualXP" since there is no plugin named that.

    I have Skype but my account is reserved for family only. Ping me on Gmail if you would. nuinbot at gmail dot com
     
  9. Offline

    Vandrake

    Fine. but it's gonna be difficult, Take longer and shiet. Whatever.

    - Should the players de-level when losing XP?
    -> If I'm level 10 and 0% xp should I go back to lvl 9?
    - Should the XP lost be x% of your exp bar, or x% of the player's xp(I'm pretty sure it's the second)

    - Should I play a sound of XP pickup when the player kills a mob?
     
  10. Offline

    Nuinbot

    Sorry for the inconvenience, I just don't use Skype like others do.
    The XP players have is a single value, a culmination of all experience gained. I have tested this with other plugins that add/remove XP. Minecraft simply determines the level based on that value. See here.
    http://www.minecraftwiki.net/wiki/Experience#Formulas_and_Tables
    This plugin should remove 10% of that total value, not of their current level's experience. Once the value is removed, Minecraft will automatically tally the new level.

    That would be nice! Completely optional, but still give the player that feeling of getting XP.
     
  11. Offline

    Vandrake

    Actually bukkit doesn't act that good when removing exp you know? I have to clear the player's level and give him a new amount of exp, but that's small detail :3
     
  12. Offline

    Nuinbot

    That's completely fine. I came across that when trying to do it through CommandHelper, but realized I am not too good at getting my code to work properly. (I am more of a networking guy.)
     
  13. Offline

    Vandrake

    I can give you a small version, not ready for server yet, so you can take a look at my current work. If you want. It's not ready yet though
     
  14. Offline

    Nuinbot

    Not a problem. Take your time. I have to head to class in a few anyways. This is by no means a rush project, as I am still setting up the spawn for my server as well as getting some of the plugins to play nice. Thanks for your help!
     
  15. Offline

    Vandrake

    By the way:
    When a player levels up, their exp value goes back to 0 and increases after that. So I will remove x% of the exp on the level. ok?
     
  16. Offline

    Nuinbot

    That isn't the way that Minecraft stores XP. Just take 10% of the player's total XP gained.
     
  17. Offline

    Vandrake

    I THINK I covered all the points you've given me? Anyways tell me what should be changed/added/removed when you test it with your friends (before the main server) :3
    Only perm is

    vxp.admin

    Command is /vxp reload
    Any bugs are welcome too.

    https://www.dropbox.com/s/ozog224f0owa5tq/NuinXP.jar
     
    Nuinbot likes this.
  18. Offline

    Nuinbot

    Looking good so far! Here is everything I have tested...

    What works:
    • Mobs/player kills now give XP directly
    • XP for each mob can be changed
    • XP pots are drunk instead of thrown (see comments below)
    • XP loss can be enabled/disabled
    • The last person to hit a mob receives the XP (this also includes environmental damage, like punching a zombie off a cliff to their death)
    • /reload command for the plugin
    What doesn't work:
    • Mining ores doesn't give XP anymore
    • Smelting ores/items does not give XP anymore
    • When a player dies, they actually get a 90% increase in XP instead of losing 10%
      • Ex 1: I had 100 XP. After a suicide, my XP increased to 190.
      • Ex 2: I had 100 XP, and my alt has 100 XP. I kill my alt and get 10XP for a total of 110 XP. However, my alt now has 190 XP.
    Other comments:
    • Can the chime of XP be musical? It is the same single note each time.
    • When XP pots are drunk, they are instant. I really don't care since they are more of a creative/luxury item, but would it be possible to give them the eating/drinking animation like food and potions?

    This is working quite well otherwise! Please keep up the good work! :)
     
  19. Offline

    Vandrake

    Ehehehehe I probably messed up the code switcing the 10% with 90% xD I tested and it seemed fine. But <i'll take another look when I can. The ores, I did not know how much to give and if I was supposed to give at all. Please specify this in your reply xD Also I do not know how to play the animation with a exp bottle. Unless I ceate a recipe and a special item with lore(water bottle) so you can drink it. What do you say?
     
  20. Offline

    Nuinbot

    Yeah, I figured something like that might have happened. No big deal, I just don't want people to level up by suiciding! :D

    In regards to the mining/smelting, if you can add an XP block list (like the mob list) for experience that would be cool. All 8 ores (coal, iron, gold, diamond, emerald, redstone, lapis, nether quartz) as well as monster spawners should be on this list.

    A list for smeltable items would also be nice (there is a comprehensive list on the wiki here).

    As far as the animation for the XP bottle, don't worry about it. It isn't that big of a concern, I just wasn't sure if there was an animation hook or not you could use.

    Thanks again!

    *edit* - Oh yeah, the XP sound being a single note. Can you fix that? Perhaps a two- or three-tone sound, kind of like coins in Mario? :)
     
  21. Offline

    Vandrake

    https://www.dropbox.com/s/if25qbseme45t9o/VirtualXP.jar

    You have to delete the config.yml, copy paste its settings if you want. I covered the smelted items, the broken ores, the new EXP sound(I find it annoying honestly) annnnnd the exp on battles seems fine @.@ it's giving 10%(config settings). Can you please recheck? kill 10 zombies or so then test it. It's working fine on mine... Peace
     
    Nuinbot likes this.
  22. Offline

    Nuinbot

    Okay, retested the plugin with a fresh config file. Here's what I see...
    • When a player dies, they still get a 90% increase. I tested this with suicide, PvE and PvP and the result is the same...
      • Player dies with 100 XP
      • Player gets 90% of their own XP back
      • Player now has 190 XP
      • I think I know what is happening here. The player is not getting their XP reset to 0 before the new XP value is being given to them, resulting in 190%.
      • You can remove the debug output that is printed out too. I am using Essentials to check/set/reset XP.
    • The XP chime? You are completely right, it is annoying! Can you change it back to a single chime note, but perhaps higher pitch? (I think it was the low pitch that threw me when I first heard it.)
    Other than that, everything is working just fine! I noticed that smelting in creative doesn't give XP but that is completely okay.

    When this is all peachy and you want to upload it to BukkitDev, let me know and I will be happy to write documentation for you. It is a very unique but powerful plugin and I think a lot of people will want to use it!
     
  23. Offline

    Vandrake

    the player is keeping its exp, because you PROBABLY have some plugin making him keep it. try to remove mine and die. check your Exp :3 I will change the sound
     
  24. Offline

    L33m4n123

    • Player gets 90% of their own XP back
    How do you remove the 10% Vandrake
    currentXP = currentXP * 0.9 will remove 10% of their xp ;)
     
  25. Offline

    Vandrake

    Like I said... It's working fine on my end xD I even tested it Pvping. It's probably a third party's plugin thats allowing the player not to lose exp
     
  26. Offline

    L33m4n123

    didn't see that. Only read the newest post of him and wanted to make sure you maybe do not mix some stuff up on acxcident^^
     
    Vandrake likes this.
  27. Offline

    Nuinbot

    You're right. I was testing this plugin solely with Essentials and it works fine without. Why would it be doing this though? (I really don't want to be without Essentials for my server as I am using a lot of it.)
     
  28. Offline

    Vandrake

    there's probably an option in Essentials that lets you keep the exp on death. google it a bit :3
     
    Nuinbot likes this.
  29. Offline

    L33m4n123

    its a permission and as OP you got all exp

    essentials.keepxp
    Allows the user to keep their exp on death, instead of dropping it.
     
    Nuinbot likes this.
  30. Offline

    Nuinbot

    Ahh that had not occurred to me. I am not near my machine but I will test this later tonight by removing OP power. (I haven't set up my permissions file yet for admin and am testing everything under OP.) Thanks for the info. :)

    Just tested it and as confirmed, Essentials lets OPs keep experience. Everything works!

    If you could update this to remove the XP sound (it really isn't necessary) and the debug text (when you die and it prints the XP message), that would be perfect. Thanks!

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

Share This Page