Weight system
The probability system of the entire plugin is controlled by weights. What are weights? A weight represents the relative chance of obtaining a particular item. For instance, if item A has a weight of 10 and item B has a weight of 30, the probability of getting A is 25%, while the chance of getting B is 75%. This is the most scientific method for calculating probabilities.
Weight operations include + (addition), - (subtraction), * (multiplication), / (division), % (modulus), and = (custom expression).
Where can weights be used? In fact, weights are applied in many parts of the plugin. For instance, adjusting weights based on conditions for loot, weights in mini-games, and item effects (like fishing rods) that offer weight modification features. They are typically configured in a list format and adhere to this specific configuration format.
With weight modifications, we can achieve features that many other fishing plugins can't. For example, there's less trash in the ocean but it frequently appears in rivers. Players using a golden fishing rod have a higher chance to catch gold-quality loot. Or perhaps, to catch a ferocious shark, players must use shark bait. All these features can be realized through the weight system.
Weights aren't very intuitive to me. How can I convert the weights into a percentage form?
The plugin has already thought of this. You simply need to use the command /customfishing debug loot <surroundings>
. It will calculate the probabilities of all potential loots based on the fishing rod, bait, and other factors you currently hold that can affect the fishing results.
Last updated