Filled Leveling System

Discussion in 'Plugin Requests' started by AlwaysAllstar, Feb 23, 2020.

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


    Plugin category: Levels

    Minecraft version: 1.14

    Suggested name: LevelSystem

    What I want: I know there's some player leveling systems out there, but most of them require a permission plugin for groups, don't have some features I need, and are just extremely large with many extra features.

    I need a plugin where a player gains experience/XP (not vanilla Minecraft experience in the bar at the bottom of the screen) by doing certain tasks and then levels up once enough experience is gained. This might be easier thought of as a point system where once enough points are gained from doing a variety of tasks/events, the player is leveled up. I will refer to everything below as experience, but keep in mind it is not vanilla Minecraft experience but more like points. No rewards are needed and I want it so I don't have to create groups with my permissions plugin, each level just has a prefix I can give to the players names through placeholders and my chat plugin. This plugin isn't supposed to reward players, it's more of a system to show how experienced the player is.

    Events that give experience:
    Player kills
    Mob kills (Specifically Zombie Pigman)
    You can add more if you have any in mind, these are the only ones I need though.

    I want to be able to edit the experience given from these events. Maybe something like this:

    #Amount of experience given per each event
    playerKill: 2
    #Amount of experience given per each specific mob kill (If you only add compatibility for zombie pigman, it'll work for my needs).
    zombie_pigman: 1

    I should also be able to define the levels (this could be the config). Again, it does not need to have groups in a different plugin. An example would look like this:

    #New players start at 1.
    #How much experience is needed until leveling up to 2
    experience: 10
    #Prefix of players at this level. Color codes are accepted
    prefix: &6&l[&fNoob&6&l]

    #How much experience is needed until leveling up to 3
    experience: 20
    #Prefix of players at this level. Color codes are accepted
    prefix: &6&l[&fPlayer&6&l]

    #How much experience is needed until leveling up to 4
    experience: 30
    #Prefix of players at this level. Color codes are accepted
    prefix: &6&l[&fAdvanced&6&l]

    I think it would probably be best if a players experience resets after each time they level up. So if I gain 10 experience and level up to 2, my experience resets to 0 and now I have to gain 20 more experience to level up again to level 3.

    Also, if a player is at level 2 with 19 experience and they do a task worth 2 experience. They should level up to three and have one experience. Basically although experience resets, if a player goes over the required amount it will transfer over (this is also shown in the command listed down below).

    And then there's the file where it stores all players' levels. You can do this however you please or think is most efficient. Keep in mind players start off at level 1. So you could do it so when a player joins for the first time they're then stored into the file as level 1, or just have it so everyone is a level 1 unless defined otherwise in this file. It's up to you really.

    Placeholders are also needed. I should note I have PlaceHolderAPI. Here are a list of PlaceHolders I have in mind:
    %LSlevel% - Returns the level of that player (an integer). These are the numbers 1, 2, and 3 in the example config.
    %LSPrefix% - Returns the player's prefix as defined in the config.
    %LSPercent% - Returns the percentage a player is to leveling up. For example, if I'm level 1 with 5 experience (going off of the example Levels/config file) this should return 50%. If I'm level 2 with 15 experience, it would return 75%. In the case of a decimal, round it to the tenths place to be, for example, 60.6% rather than 60.6666666.
    %LSExperience% - Returns how much experience a player currently has.
    %LSExperienceNeeded% - Returns how much experience is needed for the next level up. For example, if I'm level 2 this would return 20 (based off of the example config).

    Ideas for commands: /LSXP give <player> <experience amount> - Gives a player an amount of experience. If it exceeds the amount required for the next level up, it should transfer over until can no longer level up. For example, if I'm level one with 0 experience and I'm given 35 experience, I should then be level 3 with 5 experience.

    Ideas for permissions: No permissions needed. Everyone can gain experience from everything and only OPs can do the command listed above.

    When I'd like it by: This is a pretty lengthy and complex plugin, so feel free to take your time. :)

    EDIT: Removed some no longer necessary features as discussed in replies.
    Last edited: Apr 9, 2020
  2. Offline


    Please clarifi how the prefix would work, should vault be used is it a second prefix idk, might make this for u

    EDIT: also i dont quite understand the trapped chest event while the chest is open the player should get exp untill X amount of time has passed?
    Last edited: Feb 26, 2020
  3. Offline


    @EpicGodMC I was thinking the prefix would just be what would comes out of the placeholder %LSPrefix%. So this plugin won’t be displaying the prefix in any way, it’s just there to be able to use the placeholder %LSPrefix% in a different chat managing plugin. As for the trapped chest event, my game features a map with trapped chests scattered around the map that have loot in it. When a player opens a chest and takes the loot, it will reset with more randomized loot in 30 minutes. My plan for this is so when a player loots a trapped chest they will earn xp towards leveling up. The reason I have the time passed thing is so people can’t open and close a chest repeatedly and get a ton of xp (basically it’s cheat proof). This way I can have it so a player loots a chest and also gets xp towards leveling up but can’t just get an infinite amount of xp by standing and repeatedly opening the same chest over and over.
  4. Offline


    @AlwaysAllstar so essentialy they get xp and shoulnt get xp untill new items have been spawned right,
    a simple solution to this would be to make a custom item spawn in the chest which they can redeem for the xp
    this way it will always sync up perfectly, or i could make a cooldown system which will be more resource intensive
    but would also work pretty well but you would have a chance of the timings not syncing up together
  5. Offline


    @EpicGodMC Turns out I completely overlooked a feature of the plugin I'm using for the loot generation. I am actually able to run commands every time a player opens a trapped chest. So this way as long as I have the command '/LSXP give <player> <experience amount>' like I said in the post I'll be able to do what I want, nothing needs to be done with trapped chests in this plugin. The command will act like the loot so when a player opens it, it'll run the command to give them experience and it won't run the command again until the time has passed just like the loot. So you can basically ignore everything with trapped chests giving experience really and just do players, zombie pigman, and anything else you may want to add. I'm very sorry I didn't see this sooner.
  6. Offline


  7. Offline


    I can but i dont have alot of time right now so it would take a while
  8. Offline


    Alright no worries. :)
  9. Offline


    @EpicGodMC just checking in to see if you've started. :)
  10. Offline


    i have @AlwaysAllstar but i just dont progress too quikly becouse i dont have alot of time right now
    AlwaysAllstar likes this.
  11. Offline


  12. Offline


    @AlwaysAllstar pretty decent but still not progressing too quicky as i cant work for too long on this project at a time
    hope you can understand that, might post some progress later
  13. Offline


    I completely understand, thank you. :)
  14. Offline


  15. Offline


    Epic is no longer working on the plugin, would anyone else like to try? :)
  16. @AlwaysAllstar
    I'll give it a go, I'll message you if I have any questions or thoughts.
  17. Offline


  18. @AlwaysAllstar

    lsxp [setxp|addxp|setlevel|addlevel] [Player Name] [Amount]


    When you load the plugin 2 files will be created, levels.yml and exp.yml
    You can add more levels and mobs by following the same format in the files
    When a new player joins there will be a players.yml file saving their level and xp
    You can use the placeholders with PlaceHolderAPI to display the following information
    AlwaysAllstar likes this.
Thread Status:
Not open for further replies.

Share This Page