Skip to content

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