Filled Simple Stars

Discussion in 'Plugin Requests' started by Xp10d3, Dec 28, 2020.

Thread Status:
Not open for further replies.
  1. Offline


    Version: 1.8
    What I need:

    I need a simple leveling system gives you experience every time you kill a player. It's pretty simple if you understand config files. I set up an algorithm that gives you the amount of experience you should gain after killing a player.

    Algorithm should be this:

    exp = 15 * level_killed/current_level * 5

    level_killed is the level of the player you killed, and current_level is your current level. So for example, lets say you killed a level 50, and your current level is 5. The equation would be this:

    exp = 15 * 50/5 * 5

    You would then gain 30 experience. Levels should also be exponentially harder to gain. Here is what the levels should be (please make them infinite):

    level = current_level * next_level

    Pretty self explanatory. So lets say you are level 1 and the plugin is configured to have a base experience of 1,000. In order to get to level 2, it will take 2,000 experience. And now level 3 -> level 4, 8,000 experience.

    Config should also look like this:
    base_exp: 1000
    base_exp is the experience required from level 1 -> level 2.

    base_exp = 1000

    Now, level 1 -> level 2 is 1,000, and level 2 -> level 3 is 2,000, level 3 -> level 4 8,000, etc.

    base_exp = 5000

    Now, level 1 -> level 2 is 5,000, and level 2 -> level 3 is 10,000, level 3 -> level 4 40,000, etc.

    /curlvl: Shows your current level.
    /lvltop: Shows all the players with the highest level.

    level.curlvl: Allows use of /curlvl.
    level.lvltop: Allows use of /lvltop.
  2. Offline


    I'm not quite understanding the leveling system; the math doesn't seem to add up for me, but it looks like they're just powers of 2 multiplied by the base. What do you mean by current_level * next_level and how does it get you the numbers shown in the examples?
  3. Offline

    johnny boy

    This leveling equation is growing the exp count exponentially large.. Do you want us to use a different one instead?

    Regardless, I have made the plugin and the download is here:

    If you take a look at the config there are certain placeholders such as %player% and %exp% so feel free to use them (however they are dependent on the config path it's set to by default). Any issues let me know.
    Last edited: Dec 31, 2020
  4. Offline


    Apologies for not replying sooner. I've been having issues connecting to the Bukkit website, but I finally am able to get on.

    @Dai_Kunai yeah sorry; the math is a bit funky, I'll admit. If it doesn't work I plan to edit the source code and change the plugin slightly being a developer myself (I only don't have much time on my hands and am only a novice, hence why I reached out to the forums). But to answer your question, the current_level * next_level is the math that calculates how much experience is required to obtain the next level, allowing infinite levels and not just hard coded amounts. current_level is the amount of experience required to obtain the next level, and next_level is the next level the player can obtain. For example, lets say the player is at level 1 and assume base_experience is 5k (so from level 1 -> level 2 would require 5k experience for the player to level up). Level 2 would be next_level, and 5k would be current_level. Now lets say base_experience is still 5k, but the player is now at level 2. So multiplying 5k by 3 (since from level 1-> level 2 is 5k and the player is trying to obtain level 3), the experience required from level 2 -> 3 will be 15,000. I probably didn't explain this well in the original post, so apologies for that. If you are still confused let me know even though someone already made the plugin lol.

    @johnny boy thanks for making the plugin and thanks for the placeholders (that will be very useful)! Yes I understand how exponential the experience count is; that is my intention. Is it alright if I edit the source code in case I want to change the equation? To my understanding after making this plugin I should have the automatic permission to edit/change the plugin however I want.

    FYI I will likely be offline for a while, but I'll do my best to check Bukkit frequently.

    EDIT: Marking as filled for now, however if anyone else wants to do another copy of this plugin feel free (ex. adding level up messages, database integration, etc.).
  5. Offline

    johnny boy

    Yeah I've added a license you can do what you want with the code basically.
    @Xp10d3 if you want more features then you can just list them here and in my spare time I can attempt them.
    Last edited: Jan 1, 2021
    Xp10d3 likes this.
Thread Status:
Not open for further replies.

Share This Page