DropHeads icon indicating copy to clipboard operation
DropHeads copied to clipboard

[Suggestion] Add options to limit max head drops per X minutes

Open TerdyTheTerd opened this issue 10 months ago • 3 comments

Its a common occurrence that players will get multiple heads within a few minutes when they are at their mob farms. It would be nice if there was a simple config option for something like "time-since-last-drop: 5m" which would prevent additional drops for the same mob within the defined "Xm".

TerdyTheTerd avatar Feb 05 '25 19:02 TerdyTheTerd

Hmm, there are a couple variations of this to consider, and I really like them all, so I might make an add-on for them:

  • time-alive-multipliers (this one already exists): Can be used to prevent recently spawned mobs from dropping heads.

  • behead-cooldown-multipliers (your suggestion): Per-player, can be used to track their recently beheaded mobs and prevent drops from those mob types.

  • behead-cooldown-multipliers-global: Same as above, but tracks global beheads for a mob type. Useful to avoid players bypassing the cooldown by using alts in a farm. Downside is it might make common heads harder to get on big servers.

  • behead-cooldown-multipliers-area: Solves the global problem by only affecting droprates of mobs in a radius around the previous behead event. This could be interesting, since if you set the time limit to something like 999years with a drop-chance multiplier of 0% you could effectively prevent players from getting more than 1 head per farm built.

  • persistent-cooldown-multipliers: true/false: Saving the recent behead data when the server restarts (currently the plugin forgets everything on restart/reload)

  • time-multiplier-smooth-transitions: true/false: If you have a head drop multiplier set to 0, then set to 1 at 5m like in your example, it would average it out based on the current time, i.e., mobs killed at 2.5m would be 50% less likely to drop a head compared to a 0% chance.

  • target-droprates: This one is fancier / more complicated to code, so I might not include it right away, but the idea is server owners could specify a "target rarity" of specific mobs (e.g., 5 cow heads per month), and the plugin can dynamically adjust rates to create that difficulty.

EvModder avatar Feb 06 '25 12:02 EvModder

I don't like using the time-alive because then naturally spawning mobs from players exploring, or naturally spawning hostile mobs around the players in caves/night will effectively have their head drops disabled. A per-player drop cooldown makes the most sense to me. I think a good way to target mob farms specifically would either be region based, or to simply add/double the multiplier for each consecutive drop, so if a player is at their endermen XP farm and are only killing endermen, it will quickly turn into a 30 minute delay between drops.

TerdyTheTerd avatar Feb 07 '25 05:02 TerdyTheTerd

@TerdyTheTerd region based is an interesting idea, I kind of like that too, but region size (diameter and center point) might be tricky to provide configuration for. I guess center point can just be where the last behead for a mobtype took place, but it could potentially become computationally taxing with many players on a big server running mobfarms concurrently in different places.

For the consecutive drop penalty idea, I think the hard part is when does the drop rate fall back down (I am assuming it wouldn't be permanently altered droprates for that player+entity type). E.g., the configuration file will need a time between drops in order for the droprate to be reduced by x%, and a time between drops before increasing droprate back towards it's normal value by y %. I guess there's other ways to define/configure it too, but I think that's the way that makes most sense to me. Then it just needs to store a single map for each player: {player : {affected mobs : reduced rate %}}

Let me know if that sounds reasonable, I'm thinking about implementing some of these options into an addon like I said before ( sorry I know it's been a while, this was a lower-priority feature for me)

EvModder avatar Jul 27 '25 23:07 EvModder