SMAPI - Stardew Modding API

SMAPI - Stardew Modding API

971k Downloads

player_setlevel does not properly give level-up rewards

raselneck opened this issue ยท 3 comments

commented

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.

commented

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?

commented

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.

commented

Removed in develop for the upcoming SMAPI 2.6 beta 19.