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

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

  1. Offline

    Nohup

    DropBonus
    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!

    Features:
    • 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


    Changelog:

    v 2.5
    • Updated to work with Bukkit 733.


    v 2.4
    • Updated to work with new version of Bukkit. NOT backward compatible.
    v2.3
    • 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

    Tajin

    You rock! :)
     
  3. Offline

    Shenlong

    Hmm, that's odd. The post just disappeared. I guess whoever posted it must have deleted it.

    Also, thanks for the update!

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

    Nohup

    Can you post your config using the "code" function so I can see your exact setup? Also, do you use Permissions?
     
  5. Offline

    Jonbas

    Thanks for the quick update!
     
  6. Offline

    Tajin

    Hey Nohup.

    I think it was mentioned before in this thread already, do you think you could add the event of shearing sheep in addition to killing them?

    So that (for example) something like this would be possible:
    Code:
    shearsheep:
      override: true
      probability: 100
      tool:
        gold_sword:
          chances:
            wool: 100 1 3
      
    So sheep would only drop wool if sheared with a golden sword.
     
  7. Offline

    Nohup

    Not sure if that has been mentioned before, will have to look at what event that will be.
     
  8. Offline

    Tobei

    So if I wanted to award bow usage with extra cash would it work like this?

    Code:
    bonuses:
        craftchicken:
            maxcount: 5
            chances:
                egg: 10 1 2
                feather: 75 1 5
            probability: 100
            coins: 100 1 5
            tool:
                bow:
                    coins: 100 5 5
    Or would that mean that the player has to run up and left click kill the chicken with the bow in hand for this to fire?
     
  9. Offline

    Barinade

    Not sure if it's been posted but with the block bonus if you place another block in the place of one you get a bonus from you still get bonus from it

    For example, our server had gold ore giving 5-15 iConomy money and 30% chance to get a gold ingot, if we mined a gold ore and put a cobblestone in it's place and mined that we would still get the iConomy money and the 30% gold ingot.
     
  10. Offline

    Nohup

    Okay, will look into it now. Seems odd since I go off the type of the block in the onBlockBreak event, so hopefully it is something I can take care of and not a Bukkit issue :(
     
  11. Offline

    Calvin

    Code:
    bonuses:
        craftchicken:
            maxcount: 1
            chances:
                egg: 100
            override: true
        craftcow:
            maxcount: 1
            chances:
                leather: 100 1 2
            override: true
        craftpig:
            maxcount: 1
            chances:
                pork: 100 1 2
            override: true
        craftsheep:
            maxcount: 1
            chances:
                wool: 9 1 2 1
                wool: 9 1 2 2
                wool: 9 1 2 3
                wool: 9 1 2 4
                wool: 9 1 2 5
                wool: 9 1 2 6
                wool: 9 1 2 9
                wool: 9 1 2 10
                wool: 10 1 2 11
                wool: 9 1 2 13
                wool: 9 1 2 14
        craftskeleton:
            chances:
            maxcount: 2
                arrow: 100 5 8
                bone: 100 2 2
            override: true
            probability: 100
    creature:
        requirekiller: 0
    block:
        cooldown: 0
    
    So looking at that configuration, sheep when killed, should drop different types of wool (all colors but white through black, and brown), cows and picks should always drop their normal items as to sometimes they drop nothing, and the skeletons should drop way more arrows than usual. I put in the probability on the craftskeleton, because I wasn't sure that it defaulted at 100 or not, what is the default? This is not working for me anyway, so whats up?
     
  12. Offline

    Nohup

    Default probability is 0, so you need it on each node. Your chances node is in the wrong place under craftskeleton, maxcount goes outside of it. the rest looks okay to me at a quick glance.
     
  13. Offline

    Calvin

    I will fix that, and what you said pretty much will fix everything if your'e right
     
  14. Offline

    Nohup

    If not let me know, I can drop it into my test server and see what's what.
     
  15. Offline

    Calvin

    it seems my sheep drop isn't working correctly. Here it is:

    Code:
        craftsheep:
            maxcount: 2
            chances:
                wool: 9 1 2 1
                wool: 9 1 2 2
                wool: 9 1 2 3
                wool: 9 1 2 4
                wool: 9 1 2 5
                wool: 9 1 2 6
                wool: 9 1 2 9
                wool: 9 1 2 10
                wool: 10 1 2 11
                wool: 9 1 2 13
                wool: 9 1 2 14
            override: true
            probability: 100
    
    I'm guessing its either something to do with the data values, or something to do with the sheep in general. Since it doesn't drop things in the game normally maybe its kinda screwed up? I'm probably just formatting wrong or something, thanks for the help! This plugin is awesome!
     
  16. Offline

    Tobei

    My coin distribution isn't working. Did I do something wrong here?

    Code:
    bonuses:
        craftcreeper:
            maxcount: 5
            chances:
                sulphur: 50 1 2
                tnt: 10 0 1
            probability: 100
            coins: 100 33 75
            tool:
                bow:
                    coins: 100 5 5
    creature:
        requirekiller: 0
    block:
        cooldown: 60
    It appears that the block drop bonuses for stuff like cobblestone, stone, etc are working properly however...
     
  17. Offline

    Nohup

    Are you saying you aren't getting coins because you don't see the message? You need to configure the message:

    Code:
    messages:
        bank:
            positive: You have received [amount] coins
    
    Other than that this one works for me. The message is optional.

    When I pasted this in, craftsheep was at 5 spaces and the things under it were at 8. Once I corrected it to 4 and 8 then the colors dropped. However, keep in mind you have them dropping < 10% of the time and those percentages are NOT cumulative. So each type has a 10% chance with individual rolls for each entry.

    I can't recreate this locally running v 556. Granted there is only me on my local server, so I am questioning whether this is an issue with the block lag or not? Can you paste your config and I can try it out with yours specifically?

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

    Calvin

    Based on what you said, what I want to do is very hard. I think you should implement a mincount: to go with your maxcount: node so that there will always be a certain number of material dropped. That way I can have these all at %10 and not have to worry about the sheep dropping nothing. I just want them all to have a fair chance at dropping but making sure the sheep always drops something. You know what I mean? The mincount would fix it for me i think,
     
  19. Offline

    Nohup

    @Calvin you could use maxcount in a way as well though, mincount wouldnt really make sense as then I would have to put in some sort of algorithm to dynamically choose one of the specified items if none of them passed their rolls. If you did something like 25% on each of yours, the probability that each and every one would fail is extremely small, but there would still be the probability of different ones dropping. Or you could do something like put the white one last and have it at a higher percentage. I believe that YAML will preserve the order of the keys.
     
  20. Offline

    Barinade

    I deleted the gold ore config, but the same thing happens with leaves:

    Code:
        leaves:
            chances:
                sapling: 15
                apple: 10
            probability: 100
            override: true
    
     
  21. Offline

    Nohup

    @Barinade - what is your full config? Is it large or small? How many people are on your server? Are you noticing any block lag? Can you send me a PM with your full config in it? What are the steps you are taking?
     
  22. Offline

    Barinade

    There were 2 on when we noticed, no block lag at all, and my config is quite large....

    I removed the gold ore config like I said, but it was the same as leaves and leaves is doing it too.
    Show Spoiler

    Code:
    bonuses:
        craftchicken:
            coins: 20 1 5
            chances:
                egg: 20 1 2
                feather: 100 1 3
                bone: 30
            probability: 100
            override: true
        craftcow:
            coins: 20 2 7
            chances:
                leather: 100 1 2
                bone: 30 1 3
            probability: 100
            override: true
        craftcreeper:
            coins: 40 7 15
            chances:
                sulphur: 5
                bone: 10
            probability: 100
            override: true
        craftghast:
            coins: 60 15 25
            chances:
                sulphur: 20 1 3
            probability: 100
            override: true
        craftgiant:
            coins: 100 20 100
            chances:
                bone: 50 5 10
                diamond: 80 2 5
            probability: 100
            override: true
        craftpig:
            coins: 20 2 6
            chances:
                pork: 100 1 3
                bone: 60 1 2
            probability: 100
            override: true
        craftsheep:
            coins: 20 3 7
            chances:
                bone: 60 1 2
            probability: 100
        craftskeleton:
            coins: 40 8 15
            chances:
                bone: 100 1 3
                arrow: 80 1 3
                flint: 15 1 3
                feather: 15 1 3
                stick: 15 1 3
                bow: 3
            probability: 100
            override: true
        craftslime:
            coins: 20 5 10
            chances:
                slime_ball: 100
            probability: 100
            override: true
        craftspider:
            coins: 40 5 10
            chances:
                string: 80 1 2
            probability: 100
            override: true
        craftsquid:
            coins: 100 1 3
        craftzombie:
            coins: 40 5 10
            chances:
                bone: 80 1 2
                apple: 30
            probability: 100
            override: true
        craftpigzombie:
            coins: 40 10 20
            chances:
                grilled_pork: 80
                gold_sword: 2
            probability: 100
            override: true
        leaves:
            chances:
                sapling: 15
                apple: 10
            probability: 100
            override: true
    creature:
        requirekiller: 1
    block:
        cooldown: 0
    messages:
        bank:
            positive: You gained [amount] coins.
            negative: You lost [amount] coins.
    
     
  23. Offline

    Tobei

    @Nohup, got it working perfectly, just took some moving around in the yml. Even the bow bonus works too :)
     
  24. Offline

    NEO

    Im wondering if there is a limit on how many things can drop from a block. I can only seem to get 6 items to drop from a single block no matter how many items i add in .

    Code:
        glowing_redstone_ore:
            chances:
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                redstone: 100 1 1
                coal: 30 1 1
            probability: 100
            override: false
    Sometimes only 5 items drop. Sometimes 5 items and 1 coal, 6 redstone no coal, 4 redstone 1 coal. I cant get any other combinations out of this setup.

    Fixed using this.

    Code:
        glowing_redstone_ore:
            maxcount: 10
            chances:
                redstone: 100 1 5
            probability: 100
            override: false
    New question, is it possible to make the message you get when you kill something and earn iconomy money from it say the amount you have earned.

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

    Nohup

    @NEO - yes, use the tag [amount]. also if you wanted more than one roll at the redstone you use the list implementation like this:

    Code:
        glowing_redstone_ore:
            maxcount: 10
            chances:
                redstone:
                    - 100 1 5
                    - 90 1 5
                    - 100 1 5
            probability: 100
            override: false
    That would give you multiple roll attempts to drop redstone stacks
     
  26. Offline

    NEO

    Thank you, i feel like i have finally got the hang of this plugin. :)
     
  27. Offline

    Calvin

    Hey how do i give all bonus permissions? like so the person gets all the bonuses? bonus.* ?
     
  28. Offline

    Nohup

  29. Offline

    NEO

    I get the below sometimes in my console, but i have no issues receiving iconomy money from monsters or blocks. Figured i would report it.

    Dropbonus : unable to apply bank bonus : null
     
  30. Offline

    NotoriousPyro

    This is broken in build 568.
    Code:
    2011-03-24 20:13:45 [SEVERE] BLOCK_PLACED loading DropBonus v2.3 (Is it up to date?)
    java.lang.NoSuchFieldError: BLOCK_PLACED
    	at com.nohupgaming.minecraft.DropBonus.onEnable(DropBonus.java:59)
    	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:118)
    	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:453)
    	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:217)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:92)
    	at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:70)
    	at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:203)
    	at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:190)
    	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:130)
    	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:245)
    	at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    I've edited this to work with the latest release of bukkit (571):
    <Edit by Moderator: Redacted multiupload url>

    I hope you don't mind Nohup.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Apr 1, 2019
  31. Offline

    Nohup

    I'm just waiting on a recommended build since the hosting companies usually only use those... I updated a temporary one for Snowballz last night so will do so for this as well.

    Okay, for those of you ahead of the RBs, here is version 2.3.1

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

Share This Page