[MECH] OtherDrops 2.8- Ultimate block/mob/player drop editing [1.5.2]

Discussion in 'Archived: Plugin Releases' started by Zarius, Jun 12, 2011.

  1. Offline

    Zarius

    [​IMG]


    Want to fix glass/stairs/boat drops? Want to gather ice/glowstone/grass in a balanced manner? Want to smelt ore with golden tools? Want to cause chaos with undead that rise again? Now you can, simply by enabling the included example files or delve into the more advanced customisation and make drops work the way you want.

    OtherBlocks aims to give you ultimate control over what item that blocks/entities drop when destroyed, depending on how they were destroyed. Compatible with WorldGuard. Lightweight! Only scans what it needs to and ignores the rest.
    Download: BukkitDev (download link on there) | Source Code

    Included Modules
    * Fix undroppables: fix drops for stairs, glass (don't use your hands - ouch), boats & bookshelves (1.8 stairs included)
    * Gold tools (basic): gold tools have a chance of dropping the complete block for grass, ice & glowstone.
    * Gold tools (smelt): gold tools have a chance of mining an ingot directly from ores.
    * Ore Extraction: using the usual tools, ingots are ripped out of ores, leaving the stone behind.
    * Leaf overhaul: adds leaf drops (apples, cocoa, leaves, sticks & a very small chance of golden apple).
    * Undead Chaos: beware the night! Zombies & skeletons rise again and even players rise back from the dead (player deaths spawn more zombies/skeletons).
    * and more...

    Custom Configuration Examples
    Code:
        # Simple glass drop fix
        GLASS:
          - drop: GLASS
     
        # Players drop Zombies on death, 50% of the time
        PLAYER:
          - drop: CREATURE_ZOMBIE
            chance: 50%
     
        # Spiders killed with any sword at night have a 10% chance to drop web,
        # otherwise they drop whatever they normally would
        CREATURE_SPIDER:
          - tool: ANY_SWORD
            time: NIGHT
            drop: WEB
            chance: 10%
     
        # Trees drop apples (or cocoa from birch trees)
        SPECIAL_LEAFDECAY@GENERIC:
          - drop: APPLE
            chance: 5%
        SPECIAL_LEAFDECAY@BIRCH:
          - drop: DYE@BROWN
            chance: 5%
    
    If you are getting errors with the word "snakeyaml" in it, your config file isn't properly formatted.
    Test it on this website (or this one).

    See the dev.bukkit page for full details on how to set up OtherDrops, a complete parameters list and further examples.


    Changelog

    Newest changelog details here.


    Main author: @Zarius
    Contributors: @Celtic Minstrel, raws
    Original author: @cyklo
     
  2. Offline

    Celtic Minstrel

    I'm not entirely sure if OtherBlocks supports superperms yet; my perusal of the source seemed to suggest that it doesn't, but it's possible I missed something. I have no idea why it doesn't work with Permissions 3.1.6.
     
  3. Offline

    XXXtheGreat

    Is there a way to make right-clicking plausible for OtherBlocks?
     
  4. Offline

    XxZeroxX

    Coming to the forum for help ;(. Just recently came back from a long break and have been updating plugins. I am slowly switching from DropBonus (which is now inactive) to OtherBlocks. I am having issues getting drops to work on basically anyone. Here is a copy/paste of some of my files to hopefully help figure out what is going on >.<.

    The Global Config (open)
    verbosity: normal
    priority: lowest
    usepermissions: true

    include-files:
    trees: yes
    creatures: yes
    otherblocks:


    creatures.yml (open)

    defaults:

    otherblocks:
    CREATURE_PIG:
    - drop: CREATURE_CHICKEN
    message: Yeah, a chicken fell out of that pig.
    quantity: 1
    - drop: MONEY
    quantity: 1
    CREATURE_ZOMBIE:
    - tool: ANY
    drop: FEATHER
    quantity: 3-4
    message: Testface McGee
    CREATURE_CREEPER:
    - tool: ANY
    drop: DEFAULT
    - tool: ANY
    drop: TNT
    chance: 0.50
    - tool: ANY
    drop: MONEY
    quantity: 1-3
    - tool: ANY
    drop: MONEY
    quantity: 0-1
    attackrange: <2
    message: You've earned a bonus %q coins for your close combat with creeper!
    - tool: ANY
    drop: MONEY
    quantity: 0-1
    time: NIGHT
    message: Are you crazy?.. Fighting a creeper in the night is just asking to die. Bonus %q for the risk!
    CREATURE_SKELETON:
    - tool: ANY
    drop: DEFAULT
    - tool: ANY
    drop: MONEY
    quantity: 0.5-2.5
    - tool: ANY
    drop: GOLD_INGOT
    quantity: 1-2
    chance: 1.75
    message: Upon the bones falling to the ground, you notice some gold in his teeth.
    - tool: ANY
    drop: CREATURE_SKELETON
    chance: 1.00
    message: Oshi! The skeleton has reanimated and is after you once again!
    - tool: ANY
    drop: MONEY
    quantity: 0-1
    attackrange: ">10"
    message: Sniping the sniper has net you a bonus %q coins!
    - tool: BONE
    drop: MONEY
    quantity: 0-1
    message: Using their own limbs to fight back.. resourceful and demented, but I like it. Here's some extra money for your time. +%q.

    My most recent testing was on killing pigs since I could lay a spawner out and kill from there. I have otherblocks.admin.show and am able to use /ob show creature_pig and see the information on the server. I also have otherblocks.admin.reloadconfig and that works as well. I added also otherblocks.custom.* to see if that would fix it, and ultimately nothing is going through.

    Ultimately I'm trying to get it to work with PermissionsEx, but I also have Permissions installed as well. I believe the trees config works as I've seen a stick drop from a tree and I don't think any other plugin caused that. Here is a link to that config as well just in case it helps.

    trees.yml (open)

    defaults:

    otherblocks:
    SPECIAL_LEAFDECAY@GENERIC:
    - drop: GOLDEN_APPLE
    chance: 0.025
    message: A golden apple has fallen! Hopefully it didn't break!
    - drop: APPLE
    chance: 0.25
    - drop: STICK
    chance: 0.50
    - drop: LEAVES
    chance: 0.50
    color: GENERIC
    SPECIAL_LEAFDECAY@BIRCH:
    - drop: GOLDEN_APPLE
    chance: 0.015
    message: A golden apple has fallen! Hopefully it didn't break!
    - drop: APPLE
    chance: 0.15
    - drop: STICK
    chance: 0.75
    - drop: LEAVES
    chance: 0.65
    color: BIRCH
    SPECIAL_LEAFDECAY@REDWOOD:
    - drop: GOLDEN_APPLE
    chance: 0.035
    message: A golden apple has fallen! Hopefully it didn't break!
    - drop: APPLE
    chance: 0.20
    - drop: STICK
    chance: 0.65
    - drop: LEAVES
    chance: 0.55
    color: REDWOOD
    LEAVES@GENERIC:
    - tool: ALL
    drop: GOLDEN_APPLE
    chance: 0.040
    message: The leaves fall the ground as you smash them. You notice something shiny in the pile of leaves!
    - tool: ALL
    drop: APPLE
    chance: 0.45
    - tool: ALL
    drop: STICK
    chance: 0.75
    - tool: ALL
    drop: LEAVES
    chance: 0.80
    color: GENERIC
    - tool: ALL
    drop: MONEY
    quantity: 0-1
    chance: 0.02
    message: You earned %q coins! Why the hell did someone leave money in a tree anyway =\.
    LEAVES@BIRCH:
    - tool: ALL
    drop: GOLDEN_APPLE
    chance: 0.025
    message: The leaves fall the ground as you smash them. You notice something shiny in the pile of leaves!
    - tool: ALL
    drop: APPLE
    chance: 0.30
    - tool: ALL
    drop: STICK
    chance: 0.90
    - tool: ALL
    drop: LEAVES
    chance: 1.00
    color: BIRCH
    - tool: ALL
    drop: MONEY
    quantity: 0-1
    chance: 0.02
    message: You earned %q coins! Why the hell did someone leave money in a tree anyway =\.
    LEAVES@REDWOOD:
    - tool: ALL
    drop: GOLDEN_APPLE
    chance: 0.040
    message: The leaves fall the ground as you smash them. You notice something shiny in the pile of leaves!
    - tool: ALL
    drop: APPLE
    chance: 0.45
    - tool: ALL
    drop: STICK
    chance: 0.85
    - tool: ALL
    drop: LEAVES
    chance: 0.90
    color: REDWOOD
    - tool: ALL
    drop: MONEY
    quantity: 0-1
    chance: 0.02
    message: You earned %q coins! Why the hell did someone leave money in a tree anyway =\.

    Any help or suggestions is greatly appreciated, thanks!

    Edit: Can't seem to get a good copy/paste with formatting. So assume there are 4 spaces between each hyphen, and I alligned any lines under that hyphen category to line up in notepad. No tabs used.
    Example:
    otherblocks:
    ****CREATURE_PIG
    ********- drop: CREATURE_CHICKEN
     
  5. Offline

    Zarius

    @Rofang

    SuperPerms isn't supported yet. Permissions 2.x and EssentialsGroupBridge work ok - I'll try Permissions 3.16 (my guess is there may be a bug in the build permissions check in OtherBlocks when using Permissions 3.16).

    @XXXtheGreat

    Already there - check this post. No documentation as yet as this feature is quite new and OtherBlocks is going through a revamp for version 2.0 so the format of left/rightclicks will probably change.

    @XxZeroxX

    Love the skeleton "tool: bone" drop :)

    You can wrap the config in (code)...(/code) blocks (replace () with []) to retain the formatting however if /ob show is working then it's probably not the config.

    What version of permissions are you using? And what version of OtherBlocks? note: version 1.93 fixed drops for pigs (didn't realise a pig was also considered a vehicle by Bukkit) - perhaps try testing with another creature?

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

    XxZeroxX

    config (open)

    Code:
    verbosity: normal
    priority: lowest
    usepermissions: true
    
    include-files:
    trees: yes
    creatures: yes
    otherblocks:


    trees.yml (open)


    Code:
    defaults:
    
    otherblocks:
    SPECIAL_LEAFDECAY@GENERIC:
    - drop: GOLDEN_APPLE
    chance: 0.025
    message: A golden apple has fallen! Hopefully it didn't break!
    - drop: APPLE
    chance: 0.25
    - drop: STICK
    chance: 0.50
    - drop: LEAVES
    chance: 0.50
    color: GENERIC
    SPECIAL_LEAFDECAY@BIRCH:
    - drop: GOLDEN_APPLE
    chance: 0.015
    message: A golden apple has fallen! Hopefully it didn't break!
    - drop: APPLE
    chance: 0.15
    - drop: STICK
    chance: 0.75
    - drop: LEAVES
    chance: 0.65
    color: BIRCH
    SPECIAL_LEAFDECAY@REDWOOD:
    - drop: GOLDEN_APPLE
    chance: 0.035
    message: A golden apple has fallen! Hopefully it didn't break!
    - drop: APPLE
    chance: 0.20
    - drop: STICK
    chance: 0.65
    - drop: LEAVES
    chance: 0.55
    color: REDWOOD
    LEAVES@GENERIC:
    - tool: ALL
    drop: GOLDEN_APPLE
    chance: 0.040
    message: The leaves fall the ground as you smash them. You notice something shiny in the pile of leaves!
    - tool: ALL
    drop: APPLE
    chance: 0.45
    - tool: ALL
    drop: STICK
    chance: 0.75
    - tool: ALL
    drop: LEAVES
    chance: 0.80
    color: GENERIC
    - tool: ALL
    drop: MONEY
    quantity: 0-1
    chance: 0.02
    message: You earned %q coins! Why the hell did someone leave money in a tree anyway =\.
    LEAVES@BIRCH:
    - tool: ALL
    drop: GOLDEN_APPLE
    chance: 0.025
    message: The leaves fall the ground as you smash them. You notice something shiny in the pile of leaves!
    - tool: ALL
    drop: APPLE
    chance: 0.30
    - tool: ALL
    drop: STICK
    chance: 0.90
    - tool: ALL
    drop: LEAVES
    chance: 1.00
    color: BIRCH
    - tool: ALL
    drop: MONEY
    quantity: 0-1
    chance: 0.02
    message: You earned %q coins! Why the hell did someone leave money in a tree anyway =\.
    LEAVES@REDWOOD:
    - tool: ALL
    drop: GOLDEN_APPLE
    chance: 0.040
    message: The leaves fall the ground as you smash them. You notice something shiny in the pile of leaves!
    - tool: ALL
    drop: APPLE
    chance: 0.45
    - tool: ALL
    drop: STICK
    chance: 0.85
    - tool: ALL
    drop: LEAVES
    chance: 0.90
    color: REDWOOD
    - tool: ALL
    drop: MONEY
    quantity: 0-1
    chance: 0.02
      message: You earned %q coins! Why the hell did someone leave money in a tree anyway =\.


    creatures.yml (open)


    Code:
    defaults:
    
    otherblocks:
    CREATURE_PIG:
    - drop: CREATURE_CHICKEN
    message: Yeah, a chicken fell out of that pig.
    quantity: 1
    - drop: MONEY
    quantity: 1
    CREATURE_ZOMBIE:
    - tool: ANY
    drop: FEATHER
    quantity: 3-4
    message: Testface McGee
    CREATURE_CREEPER:
    - tool: ANY
    drop: DEFAULT
    - tool: ANY
    drop: TNT
    chance: 0.50
    - tool: ANY
    drop: MONEY
    quantity: 1-3
    - tool: ANY
    drop: MONEY
    quantity: 0-1
    attackrange: <2
    message: You've earned a bonus %q coins for your close combat with creeper!
    - tool: ANY
    drop: MONEY
    quantity: 0-1
    time: NIGHT
    message: Are you crazy?.. Fighting a creeper in the night is just asking to die. Bonus %q for the risk!
    CREATURE_SKELETON:
    - tool: ANY
    drop: DEFAULT
    - tool: ANY
    drop: MONEY
    quantity: 0.5-2.5
    - tool: ANY
    drop: GOLD_INGOT
    quantity: 1-2
    chance: 1.75
    message: Upon the bones falling to the ground, you notice some gold in his teeth.
    - tool: ANY
    drop: CREATURE_SKELETON
    chance: 1.00
    message: Oshi! The skeleton has reanimated and is after you once again!
    - tool: ANY
    drop: MONEY
    quantity: 0-1
    attackrange: ">10"
    message: Sniping the sniper has net you a bonus %q coins!
    - tool: BONE
    drop: MONEY
    quantity: 0-1
      message: Using their own limbs to fight back.. resourceful and demented, but I like it. Here's some extra money for your time. +%q.

    (Failed again ;()

    Alright, that should fix the formatting in the spoilers to guarantee I didn't mess something up. Here is the version info and anything else I can think of that may be important.

    Permissions: 3.1.6 (Yeti)
    Otherblocks: 1.9.3
    PermissionsEx: 1.1.3

    Otherblocks does say that it has loaded trees.yml and creatures.yml. It also says in the command prompt that it hooked into Permissions and that it found a payment method. Earlier I was able to get Gravel to drop money. In the Creatures config I have Skeleton, Creeper, and Pig setup. For some reason, it seems to be randomly working for pigs. I will test Skeleton and Creeper during the night. Thanks for the help so far though just in case xD.
     
  7. Offline

    Zarius

    @XxZeroxX

    Nope - formatting's still out of alignment. Do all tree drops seem to work? Odd that pigs are randomly working, although there might be an issue with Permissions 3.1.6 - I'm looking into that tonight for someone else too.
     
  8. Offline

    Cultist O

    Yet another feature thought (tell me to go away if you want, lol) you have the "replacementblock" thing going on, would it be possible to replace an area of blocks? IE I want you to be able to turn cobble to moss-stone by using bone-meal on it, but I'd like it to turn all cobble within say 5 blocks into moss stone per use, (and of course use one bonemeal up.) Also is there a replace creature function? (for the click functions) I suppose a kill (or damage) creature function would allow you to just drop the new one
     
  9. Offline

    Celtic Minstrel

    There is no replace creature function, and I think replacing an area of blocks goes a little beyond the scope of this plugin; this plugin is primarily for specifying ways of getting items and secondarily for altering what happens when something is destroyed, not for specifying ways to change blocks.
     
  10. Offline

    Rofang

    I appreciate your quick response. Here's an update: I've switched to PermissionsBukkit / SuperPerms, and OtherBlocks' drops do work now, so long as I don't try to use the Permissions bridge (then we're back to ignoring the custom drops). But per where you said SuperPerms isn't supported yet, OtherBlocks doesn't appear to be returning negative permissions checks (they always return true even for a bogus node). This is good enough for me, though, as I wasn't using permission checks in my drops.

    Edit: Hmm, just noticed a number of other important plugins won't presently work without the bridge. Guess I'll need to wait to implement OtherBlocks.
     
  11. Offline

    XxZeroxX

    For the most part everything seems to be running fine. I really don't know what could be causing it since I honestly don't think I changed anything between asking for help. As of now though, everything seems to work fine. I will continue to use both Permissions files as long as they don't conflict for whatever reason. Thanks again! =)
     
  12. Offline

    gytis55

    I wanted to have sheep, which after being fed with a slime ball, explode shortly after with a few slimes dropping in.
    I tried this:
    Code:
        CLICKRIGHT-CREATURE_SHEEP:
          - tool: SLIME_BALL
            event: EXPLODE
            drop: CREATURE_SLIME
            quantity: 2-4
            damagetool: 1
            delay: 100
    But that just made sheep eat the slimeball and to... nothing.
    Is there any way I can make this work?
     
  13. Offline

    ClearTranquil

    Hi, I was running an older version of this plugin and upgraded today. I was sure to redo the config but some of them don't seem to be working like they were before. I'm listing no errors in the log and the /ob show returns the proper strings.

    For example, type "/ob show glass" returns "Block (20): dropgroup: # with: ANY drops: GLASS (100.0%) :

    However...glass doesn't drop when glass is broken. Why is this?
     
  14. Offline

    Rofang

    Sounds like my problem, which was caused by OtherBlocks not playing nicely with Permissions 3.16 (it's being looked into; above). Do you have that version of Permissions installed?
     
  15. Offline

    ClearTranquil

    That's the one.
     
  16. Offline

    Zarius

    Yup, looking into the issues with Permissions 3.16 - just gotta learn how to use it too :D
     
  17. Offline

    Rofang

    If it's of any use, I do believe OtherBlocks also misbehaved under SuperPermsBridge, but PermissionsEx lets it work again (while still allowing other Yeti-Permissions plugins to work). You still won't get permissions-specific drops under this scenario until OtherBlocks receives a fix, but I think it's a decent compromise for now.

    Edit: On another note, are ghast fireballs programmed too freakishly for OtherBlocks to handle? Because right now it seems no tool setting is detecting their explosion. I want to prevent ghast damage to the landscape, and WorldGuard's ghast-fireball region flag doesn't seem to be doing the trick.
     
  18. Offline

    Chronx6

    Permissions 3.16 seems to give a lot of issues from what I've heard. I know McMMO doesn't work well with it and I've seen a least a few other plugins listing issues. From what I've seen and messed with PermissionsEx is currently the way to go.
     
  19. Offline

    Zarius

    @Rofang

    Ghast fireballs are part of the upcoming 2.0 version (many thanks to Celtic Minstrel for working on a huge restructure - looks great so far :)).

    I should note that the projectile "shooter" detection only works with RB#1060 (for RB#1000 you could still likely just disable fireballs entirely, although that may conflict with another plugin using fireballs).

    Config might change a little but at this stage existing configs should still work fine (apart from CLICK-LEFT and CLICK-RIGHT, these will change).
     
  20. Offline

    Rofang

    Great to hear - thanks, Zarius. Would you be inclined to give us a spoiler on the intended click-left and click-right syntax? I'm using a personal database to keep track of my OtherBlocks plans (and auto-generate the yml), and I'd be glad to have the new method in mind as I plan.
     
  21. Offline

    Celtic Minstrel

    There are some other changes that will break configs; I think the most notable is the removal of SPECIAL_LEAFDECAY in favour of the new "action" field, which will also be used for specifying left and right click. (At present, the valid values for action are BREAK, LEFT_CLICK, RIGHT_CLICK and LEAF_DECAY, but BREAK may be changed.)

    Those are the only breaking changes I can think of off the top of my head. There may be a few keyword changes, but not many.
     
    Rofang likes this.
  22. Offline

    XXXtheGreat

    So, if I did:
    CLICKRIGHT-COBBLESTONE:
    - tool: FEATHER
    drop: GLOWSTONE
    It would work?
     
  23. Offline

    Celtic Minstrel

    @XXXtheGreat – You can try it, but I think you may need to use the cobblestone ID rather than the name.
     
  24. Offline

    Zarius

    @XXXtheGreat

    Celtic is correct - it needs to be "CLICKRIGHT-4". This will be fixed in version 2.0.
     
  25. Offline

    Moromillas

    Reporting Error:

    Using bukkitcraft 1060, OtherBlocks 1.93.

    In config file:
    Show Spoiler
    Code:
        WOOD_STAIRS:
            - drop: WOOD_STAIRS
              damagetool: 0


    Upon breaking wooden stairs, this is the error report in console:
    Show Spoiler


    Did see "spout" in the error report, using 1.0.2 of Spout.
     
  26. Offline

    Zarius

    I don't think the image link is working properly.
     
  27. Offline

    Moromillas

    Trying again.
    Show Spoiler
    [​IMG]
     
  28. Offline

    RugRats

    @Zarius so your removing RIGHT-CLICK and LEFT-CLICK and feel free to have me test the new features :p
     
  29. Offline

    Zarius

    Not removing, just making it easier to use :) Will definitely send you a test version when it's ready :)
     
    RugRats likes this.
  30. Offline

    Sh8kezula

    I have this method of nerfing mob traps. I was wondering what other ppl use.

    Code:
    defaults:
    otherblocks:
        CREATURE_ZOMBIE:
            - tool: ALL
              drop: DEFAULT
              toolexcept: [DAMAGE_ENTITY_EXPLOSION, DAMAGE_FIRE, DAMAGE_CONTACT, DAMAGE_DROWNING, DAMAGE_FALL, DAMAGE_SUFFOCATION]
            - tool: ALL
              drop: MONEY
              quantity: 0.50-4
              toolexcept: [DAMAGE_ENTITY_EXPLOSION, DAMAGE_FIRE, DAMAGE_CONTACT, DAMAGE_DROWNING, DAMAGE_FALL, DAMAGE_SUFFOCATION]
            - tool: [DAMAGE_ENTITY_EXPLOSION, DAMAGE_FIRE, DAMAGE_CONTACT, DAMAGE_DROWNING, DAMAGE_FALL, DAMAGE_SUFFOCATION]
              drop: AIR
    
    This seems to be working.

    bty Wonder full plugin... I love it.. Cant wait for the block drop changes to work on 1060. :)
     
  31. Offline

    Zarius

    I'll probably add a mob-farming-nerf config in the next version :)

    You can simplify that config like such:

    Code:
    aliases:
            - tool: &environ [DAMAGE_ENTITY_EXPLOSION, DAMAGE_FIRE,  DAMAGE_CONTACT, DAMAGE_DROWNING, DAMAGE_FALL, DAMAGE_SUFFOCATION]
    
    otherblocks:
        CREATURE_ZOMBIE:
            - tool: *environ
              drop: NOTHING
              exclusive: 1    # this means that if this drop occurs - none of the others for this creature will.
        # put any other drops here, don't need to put tool except
    
    What's wrong with the block drops? Or you mean the left/right click?
     

Share This Page