Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crop quality_chance calculation #17

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

zorvex09
Copy link

Based on the Crop.cs source file, the crop quality is determined by first comparing a random double between 0.0 and 1.0 to see if it is less than the gold_chance. If it is not, it then compares a new random double between 0.0 and 1.0 to see if it is less than the silver_chance. Due to how the nested if statements are set up, you need to multiply the silver_chance number by the chance that the crop was not gold. Then the base chance is just 1-(gold_chance + silver_chance).

Based on the Crop.cs source file, the crop quality is determined by first comparing a random double between 0.0 and 1.0 to see if it is less than the gold_chance.  If it is not, it then compares a new random double between 0.0 and 1.0 to see if it is less than the silver_chance.  Due to how the nested if statements are set up, you need to multiply the silver_chance number by the chance that the crop was not gold.  Then the base chance is just 1-(gold_chance + silver_chance).
JeffreyBytes added a commit to JeffreyBytes/crop_planner that referenced this pull request Apr 6, 2022
big thanks to zorvex09 for the fix: exnil#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant