[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

    Nohup

    Okay, so who has iConomy configured and wants to test the changes to support coin "drops". The way you guys were talking about this I thought it was an actual drop with graphics and what not lol.
    --- merged: Mar 3, 2011 6:15 AM ---
    Oh, since we were talking about tools... One other thing that I had in mind when all this was coming together is that you can also PENALIZE people with this tool for not using the right tool. For example, a diamond shovel on a tree can result in nothing with the override flag. Just something to consider...
     
  3. so... how do i make a broken glass block drop glass ? i experimented with that yesterday but it seems breaking glass never yields anything no matter how it is configured. other than that... very nice plugin, now finally my zombies can drop leather armor pieces and while digging dirt one may find a compass, clock or bowl ;) Keep it up !
     
  4. Offline

    Nohup

    This works for me for glass:

    Code:
    
        glass:
            maxcount: 1
            chances:
                glass: 100 1 1
            override: false
            probability: 100
    
    
     
  5. Offline

    Bacu

    Is it possible to modify the drops of gravel/sand when they fall onto a block like a torch or a rail?
     
  6. Offline

    Nohup

    the block items are onBlockBreak, so as long as that event fires during that then it should work as-is. the only thing that checks for a player doing it is killing creatures. Now, if you DON'T want that to be the case then you could just configure it where all your bonuses are based on tool, which would ensure that a player was doing it.

    Also, fun updates coming in a few minutes:
    • Ability to specify data values (such as color for ink sack/wool, texture of wood drops, type of coal, etc)
    • Ability, under the tool-specific settings, to specify how much damage the given tool takes
    • [BETA] iConomy support, still waiting for folks to test that the iConomy stuff works, but I have tested that it doesn't break anything without iConomy.
     
  7. Offline

    XxZeroxX

    Both of those out of the 4 updates are extremely huge for me. The cloth obviously since it makes every possibly block be accessable through drops.

    As for the 2nd statement, I was glad you took that route with penalizing people for wrong tools. I do agree that making the override true if you use the wrong tool would be yet another feature I don't believe I've seen around, but for the most part I am surprised with how fast this plugin has been updated.

    iConomy coin implementation should spark interest of tons of people too ;).
     
  8. Offline

    Nohup

    Figure both ways are available for setting how things work, that's what I was after (not making it one way or the other) :)
     
  9. Offline

    TatteredKing

    VERY cool. Well done - I can see why you are excited about making this one. I am starting to get a handle on the syntax, and from my early experiments, I can see that I'm definitely going to use this one. Thank you!

    Nohup: Is it possible to comment within the config.yml? ## or something? I can see where that might make following my logic easier later when I reopen the config and wonder wth I did in there 6 months ago.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Aug 23, 2018
  10. Offline

    QQCucumber

    Hey, great job on the iconomy support. Just one thing bothers me though, I really don't want to promote my players sitting outside a mob spawner and waiting for monsters to pop to farm them. Is it at all possible we can get some sort of config file (separate from the one we have now would probably be best) that'll let us control how far monsters have to be from a mobspawner before they start dropping rewards?

    What I always did with iMonster on my server is award 1 coin per kill, but if they're within 10 blocks of a mob spawner, they didn't get anything. However, they could destroy the mobspawner for 50 coin.
     
  11. Offline

    Voxel Box

    very neat! i will have to take a look at this!

    this is potentially really excellent for a creative server like ours that repurposes blocks! -- having no more useless coal clogging our inventories would be a welcome lubrication to item management.
     
  12. Offline

    Nohup

    @TatteredKing - Yes, the comments are done with # with a space after it. As with everything in YAML that space is important lol. Bukkit uses SnakeYAML

    @Voxel Box - Glad you like it. You can also check out my Philosopher's Box, it is basically a weighted trading system so you can give coal a value and allow it to be converted into another object (i.e coal = 1, diamond = 100, put 100 coal in the box and press the button and get a diamond in return).
     
  13. Offline

    Voxel Box

    Nosh~ We're strictly free-build and creative at the moment, so the focus for us is on getting rid of needless items like ore and it's little friends. iConomy is a neat idea, but i have so many money worries in the real world that i prefer to strip all of that stuff out of my game-time. I will check it out on our test server: my main concern is this is may be overkill for what we need and there may be a simpler way to accomplish what specifically I'm looking for. Oh those precious little server resources, how I hate them!

    ~plusnine.
     
  14. Offline

    TatteredKing

    Awesome, that's kind of what I was thinking would work, but have not gotten home to test it out yet. I'll do it! Great job with this - I'm looking forward to fiddling with the iconomy bits soon. :)
     
  15. Offline

    Nohup

    @Voxel Box - The funny thing is that this is completely scalable. The code itself is under 500 lines, and the configuration parsing is done once and cached by Bukkit so you aren't having to rehash it each time. So this really fits large or small needs. Don't want iConomy, I don't use it myself, no problem it doesn't require it at all. It was just an add-on feature. Only want to affect 2 things, again no problem, should be lightning quick. So hopefully you will find it meets your needs :)
     
  16. Offline

    Voxel Box

    Awesome -- I certainly hope i didn't sound like I was impuning your code ability, only implying I was looking forward to taking a peek under the hood. =)
     
  17. Offline

    MaverickHunter

    Could anyone post a config which would make tree logs drop planks and not wood blocks? I can't seem to get the override thing working correctly. It might be because I have no idea how to name either in the config [​IMG]
     
  18. Offline

    Nohup

    Code:
    bonuses:
        log:
            chances:
                wood: 100 1 2
            override: true
            probability: 100
    
    There are two references that can help:

    My code lookup sheet here
    Visual minecraft data items on wiki here
     
  19. Offline

    MaverickHunter

    You rock. Both exactly what I needed. Thanks for posting it up!
    However, with that config (and nothing else in the file) logs still drop logs. =\ Maybe I'm missing something? I'm running CB 440.

    Edit: Ok, I took out the 1 2 from wood: 100 1 2 and now it spawns the wood and log when I kill a log block =\

    Oops. Found my problem. Apparently I was using an older version of DropBonus and forgot I hadn't updated. All working now. Thanks!
     
  20. Offline

    Euphoriant

    Helloooo, I'm having a little trouble getting my console to not tell me that my config file is riddled with error, yet it seems alright. Could you maybe take a gander for me?

    Code:
    bonuses:
        craftchicken:
            chances:
            maxcount: 3
                egg: 25
                feather: 25
                bone: 50
                raw_porkchop: 1
                seed: 10
                feather: 50
                feather: 30
                feather: 10
            override: true
            probability: 100
        stone:
            chances:
            maxcount: 3
                cobblestone: 5 1 3
            override: true
            tool:
                wood_pickaxe:
                    chances:
                        cobblestone: 40
                stone_pickaxe:
                    chances:
                        cobblestone: 70
                iron_pickaxe:
                    chances:
                        cobblestone: 80
                gold_pickaxe:
                    chances:
                        stone: 40
                diamond_pickaxe:
                    chances:
                        cobblestone: 100
            probability: 100
        diamond_ore:
            chances:
                diamond: 100
            override: true
            probability: 100
        log:
            maxcount: 3
            chances:
                stick: 30
                stick: 20
                stick: 10
            override: true
            tool:
                stick:
                    chances:
                        log: 20
                wood_axe:
                    chances:
                        log: 40
                stone_axe:
                    chances:
                        log: 60
                iron_axe:
                    chances:
                        log: 80
                diamond_axe:
                    chances:
                        log: 90
                gold_axe:
                    chances:
                        log: 40
            probability: 100
        leaves:
            maxcount: 3
            chances:
                sapling: 5
                leaves: 5
                stick: 5
            override: true
            tool:
                wood_hoe:
                    chances:
                        apple: 1
                        golden_apple: 0.001
                stone_hoe:
                    chances:
                        apple: 2
                        golden_apple: 0.01
                iron_hoe:
                    chances:
                        apple: 3
                        golden_apple: 0.05
                diamond_hoe:
                    chances:
                        apple: 5
                        golden_apple: 0.08
                gold_hoe:
                    chances:
                        apple: 10
                        golden_apple: 0.1
            probability: 100
        lapis_ore:
            maxcount: 5
            chances:
            override: true
            tool:
                stone_pickaxe:
                    chances:
                        blue: 100 1 2
            probability: 100
    it keeps telling me that there is an error on line 5, column 16. I checked it, and it seems all clear. Any ideas?
     
  21. Offline

    Jason555555

    Can someone tell me what the overide and probability means? I'm not too sure if the probability set sit for all the items or..
     
  22. Offline

    Emalde

    This is perfect for things like making glass drop glass and doing nonsensical things with dungeons. Thanks!
     
  23. Offline

    Nohup

    @Euphoriant - There are a few issues. First the maxcount goes outside of the chances node, they are both nodes of the same level. Second your list for dropping multiple sets of sticks needs work...

    Code:
    bonuses:
        craftchicken:
            maxcount: 3
            chances:
                egg: 25
                feather: 25
                bone: 50
                raw_porkchop: 1
                seed: 10
                feather:
                - 50
                - 30
                - 10
            override: true
            probability: 100
        stone:
            maxcount: 3
            chances:
                cobblestone: 5 1 3
            override: true
            tool:
                wood_pickaxe:
                    chances:
                        cobblestone: 40
                stone_pickaxe:
                    chances:
                        cobblestone: 70
                iron_pickaxe:
                    chances:
                        cobblestone: 80
                gold_pickaxe:
                    chances:
                        stone: 40
                diamond_pickaxe:
                    chances:
                        cobblestone: 100
            probability: 100
        diamond_ore:
            chances:
                diamond: 100
            override: true
            probability: 100
        log:
            maxcount: 3
            chances:
                stick:
                - 30
                - 20
                - 10
            override: true
            tool:
                stick:
                    chances:
                        log: 20
                wood_axe:
                    chances:
                        log: 40
                stone_axe:
                    chances:
                        log: 60
                iron_axe:
                    chances:
                        log: 80
                diamond_axe:
                    chances:
                        log: 90
                gold_axe:
                    chances:
                        log: 40
            probability: 100
        leaves:
            maxcount: 3
            chances:
                sapling: 5
                leaves: 5
                stick: 5
            override: true
            tool:
                wood_hoe:
                    chances:
                        apple: 1
                        golden_apple: 0.001
                stone_hoe:
                    chances:
                        apple: 2
                        golden_apple: 0.01
                iron_hoe:
                    chances:
                        apple: 3
                        golden_apple: 0.05
                diamond_hoe:
                    chances:
                        apple: 5
                        golden_apple: 0.08
                gold_hoe:
                    chances:
                        apple: 10
                        golden_apple: 0.1
            probability: 100
        lapis_ore:
            maxcount: 5
            override: true
            tool:
                stone_pickaxe:
                    chances:
                        ink_sack: 100 1 2 4
            probability: 100
    I think I caught it and updated it right, check the examples on the first post in case I missed something. I will probably have to make a Wiki or something lol.

    @Jason555555 - probability is the chance that the given material will qualify for a bonus; override specifies whether the bonus overrides the standard server drops or not.
     
  24. Offline

    QQCucumber

    Probability should probably default to 100 when not set.
     
  25. so... i still cant get glass drop glass or stone/wood stairs drop stone/wood stairs even using your example posted above but i'll figure it out eventually ;) Thanks a lot !

    I'd like to know if this mod can now be seen as a full replacement of BlockDrops: http://forums.bukkit.org/threads/me...-anything-drops-mobs-vehicles-blocks-185.2177 ?

    also i'd like to suggest merging and Fixing the MobControl functionality into this: http://forums.bukkit.org/threads/mech-mob-control-v1-5-control-those-mobs-349-broken.4828

    Et voila: the ultimate Drop/Mob management system ;) If at all possible.
     
  26. Offline

    TatteredKing

     
  27. Offline

    QQCucumber

    Yup.

    MobControl is meant to do a lot more than just manage drops, that doesn't seem like a great idea. And WinSock is planning on updating it soon anyway.
     
  28. Offline

    Nohup

    @g_BonE - Paste your config somewhere so we can see it. As far as replacements and merging... I think I cover what BlockDrops has based on the title of their thread, but I haven't researched what they have so I can't say for certain. As far as merging, it looks like MobControl + DropBonus would do what you want without merging. They are two separate functionalities without overlap. Is it not updated or something?

    @QQCucumber - Not sure I agree with that one man, too much auto-on options can lead to problems too. It can be done, but I would be leary of it...

    @TatteredKing - Excellent :)

    @All of yous... 1.7 is now out. Multi-world support is in it as well as a change QQ asked for while he is testing the iConomy stuff.
     
  29. Offline

    QQCucumber

    To be honest I can't think of a time I would not have probability set at 100 for anything I plan on doing on my server, which is why I mention it. Not a big deal if you don't want to incorporate it though. [​IMG]
     
  30. Offline

    PAPABEAR1010

    Thankyou for this, pure genius!
     
  31. putting amounts (e.g. 100 1 1) behind the drop chances seems to have helped with glass dropping glass ;)

    keep going, this is a really nice mod ! Would You mind giving an example on how to have a sheep drop randomly colored wool ? Maybe even without killing it ?
     

Share This Page