Thorinair / Stardew-Profits

A Stardew Valley crop profits calculator and visualizer. Link: https://thorinair.github.io/Stardew-Profits/
MIT License
153 stars 74 forks source link

more accurate chance of extra potatoes #55

Closed davidmcguiredesign closed 3 months ago

davidmcguiredesign commented 6 months ago

TLDR: crops.js line 380 should be set to 0.25 instead of 0.2.

Explanation

The Wiki page notes that the actual potato calculation is done iteratively starting with 0.2, but not ending there. The actual calculation is 20% for 1, and if successful, 20% (of 20%) for another, and so on. But if charted, you'll notice that the number approaches 25% with each increase in precision.

equation result
0.2 0.2
0.2 + (0.2^2) 0.24
0.2 + (0.2^2) + (0.2^3) 0.248
0.2 + (0.2^2) + (0.2^3) + (0.2^4) 0.2496