[INACTIVE][MECH] DropBonus v2.5 - Loot table configuration tool - [740]

Discussion in 'Inactive/Unsupported Plugins' started by Nohup, Feb 25, 2011.

  1. Offline


    Version 2.5

    Tags - Loot, Drops, Permissions, iConomy, Multi-world

    The DropBonus plugin will allow you to configure the loot tables on your server in such a way that you can a) set the probability that breaking a block or killing an entity will generate a bonus, b) set the probability of EACH TYPE of bonus that can be generated, c) set a range for the number of items dropped and MORE. Even better still, the plugin was coded in a completely generic fashion so you aren't limited to the combinations that I thought were correct or needed. You can configure this plugin so that ANY block that is broken has the chance (.1% - 100%) of generating ANY other material (Material.X). The same goes for any creature that is killed.

    This tool can be used to override the default game drops as well. If you wanted to turn all drops from blocks off and control all the materials on your server, this tool makes it possible. It provides total control over what drops when blocks break and when creatures are killed!

    • Allows for bonus blocks to be dropped when a configured block is broken OR when a configured mob is killed.
    • Bonus chances are cumulative, so you could receive multiple bonuses for one block/mob based on the laws of probability.
    • Single "roll" performed to determine if bonuses should be granted on this event or not. Once you have qualified for a bonus, all bonuses defined for that block will be attempted.
    • Individual "rolls" performed for each bonus type, ensuring that qualifying for one bonus at a given level doesn't automatically qualify you for all bonuses at that level.
    • Configurability is the key. You can configure any block type and under that block type you can configure the chance of a bonus entity being dropped when the given block type is broken. The same goes for mob type.
    • Along those lines, you can also set individual blocks OR bonuses to be turned off. You don't have to have a specific set of entries or drops. Only set up what you want to occur.
    • Percentage configuration is now from 0-100 and anywhere in between in double format (so 0.000001 will now be accepted)
    • Ability to override standard drops from entities and blocks, assumed to be false if not specified
    • Ability to set drops based on tool used when breaking the block/killing the mob
    • Ability to specify 0-n bonus items of a type to be delivered in one "bonus"
    • Ability to specify 0-n bonus evaluations for a given bonus (i.e. you have 100% of one bonus stone, and then 20% chance of a second bonus stone)
    • Ability to specify the maximum number of dropped items per bonus per material
    • Configurable permissions supported by the Permissions plugin
    • Ability to specify the amount of damage done to a tool when breaking a block of a given type or killing a given mob
    • Newly added - MULTI-WORLD support, configurability for each world or all worlds at once.
    • iConomy support for specifying currency to drop from mobs and blocks
    Usage: Install the plugin and configure the config.yml for it (after it is generated). No commands currently specified. Bonus node permissions can be setup in the Permissions config.yml as exemplified below.

    Configuration Examples: Wiki

    Permissions Example: Wiki

    Multi-world Support: Wiki

    iConomy Support: Wiki

    Download DropBonus: DropBonus v 2.5
    Download Source: GitHub
    Wiki Site: Wiki

    Latest CraftBukkit version tested against: 733


    v 2.5
    • Updated to work with Bukkit 733.

    v 2.4
    • Updated to work with new version of Bukkit. NOT backward compatible.
    • Added list support for coins entries
    • Added permissions check before applying override
    v 2.2
    • Bug fixes for Permissions plugin name and 0 data field entry.
    v 2.1
    • Changed cooldown to only affect configured blocks
    • Added override support at tool level
    v 2.0.1
    • Bug fix for creature coin drop issue for iConomy integration.
    v 2.0
    • Added permissions configurability at the Material level (items dropped)
    • Major code refactor, thus new major version
    • Adjusted priority to Monitor where dealing with cancellable events, this will prevent conflicts with WorldGuard and iZone
    • Tested against new Recommended Build, w00t!
    v 1.10

    • Added support for boats and carts
    v 1.9

    • Added configuration to specify whether a killed entity only drops bonuses when killed by a player or not. This has a top-level default AND creature-specific configurations.
    • Added configuration to specify a placed-block cooldown timer (in ticks).
    • Added clean up routine to tracking to make sure entries aren't orphaned.
    • Adjusted block listener priority for onBlockBreak event and accounted for if the event is cancelled.
    v 1.8

    • iConomy beta successfully complete
    • Refactored some of my packages for those that look at my code
    • Created wiki for documentation so this post wasn't so large!
    v 1.7

    • Multi-world support added
    v 1.6

    • Added additional data specification within drop entries (used for color, texture, etc)
    • Added ability to specify how much damage a tool takes when breaking a block or killing a creature
    • Added BETA release of iConomy support (thanks to @Coelho for his help!)
    • Limited error spam to the console when configuration files are not correct
    v 1.5

    • Added Permission support
    v 1.4

    • Added tool-specific drop specification
    • Added support for 0-n bonus items to be dropped from a single configuration
    • Added support for o-n bonuses per material type per bonus
    • Added specification for maximum number of bonuses dropped per event
    v 1.3

    • Added override support to disable standard drops from blocks and entities.
    • Override flag assumed to be false if not specified
    v 1.2

    • added check to only drop bonus when death is caused by entity attack, not by external triggers such as skeletons burning to death or entities drowning
    v 1.1

    • Overhaul to percentage definitions
    • Added support for mob deaths
    • Changed name to DropBonus to span new functionality
    v 1.0

    • Initial release.
    Noppoly, Stormbow, Phaedrus and 2 others like this.
  2. Offline


    Okay, I put it in and cleaned up the spacing, when I brake a stone block I get one cobblestone and occasionally something else. When I look at your config file at the Miner (I am assuming he is the problem?) I see that he only has access to the cobblestone drop, he also needs access to these:

    If you have times when you want a specific tool, then you would also have to do bonuses.stone.toolname. Overall, the config looks to work, I would clean up the extraneous spacing as YAML doesn't always play nice with it. Now it is just a matter of getting your permissions complete. Nice config btw, good use of roles!
    this should already be in place, I don't go through the bonus generation at all (material or coin) if the block has been placed by a player and the cooldown hasn't expired. Keep in mind, the cooldown is in server ticks, not seconds. 1 server tick = 1/20 of a second.
  3. Offline


    Ah, that makes sense. I didnt know you had to include those when doing specific permission nodes. Yeah, ive been making RP classes via DropBonus and Permissions Plugin, its a nice work around to get custom RP classes, it works surprisingly well. I put a good amount of work on adding in a rank system for the RP classes, I felt that it would be worth trying to fix.

    I'll try adding those in today when I get back to the server computer, as well as fixing those extra spacings, im used to organizing my coding like that.

    Thanks again for your help! I really appreciate it.
  4. Offline


    I'd like to request that cooldown be able to be set per block type.

    Here's my issue: I'd like gold ore to yield more than one item per ore, and I'd like glass to drop glass most of time you break it. If I set cooldown, the glass functionality becomes not at all what I want, but if I don't, you can simply endlessly multiply your gold. For now I'll probably make gold ore drop gold bars but that removes a game mechanic.

    The other advantage of this is that I suspect most people would really only want to track gold ore, iron ore and logs because only they are limited resources that drop replaceable versions of themselves but often people have definitions for all sorts of blocks including ones that are planted often like dirt stone and cobblestone. This would dramatically reduce the load of keeping track of placed blocks since people very rarely legitimately place gold, iron ore and logs.
  5. Offline


    Ok, sorry to bother you with this still, but unfortunately after adding "bonuses.stone.chances" and "bonuses.stone.probability" it still has yet to work. Could you send me the configs that you fixed up if possible?

    Oddly, stone only drops when "bonuses.stone.*" is applied but doesnt work when "bonuses.stone" is applied.

    I lied, i fixed it, I updated DropBonus to 2.2 and it works now.
  6. Offline


    @dugen - The issue isn't the natural behavior of replacing itself, the issue was that any block placed could be farmed for the bonuses as well. Overall even glass could be farmed for whatever you set it up as. Now I can see where glass could be set as 1 block per break, but that could be said of any of the nodes. The cooldown truly only makes farming more frustrating, so if you set say a 90s cooldown it makes it a bit slower, however there are still ways around it. Heck there are ways around it at any level tbh. While possible to configure things like this, I am wondering if it is TRULY practical...
  7. Offline


    Would this cause grass to be dropped 60% fo the time when any block other than a tool is used, and drop tyhe tool-specific bonus whenever a tool is used?

            override: true
            maxcount: 1
            probability: 100
                dirt: 60 1 1
                        dirt: 65 1 1
                        dirt: 70 1 1
                        grass: .5 1 1
                        dirt: 75 1 1
                        grass: 1 1 1
                        dirt: 60 1 1
                        grass: 39.25 1 1
                        iron_ingot: .25 1 1
                        gold_ingot: .25 1 1
                        diamond: .25 1 1
                        dirt: 80 1 1
                        grass: 2 1 1
    And just so you know, I love the plugin format, very simple and easy to make. (I even made a sytax for the config, so useful)
  8. Offline


    that would cause dirt to drop 60% of the time regardless of tool, and then the tool specific drops would build upon it. so with the wood spade you have 60% chance of 1 block, and then another 65% chance of another block.
  9. Offline


    Is there any way to make it drop 60% of the time, and have it do tool-specific bonuses otherwise? (other than doign every, single, item they might possible ahve in their hand)
  10. Offline


    well with the way you have it then it kinda does in a back door manner. With a maxcount of 1, the tool bonuses are going to be evaluated first, so if they qualify (successful roll for the percentage specified) for one of the bonus items they will get that item and it only, however if they don't then they will have a 60% chance at the dirt. So using the wood spade would have two rolls for dirt rather than 1.
  11. Offline


    So I could put both probabilities at .5, and there would be a total probability of .75? If so I can deal with that very easily, thanks for responding.
  12. Offline


    It's been 20 years since I sat in my last statistics class, but sounds right :)
  13. Offline


    Hey, is it possible to stack the coin drops the way you can stack item drops?

    For example:

        - 100 1 5
        - 20 10 15
        - 0.1 100 150
  14. Offline


    Yes, but I'm having glass drop one glass 90% of the time and one sand the other 10%, so "farming" yields a net glass loss. Other things, like coal ore and diamond ore, don't drop themselves so it's not an issue. You can't farm it, you have to find it.

    I have most of my drops configured as a small net loss like that to keep the game balance similar to a stock server. I'm just trying to make it so that construction projects require a smaller percentage of mining overhead by reducing durability loss on tools for common tasks as well as increasing drop rates of materials consumed in construction like diamond and coal.


    I've found a bug with "something" but I'm not sure what. I've noticed that sometimes Dropbonus seems to get stuck where, for example, when I mine coal and then place a torch where the coal was and then go to pick the torch up, it will drop bonus coal as if I just broke a coal block. I can sit there dropping torches and picking them up over and over and farm coal. At the same time, glass seems to stop dropping it's bonuses. I suspect that it might be a craftbukkit bug given the behavior but I figured I'd mention it. I'm running a recent recommended craftbukkit build (git-Bukkit-0.0.0-516-gdf87bb3-b531jnks). A server restart predictably clears the issue. I'm running with no cooldown currently and a fairly modest configuration who's only obvious abnormal feature is that I'm using negative damaged values.
  15. Offline


    I don't currently have it supporting lists, but I can code it if you need.

    @dugen - I will have to look at the bug, still not sure I want to implement the other change, will have to read through it a few times.
  16. Offline


    How would i make birch logs drop birch logs and pine logs drop pine logs etc?
  17. Offline


    It would be nice so that I can set it up to do a general low level payment and a rare large bonus.
  18. Offline


    there is a fourth entry for things that can be passed a data byte, so like wool and dye for color and wood for type. So:

    Standard Wood:
        wood: 100 1 1
        wood: 100 1 1 1
        wood: 100 1 1 2
  19. Offline


    all this does is make basic logs drop all three log types
  20. Offline


    right, what fuzzy means is we cant use the damage value when defining the block we want to edit.
    In other word we can only change the drop-behaviour of "log" (which equals "log:0") but not of "log:1" or "log:2". Or can we ?

    One thing I noticed, is that override seems to completely ignore permissions.
    So if I maybe have leaves drop apples when destroyed (along with override:true) that works fine for someone with the 'bonuses.leaves.*' permission. Someone without that permission however will get nothing at all from leaves, not even the default drop.

    Is there a way around that, other than having to redefine the standard behaviour in addition to the actual bonuses?
  21. Offline


    I would like to second this request as I thought it already did this [​IMG]. Actually, I think the way I have it set up is to have two "coin:" lines. Like...

    coins: 100 1 5
    coins: 25 50 100

    Will that not work either?
  22. Offline


    @Tajin, @fuzzy_cobalt - That should drop logs for any log broken, but you are correct in that I don't have the configurations themselves taking into account the additional data value, only the drops. I put it on the list.

    @Tajin - Correct. I was "assuming" that anyone that set override to true would want to control every aspect of the drop, so in that case they would want to provide the permissions to get there as well. I can change that easily enough though as well since in the way you are describing it changes default game mechanics for folks without access.

    @Shenlong - No, that wouldn't work right now either, sorry.
  23. Offline


    No problem! This plugin still serves many, many purposes on my server, I can live without that bit of functionality. I would like to see it implemented if possible though. Also, I appreciate all the help and support you give us users. I've definitely noticed that you provide much more support and listen to suggestions a lot more than some plugin authors.
  24. Offline


    Does this work with vehicles yet? Would like to make a boat drop a boat and not materials.
  25. Offline


    @Scyfi - Last I tested it did
  26. Offline


    I would recommend you use PickBoat for returning boats. There are a lot of specialized vehicle events regarding boats that DropBonus wasn't really meant to handle.
  27. Offline


    One problem is that coins should go on the same level as chances.

    coins: 100 30 100
        glowstonedust: 40 1 2
    instead of...

        coins: 100 30 100
        glowstonedust 40 1 2
    There may be other problems since your getting the unable to find a material message, but I'm not sure what causes that.
  28. Offline


    The material message is usually for a wrong material name under chances, but I dont see the post you are responding to!

    Version 2.3 is now available. This update includes list support for coins configurations:

        - 100 1 1
        - 50 1 1
        - 25.2 1 1
    This also includes a permission check before override settings are checked.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 10, 2016
  29. Offline


    @Nohup I'm not sure I understand the permission check before override settings are checked patch note. Can you go into detail a bit on that?
  30. Offline


    basically it checks if the user has permission to the override node before overriding the drop. As was mentioned above, right now if the user didnt have permission to let's say "bonuses.sand.*" and override was set to true on that, then even though they didnt have permission to get to the configuration node it was still overriding the game mechanic and ending up in nothing dropped.
  31. Offline


    I wanted to make zombies drop the netherrack at a 75% drop and i was testing it on the cow to see if it would work at all and i never got any from them. this is what i was using.

    netherrack: 75 5
    probability: 100
    override: false
    requirekiller: true
    requirekiller: 0
    cooldown: 0

Share This Page