XP Decay not working
Hopefully it's not some trivial error or oversight on my part - XP Decay has been doing next to nothing on my server. I enabled logging for it but got nothing. I changed and re-enabled Decay settings many times over many weeks and from what I've managed to track manually it decreased XP for some users here and there but not as much as it was meant to and in some cases they kept their role rewards even after dropping in level. Overall it seems like it's doing something very occasionally, but not working as intended, most of the time not working at all from what I can tell.
I currently have it set to remove 1 XP per day. Logging and some manual checks still don't show it doing anything.
Server ID: 1224390743133786174
Solution:Jump to solution
Thanks for helping us uncover this bug @ahmenh0tep, enjoy the rest of your month of Kiai Premium on us, and if you have any other suggestions or bugs you know where to reach us 🙏
22 Replies
Hey @ahmenh0tep! Our team will answer your post soon.
If this is an issue in your server, make sure you've included your server's ID (This can be found on the
/ping
command), as well as which users are having this issue.
Once your question has been answered, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution
to help others find the solution via Answer OverflowHey there again @ahmenh0tep, it seems like Kiai is only taking
1 XP
from users once per day.It operates on this basis: https://docs.kiai.app/commands/settings#xp-decay-interval
Settings Command – Kiai Docs
The main documentation for Kiai
https://i.imgur.com/K8qJoty.png This is your current configuration as far as we can see on our end.
Well that's what I want it to do, but neither logging nor manually checking the level of certain users is showing that it's being done
I've regularly checked the xp of one particular inactive user and their XP just stayed at a certain value (72) for several weeks, at some point recently it dropped to 70 and now it's stuck at 70
I see, let me see if I can find any further logs of Kiai's activity in your server.
The interval here is not expressed in seconds is it?
No, that would be milliseconds, as it is easier for us to handle that way internally within the bot.
If I remember correctly, when I first set it up a few months ago I did notice it working (seemingly correctly), but I'm afraid I can't offer anything other than vague and anecdotal examples
Unfortunately I discovered the logging option quite late
No worries, we're gonna do some investigating on our end :)
Thanks!
So after confirming internally, there’s little room for unintended behaviour here.
The only logical explanation we have based on what you’ve said is that Kiai will simply ignore any members whose total XP at the time of the decay triggering is less than the amount the decay would take away.
Do you think that could be the case here? Or are you fairly sure that Kiai is failing to take XP away from members even if they have more XP than that of which it would take away
@Codeize The users I've been manually checking for xp changes have all had plenty of xp (70+) so that doesn't seem to be the case. There's also the issue of XP Decay logging not working. I've had it enabled for a while and I haven't gotten a single log message for Decay.
Could it be that Decay is ignoring members whose xp has been set manually?
Most likely not, we don’t have any logic in place to account for this.
It not logging anything at all is weird though, I’ll do some more digging
I tried with two different logging channels, and I checked to see if other logs work and it seems like they do. XP gain logging works.
I also just checked the rank of one particular member who's been inactive for a while, I can see they've lost some xp due to Decay but then there's another problem - they haven't lost the role reward they got (specifically, they got a role for reaching level 2, now they're back to level 1 but still have the role)
So from purely anecdotal evidence I seem to be having three different problems: xp decay not working in the right amounts and/or at the right interval, xp decay not sending any log messages, and users keeping their level rewards even if their level does drop
I'm tracking another inactive member who's close to losing their level, I'll see what happens and update
I think decay has been working for them, at least in the last couple of days
@ahmenh0tep Hey there, I'm going to give you a discount code for a free month of Kiai Server Premium, one of the benefits of server premium is that you can set a custom XP decay time, and internally this works on a separate process from the free server XP decay, so this will help us track this down internally.
You should get a DM from Kiai with the code shortly and you can redeem it through https://kiai.app/premium
@Shadow thanks, should I set the interval to anything specific?
No, you can customize it however you wish for your server
The way it works is that each premium server gets its own worker to process xp decay based on the interval setting you set, while all free servers just use one cron loop
Done, with same settings (1 xp per day)
this member's xp today dropped from 242 to 235 for some reason, reducing their level too but they haven't lost their role reward
should I just disable xp decay and leave it at that or do I keep it running for more testing?
now it's 231 😅
dropped some more for that member and I think a few others, so I've disabled it for now. idk how this became such a mess
We're looking into it on our end 🙏
@ahmenh0tep Are you getting XP decay logs in your kiai logging channel for that user
I think I may have found the issue!
XP decay should be fully working now
Solution
Thanks for helping us uncover this bug @ahmenh0tep, enjoy the rest of your month of Kiai Premium on us, and if you have any other suggestions or bugs you know where to reach us 🙏