[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. NoHup I LOVE this plugin!! It should let me do what I really want to do for RPG Classes - but I'm struggling to understand the config so please help! I want to do a few things but here's one example:
    - I want my Druid or Farmer classes to be able to harvest more than just wheat from mature wheat crops.. I already figured how to restrict use of Gold Hoe to the group:druids (using WorldGuard) and I also know that the block broken is 59 for wheat.. so I want to add a couple of items - say 38 and 40 - that might also drop if a 59 is broken (wheat harvested) *using* a Gold Hoe... please help!
    - also, wheat is 59 whether just planted or fully grown - is there a way to only trigger this when its grown? I think thats checking the Data code for the block too.. would be awfully useful please! Otherwise my Druids will be able to harvest freshly planted seeds :(

  3. Offline


    Okay, so for your crops you basically want bonus drops if they are using a gold hoe if I am reading that correctly, so would be something like:

            probability: 100
                        wheat: 100 1 5
    In this example whenever a crops block is broken by a golden "hoe" then there will be between 1 and 5 additional wheat dropped. You have limited that tool use in WorldGuard so that would meet your needs. Or if you wanted more control and you are using Permissions then you could give a permissions node of 'bonuses.crops.tool.gold_spade' to whichever profiles you wanted to have it.

    One of the requests earlier today was to be able to map permissions all the way down to the material level (in this case wheat). I will be looking into that and I will have to look into adding a data value node under the block entry so that you can specify your level of growth. I have them in the output but hadn't put them in the input so far, but should be easy to do. Keep your eyes peeled for a new release tonight :)
  4. Offline


    Absolutely love this plugin. The amount of power and control over drops is phenomenal.

    The config file doesn't bother me at all, but I can see it being a point of confusion for people not comfortable with YAML. Perhaps people could start posting their working example configs to have something to work with.
  5. Offline


    I keep getting the below message in my console. I have iconomy set up. I had the name my currency changed to gold and thought maybe that was causing it, but when I changed it back to coins it still doesn't work. Any suggestions?

    2011-03-08 22:56:36 [INFO] DropBonus : Configuration file issue : Unable to find
     a material named coins
    Oh, and this is an example of what I have in the config file.

            probability: 100
            ovveride: false
                coins: 100 10 20
  6. Offline


    it is just an informational error and not killing anything, it is saying that there is no such material constant (which there isnt). Are you getting it over and over again? You should only get it once the first time it is hit.
  7. Offline


    No, it wasn't flooding my console or anything but I also wasn't getting any coins/gold for some reason. If I'm understanding my configuration correctly I should definitely get between 10 and 20 "coins" anytime I kill a creeper right?
  8. Offline


    you need to fix your spacing though, just do 4 spaces for each level, and fix the typo in override. Then it should work as long as iConomy is installed and setup properly.
    Version 2.0 is out there! This is a major code refactor to clean up some things and I got rid of the last piece of redundant code with it as well. I also was able to put in the permissions at the material (i.e. what is dropped) level. I have NOT figured out the issue for only full-grown crops as of yet and am wondering if crops is the only thing that would have a worry on this attribute right now. Will continue to ponder it.

    For now, I am going to play some Dragon Age II. Will check back in after a bit and make sure I haven't bombed everyones' servers or anything.
  9. Offline


    I fixed the typo and made sure the spacing was correct and it still doesn't work. I also made sure I had the most up to date versions of DropBonus and iConomy. It doesn't give me an error or anything, it just doesn't give out any money when I kill a creature. Is there anything else you can suggest?
  10. Offline


    Are you running Permissions at all? @QQCucumber and @XxZeroxX tested the iConomy bits for me, from what I can see of your snippet if you fixed it properly it should work, but maybe they can offer some insight.
  11. Offline


    @Shenlong has coins under the chances column. That's not where it goes, it goes on the same level as chances.
  12. Offline



    Getting a strange error?

    [SEVERE] Could not pass event BLOCK_BREAK to DropBonus
    java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String
    at com.nohupgaming.minecraft.util.DropBonusEvaluator.buildBonus(DropBonusEvaluator.java:224)
    at com.nohupgaming.minecraft.util.DropBonusEvaluator.generateBonus(DropBonusEvaluator.java:108)
    at com.nohupgaming.minecraft.listener.block.DropBonusBlockListener.onBlockBreak(DropBonusBlockListener.java:37)
    at org.bukkit.plugin.java.JavaPluginLoader$30.execute(JavaPluginLoader.java:309)

    I think this coincided with my using a wooden pick on some stone?

    Didn't crash the server or anything, but I couldn't find any mention of it on the forum, so thought I'd mention it all the same =)

  13. Offline


    is it possible to make creatures drop certain items only when they are killed with a certain tool?

    this (just a test) doesn't seem to work:
            probability: 100.0
                        stone: 100.0
    i'd really need this kind of an option, not for sheeps t o drop stones but for example, monsters would drop better items when killed with a sword instead of a bow or something else.
  14. Offline


    I need a password to see the item tables now? What is this?
  15. Offline


    @QQCucumber - Thanks for catching that, two sets of eyes and all that :)
    @shousper - fixed, new jar is available. Thanks for catching my bug!
    @giding - Yes this works, but I think you were hitting the same bug shousper was hitting. grab the latest jar, it is fixed now :)
    @TheMap - what????:eek: what items table? on the wiki? should only need a password if you are trying to change it, not view it. I just viewed it without logging in with no issues. Let me know what you are hitting!
    Oh wait!!!

    @TheMap - Sorry, I reorganized a few things on the wiki and in doing so I changed the name of the appendices so they were general and not specific to DropBonus since the same data can be used for my Philosopher's Box plugin. Try this link and you should not get the password dialog, and then the links to all of them are in the side navigation as well.
  16. Offline


    Oh, I think I know what's happening with @TheMap! It happened to me last night when i was perusing the wiki. On the Drop Bonus Advanced Config page it say...
    That link asks you for a password. But if you click on the link on the right hand side for Appendix C it works.
  17. Offline


    @Shenlong - thanks for pointing out the spot I missed, fixed now on the wiki :)
  18. Offline


    I have a couple of suggestion for this amazing plugin. I have my zombies set to drop armor when they die:
                leather_boots: 5
                leather_chestplate: 5
                leather_helmet: 5
                leather_leggings: 5
                red_mushroom: 25 0 3
                brown_mushroom: 25 0 3
                diamond: .1 0 1
                gold_ingot: .3 0 4
                iron_ingot: .5 0 7
                coal: .7 0 13
            probability: 100
            override: true
            requirekiller: true
    It'd be really awesome if I could randomize what level of damage the armor is at when it drops. (Because, you know, zombies that have been rotting in the ground are going to rise from the grave in pristine, shiny, new armor.) I'm thinking something like this:
                leather_boots: 5
                        - 10 0 10
                        - 50 30 100
                    maxcount: 1
                leather_chestplate: 5
                leather_helmet: 5
                leather_leggings: 5
                red_mushroom: 25 0 3
                brown_mushroom: 25 0 3
                diamond: .1 0 1
                gold_ingot: .3 0 4
                iron_ingot: .5 0 7
                coal: .7 0 13
            probability: 100
            override: true
            requirekiller: true
    So instead of prestine, shiny boots dropping, it has a 10% chance to drop boots that are in new or like new condition and a 50% chance to drop boots that are between used to barely a rag on your foot. The maxcount serves to prevent two pairs of boots from dropping.

    I understand that the game assigns a damage value and that diamond stuff can take somewhere around 2000 damage before it breaks but I don't know those numbers off the top of my head which is why I've specified their damage in percents (o to 10, 30 to 100) instead of the actual damage values.

    I'd also love it if I could have entities sometimes spawn another entity. For example:
                    - 50 0 6
                    - 10 0 6
                bow: 10 0 1
                diamond: .1 0 1
                gold_ingot: .3 0 4
                iron_ingot: .5 0 7
                coal: .7 0 13
                bone: 50 0 4
                craftskeleton: 10
            probability: 100
            override: false
    Killing a skeleton has a 10% chance to spawn another skeleton. (Or the first skeleton magically reassembles and keeps fighting if you prefer to look at it from a story telling perspective.)

    Finally, some sort of drop supersede for when something does drop, nothing else does. Example:
                feather: 50 0 3
                string: 50 0 3
                egg: 25 0 9
                diamond: .1 1
                    supersede: true
                gold_ingot: .3 0 4
                iron_ingot: .5 0 7
                coal: .7 0 13
            probability: 100
            override: false
            requirekiller: true
    If the diamond does drop, nothing else on that list will.

    Thanks for this amazing plugin!
  19. Offline


    Hmm, I moved the coins up a level like QQCucumber suggested and that still didn't work so I did some testing.

    This doesn't work for some reason.
            probability: 100
            overide: false
            coins: 100
    But this does.
            maxcount: 1
            coins: 100
                diamond_ore: .01
                lapis_ore: .01
                mossy_cobblestone: .01
                obsidian: .01
                iron_ore: .01
                gravel: .01
                dirt: .01
                coal_ore: .01
                gold_ore: .01
                redstone_ore: .01
                cobblestone: 100
            probability: 100
            override: false
    With this set up I get money when I mine stone, but not when I kill a zombie. I know it's probably something in my setup, but for the life of me I can't think what. Any ideas?
  20. Offline


    Could you add a group based bonus? IT would use a permissions group as base, so if a player breaks a block and he is from a goup, it would drop something, if he is from another group it would drop another thing.

    It would be great, so servers could make classes like miners, farmers, lumberjacks and etc.
  21. Offline


    @anon - use Permissions and it is done. there are several folks above that do just that!
    @Shenlong - how are you killing the zombie?
  22. Offline


    I've tried killing it with both a sword and bow and arrow.
  23. Offline


    override is spelled wrong, not sure that this would be the issue, but it is. do you want to send me your whole config? Unfortunately I don't have iConomy installed locally...
    oh and are there any errors in the console? I have lines around logging if an error occurs in that area.
  24. Offline


    Bah, I really can't spell apparently. Anyway, I fixed that and tested again and it still doesn't work. No errors show up in the console at all. I attached my config file. I appreciate all the help, thanks.

    Attached Files:

  25. Offline


    Can someone help me? There are many stuff to configure, and I cant figure how to do it... :(

    I need to make a certain group, so if they use golden tools to harvest ores they will get the melted ores.
    Something like, use a golden pickaxe, gold ore drops gold ignot. If they harvest it with other tools they drop normal gold ore. If another group harvest with anything, normal drop.

    I cant figure how to do it. Should I list the tool on the config and on the permission too? If I put override and people dont use golden tools will it drop nothing? Can someone please post an example of the files? Im dumb sorry [​IMG]
  26. I'm wracking my brain trying to figure out how item decay works. I'd like to give bonuses to some players so that their diamond tools decay at a rate of 25% of the normal decay rate... how would I configure this?

    Amazing plugin!
  27. Offline


    Is it possible to add color formatting to the iConomy coin messages? I tried a couple ideas and nothing has worked so far. Before I keep trying other combinations, I want to know if it's possible and if not, can it be added in a future update?

    I'm interested in adding something like this where positive is green and negative is red and they both have coins as white.
            positive: &2You have received &f[amount] &2coins
            negative: &cYou suck and were penalized &f[amount] &ccoins
  28. Offline


    Nohup, your craft(monster) is broken with regards to giving iConomy's coins.

    I've tried everything, the coins NEVER, ever, ever show up when I kill the mob. I've tried it on chickens, skellies, etc. You name it! The item/block will drop, but it will never give coins.

    Then I tried it on a grass block... Coins up the wahzoo.

    Is there a fix or am I just "doin' it wrong"?
            maxcount: 5
            coins: 100 100 250
                bow: 5 1 1
                feather: 25 1 3
                bone: 25 1 3
            override: false
            probability: 100

    Could you look at 'leaves' blocks while you're at it? I want to make it so that when someone breaks the 'leaves' block it has a low chance of dropping apples or leaves.

    Thanks for checking the plugin, see you tomorrow!
  29. Offline


    I am checking on it now
    There is now a fix out there for the creature and bank issue, I designated this 2.0.1. Leaves appears to have been working fine. I used:

            probability: 100
            override: false
                apple: 100 1 5
    @anon - It is late here but I will try and set up your example above tomorrow if no one else can post it for you.

    @HamburgerHelper - Right now I had it set to an int value that was a specific amount of damage to assess per break. I can look at it and see if I can either implement it better or find a way to get you the ranges for each tool.

    @GameFAQsRolo - Again, I will look at this tomorrow
    Hamburger Helper likes this.
  30. Offline


    I've read about this feature a few places:
    • Ability, under the tool-specific settings, to specify how much damage the given tool takes
    but I can't find any documentation or examples for how this works. For example, how would I make it so diamond pickaxes take less damage from mining stone. From a quick read of the code it looks like the configuration element is "damaged" and from my understanding of how durability works in Minecraft, I'm assuming the normal value for damage applied would be 1. This would seem to make it hard to decrease the durability loss of tools with out making them take no damage. Increasing durability loss seems like it would be easy by using values greater than one, but the only option for decreasing would seem to be setting the value to 0, removing damage entirely.

    Would this be how you'd remove damage entirely?:
            override: false
                  damaged: 0
    Do you need to set override to true to override the default Minecraft durability loss?

    Also, Is there any chance of having percent damaged values that would randomly apply damage based on a roll.. i.e. 25% would apply 1 damage randomly 25% of the time, whereas 150% would apply 1 + another 1 50% of the time, etc.?
  31. Offline


    Does anyone have a good idea for a plugin used for removing/spending the coins? I'm currently using DropBonus to give Players coins for killing mobs. But at the moment there is no possibility to decrease the amount of coins on the server. Therefore a big inflation will occure if there is no way to spend the coins.

Share This Page