cc3768 / UniversalCoinsMod

Universal Coins mod for Minecraft, using Minecraft Forge.
MIT License
9 stars 5 forks source link

Wither Boss drops 9 Million Coins #21

Closed psiie closed 9 years ago

psiie commented 9 years ago

It has come to my attention that my players are grinding wither bosses. They seem to drop 9 Million coins every 10 kills or so. The 10 kills could be bad luck as I checked my config and it is still set to default (set to 1/4 kill to drop ratio). My max coin drop is set to the default ~36 or so as well.

Not only to fixing this bug, but could we also have an option to only drop the lowest coin value? This could help limit any further bugs like this as well. Although less fun :\

http://i.imgur.com/MWkZxZQ.png

notabadminer commented 9 years ago

The one out of ten might be due to random numbers not being truly random. I'll see if I can improve that.

What would be a good amount to drop for withers? When I wrote the formula for dropping coins based on health, I didn't expect wither farming. I was thinking about the ender dragon and it being a one time drop.

Right now, the formula is: int dropped = (int) (randomDropValue * Math.pow((health / 20), 4) * (event.lootingLevel + 1));

This results in up to 7,290,000 being dropped for the 300 health a wither has when a looting III item is used. Up to 1,822,500 with an unenchanted kill

What about switching to a linear drop formula so a mob with 200 health drops 10x a mob with 20 health? Keeping the random drop value and the looting multiplier. This would put the wither boss drops at up to 540 (2,160 with looting III).

I could add a configurable 1000x multiplier for the ender dragon. It would drop up to 360,000 by default (1,440,000 with looting III)

psiie commented 9 years ago

Thats it indeed! I love the idea of Looting III changing the coin drop outcome. We should keep that but do more of a linear drop formula. I feel that dropping a max of 10 coins per hp seems fair as long as the drop-rate is still accounted for.

As for specific mobs such as the Ender Dragon, perhaps it could be listed under the config as "creatures always-drop" in which the section could be toggled as well as configured.

I know that everyone does something different for economies and customization is key. For a server like mine, I welcome this mod as it creates a slowly inflating economy. A fixed monetary system only works if people always keeps money flowing and continue to play on the server (every never-returning player removes their cash from the economy). So I would probably still keep Ender Dragon drops rather low. Perhaps a 100% 10k drop to accompany the ender-egg. This way parties can at least split loot. Other than this, a linear drop table would ensure a steady supply of coins into the game.

Now and idea: detect if single-player (or if an option is selected in settings?) in which the drops would be the "int dropped = (int) (randomDropValue * Math.pow((health / 20), 4) * (event.lootingLevel + 1));" formula. This high-coin formula would be more well suited in a single-player environment where hoarding coins is fun :).

I know I'm verbose. Sorry about that :P

notabadminer commented 9 years ago

I've changed the mob drop handler to drop directly proportional to the mob health. I also added a multiplier for the ender dragon and changed it so the dragon kill always drops coins. The default settings drop up to 240k with no enchantment. Fortune III will drop up to 1M coins.