1

How To Create a Leveling System?

avrona's Avatar avrona10/16/16 4:43 am
1 emeralds 4.2k 27
10/22/2016 11:34 am
avrona's Avatar avrona
How can I create a system, where a player get's a reward and some text telling them they reached the next level? The levels are the standard above the hotbar levels. So anyone know how to do that?
Posted by avrona's Avatar
avrona
Level 40 : Master Explorer
37

Create an account or sign in to comment.

27

1
10/22/2016 11:34 am
Level 40 : Master Explorer
avrona
avrona's Avatar
Players won't be leveling up a lot anyway. The first batch of levels should be to around 15 and that would last a few months before more have to be released.
1
10/22/2016 10:47 am
Level 19 : Journeyman Artist
DepthStrider
DepthStrider's Avatar
Even though there aren't XP orbs a large quantity that increases the level by more than 1 in one go (/xp can do this) it'll still pose a problem. Imo the difficult part is to know how many, and what levels just got passed (i.e each level gained).
1
10/22/2016 10:15 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
Just use tags.

on a clock:
/scoreboard players set @a[tag=!Applied] Level 0
/scoreboard players tag @a[tag=!Applied] add Applied
1
10/22/2016 9:39 am
Level 40 : Master Explorer
avrona
avrona's Avatar
How can I set new players to have a score of then? By giving all people with lm=0 a score of 0 for l1c, l2c, etc. ?
1
10/22/2016 9:17 am
Level 23 : Expert Engineer
Heklo
Heklo's Avatar
Are you using curly brackets? youre supposed to use [ ] in target selectors. If the command doesn't work than that's probably why.

Also, The way you're system is working wont function, because when people start they have an unidentified score, not equal to 0.
1
10/22/2016 5:17 am
Level 40 : Master Explorer
avrona
avrona's Avatar
Here is the system I tried, however the command doesn't work. Maybe this will help.

/execute @a{lm=1, score_l1c_min=0} ~ ~ ~ /give @p cake

The cake is only a temporary thing to see if the system works. I want to put another repeater command block next to that that gives all players with lm=1 the score of 1 in l1c. l1c is a scoreboard that stands for "level 1 claimed" to see if a player claimed the reward for reaching a specific level or not.

Good idea?
1
10/22/2016 11:03 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
This is quite stupid XD

That would require an objective for each level.
Instead, you can use one objective to track the previous level and the target selectors l and lm to track the current level.

Compare the current level with the previous level and if the current level is higher, make stuff happen.

Those commands I posted all the way in the beginning do that exact thing. They target everyone with a level that's higher than the previous level and make stuff happen to them.

Please re-read
1
10/21/2016 6:13 am
Level 40 : Master Explorer
avrona
avrona's Avatar
Ok?
1
10/21/2016 6:04 am
Level 7 : Apprentice Architect
Zagdrath
Zagdrath's Avatar
Hey Heklo
1
10/21/2016 4:15 am
Level 40 : Master Explorer
avrona
avrona's Avatar
Yes using commands and command blocks.
1
10/20/2016 4:09 pm
Level 40 : Master Explorer
avrona
avrona's Avatar
I can't have pluigns. I don't even know how to make them.
1
10/21/2016 4:11 am
Level 71 : Legendary Unicorn
McHorse
McHorse's Avatar
Well, then, I think you'll have a hard time.

