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

Add rune drop chance control #35

Closed
Deadlock39 opened this issue Jul 13, 2020 · 1 comment
Closed

Add rune drop chance control #35

Deadlock39 opened this issue Jul 13, 2020 · 1 comment
Assignees
Labels
feature good first issue Good for newcomers

Comments

@Deadlock39
Copy link
Collaborator

Add a control knob that affects rune drop chances.

Minimum setting is vanilla drop rates
Maximum setting is equal drop chance for every rune any time a rune TC is selected.
Use logarithmic scaling instead of linear to give more intuitive results.

Example:
When TC 17 is selected Zod drops at a 0.02% chance.
At them maximum, it will drop at a 3% (1/33) chance
At half of the maximum setting it should drop at a 0.25% chance (0.02/0.25 = 0.25/3) instead of a 1.51% chance

This is done using log scaling.
Instead of:
chance = minChance + (maxChance - minChance) * scaleFactor
Use:
chance = Pow( 2, Log2(minChance) + (Log2(maxChance) - Log2(minChance) ) * scaleFactor )

@Deadlock39 Deadlock39 self-assigned this Jul 13, 2020
@Deadlock39
Copy link
Collaborator Author

I've written and minimally tested this code. It looks good. Need to finish documentation and push patches.

@tlentz tlentz added feature good first issue Good for newcomers labels Jul 14, 2020
@tlentz tlentz closed this as completed Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants