-
Notifications
You must be signed in to change notification settings - Fork 626
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
Adjust gardening quantity calculation and elemental ore yield #4522
Adjust gardening quantity calculation and elemental ore yield #4522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for code changes, I have no input on ele ore quantity.
Looks like your git commit title is too long, We enforce a 72 character limit, you can use |
41f5bec
to
4e72ab4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, there doesn't seem to be any evidence that 2 elemental ores is possible without the use of arcane pots.
anecdotal and I can't prove: but its possible just rare as F. Approving as is, because we don't even have full understanding of every detail of retail and might never unless SE discloses more like they did with TH mechanics.. We should try and remember this next time an SE rep does a Q&A with the community.
Yeah I couldn't find any conclusive evidence either way. My reasoning for this was mainly that with the old algorithm, it wasn't possible to get 2 (unless the gardening "myths" were turned on), so the safest thing is to make sure you can't get them with the new algorithm either. |
as for myself I've only got personal memories for what I say, and that's not a good enough to base code on. I used to do a lot of gardening (mainly for the platinum leaves resulting from failed ores). |
I'd prefer to keep what you have for now, and hope that someday we squeeze some more info out of SE or someone really passionate about this goes on a long data collecting spree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good maths and comments, thanks! 🚀
I affirm:
What does this pull request do?
This does three things related to gardening results:
Increases the range of the RNG strength assigned to each plant from 0-31 to 0-32. The RNG strength is later divided by 32 and therefore the maximum previous value was 96.8% making it impossible to ever hit 100 strength, making the maximum yield of certain gardening combinations impossible.
Elemental ores were previously impossible to hit their max yield of 2. With the first fix, this is now possible. However, there doesn't seem to be any evidence that 2 elemental ores is possible without the use of arcane pots. Therefore, I'm reducing the maximum yield of all ores to 1.
Normalizes the distribution of quantity so that all potential quantities have equal ranges of when they're chosen.
The old algorithm for quantity is:
min+(max-min)*percent+0.1
The new algorithm is:
min+(1+max-min)*percent
I'm not really sure how the original algorithm is supposed to work, and I suspect the +0.1 on the end may have been a hack to try and account for the fact that the RNG was previously capped at 96.8% instead of 100%. It's easier to compare the old and new results here, using Persikos from Tree Saplings + double Dark Crystal feeds:
The old algorithm slightly over-represented the minimum and greatly under-represented the maximum, while the new version is an even split across all quantities.
Note that while I did fix elemental ore yields, this will significantly impact tree sapling yields as well. Previously there would have been roughly a 5% chance to 2x saplings from a harvest and now it will be 50%. I don't have any hard data to back this up as accurate but I did see several random forum posts suggesting that it wasn't uncommon to get more saplings harvest than cuttings planted, so it seems closer to reality in my opinion.
Steps to test these changes
!additem 217 10
Place flowerpots in mog house
Open the char_inventory db table. Find the entries for your 10 pots and set the extra field to:
Assign the extra field of each pot to 1 row above, in hex. These are tree saplings with double dark feeds set to harvest state, with a different strength for each pot. Respectively, the strengths and expected yields (compared to the data posted above) when harvesting: