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

Use modules' fishing loot tables to randomly override fished items #294

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Vftdan
Copy link

@Vftdan Vftdan commented Mar 2, 2025

Add fishing event handler to the base Module class that rerolls one of the three fish loot categories (independently from the result got from the original vanilla roll, so skewing the effective probabilities) with weights that should emulate vanilla behavior (taking into account the player's Luck effect, Luck Of The Sea enchantment, and whether the fishing bobber is currently in open water) and randomly selects an item from the module's corresponding loot table proportional to its chance to replace the original fished item or preserves the original item with a chance of $1.0 - \sum\text{of chances in the module's selected loot table}$.

Fixes #292

… item

Guarantee that every item has a chance to be chosen even when the sum of chances surpasses 100%
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.

Fishing loot is not modified
1 participant