Then how did you developed your anit-cheat system "SpyFort?!" Using command blocks?!?
1
10/20/2016 3:53 pm
Level 71 : Legendary Unicorn
McHorse
McHorse's Avatar
Maybe you should simply write a plugin which is going track player's level and on level up, announce new level and give the reward? Hm? This will be much easier, in terms of implementation (for programmer) IMO, AFAIK you can code
1
10/20/2016 3:44 pm
Level 40 : Master Explorer
avrona
avrona's Avatar
Same here, I can't really understand any of the ideas. If you need any more clarification on anything I want in the system, please let me know.
1
10/18/2016 7:06 pm
Level 23 : Expert Engineer
Heklo
Heklo's Avatar
Yes, I didn't think you wanted it displayed there. I'm not sure of a way to perfect it without that, perhaps you could ask Bertie to elaborate on his idea. (I don't understand other peoples ideas)
1
10/18/2016 2:15 am
Level 40 : Master Explorer
avrona
avrona's Avatar
But doesn't it remove xp from a player?
1
10/17/2016 7:56 pm
Level 23 : Expert Engineer
Heklo
Heklo's Avatar
Running my three commands in a that order will work, I've tested it.
1
10/16/2016 3:10 pm
Level 40 : Master Explorer
avrona
avrona's Avatar
.Could I maybe have a visualisation of this as I don't fully understand. Plus does it support more than one player?
1
10/16/2016 1:46 pm
Level 23 : Expert Engineer
Heklo
Heklo's Avatar
If you give a player more than 1 level of xp at a time, the system he provided will overload. The fix I specified can take unlimited amount of xp at once.

Also, if youre using mechanisms to give xp, why don't you just skip it and go directly to /scoreboard players add
1
10/16/2016 8:07 am
Level 19 : Journeyman Artist
DepthStrider
DepthStrider's Avatar
Um. Wouldn't levelling that way be broken, taking XP farms into consideration.
1
10/16/2016 10:44 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
It's actually smart to use the leveling system. It provides exponential increase in goal. And for most gametypes it would make things more difficult. Could be great for maps and games.

And the OP probs doesn't want to apply a leveling system with rewards to a survival server. Just assuming though...
1
10/16/2016 6:21 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
use the selectors l and lm (maximum level number and minimum level number)
Also use a scoreboard objective to count the previous levels.

/scoreboard objectives add Level dummy
/scoreboard players set @a Level 0

/tell @a[lm=1,l=1,score_Level_min=0,score_Level=0] You reached level 1!
/scoreboard players set @a[lm=1,l=1,score_Level_min=0,score_Level=0] Level 1

/tell @a[lm=2,l=2,score_Level_min=1,score_Level=1] You reached level 2!
/scoreboard players set @a[lm=2,l=2,score_Level_min=1,score_Level=1] Level 2

/tell @a[lm=3,l=3,score_Level_min=2,score_Level=2] You reached level 3!
/scoreboard players set @a[lm=3,l=3,score_Level_min=2,score_Level=2] Level 3
1
10/16/2016 11:23 am
Level 23 : Expert Engineer
Heklo
Heklo's Avatar
This is a good concept, but unfortunately it will get jammed easily. This is due to the fact that level 1 is needed to get to level 2. If a player was to pick up a large xp orb and gain more than 1 level, the system will not know how to react. That is why it needs a reset system:

/scoreboard players add @a[lm=1] Level 1

/tellraw @a[lm=1] [{"text":"You have reached level ","color":"aqua"},{"score":{"objective":"Level","name":"*","value":"0"},"color":"red"}]

/xp -1L @a[lm=1]

Running in this order, it will:
- add an objective level to the player with 1 xp level
- tell them the specific level they are at
- reset their xp, but keep their level score

P.S. The first command needs to be on always active, with a repeater command block. The other two have to be always active, but with chain command blocks.

Hope this works our for you, let me know if there's any problems with it.
1
10/16/2016 1:50 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
You can also remove the l=# arguments from the commands above
That means that if the previous level is lower than ANY level, it will update...

You can use the same group of selector arguments for other commands, as long as /scoreboard is last.

You create each group of commands as a tower of command blocks, using an impulse command block at the bottom and chain command blocks going upwards.

Then for every level you place multiple towers behind each other in a numerical order. You connect the towers with repeaters and run a redstone signal through it, using a clock. Make sure that one pulse can travel to the end of the line, before another pulse starts
1
10/16/2016 5:13 am
Level 13 : Journeyman Crafter
dhtdht020
dhtdht020's Avatar
[DELETED]
1
10/16/2016 4:57 am
Level 13 : Journeyman Engineer
KGSteve
KGSteve's Avatar
are you referring to gaining xp?
1
10/16/2016 11:42 am
Level 40 : Master Explorer
avrona
avrona's Avatar
Each time you earn an entire level, yes,

use the selectors l and lm (maximum level number and minimum level number)
Also use a scoreboard objective to count the previous levels.

/scoreboard objectives add Level dummy
/scoreboard players set @a Level 0

/tell @a[lm=1,l=1,score_Level_min=0,score_Level=0] You reached level 1!
/scoreboard players set @a[lm=1,l=1,score_Level_min=0,score_Level=0] Level 1

/tell @a[lm=2,l=2,score_Level_min=1,score_Level=1] You reached level 2!
/scoreboard players set @a[lm=2,l=2,score_Level_min=1,score_Level=1] Level 2

/tell @a[lm=3,l=3,score_Level_min=2,score_Level=2] You reached level 3!
/scoreboard players set @a[lm=3,l=3,score_Level_min=2,score_Level=2] Level 3


And how would the mechanism look like? Plus how about giving items at reaching a level?

Um. Wouldn't levelling that way be broken, taking XP farms into consideration.


There are no xp farms on the server.

This is a good concept, but unfortunately it will get jammed easily. This is due to the fact that level 1 is needed to get to level 2. If a player was to pick up a large xp orb and gain more than 1 level, the system will not know how to react. That is why it needs a reset system:

/scoreboard players add @a[lm=1] Level 1

/tellraw @a[lm=1] [{"text":"You have reached level ","color":"aqua"},{"score":{"objective":"Level","name":"*","value":"0"},"color":"red"}]

/xp -1L @a[lm=1]

Running in this order, it will:
- add an objective level to the player with 1 xp level
- tell them the specific level they are at
- reset their xp, but keep their level score

P.S. The first command needs to be on always active, with a repeater command block. The other two have to be always active, but with chain command blocks.

Hope this works our for you, let me know if there's any problems with it.


There are no xp orbs. Only mechanisms that do /xp
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome