_edit by admin:_
You will level up as soon as you complete a Daily or To-Do, or use a Habit or Reward. None of your Experience will be lost.
You don't need to report it because we know that it happens for all players if they gain enough Experience to put them over the limit for levelling up from any of these causes:
This issue is currently on hold for the reasons given here: https://github.com/HabitRPG/habitica/issues/2433#issuecomment-635062474
_end of edit by admin_
My currently experience is 358/350 (Level 15). I probably should have leveled ... to 16.
The last experience I got was 100 XP from the Trapper Santa party quest. I got the 20 gold just fine, already had the polar bear mount, and while I'm not sure if I got the right amount of experience, I'm fairly certain 100XP would have put me over to the next level.
I refreshed the page and I was still at 358/350 XP without level.

I haven't tried checking off another box, but I'll update when I get around to that.
your next task (habit, daily, todo, etc) update will level you up.
@lefnire I assume this is just because we don't update the User object on quest completion?
Right, in many cases we fail to run user.fns.updateStats(), which will trigger level up, etc accordingly. In the case of quests, user.stats.exp is handled as a mongo query, so we don't have access to the user object. Fixing that is a whole big thing and I'm not sure it's worth the time/effort
Ah, yeah. It would be nice if Mongoose supported findAndModify through the Schema.
Ah, I noticed this too earlier today. It would be cool to get that levelup rush when finishing a quest, but definitely low priority especially if the fix is a hassle.
@lefnire Sorry to be bringing this out from the grave, but you mentioned that as the experience is handled as a mongo query, you do not have access to the user object to trigger the level up, potentially requiring a major rewrite.
Do you happen to know if this, by any chance, is getting fixed on the API v3 update?
@zesme We'll be looking into a lot of old issues after API v3 is released, including this one. The code has changed a lot since lefnire's comment, so don't rely on it still being accurate.
@zesme @Alys unfortunately this bug isn't fixed by v3. The way to fix it would be to load all the users profiles when finishing a quest but it's an expensive operation that we prefer not to do unless really necessary
If we aren't interested in fixing this right now because it's an expensive operation, should we remove the "help welcome now" tag or maybe close the issue unless we're hoping for a more feasible fix that someone can propose?
I am not sure if this should be in a separate issue or not.
I signed up today and clicked through the tutorials and they were giving me experience. I ended up with 1 xp over the experience limit for my level 2 and it wasn't until I did another action (updated a task that gave me xp) that the trigger occurred to level me up.
I feel like at the very least a new player who goes through all the tutorials for the first time, seeing themselves not level up is a bit awkward.
@audiolion: The new player tutorial is supposed to be tuned such that you finish just shy of leveling up, and checking off one of the starting tasks puts you over. Had you checked anything off prior to starting the tutorial? If not, there may be a bug in how much Experience the tutorial hands out; if you did check something off beforehand, it's this issue for sure.
@SabreCat I am pretty sure I did something to give me random experience, or clicked on a different tutorial that gave me exp, maybe I joined a guild, I can't recall. That explains how I was just over the barrier after doing the new player tutorial and must be related to this issue.
If you want I can make a new account and follow steps to recreate, but maybe it is not helpful since we already know the source of the error.
I understand triggering a level up is an expensive operation, and thus it is not a suitable solution for this issue. What about having Angular change the XP counter label (e.g.: 80/100, 194/170) to something like "SYNC TO LEVEL UP!" or "REFRESH TO LEVEL UP". This should be simple enough to do in Angular, and should also eliminate the reports coming from this issue.
I will gladly take a look into this possibility if you think it’s worth it.
On Jul 21, 2016, at 13:50, Ryan Castner [email protected] wrote:
@SabreCat https://github.com/SabreCat I am pretty sure I did something to give me random experience, or clicked on a different tutorial that gave me exp, maybe I joined a guild, I can't recall. That explains how I was just over the barrier after doing the new player tutorial and must be related to this issue.
If you want I can make a new account and follow steps to recreate, but maybe it is not helpful since we already know the source of the error.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/HabitRPG/habitrpg/issues/2433#issuecomment-234314154, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeoffXUE7xoDJTWjaxTYdYt-53irFz1ks5qX6NNgaJpZM4BaWuc.
wait what is the problem here? why can't we call a sync to level up and instead want the user to manually do something to call it? why not just call it ourselves?
If we have an EXP bar we can check is the left side > right side? if so call sync/levelup. Is there something that is more expensive about doing this check than having the user call it manually when the see they have more exp than their exp total to level requires?
Syncing or refreshing won't make the user level up. Completing a task will. See the text in bold at the top of this issue for more detail.
@Alys Perhaps we could use that as text then? "Complete a task to level up!"
Or maybe and uglier hack would be to create a task, and dynamically complete it? Not sure if it is possible (it’s also quite ugly), but it’s an option…
On Jul 21, 2016, at 16:39, Alys [email protected] wrote:
Syncing or refreshing won't make the user level up. Completing a task will. See the text in bold at the top of this issue for more detail.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/HabitRPG/habitrpg/issues/2433#issuecomment-234361007, or mute the thread https://github.com/notifications/unsubscribe-auth/ABeofbpLadPo-ctYNGt-cMXXXFoBJv_Lks5qX8sCgaJpZM4BaWuc.
I'm in favour of displaying text that says "Complete a task to level up!"
However if anyone wants to work on that, wait a day or two to see if there's more feedback from other admins/staff.
:+1:
I like that idea!
On Thursday, July 21, 2016, Blade Barringer [email protected]
wrote:
👍
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/HabitRPG/habitrpg/issues/2433#issuecomment-234367875,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADVQwT1j5Gjs9pHo12iKYPlJq1rkr_ioks5qX9FOgaJpZM4BaWuc
.
Okay, no more need to wait. :) The idea for saying "Complete a task to level up!" is approved! @zesme Would you like to do it?
im going to follow this just/potentially implement myself just to learn about contributing and learn more about the system, I am excited to become a Blacksmith :)
@Alys From my _somewhat-limited-but-growing_ experience with Angular, I think this should be a great task for anyone wanting to get started. If @audiolion feels he is up to it, I think this will be a perfect one for him! 😄
cool I will start working on this if that is ok!
@audiolion Very okay! Thank you!
Thanks @zesme ! :)
Yep, definitely still happening on the new site. Is this a priority or should other bugs be smashed first?
@LunarGem I'd agree that it's a minor priority per the label, but it is a very common source of confusion, so we'd certainly appreciate a fix if you figure it out!
Thing that was blocking this for a long time was that we did not have a way for the client to know that a user leveled up and has not seen the level up dialog yet if they can also level up through quests. By adding a notification like "show levelup dialog" to the notifications array for the user, we could implement this then.
Is this still an issue? It's been a while since I've noticed it happen, but I could just not be seeing it.
Yes, it still happens.
The Armoire has a new issue that makes this bug a bit harder to notice: https://github.com/HabitRPG/habitica/issues/11827
I've removed some old comments (e.g., posts confirming it's still happening).
I guess that levelling up after getting experience from using the Armoire would be easier to do and have less impact on performance than leveling after a quest finishes. When https://github.com/HabitRPG/habitica/issues/11827 is fixed, I'm going to create a new issue specifically for leveling up from the Armoire.
@Alys We noticed that #11827 has been closed. Are you still planning to create the new issue for leveling up from Armoire? Should we close this issue?
Heck, sorry, I meant to update this issue regarding that! The new issue for leveling up from the Armoire wasn't needed because #11827 / PR #11884 fixed that too. :tada: :trophy: I've just changed the title of that PR to make that more obvious.
I'm about to edit the title and top post for this issue to indicate that it's only for Quest XP now. However I'm going to put it on hold because honestly I think that's best done after we move to using database transactions so it has less chance of sync/multi-update-style bugs, and we'd want to assess whether there'd be extra database/server load from it, especially for larger parties. However if any staff disagree, I'd be just as happy to see this marked as ready for a fix. :)
@paglias, @Alys mentioned database transactions above--is this something that would fall under that label you've been curating?
I think the issue here is not much with transactions but with the fact that when applying quests progress we do not load the users document at all but just increase their EXP with a database command, while levelling up requires calling updateStats on the user object that would have to be loaded. We can explore the perf impact this would have but I don't think transactions would help in solving the problem
My reference to database transactions wasn't because they'll fix this issue (they won't) but because any fix for this issue would ideally also include database transactions so that the fix is reliable for all party members.
Yeah but we have to pay attention when using transactions in these cases or we risk making the problem worse: