WolfyScript / CustomCrafting-Wiki

Wiki and JavaDocs for CustomCrafting
https://www.spigotmc.org/resources/55883/
9 stars 3 forks source link

New Crafting Condition: Chance #27

Open ColonelKai opened 3 years ago

ColonelKai commented 3 years ago

Is your feature request related to a problem? Please describe. It would be nice to have a way of giving players a risky choice to go for a crafting recipe that has a chance to fail.

Describe the solution you'd like The ability to set a percentage for risk of making a crafting recipe success chance (the higher the percentage, the safer it is)

And when it fails, the crafting recipe to fail, and make a noise (Anvil Break?) (and perhaps close the GUI / give a message) to indicate that the crafting recipe failed.

WolfyScript commented 3 years ago

That could be an interesting idea.

My question would be at which stage this should happen? As this idea describes a Condition, it would be checked before the recipe is even processed.

I assume the recipe should be consumed, because else it wouldn't really be a risk, but then a condition wouldn't work 🤔

Possible alternative By setting multiple recipe results, you can choose a result at random (weighted random). For example, a trash item and a treasure item. Then you set the weight for each of the items, so the trash item occurs more often. Of course, the result is only re-rolled once the recipe is actually crafted (the player takes out the item).

ColonelKai commented 3 years ago

This is an idea better than even i could think, but maybe just add a special item that says the result will be randomized?