[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

    Zarius

    Yeah, I figured that a lot out commands you might want to run on a block break or creature kill would require ops, but don't know how common it is for commands to want to run from a player only. Perhaps with the new permissions you could specify what permissions you want the "command runner" to have.

    Would be interested in what bits could be improved with a revamp, feel free to pm me our post them here. I'm always trying to make it simpler but can't always see how :)
     
  3. Offline

    Dothackking

    How can I completely disable drops from mobs with this plugin? I don't want to have two plugins both modifying drops :D
    edit:
    Also, do I just set a block's drop to blank if I want it to drop nothing?
     
  4. Offline

    Zarius

    If you don't add any configuration for mobs then the onEntityDamage/Death events don't do anything so no need to worry - same with blocks (no drops from blocks configured = no code run in those events).

    Edit: also note that if you do have some block or mob drops then the code run is a quick check of the mob or blocktype in question against the set of drops configured - if no drop is found the function exits.

    Example for dropping nothing:
    Code:
      COBBLESTONE:
        - drop: NOTHING
    
     
  5. Offline

    enelar

    Lolz! Thanks!!
     
  6. Offline

    SabbyKat

    Well, I'm back after trying every bloody thing I can possibly imagine that would cause issue with this plugin.

    YAML checker gives 0 errors.

    The backend shows it loading (some) drops.

    Yet... nothing drops. Profile setting to debug, shows nothing at all, ever.

    The config is IDENTICAL to the one you posted (bar fixing a few of your errors in it). >.<

    The few things I can note of oddities beside no drops, is it is seemingly only loading Zombie and Spider drops, that's all it shows in the log.

    I've also seen it mention 'ZOMBIE no drop' in the logs, at seemingly random points when mobs are even disabled... *sigh* help? ._. this is driving me bloody crazy, spent another sleepless night trying to fix this.
     
  7. Offline

    Zarius

    Rather than trying to get the whole thing working at once you should try just adding a single block and single creature and see what happens - if that doesn't work then you know something's wrong and it's a lot quicker that way.

    Thanks for alerting me to the "nodrop: CREATURE_ZOMBIE" message - that's a debug message I accidentally left in that appears when the player is set to drop something (in this case you've set the player to drop a zombie) when dying. It will be fixed in the next release.

    Not sure what you mean by "profile setting to debug" - for a heap more debug messages you can set "verbosity" to "highest" or "extreme".

    Can you post the exact config file you used? That way I can test it directly myself and let you know what's wrong. Without the file I cannot determine anything - my local tests are working and it seems to be working ok for other players.
     
  8. Offline

    SabbyKat

    Verbosity gives 0 error messages at 'extreme', no extra information at all, which is puzzling. Though mcmyadmin may filter it (gonna check config later, might stick it in some random darn log knowing it).

    I attached the 'test' config I was using, seeing if perhaps using a stand-alone .YML that is turned on via the global config, instead of pasting it inside the config, would help, but it changed nothing.

    Also, I did test with just one mob, dropping a single entity, with a clarified YML error checker, saying it was fine, yet still no errors, no drops, notta. and Yes, I tested it extensively (over 100 subjects, 3 players of different 'status', etc etc) and all the same result >.<

    Edit:

    OK. WHAT THE F**K?! X.X I have a bloody log on the day I extensively tested otherblocks, and it's over 20 GIGABYTES BIG!!! that's just freaking letters and words! Omfg. Explains some issue on the server too.

    I'm going to purge these logs, and run a fresh start, and test the hell out of it with verb on extreme, then post what I get here.

    Edit2:

    Getting spammed to no end with this, filled my entire console after I turned verb to extreme (prior, it showed absolutely nothing error wise).
     

    Attached Files:

  9. Offline

    Zarius

    @SabbyKat

    Yup - extreme is called that for a reason :D Will take a look at the files soon.

    20GB previously without the extreme??


    edit: Yup - it's something in that config, tested it on my server and it doesn't work whereas my own extensive config does work - looking into the issue.

    edit2: Found the issue - OtherBlocks doesn't support lists for drops (eg. drop: IRON_SPADE, IRON_PICKAXE, IRON_SWORD, IRON_HOE, IRON_AXE) and doesn't gracefully deal with them if found. I do plan to use lists for drops eventually but will just add some error checking for now. (don't know why you weren't getting errors though - I was getting nullpointerexception errors with your config)
     
  10. Offline

    Dothackking

    Can I make two drops for one tool and one block? Ex: Sand dropping sand AND gunpowder (50% chance) both with "all" tools
    Edit:
    Also, what is the name for gunpowder? I can't get it to find it.
     
  11. Offline

    Zarius

    You want sand to drop sand all the time and gunpowder (SULPHUR) 50% of the time?

    Code:
      SAND:
        - drop: SAND
          tool: ALL   # don't really need this line, as the default is ALL anyway
        - drop: SULPHUR
          chance: 50%
    
     
  12. Offline

    Dothackking

    Ah, I see. I misspelled sulphur...lol. Thanks
     
  13. Offline

    Celtic Minstrel

    Sulfur is a perfectly valid spelling; it's just not the one the Bukkit team chose.
     
  14. Offline

    EMOberger

  15. Offline

    Zarius

    Yeah, that would be tricky without modifying the other plugin. I might make an API that other developers could use at some point (they could perhaps add an "action type" into OtherBlocks which you could use in the config).
     
  16. Offline

    EMOberger

    figured as much :[
    well hope the future is good :]
     
  17. Offline

    gytis55

    Uh, I wanted to know one thing:
    Code:
        CLICKRIGHT-STATIONARY_LAVA:
          - tool: BUCKET
            replacementblock: STATIONARY_LAVA
            event: ???
    What to input instead of the ??? to make it take the lava, and the STATIONARY_LAVA would replace the picked up lava, resulting in infinite lava, or is it not possible yet?
     
  18. Offline

    Zarius

    Hmm... not possible yet - there's not an option for replacing the item in hand.
     
  19. Offline

    Dark_Balor

    @Zarius : don't know if it could help. But a fireball is a projectile and in my plugin (AdminCmd) I setted the launcher to be the player ... who launched the fireball.

    Then you can get if the fb was launched by a ghast or a player.

    For the vulcan ... well explosion at see, only deal BLOCK_EXPLOSION damage.
    For the lighting first is : LIGHTNING, but it's very rare that the strike kill the player, more likely the fire that is created by the lightning.
     
  20. Offline

    Celtic Minstrel

    I suppose [UN]FILL, maybe, as an idea. Though, I think infinite lava would be better handled by physics than by bucket filling.

    Another possibility is handling the bucket empty/fill events.
     
  21. Offline

    RugRats

    @Zarius
    Horrible Bug due to the new clicking update. Hard to explain so I made this laggy video for you:)

     
  22. Offline

    Zarius

    I figured it would be easier and more flexible to replace the item in hand - that way you could have a surreal world where lava gives you a bucket of milk, or people could come up with better ideas than me :D

    Ah, thanks for that - I know what it is. "damagetool" defaults to 1 if it's not set therefore if you set a config for the clicking on blocks it'll default to damaging tools or removing items as per your video.

    Fixed in a local build - will release when I can.
     
  23. Offline

    RugRats

    Or you can send me a secret message with the DL link :) I really need it.
     
  24. Offline

    Piercing Goblin

    I get an error message when I use this config file:
    Code:
    otherblocks:
        CREATURE_ZOMBIE:
            - tool: GOLD_SWORD
              drop: SLIME_BALL
              chance: 30
              message: ["You wipe the slime from your sword."]
        CREATURE_PIG_ZOMBIE:
            - tool: [ANY_SWORD, BOW, ARROW]
              drop: GOLD_SWORD
              chance: 100
              message: ["The sword drops to the ground undamaged."]
        CREATURE_SKELETON:
            - tool: ANY
            drop: arrow
            quantity: 4-5
            chance: 5
            message: ["You manage to scavenge a few more arrows from the dead skeleton"]
        NETHERRACK:
            - tool: IRON_PICKAXE
            drop: SAND
    This is a readout of my server

    Code:
    21:59:59 [INFO] [OtherBlocks:1.91] Couldn't load WorldGuard.
    21:59:59 [INFO] [OtherBlocks:1.91] No values found in config file!
    21:59:59 [INFO] [OtherBlocks:1.91] BLOCK: SHEARS + LEAVES now drops 1.0x APPLE@ with 2.5% chance
    21:59:59 [INFO] [OtherBlocks:1.91] CONFIG: apple.yml loaded.
    21:59:59 [INFO] [OtherBlocks:1.91] BLOCK: ALL TOOLS + PLAYER now drops 1.0x ZOMBIE@
    21:59:59 [INFO] [OtherBlocks:1.91] CONFIG: playerzombies.yml loaded.
    21:59:59 [SEVERE] Error occurred while enabling OtherBlocks v1.91 (Is it up to date?): while parsing a block collection; expected <block end>, but found Key
     
  25. Offline

    Zarius

    Looks like your spacing is out, you need to make sure that the d in"drop"lines up with the t in "tool".
     
  26. Offline

    lauris3722

    Pork gives error..

     
  27. Offline

    Zarius

    Odd, not sure why that would be, will test it out on my server later.
     
  28. Offline

    Piercing Goblin

    Is there any option or way to make it so (for instance) I have a zombie drop a slime with a 10% chance, but also have it default drop its feathers even if it drops the slime?
     
  29. Offline

    Celtic Minstrel

    In that case, just making it drop slime with 10% chance should be sufficient.
     
  30. Offline

    Piercing Goblin

    Okay, and what if I want the reverse? If it drops a slime, have it drop only a slime?
     
  31. Offline

    Zarius

    Try:
    Code:
        CREATURE_ZOMBIE:
            - drop: DEFAULT
    
            - drop: CREATURE_SLIME
              chance: 10%
              exclusive: 1
    
     

Share This Page