[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

    notjerem

    What version of OtherDrops & Bukkit are you using? Also, are there any errors on startup perhaps?

    Can you type "/od show creeper" in game and tell me what it says?
     
  3. Offline

    Shougunner

    Hey I was wondering if you could give a me a hand real quick. Basically I'm trying to raise the health of zombies for when they spawn. This is what I got so far but it doesn't appear to be working.

    CREATURE_ZOMBIE@100H:
    - drop: [367/0-2/100%, XP/50]
    - action: HIT
    tool: PROJECTILE_ARROW
    damage.victim: -10
    message.attacker: ["&cArrows have no effect on zombies!"]
    - action: LEFT_CLICK
    tool: [ANY_BLOCK,ANY_ITEM]
    message.attacker: ["&cDicks!"]
    potioneffects.attacker: [SLOW@100@2]

    Thanks in advance.
     
  4. Offline

    Zarius

    Shougunner

    that should set the drops for the stronger zombie but to make the zombie drop you need something like this:

    PHP:
      zombie:
        - 
    actionmobspawn
          drop
    zombie@100H
          chance
    20#  or whatever percent you want
     
  5. Offline

    Shougunner

    Zarius

    I'm actually just spawning in the zombies using essentials. But for some reason the max health still doesn't appear to be working.
     
  6. Offline

    Zarius

    Shougunner

    Spawning them in with higher health with Essentials or wanting OtherDrops to change the health? Because the config you posted doesn't change the health, it just defines what a higher health zombie will drop.

    If you want the higher health change to apply to custom only spawns (can't identify only Essentials spawns) you can try:

    PHP:
      zombie:
        - 
    actionmobspawn
          drop
    zombie@100H
          spawnedby
    CUSTOM
          chance
    20%
     
  7. Offline

    Shougunner

    Zarius

    Well I figured it doesn't matter how they are spawned in (whether it's essentials, naturally or spawn egg) I was just trying to change the health it spawns in with.

    Also it seems I can't figure out a method spawning giants naturally (for example in a certain biome or at night).
     
  8. Offline

    Zarius

    Shougunner

    Well, that's exactly what my first example did (20% chance of replacing a zombie no matter how it spawned in) - did you try it?

    Example with giants in desert biome at night:

    PHP:
      zombie:
        - 
    actionmobspawn
          drop
    giant
          chance
    10%
          
    biomedesert
          time
    night
          spawnedby
    NATURAL
    To get a natural spawn you need to replace an existing natural spawn, eg. zombie, skeleton, creature_hostile, any_creature, etc. either completely or with a certain percent chance.
     
  9. Offline

    nuke21

    I wish I could make it so coal ore dropped charcoal instead of coal but I can't seem to get it to work. 263:1 doesn't seem to be recognized, nor does the word: charcoal

    I also wish I could have it so IRON_ORE in od-ore_extractions.ylm allowed for XP to be dropped in there instead of me having to add
    Code:
        IRON_ORE:
            - tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
              drop: XP
              quantity: 2-3
    to od-fix_undroppables.yml but oh well, this works I guess. I just wish the charcoal worked.
     
  10. Offline

    Zarius

    nuke21

    I believe charcoal is a type of coal so you could try COAL@CHARCOAL, or COAL@1 - if that doesn't work let me know and I can test it out when I've got time.

    Is there any reason you can't add the XP drop directly to the ore extractions file?
     
  11. Offline

    nuke21

    Zarius

    I got the charcoal to work using the @ sign, thank you very much. And to my knowledge about the XP drop during the ore drop, I can't get it to work. I can't get it to only drop a single ingot and 2-4 XP at the same time.

    I have it set to not change the block to stone, I like it to drop the ingot just like ore blocks drop coal and diamonds, and since you only get XP from smelting gold and iron, that is why I want them to get XP when it drops the Ingot.

    Code:
        IRON_ORE:
            - replacementblock:
            - drop: IRON_INGOT
              quantity: 1
              drop: XP
              quantity: 2-4
              tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
     
  12. Offline

    Zarius

    Ah, try something like this:

    Code:
      IRON_ORE:
        - drop: [IRON_INGOT, XP/2-4]
          tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
    
    Or alternatively (does the same thing):

    Code:
      IRON_ORE:
        - drop: IRON_INGOT
          quantity: 1
          tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
     
        - drop: XP
          quantity: 2-4
          tool: [STONE_PICKAXE, IRON_PICKAXE, DIAMOND_PICKAXE]
    
     
  13. Offline

    nuke21

    Zarius Now it works, thank you! You are truly the man!

    Now I remember you replied to a thread I posted, and you said
    Code:
    otherdrops:
      CREATURE_HOSTILE:
        - action: MOBSPAWN
          height: ">22"  # for levels 23 and above
          drop: NOTHING  # disable the spawn
    So I don't have monsters spawning in the void. What file would I want to put this code into?
     
  14. Offline

    Zarius

    nuke21

    Could be any of the include files or just put it at the bottom of the otherdrops-drops.yml file.
     
  15. Offline

    nuke21

    Any idea why this is happening over and over on my cmd?

    Code:
    17:05:53 [SEVERE] Could not pass event LeavesDecayEvent to OtherDrops v2.7.1
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:427)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:477)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:462)
            at net.minecraft.server.v1_5_R2.BlockLeaves.k(BlockLeaves.java:126)
            at net.minecraft.server.v1_5_R2.BlockLeaves.a(BlockLeaves.java:117)
            at net.minecraft.server.v1_5_R2.WorldServer.g(WorldServer.java:404)
            at net.minecraft.server.v1_5_R2.WorldServer.doTick(WorldServer.java:202)
     
            at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:5
    54)
            at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:2
    25)
            at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:4
    76)
            at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java
    :409)
            at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:5
    73)
    Caused by: java.lang.NullPointerException
            at com.gmail.zariust.otherdrops.parameters.actions.MessageAction.parseVa
    riables(MessageAction.java:135)
            at com.gmail.zariust.otherdrops.event.DropRunner.run(DropRunner.java:102
    )
            at com.gmail.zariust.otherdrops.OtherDrops.scheduleDrop(OtherDrops.java:
    571)
            at com.gmail.zariust.otherdrops.OtherDrops.performDrop(OtherDrops.java:4
    17)
            at com.gmail.zariust.otherdrops.listener.OdBlockListener.onLeavesDecay(O
    dBlockListener.java:76)
            at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:425)
            ... 12 more
     
  16. Offline

    Zarius

    nuke21

    No idea - but I'd recommend updating to the latest beta on BukkitDev as I've probably fixed the issue.
     
  17. Offline

    zenvince

    Hello there !

    I'm getting issues with OD. On our server we're using these versions :
    OtherDrops 2.8b.459
    CraftBukkit beta 1.5.1-R0.2

    The issues :

    ZOMBIE:
    - action: MOBSPAWN
    - biome: SWAMPLAND
    - time: NIGHT
    - drop: WITCH
    - chance: 10%
    - message.server: "MOBSPAWN test"

    The message shows up properly on zombie spawn. I tried several mobs (PIG, IRON_GOLEM, GHAST, BLAZE), it doesn't work.
    I made my tests without any biome/time/chance set up, with no luck.
    I tried with items (eg. diamond), it's working like a charm.

    ---------------------------
    I don't know if it's related to OtherDrops or no, but we cannot keep any kitten obtained from cats tamed "legally". They despawn as hostile mobs (though they are tamed at birth as we can make them sit).
    Same issue with coloured cats we obtain via OtherDrops (eg. drop CAT@RED when RIGHT_CLICK on CAT@WHITE with INK@ORANGE in hand)
    It worked properly before 1.4.6, I can't remember which OD version and CB version we used at this time.

    It needs further testing with a blank server except OtherDrops 2.8b.459 and CraftBukkit beta 1.5.1-R0.2.
     
  18. I would like to get a zombie to spawn whit the same name of the killed player. Is that possible some how?
     
  19. Offline

    Zarius

    zenvince

    There are a few too many dashes there. Each "drop section" should start with a dash and then no dashes for the following parameters, eg:

    PHP:
      ZOMBIE:
        
    # this is one "drop section"  below
        
    actionMOBSPAWN
          biome
    SWAMPLAND
          time
    NIGHT
          drop
    WITCH
          chance
    10%
          
    message.server"MOBSPAWN test"
     
      
    # here's another "drop section"
        
    dropEGG
          chance
    50%
     
    # etc...
    Not sure about the kitten issue but tamed cats should be able to be dropped with "drop: CAT@RED!!TAMED".


    Noobidoo

    Try:

    PHP:
      PLAYER:
        - 
    dropZOMBIE~%v
     
  20. Offline

    zenvince

    Thank you Zarius , I put the dashes in my post by mistake, the config file is correctly written.
    I'll let you know about the kitten/colored cats on a test server with nothing but CB and OD installed.
     
  21. Offline

    Zarius

    zenvince

    Ah, so the config file (for the witch drop) is written correctly on your server but doesn't work? What version of OtherDrops are you running?
     
  22. Offline

    zenvince

    The server is running OtherDrops 2.8b.459 with CraftBukkit beta 1.5.1-R0.2. The item drops via MOBSPAWN work properly.
    I also tried to set "spawnedby: NATURAL" ,this is not working either.
     
  23. Offline

    Zarius

    Hmm.. how are you testing the witch spawn? Also, note that there is a mob limit in the otherdrops-config file of 150 - if the number of the mobs in the world exceeds this then OtherDrops won't spawn any more mobs (that's because the Bukkit mob spawning limits are on natural mobs only so OtherDrops custom spawned mobs aren't counted - end result is that without the limit you could end up with thousands of mobs in the world) - set this figure at a level that's comfortable with you.

    If I could work out a way I'd "replace" the spawned mob (eg. replace the zombie with a witch) but currently I need to remove the current spawned mob and "drop" a new one at the same location.
     
  24. Offline

    zenvince

    As for the kitten/colored cat issue, I've just tested on a fresh server with only OD 2.8b.459 and CB beta 1.5.1-R0.2.

    Code:
        CAT@RED_CAT!!TAMED:
            - action: RIGHT_CLICK
              tool: DYE@BLACK
              drop: CAT@BLACK_CAT!!TAMED
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@WHITE
              drop: CAT@SIAMESE_CAT!!TAMED
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@YELLOW
              drop: CAT@WILD!!TAMED
              consumetool: 1
             
        CAT@SIAMESE_CAT!!TAMED:
            - action: RIGHT_CLICK
              tool: DYE@BLACK
              drop: CAT@BLACK_CAT!!TAMED
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@ORANGE
              drop: CAT@RED_CAT!!TAMED
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@YELLOW
              drop: CAT@WILD!!TAMED
              consumetool: 1
     
        CAT@BLACK_CAT!!TAMED:
            - action: RIGHT_CLICK
              tool: DYE@WHITE
              drop: CAT@SIAMESE_CAT
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@ORANGE
              drop: CAT@RED_CAT
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@YELLOW
              drop: CAT@WILD
              consumetool: 1
             
        CAT@WILD!!TAMED:
            - action: RIGHT_CLICK
              tool: DYE@WHITE
              drop: CAT@SIAMESE_CAT!!TAMED
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@ORANGE
              drop: CAT@RED_CAT!!TAMED
              consumetool: 1
            - action: RIGHT_CLICK
              tool: DYE@BLACK
              drop: CAT@BLACK_CAT!!TAMED
              consumetool: 1
    
    With or without !!TAMED, the cats (and kitten) keep despawn when I'm running far away and come back. The cats I tamed from natural spawned ocelots are staying in place, but no kitties nor colored cats. I even tried to replace CAT@ by OCELOT@, no success. What's odd is that kitties I get from my 2 cats tamed "naturally" are despawning too ...

    As for my MOBSPAWN tests, my config file currently looks like this :

    Code:
        PIG:
            - action: MOBSPAWN
              drop: IRON_GOLEM
              chance: 10%
              spawnedby: NATURAL
              message.server: "MOBSPAWN test"
    I get the message "MOBSPAWN test" in the chat, but no IRON_GOLEM so far.
     
  25. Offline

    Tyrius

    I'm trying to create a simple PVP reward drop: a player kills another player and take some of their money (if they have any).

    Code:
        PLAYER:
            - tool: PLAYER
              drop: MONEY@STEAL/1
    But the money is also stolen if a player is killed by a mob, I thought the "tool: PLAYER" parameter would insure it only steals money from the player if killed by another player.

    Is the the intended functionality or am I doing something wrong?

    Using version 2.7.1
     
  26. Offline

    Zarius

    Tyrius

    Yes, that's the correct a way to use it however there are issues with tool: PLAYER in that version that were fixed in 2.8.beta2.

    I'd suggest trying out the latest beta version, it also has a more flexible "money" parameter, I'll show some examples later when I'm not on my mobile.
     
  27. Offline

    zenvince

    @Zarius :
    Just to make you know I did tests without OtherDrops on my server to test about kittens/cats disappearance : the issue seems to be CraftBukkit relative since they disappear with only CB running on the server (kittens stay in place on a vanilla server without CB, maybe colored cats obtained via OD are acting the same way)

    Still can't make any mob spawn via MOBSPAWN trigger. If I understood your explaination correctly, I should see at least 150 <whatever mob I wish to spawn via mobspawn tests>, am I right ?
    I chose pigs for my tests because I'm sure they won't spawn in caverns underneath me...
     
  28. Offline

    Zarius

    zenvince

    Thanks for the investigative work - glad it's not OtherDrops :)

    The mobspawn trigger will only work if there are less than 150 mobs in the world (in total - not just OtherDrops) - this limit can be changed in the config file in latest versions.

    The way I would test it would be to say override a cow spawn with a pig and then use essentials command "/killall" to make sure no mobs have spawned & then quickly "/spawnmob cow" to see if a pig spawns.
     
  29. Offline

    zenvince

    I made a test with Essentials, it works (as soon as I remove "spawnedby: NATURAL" in the drop section)
    They do spawn naturally if I put back "spawnedby: NATURAL", then "/od reload" and "/kill all".

    May I ask you what's the code to change the limit in the config file ?
    It seems the config file I got from the admin of our server is an old one without the latest options (ie. enchantments_ignore_level/enchantments_use_unsafe that I added manually but I don't know the other ones)

    EDIT: Nevermind, I found the right config file in the JAR so I'll make tests increasing the value. It would be great if we could disable the limit with drop chance at low values (for example, 1% chance for a witch to spawn in SWAMPLAND via MOBSPAWN on a pig)
     
  30. Offline

    Shougunner

    Would you happen to know how to disable mobs spawning except in a specified biome (slimes in this case). Intention here is to stop people making massive quarries underground for slime farming.
     
  31. Offline

    Zarius

    PHP:
      SLIME:
        - 
    actionmobspawn
          biome
    : [-DESERT]
          
    dropnothing
    should stop any slime spawning except in a desert biome.
     

Share This Page