[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

    Not a stupid question - though it is answered on the wiki :) When first installed nothing will change at all unless you add your own drops or enable one of the included modules.

    @SabbyKat

    Here's a cleaned up start - note that "tool: ALL" is the default and doesn't need to be specified (as with quantity: 1 & chance: 100%). Using dropgroups saves you some lines too.

    The shortcut of using "drop: BONE/3-6/5%" isn't actually in the current version yet - just wanted to see how it would look and help improve readability.

    Also, I got the impression you want the drops to be "exclusive" - especially the multiple feather drops from zombies (without an "exclusive" option there's a chance that they will all drop).

    Show Spoiler
    Code:
    ## Beginning Player Drop List Event  - Special Player Events ##
    ##
    
    ##Zarius: I changed this bit from being 100% on each - otherwise you get two messages with 3 ghasts & 3 creepers spawning. This way you get a 50% chance of ghasts & 50% chance of creepers.
    
            PLAYER@Sabbykat:
                - drop: CREATURE_GHAST/3/50%
                  message: "Death to all who dare oppose our Empress! Kyehhhhh!"
                  exclusive: TRUE
                - drop: CREATURE_CREEPER@POWERED/3/100%
                  message: "Death to all who dare oppose our Empresssssss!"
    
    ## Beginning Player Drop List Event  - Day and Night time, normal ##
    ##
            PLAYER:
                - drop: DIAMOND/2/0.1%
                  message: ":o you find a Diamond in your foes bloodied Corpse!"
                - drop: TORCH/20/50%
                - drop: GOLD_INGOT/5/2.5%
                - drop: IRON_INGOT/10/5%
                - drop: GRILLED_PORK/3/25%
                - drop: CREATURE_ZOMBIE/1/100%
    
    ## Beginning Zombie Drop List Event  - Day, normal ##
    ##
    
            CREATURE_ZOMBIE:
              - dropgroup: day
                time: DAY
                drops:
                - drop: CREATURE_SKELETON
                - drop: FEATHER/1-3/50%
                - drop: FEATHER/3-5/25%
                - drop: FEATHER/5-8/12.5%
                - drop: FEATHER/8-25/1%
                - drop: STONE/5/2.5%
                - drop: SAPLING/1/1.3%
                - drop: GLASS/5/0.9%
                - drop: DISPENSER/1/0.9%
                - drop: POWERED_RAIL/3/0.5%
                - drop: PISTON_BASE/1/1.5%
                - drop: GRILLED_PORK/3/25%
                - drop: SAPLING/1/1.3%
                - drop: CHEST/2/1%
                - drop: TORCH/12/10%
                - drop: WOOL/10/1.5%
                - drop: FURNACE/1/2.5%
                - drop: BREAD/2/10%
                - drop: BOOK/1/5%
                - drop: MINECART/1/0.5%
                - drop: BED/1/1%
                - drop: BOOKSHELF/1/0.2%
                - drop: COOKIE/5/20%
                - drop: COAL/2/5%
                - drop: [IRON_SPADE, IRON_PICKAXE, IRON_SWORD, IRON_HOE, IRON_AXE]
                  chance: 0.5
    
    ## Beginning Zombie Drop List Event  - Night, normal ##
    ##
              - dropgroup: night
                time: NIGHT
                drops:
                - drop: CREATURE_SKELETON/1/20%
                - drop: FEATHER/1-3/50%
                - drop: FEATHER/3-5/25%
                - drop: FEATHER/5-8/12.5%
                - drop: FEATHER/8-25/1%
                - drop: STONE/5/2.5%
                - drop: SAPLING/1/1.3%
                - drop: GLASS/5/1.9%   # did you want this different from day drop?
                - drop: DISPENSER/1/0.9%
                - drop: POWERED_RAIL/3/0.5%
                - drop: PISTON_BASE/1/1.5%
                - drop: GRILLED_PORK/3/25%
                - drop: SAPLING/1/1.3%
                - drop: CHEST/2/1%
                - drop: TORCH/12/10%
                - drop: WOOL/10/1.5%
                - drop: FURNACE/1/2.5%
                - drop: BREAD/2/10%
                - drop: BOOK/1/5%
                - drop: IRON_SPADE, IRON_PICKAXE, IRON_SWORD, IRON_HOE, IRON_AXE
                  chance: 1.5       # did you want this different from day drop?
                - drop: MINECART/1/0.5%
                - drop: BED/1/2.5%  # day is 1.5%
                - drop: BOOKSHELF/1/0.2%
                - drop: COOKIE/5/20%
                - drop: COAL/2/5%
    
    
    ## Beginning Spider Drop List Event  - Day, normal ##
    ##
    
             CREATURE_SPIDER:
              - dropgroup: day
                time: DAY
                drops:
                - drop: STRING/3-6/50%
                - drop: STRING/6-10/25%
                - drop: STRING/10-18/12.5%
                - drop: STRING/30-64/1%
                - drop: WEB/1/0.2%
                - drop: PISTON_STICKY_BASE/1/0.5%
                - drop: LAPIS_BLOCK/1/2.5%
                - drop: MAP/1/1%
    
                - tool: GOLDEN_SWORD
                  drop: GLOWSTONE/1-3/0.8%
    
                - drop: IRON_HELMET, IRON_CHESTPLATE, IRON_LEGGINGS, IRON_BOOTS
                  chance: 0.5
    
                - drop: DIAMOND_HELMET, DIAMOND_CHESTPLATE, DIAMOND_LEGGINGS, DIAMOND_BOOTS
                  chance: 0.1
    
                - drop: GOLD_RECORD/1/0.001%
                - drop: GREEN_RECORD/1/0.001%
                - drop: BONE/1-3/5%
                  message: "I wonder what these belonged to..."
    
                - drop: WATCH/1/1.5%
                  message: "The Spider was clenching a golden Watch... always thought they told time by a hair past a leg!"
    
    ## Beginning Spider Drop List Event  - nIGHT, normal ##
    ##
    
              - dropgroup: night
                time: NIGHT
                drops:
                - drop: STRING/3-6/50%
                - drop: STRING/6-10/25%
                - drop: STRING/10-18/12.5%
                - drop: STRING/30-64/1%
                - drop: WEB/1/1.5  # day is 0.2%
                - drop: PISTON_STICKY_BASE/1/1.5%  # day is 0.5%
                - drop: LAPIS_BLOCK/1/2.5%
                - drop: MAP/1/1%
    
                - tool: GOLDEN_SWORD
                  drop: GLOWSTONE/1-3/0.1%
    
                - drop: IRON_HELMET, IRON_CHESTPLATE, IRON_LEGGINGS, IRON_BOOTS
                  chance: 1.5
    
                - drop: DIAMOND_HELMET, DIAMOND_CHESTPLATE, DIAMOND_LEGGINGS, DIAMOND_BOOTS
                  chance: 0.5
    
                - drop: GOLD_RECORD/1/0.01%
                - drop: GREEN_RECORD/1/0.01%
    
                - drop: BONE/3-6/5%
                  message: "I wonder what these belonged to..."
    
                - drop: WATCH/1/1.5%
                  message: "The Spider was clenching a golden Watch... always thought they told time by a hair past a leg!"
    
    


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

    SabbyKat

    Ahhh, thank you so much.

    Yes, I put the chance, and rates, etc etc in JUST in case. as I said, I was trying to be thorough and not miss a tag or two.

    So wait, 9 spaces instead of 8? Where are these type of rules? lol I can't count lines very well since well, they're not really something you can measure easily... :p as I heard mention of 'at least 4 SPACES' nothing about 8 or less or more.

    Once again, thank you. I see it can be refined a great deal and save me a BUTTLOAD of coding. Mucho appreciated.

    Though... if this 'manner of formating' doesn't work, isn't this config useless to me? :p
     
  4. Offline

    Zarius

    Search for yaml formatting? However all you really need to know is that each "block" needs to be indented (usually 4 spaces - cannot use tabs) the same amount. You're using 8 spaces which is fine but that means each CREATURE/BLOCK: bit needs to be indented the same.

    The new abbreviated format for drop is planned for release (hopefully in the next few days).
     
  5. Offline

    EMOberger

    Haven't forgotten about commands on death have you? :]
     
  6. Offline

    Zarius

    Nope - just lots of other things to do first (including RL) :) I've got permission from RabidCrab (many thanks) to use the command code from the "Vote" plugin so should be able to integrate that soon.
     
  7. Offline

    EMOberger

    OK, thank you! I was just making a friendly reminder :D
     
  8. Offline

    gytis55

    Hello, at first I'd like this awesome plugin.
    Secondly, the ob-ore_extraction.yml file, it works fine except for one thing: You can mine any ore specified there with any pickaxe. Because you forgot to specify which picks need to be used :p
     
  9. Offline

    Zarius

    Oops :D Thanks, will look into that :)

    @EMOberger

    Commands working in local build :D
     
  10. Offline

    gytis55

    I already fixed it :D
    Code:
    defaults:
    
    otherblocks:
        # The goal of this module is to allow a server to set ore to seem to be "extracted"
        # from stone, leaving behind the stone.  Drops should all equal the default drops
        # (as replacementblock doesn't work with drop: DEFAULT)
    
        COAL_ORE:
            - replacementblock: STONE
              drop: COAL
        IRON_ORE:
            - replacementblock: STONE
              drop: IRON_INGOT
              tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
        GOLD_ORE:
            - replacementblock: STONE
              drop: GOLD_INGOT
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        DIAMOND_ORE:
            - replacementblock: STONE
              drop: DIAMOND
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        LAPIS_ORE:
            - replacementblock: STONE
              drop: DYE@BLUE
              quantity: 4-8
              dropspread: true
              tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
        REDSTONE_ORE:
            - replacementblock: STONE
              drop: REDSTONE
              quantity: 4-5
              dropspread: true
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        GLOWING_REDSTONE_ORE:
            - replacementblock: STONE
              drop: REDSTONE
              quantity: 4-5
              dropspread: true
              tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
     
  11. Offline

    Zarius

    @gytis55

    Me too :) Couple of differences - you need ANY_PICKAXE on coal, otherwise breaking it with anything (eg. spade, axe, wool) will give you coal. Didn't think that lapis and redstone could be collected with a stone pickaxe.

    Show Spoiler
    Code:
        COAL_ORE:
            - replacementblock: STONE
              drop: COAL
              tool: ANY_PICKAXE
        IRON_ORE:
            - replacementblock: STONE
              drop: IRON_INGOT
              tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
              
        GOLD_ORE:
            - replacementblock: STONE
              drop: GOLD_INGOT
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        DIAMOND_ORE:
            - replacementblock: STONE
              drop: DIAMOND
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        LAPIS_ORE:
            - replacementblock: STONE
              drop: DYE@BLUE
              quantity: 4-8
              dropspread: true
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        REDSTONE_ORE:
            - replacementblock: STONE
              drop: REDSTONE
              quantity: 4-5
              dropspread: true
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
        GLOWING_REDSTONE_ORE:
            - replacementblock: STONE
              drop: REDSTONE
              quantity: 4-5
              dropspread: true
              tool: [IRON_PICKAXE, DIAMOND_PICKAXE]
    
     
  12. Offline

    gytis55

    Okay, but lapis CAN be broken with stone pick.

    Doublepost, but
    Also, a mcMMO support would be nice.
    Like requiring a cerain level to get the drop, and getting specified xp on a certain level when the drop is initialized, drop chance differences by the level(ex. 1% at level 0-50 mining, 3% at 51-100... OR maybe...
    chance = certain skill level * something...
    many features in it :))
    It would be very nice, but I won't be surprised if you refuse to do it, I imagine coding as hard work.

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

    Zarius

    New version - download here

    Version 1.9 beta1 (2011/08/09)
    * runcommands - allows you to specify commands to run if the conditions are met. Start command with "*" to run as first OP in ops.txt, start with "!*" to suppress OP messages being sent to player (send to console instead), "%p" will be substituted with players name
    * /ob profile - for debugging/speed testing (example usage: /ob profile on, break some blocks, /ob profile blockbreak, /ob profile drops, /ob profile off)
    * FORCETREE - will create a tree on almost anything (excludes things with contents - chest, furnaces and dispensers)
    * damagetool removes items (eg. rightclick with bonemeal, remove 1 or 2 or x bonemeal)
    * fixed ore_extraction - now enforces correct pickaxes
    -- 1.9 alpha changes:
    * left/rightclick blocks
    * rightclick entities
    * shear/unshear/sheartoggle events

    Example of runcommands (another odd example :D)

    Code:
        GLASS:
            - drop: APPLE
              time: DAY
              runcommands: ["!*time night", "msg %p Done"]
              event: FORCETREE@TREE
            - drop: DIAMOND
              runcommands: "/time day"
              time: NIGHT
    
    I've got a fairly large test config that I checked things with but I could have missed things - let me know if you have any issues.

    I have definitely considered this (was planning on writing my own skills plugin in the past) - I'd prefer the formula way but it would be tricky. Anyone with plugin skills & time is welcome to send me a patch :D

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

    gytis55

    Ooh, nice. Good work.
    Now I can feed leaves to sheep to get more wool xDD
     
  15. Offline

    Zarius

    Almost :D Will need to wait until version 2 before it works properly. Problem is that you can't specify "CREATURE_SHEEP@SHEARED"... It is a feature I'm working towards though.
     
  16. Offline

    gytis55

    Wouldn't this just work?:
    Code:
        CLICKRIGHT-CREATURE_SHEEP:
          - tool: LEAVES
            damagetool: 1
            event: UNSHEAR
     
  17. Offline

    Zarius

    @gytis55

    Doh - of course it would :D You can also add "delay: 100" or something if you don't want the wool coming straight back.

    It's the "SHEAR" event that has issues - because it will work on both shorn and unshorn sheep, but the shears tool will still work fine.
     
  18. Offline

    gytis55

    Installed the new update, before that backuped my config, and I get this error:
    Code:
    [SEVERE] Could not load 'plugins\OtherBlocks.jar' in folder 'plugins':
    java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:173)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:207)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:130)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:128)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:97)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:51)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:132)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NoClassDefFoundError: com/sk89q/worldedit/Vector
        at com.gmail.zariust.bukkit.otherblocks.OtherBlocks.<init>(OtherBlocks.java:180)
        ... 13 more
    Caused by: java.lang.ClassNotFoundException: com.sk89q.worldedit.Vector
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
        at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 14 more
    Probably my fault xD
    I also run:
    ChopTree
    DwarfForge
    mcMMO
     
  19. Offline

    Zarius

    Possibly my fault :) Do you run WorldEdit and/or WorldGuard?
     
  20. Offline

    gytis55

    Nope, only those three that I mentioned.
    And it doesn't also work with a fresh setup with only bukkit and OtherBlocks.
     
  21. Offline

    Zarius

    Yeah, I removed WorldGuard & WorldEdit and get that error. Adding WorldEdit back in fixed it - will try and fix.
     
  22. Offline

    gytis55

    Another Idea hit me:
    Modifying furnace cookable items, fuels and results.
    Could make planks smelt 8 items like coal...
    Or smelt 1 sand for 2 glass xD
    This plugin has INFINITE POSSIBILITIES.
     
  23. Offline

    Zarius

    @gytis55

    Worked it out - redownload beta version for the fix.

    Modifying furnace (and even crafting) recipes is probably best left to other plugins - I know there's a few good crafting ones out there, should be some furnace ones too.
     
  24. Offline

    Haliotro

    Hello,
    I manage a hardcore survival server and I'm looking for a more efficient way to manage limited resource drop rates. I've recently stumbled across this plugin and think that it has awesome potential and will help me replace about 6 other plugins that I'm using.

    In order to disable default drops and then have a variety of other potential drops come from various tools, I decided that dropgroups was probably the way to go because it does a good job of organizing the information. Unfortunately, I haven't seen many examples of it yet and am wondering if someone savvy at this plugin could tell me where it that I'm going wrong in my approach. Here's some sample code so far:


    Code:
      LOG:
        - dropgroup: treepuncher
          tool: ANY
          toolexcept: ANY_AXE
          drops:
              - drop: WOOD
                chance: 8
              - drop: STICK
                chance: 3
                quantity: 1-2
        - dropgroup: woodchopper
          tool: WOOD_AXE
          damagetool: 2
          drops:
              - drop: LOG
                chance: 5
                quantity: 1
              - drop: WOOD
                chance: 20
                quantity: 1
              - drop: STICK
                chance: 8
                quantity: 1-2
        - dropgroup: stonechopper
          tool: STONE_AXE
          damagetool: 3
          drops:
              - drop: LOG
                chance: 8
                quantity: 1
              - drop: WOOD
                chance: 25
                quantity: 1
              - drop: STICK
                chance: 10
                quantity: 1-2
        - dropgroup: ironchopper
          tool: IRON_AXE
          damagetool: 5
          drops:
              - drop: LOG
                chance: 15
                quantity: 1
              - drop: WOOD
                chance: 35
                quantity: 1
              - drop: STICK
                chance: 15
                quantity: 1-2
        - dropgroup: diamondchopper
          tool: DIAMOND_AXE
          damagetool: 8
          drops:
              - drop: LOG
                chance: 35
                quantity: 1
              - drop: WOOD
                chance: 65
                quantity: 1-2
              - drop: STICK
                chance: 35
                quantity: 1-3
        - dropgroup: goldchopper
          tool: GOLD_AXE
          damagetool: 1
          drops:
              - drop: LOG
                chance: 75
                quantity: 1-5
              - drop: WOOD
                chance: 75
                quantity: 2-6
              - drop: STICK
                chance: 75
                quantity: 2-6

    Any feedback you can provide me to get me in the right direction would be greatly appreciated. Also, if you know a more efficient way to do this, please let me know.

    P.s Here was my first attempt before using dropgroup. As you can see, it's not only a lot clunkier, but it did not work completely either. I kept getting higher drop rates than expected for each tool type:


    Code:
      LOG:
        - drop: NOTHING
        - tool: WOOD_AXE
          drop: LOG
          damagetool: 1
          chance: 10
          quantity: 1
        - tool: STONE_AXE
          drop: LOG
          damagetool: 1
          chance: 15
          quantity: 1
        - tool: IRON_AXE
          drop: LOG
          damagetool: 1
          chance: 20
          quantity: 1
        - tool: DIAMOND_AXE
          drop: LOG
          damagetool: 1
          chance: 30
          quantity: 1
        - tool: GOLD_AXE
          drop: LOG
          damagetool: 1
          chance: 100
          quantity: 1-6
        - tool: ANY
          drop: WOOD
          damagetool: 0
          chance: 15
          quantity: 1
        - tool: ANY
          drop: WOOD
          damagetool: 0
          chance: 10
          quantity: 1
        - tool: WOOD_AXE
          drop: WOOD
          damagetool: 0
          chance: 5
          quantity: 1
        - tool: STONE_AXE
          drop: WOOD
          damagetool: 0
          chance: 10
          quantity: 1
        - tool: IRON_AXE
          drop: WOOD
          damagetool: 0
          chance: 15
          quantity: 1-2
        - tool: DIAMOND_AXE
          drop: WOOD
          damagetool: 0
          chance: 25
          quantity: 1-2
        - tool: GOLD_AXE
          drop: WOOD
          damagetool: 0
          chance: 100
          quantity: 1-6
        - tool: ANY
          drop: STICK
          damagetool: 0
          chance: 20
          quantity: 1-2
        - tool: WOOD_AXE
          drop: STICK
          damagetool: 0
          chance: 5
          quantity: 1
        - tool: STONE_AXE
          drop: STICK
          damagetool: 0
          chance: 10
          quantity: 1
        - tool: IRON_AXE
          drop: STICK
          damagetool: 0
          chance: 15
          quantity: 1-2
        - tool: DIAMOND_AXE
          drop: STICK
          damagetool: 0
          chance: 25
          quantity: 1-2
        - tool: GOLD_AXE
          drop: STICK
          damagetool: 0
          chance: 100
          quantity: 1-6
    Thank you! This is an amazing plugin from what I can tell so far.
     
  25. Offline

    Zarius

    @Haliotro

    Looks great so far - good use of the dropgroups :) Keep in mind that unless you set a drop as exclusive it will drop if it's conditions are met along with any other drops that have also met conditions. Eg:

    Code:
      GRASS:
        - drop: APPLE
          chance: 50%
        - drop: EGG
          chance: 50%
    
    This doesn't mean a 50/50 chance of apples and eggs. It first tests apples for a successfull "roll" of 50%, then tests eggs for a 50% chance - so there's still a good chance that both will drop or none will drop. This can be good in some scenarios (eg. my leaf overhaul where multiple things can drop but with small chances). Otherwise use the exclusive option:

    Code:
      GRASS:
        - drop: APPLE
          chance: 50%
          exclusive: true
        - drop: EGG
          chance: 100%
    
    Hence an egg will drop 100% of the time, UNLESS the apple drops (50% of the time). So this would be a 50/50 drop.
     
  26. Offline

    Haliotro

    Wow, thanks for the fast reply!

    Yes, I would like the chance of multiple things to drop as in planks and sticks falling at the same time.

    Ok, so I could not get that previous code to work, but following an outline by someone else in this thread, here's what I'm using now:


    Code:
      LOG:
      - dropgroup: chopper
        exclusive: 0
        chance: 100
        drops:
    
         - tool: ANY
           drop: WOOD
           chance: 8
           exclusive: 0
    
         - tool: ANY
           drop: STICK
           chance: 3
           quantity: 1-2
           exclusive: 0
    
    
         - tool: WOOD_AXE
           tooldamage: 2
           drop: LOG
           quantity: 1
           chance: 5.0
           exclusive: 1
    
    
         - tool: WOOD_AXE
           tooldamage: 2
           drop: WOOD
           quantity: 1
           chance: 20.0
           exclusive: 1
    
    
         - tool: WOOD_AXE
           tooldamage: 2
           drop: STICK
           quantity: 1-2
           chance: 8.0
           exclusive: 1
    
    
         - tool: STONE_AXE
           tooldamage: 3
           drop: LOG
           quantity: 1
           chance: 8.0
           exclusive: 2
    
    
         - tool: STONE_AXE
           tooldamage: 3
           drop: WOOD
           quantity: 1
           chance: 25.0
           exclusive: 2
    
    
         - tool: STONE_AXE
           tooldamage: 3
           drop: STICK
           quantity: 1-2
           chance: 10.0
           exclusive: 2
    
    
         - tool: IRON_AXE
           tooldamage: 5
           drop: LOG
           quantity: 1
           chance: 15.0
           exclusive: 3
    
    
         - tool: IRON_AXE
           tooldamage: 5
           drop: WOOD
           quantity: 1
           chance: 35.0
           exclusive: 3
    
         - tool: IRON_AXE
    
           tooldamage: 5
           drop: STICK
           quantity: 1-2
           chance: 15.0
           exclusive: 3
    
         - tool: DIAMOND_AXE
           tooldamage: 8
           drop: LOG
           quantity: 1
           chance: 35.0
           exclusive: 4
    
    
         - tool: DIAMOND_AXE
           tooldamage: 8
           drop: WOOD
           quantity: 1-2
           chance: 65.0
           exclusive: 4
    
    
         - tool: DIAMOND_AXE
           tooldamage: 8
           drop: STICK
           quantity: 1-3
           chance: 35.0
           exclusive: 4
    
    
         - tool: GOLD_AXE
           tooldamage: 1
           drop: LOG
           quantity: 1-5
           chance: 75.0
           exclusive: 5
    
    
         - tool: GOLD_AXE
           tooldamage: 1
           drop: WOOD
           quantity: 2-6
           chance: 75.0
           exclusive: 5
    
    
         - tool: GOLD_AXE
           tooldamage: 1
           drop: STICK
           quantity: 2-6
           chance: 75.0
           exclusive: 5

    Everything seems to work with 2 exceptions.
    1. I can't get it to behave properly for the initial - tool: ANY (where there is a really low drop rate of either plank and/or sticks)
    Should the list be in reverse order so that the - tool: ANY is only calculated if no other option is calculated first?
    Currently, the logs are just dropping DEFAULT whenever they are broken by anything except one of the listed axes.

    2. The problem I'm having with the - tool: ANY components is inflating the chance of dropping LOG on the axes.

    Any quick advice? Thanks!




    EDIT:

    I added the following node to the drop group:


    - tool: ALL
    drop: NOTHING


    Now everything works as expected. Thank you.

    So here's my fully functional example for anyone else who gets stuck like I did:
    Code:
      LOG:
      - dropgroup: chopper
        exclusive: 0
        chance: 100
        drops:
    
         - tool: ALL
           drop: NOTHING
    
         - tool: ANY
           drop: WOOD
           chance: 8
           exclusive: 0
    
         - tool: ANY
           drop: STICK
           chance: 3
           quantity: 1-2
           exclusive: 0
    
         - tool: WOOD_AXE
           tooldamage: 2
           drop: LOG
           quantity: 1
           chance: 5.0
           exclusive: 1
    
         - tool: WOOD_AXE
           tooldamage: 2
           drop: WOOD
           quantity: 1
           chance: 20.0
           exclusive: 1
    
         - tool: WOOD_AXE
           tooldamage: 2
           drop: STICK
           quantity: 1-2
           chance: 8.0
           exclusive: 1
    
         - tool: STONE_AXE
           tooldamage: 3
           drop: LOG
           quantity: 1
           chance: 8.0
           exclusive: 2
    
         - tool: STONE_AXE
           tooldamage: 3
           drop: WOOD
           quantity: 1
           chance: 25.0
           exclusive: 2
    
         - tool: STONE_AXE
           tooldamage: 3
           drop: STICK
           quantity: 1-2
           chance: 10.0
           exclusive: 2
    
         - tool: IRON_AXE
           tooldamage: 5
           drop: LOG
           quantity: 1
           chance: 15.0
           exclusive: 3
    
         - tool: IRON_AXE
           tooldamage: 5
           drop: WOOD
           quantity: 1
           chance: 35.0
           exclusive: 3
    
         - tool: IRON_AXE
           tooldamage: 5
           drop: STICK
           quantity: 1-2
           chance: 15.0
           exclusive: 3
    
         - tool: DIAMOND_AXE
           tooldamage: 8
           drop: LOG
           quantity: 1
           chance: 35.0
           exclusive: 4
    
         - tool: DIAMOND_AXE
           tooldamage: 8
           drop: WOOD
           quantity: 1-2
           chance: 65.0
           exclusive: 4
    
         - tool: DIAMOND_AXE
           tooldamage: 8
           drop: STICK
           quantity: 1-3
           chance: 35.0
           exclusive: 4
    
         - tool: GOLD_AXE
           tooldamage: 1
           drop: LOG
           quantity: 1-5
           chance: 75.0
           exclusive: 5
    
         - tool: GOLD_AXE
           tooldamage: 1
           drop: WOOD
           quantity: 2-6
           chance: 75.0
           exclusive: 5
    
         - tool: GOLD_AXE
           tooldamage: 1
           drop: STICK
           quantity: 2-6
           chance: 75.0
           exclusive: 5

    2nd EDIT:

    For anyone else looking at this example, I have realized two mistakes that I made so take note:
    1. tooldamage should be damagetool. That was just a misspelling.
    2. The damagetool is only applied upon successful event. Thus, to make tools lose durability as they should even with an unsuccessful drop, you will need to add nodes such as this for each tool and block drop:


    - tool: STONE_AXE
    damagetool: 3
    drop: NOTHING
    exclusive: 2

    Damagetool does not appear to stack so if you put this first, it will have 100% chance of applying the damage to your tool and will ignore all future damagetool effects. Just to be safe though, I set damagetool to 0 for all other instances of the same tool on each block type.
     
  27. Offline

    mefisto1542

    Do i need to replace any .yml file when i update to 1.9beta?

    PS: Boats work for me now :D thx
     
  28. Offline

    Zarius

    Hmm - the dropgroups should work. Will look into this - basically you should be able to take the common bits (tool/tooldamage) out into the dropgroup so you don't need to keep repeating it. Also note that those "exclusive" tags aren't really necessary as each of the groups you set as exclusive (1,2,3,4,5) are already exclusive due to the tool type.

    The only one that's changed is the ore_extraction one.
     
  29. Offline

    enelar

    replacementblock: DEFAULT

    means that block will replaced by itself. (same block)

    STONE:
    - ANY
    replacementblock: DEFAULT
    drop: AIR

    - ANY_PICKAXE

    means - by pickaxe will drop cobblestone, else nothing droped and block replaced by STONE (by itself)

    I beieve it would work:

    Code:
        ALIASES:
            - &wrongtool
              tool: ANY
              replacementblock: DEFAULT
              exclusive: wrong
            - &atata
              damageattacker: 20
              tool: ANY
              drop: AIR
              toolexcept: [ANY_SPADE, ANY_AXE, ANY_HOE, ANY_PICKAXE]
              replacementblock: DEFAULT
              message: "WTF! Wrong item... Non RP playing..."
              exclusive: atata
            - &damageall
              tool: ALL
              drop: AIR
              replacementblock: DEFAULT
              message: "Oh, my fingers!"
              damageattacker: 1
            - &defaultdrop
              tool: ALL
              drop: DEFAULT
              chance: 5
            - &specitem
              tool: ALL
              drop: DEFAULT
              chance: 100
              exclusive: 1
            - &dropstone
              tool: ANY_PICKAXE
              drop: COBBLESTONE
              exclusive: 1
    
        COAL_ORE:
            - <<: *wrongtool
              toolexcept: ANY_PICKAXE
            - <<: *damageall
              damageattacker: 8
            - <<: *atata
            - <<: *dropstone
            - <<: *specitem
              tool: ANY_PICKAXE
              chance: 40
              permissions: race_a.COAL_ORE
            - <<: *specitem
              tool: ANY_PICKAXE
              chance: 60
              permissions: race_h.COAL_ORE
            - <<: *specitem
              tool: ANY_PICKAXE
              chance: 60
              permissions: race_t.COAL_ORE
              - <<: *specitem
              tool: ANY_PICKAXE
              chance: 5
              permissions: race_r.COAL_ORE
    
    1) With figers - damage attacker, nothing changed with block. (damageall)
    2) On wrong tool - nothing changed with block. (wrongtool)
    3) On pickaxe, each race individual chance to drop, always drops cobblestone.
    4) Kill player else. (Brocken with dirt, sand, fish, seeds, etc)

    Right?

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

    Zarius

    You can use "drop: DENY".
     
  31. Offline

    Derf321

    Is there a way to make it so when a player dies from natural causes (falldamage, fire, lava, drowning, suffocation), that they respawn with their inventory, and do not drop anything?
     

Share This Page