player_setlevel does not properly give level-up rewards
raselneck opened this issue ยท 3 comments
The way player_setlevel
is setup to work, users can completely miss out on proper level-up rewards (such as recipes and picking perks at levels 5 and 10). One solution I've thought of (and implemented in a fork) is to add a player_addxp
command that hooks into the game's native level-up code so that players do not miss out on those rewards, as well as a player_getxp
command so players know how much experience they would need to level up, and then deprecating and eventually removing player_setlevel
.
The only downside to the experience-based commands is they do not allow for adding "negative" experience, so if a player were to set all of their skills to max level then they would not be able to set their skills to a lower level.
If my solution sounds good, then I'd be happy to submit a pull request for code review before merging. If not, then I'd love to keep this discussion open to help find another potential solution.
Hi @xoarinn. I'm tempted to remove the command instead; the built-in console commands are intended to help with testing and debugging. For changing XP and levels, it's probably better to use a more comprehensive implementation like CJB Cheats Menu. What do you think?
Ahh yeah, if the console commands are meant for debugging and testing then I would say that removing player_setlevel
altogether would be the better choice.