0 of 0

File information

Last updated

Original upload

Created by

Jonathan Feenstra

Uploaded by

JonathanFeenstra

Virus scan

Safe to use

6 comments

  1. glymr
    glymr
    • premium
    • 63 kudos
    This is very clever! But does it take into account the fact that the code weights green preferentially?
    1. JonathanFeenstra
      JonathanFeenstra
      • premium
      • 95 kudos
      Yes, I looked at the game code to calculate the probabilities for both colours. With 0 luck, the probability of landing on green is already 11 / 15 compared to 4 / 15 for orange, so betting on orange will pre-fill the wager to 0 unless your luck is high enough. See the source code for more details about the calculation.
    2. glymr
      glymr
      • premium
      • 63 kudos
      Ohh, very cool! I hadn't realized that the probabilities had change with the new update. Thank you for this mod!
    3. JonathanFeenstra
      JonathanFeenstra
      • premium
      • 95 kudos
      You're welcome! I didn't know about the changed probabilities either, do you know in which version they were changed and what they were before?

      This table lists all the possible wheel spin outcomes with 0 luck. If your luck level is higher than 0, there's a chance that the arrow will suddenly speed up at the end when it would otherwise land on the losing colour (this has a probability of luck level / 15 if you bet on green and luck level / 20 if you bet on orange).
    4. glymr
      glymr
      • premium
      • 63 kudos
      I'm basing this information on the wiki, so it's quite possible that it's wrong. Before the 1.6 update, the wiki information went as follows, with no reference to luck:

      "At the Spinning Wheel, the player can bet Star Tokens on whether the spinner will land on green or orange.Players can quickly earn the star tokens required to purchase all items in the shop by betting green, since the mathematical probability
      the wheel will land on green is 75%, versus 25% for orange. The
      probability is not a guarantee for any single roll, however. For
      efficient profit while protecting against losses, always bet half of the
      current stars. This can be calculated using the Kelly criterion for bet
      sizing:

      Proportion to bet = Chance of Winning - (Chance of Losing / Profit Margin on Win).
      Simplified for the case of doubling a bet we get
      Proportion to Bet = (2 * Probability of Winning) - 1
      Proportion to Bet = (2 * .75) - 1 = .5 = 50%"

      That's from the Wayback Machine, from March 16, 2024. https://web.archive.org/web/20240316072930/https://stardewvalleywiki.com/Stardew_Valley_Fair

      Edit: Ah, I'm wrong, there is a reference to luck, but it's further down in the page, under "Trivia". So it's possible that the luck factor has always existed in the code.
    5. JonathanFeenstra
      JonathanFeenstra
      • premium
      • 95 kudos
      Interesting, in the decompiled code for 1.5.6, I only noticed a very minor change in the arrow deceleration compared to what I see in 1.6 (-0.000628318530717959 instead of -0.0006283185307179586). That difference is so small that it might just be due to using a different decompiler, I don't think it affects the probabilities. This part of the wiki has been modified multiple times since March 16 so it's probably just an error. 11 / 15 is quite close to 0.75, so someone probably just estimated it based on in-game testing. Anyway, the current info on the wiki is correct.