cdaragorn / Ui-Info-Suite

Mod for Stardew Valley.
86 stars 360 forks source link

Adding percentage value to the luck text #76

Closed gasparsigma closed 1 year ago

gasparsigma commented 3 years ago

Adding a percentage value to the luck so it's a bit more informative. Normalized, so in-game luck of -0.1 is 0%, 0 is 50%, 0.1 is 100%, and in-betweens are rounded to the nearest value

Ex: Luck -0.090 yields text You're not feeling lucky at all today... (5%) Luck 0.092 yields text You're feelin' lucky!! (96%) Luck 0.099 yields text You're feelin' lucky!! (100%)

gasparsigma commented 3 years ago

Suggestions for changes are welcome if it breaks the spirit of the mod by giving too much value-like precision

FlashTurtle commented 2 years ago

I'm very new to this, so I apologize if anything I say sounds harsh, but I would love to see this change!

I think it adds the right amount of data for what luck should be. The current hovering over dice right now is sort-of confusing and mainly vague

        double currentLuck = Game1.player.DailyLuck;
        double normalized = Math.Round((currentLuck - luckMin) / (luckMax - luckMin) * 100);

Also, the formula- I'm confused how it works: You're taking the initial luck + 0.1 (since min = -0.1)

Therefore, it will either be between the range of [0.0,0.2] (low to high) The bottom value is the average / max? = [0.1 - - 0.1] = 0.2 - Which I think makes sense (I just solved my own question)

Maybe we should add more options of sprite colors so that it mirrors what the wiki says for luck? though? With 6 values, and neutral at 50%? Would it be better to go from negative to positive bounds to follow the current format by introducing negative percentage- or is that where things get wonky due to a division of 0?

https://stardewvalleywiki.com/Luck#cite_note-tvluck-2

cdaragorn commented 1 year ago

I really appreciate your effort to improve the mod but I'm not going to accept this change because it doesn't follow the intent of this mod. It's not meant to make it easier to get information that the game already has a way for you to get.

This info is intentionally vague. The game already gives you a way to get specific knowledge of your luck. This is only meant to give you enough idea of how your luck is going that you can tell if it's generally good, neutral or bad. I don't want to give you more information when the game already has a mechanic for giving that.