DropSwap
Kalem's
DropSwap
Kalem's DropSwap plugin is a Bukkit server mod that monitors creature deaths and block breaking, looks at the drops, then swaps items and quantity.
____
Updated for Bukkit 1.5.1 R0.1
Tested and working with Bukkit-1.5.2-R0.1 (Build #02754)
____
Features:
- Select creatures/blocks to monitor
- Specify drops to monitor
- Swap existing drops (Have spiders drop web instead of string!).
- Add new drops (Have zombies drop feathers again!).
- Remove drops (No more rotten flesh!).
- Give a range for the minimum and maximum number of additional/swapped items to drop.
- Set the chance for an add/swap/remove attempt to be successful.
____
Simple to set up:
After putting dropswap.jar in you server's plug-in folder, reload your server to create the default config.yml file. By default, DropSwap will add feathers to Zombie drops 50% of the time, and will turn Spider drops of string into Spider drops of web.
To modify DropSwap, just edit the config.yml file in the plugins/DropSwap folder using the following options:
LOGGING SETTINGS
- INFO - Show all information to the console
- SEVERE - Reduce logging to only errors (default)
[Must be upper case]
PERMISSION SETTINGS
PERMISSIONS: REMOVED! Causing too many complications and kept me from keeping plug-in up to date.
DROPSWAP SETTINGS
- ENTITY|MATERIAL:SUB, ACTION: <DROP ITEM>:SUB, <SWAP ITEM>:SUB, <CHANCE>, <MIN>, <MAX>
- ENTITY: the string name of the monster/creature/animal to modify (required)
(use ALL for ENTITY to include all creatures including farm animals, pets, etc)
NOTE: ENTITY must be the string name of the creature
(use ANY(no sub-type) for MATERIAL to include any block including leaves, grass, flowers)
NOTE: MATERIAL can be the string name or the integer ID of the block
- SUB: Separated from the blocks by a COLON(:), the SUB-ID allows selection of sub-types (optional - integer only)
- ACTION: choose from additem|swapitem|removeitem (required)
- DROP ITEM: original item that entity drops (required for swapitem|removeitem)
- SWAP ITEM: item that is swapped for original item (required for additem|swapitem)
- CHANCE: a floating number (decimal required) for chance that add/swap/remove will occur (required if using max or min/max)
- MIN: the minimum number of swap items to allow (must come before max if used, 1 is min if not used)
- MAX: the maximum number of swap items to allow (required if min is used, can be equal to min)
____
Config.yml Example
dropswap:
- ALL, additem, GOLD_NUGGET, .10
- SPIDER, swapitem, STRING, WEB, 1.0, 1
- ZOMBIE, additem, FEATHER, .50
- ZOMBIE, removeitem, ROTTEN_FLESH, 1.0
- SQUID, additem, RAW_FISH, 0.8
- GLASS, additem, GLASS, 1.0
- LOG:2, swapitem, 17:2, 17:3, 0.5
____
Future:
- Suggestions welcome
____
I'd love to hear from you
Kind and constructive feedback is appreciated. Tickets will be responded to as soon as I can. No plug-in compatibility has been tested.
____
Cheers,
- Kalem
@Shizong
Updated to 1.4.2-R0.3. Hopefully emeralds work now.
@Ajaxan
Updated to 1.4.2-R0.3
@NyanCraftDe
Added values (use number for material instead of name) and sub-ids (always a number).
Hey, Love your plugin! It makes my survival work a whole bunch more challenging but I want to update to 1.4. Are you planning on updating to 1.4 soon or should it work with the new update?
Can I adjust the dropswap settings for certain types of (permissions-)groups? e.g. : lumberjack will get no drop "apple" when he destroys a leaf-block farmer will get the apple drop
what about values/sub-ids? Im waiting for this. :(
so i tried to make it so all mobs will drop one emerald when killed and it says : invalid block type ALL any help?
Id like to make it so if a player breaks a redstone lamp on they get a redstone lamp on as the drop however i get an error block type REDSTONE_LAMP is unknown
ive tried using item id and it still has same error
Please, please, PLEASE add allow item values (ID numbers) for the config. The current config does not accept a lot of standard item names such as... Some are missing. "GOLD_INGOT" - My bad, I accidentally missed the comma between the ingot and the percentage.
Also, not sure how it works but sometimes a plugin will simply have data values as they work ingame (using the engine to work out the item or something) This allows for enchants to work. Enchants working would save my life as I could for example remove skeletons dropping power1 bows and change them to a normal bow, by using the power1 code of -f1. SKELETON, swapitem, BOW-f1, BOW, 1.0, 1
@subnoizey
It seems 1.0=100% and 100=100% work. It is defaulted at 1.0, so I assume >1.0 is simply divided by 10. Never ever is a decimal point seen twice in a number (.0.01) so for 1/100 chance (1%) You would simply do 0.01
So for a one in 500 chance for an emerald to drop from dirt you would do: DIRT, swapitem, DIRT, EMERALD, 0.002, 1
and for one in 300 chance for stone from dirt you would do: DIRT, swapitem, DIRT, STONE, 0.003333, 1 with the threes continuing for the maxium allowed digits whatever that may be.
Awesome plugin, it's exactly what i was looking for.
Two requests. First one being, are you able to give more information on the chance? You state
but i'd like to know how to add say a 1% chance of dropping. For example am i able to put a 0 before the decimal? 0.01 for a 1/100 chance? or do i use .0.01 as it needs a decimal? I'm going to make emeralds (my servers currency) drop when you break dirt with a 1 in 500 chance and a 1 in 300 chance for stone etc.
Second question,
is there an easy way to reload the config? /dw reload or something? just makes it easier to test. cheers
@sumusikoo
go to the config.
logging: INFO change it to logging: SEVERE
Hello the plugin is shutting down my server because it floods the console how to fix
lovin this plugin. any chance of adding mobs to drop mobs? that would be awesome :D
EDIT: Works with PEX
DropSwap is a really good plugin, but has a bug on durabilty of tools, i use version 1.5 of dropswap, 1.3 of bukkit, don, sent you a pm with the details
DropSwap 1.5 adds check for no-build zone (tested only with World Guard) to preven players from getting 'added' drops when a block is destroyed in a no-build zone.
DropSwap v1.4 is updated for compatiblity with Bukkit v1.3.1 R1.0
My hightest priority is to get IDs (codes) for blocks working.
You are a life saver, i have spent about 2 hours running thru plugin after plugin, and this one works, just the way i want it. User friendly setup, Simple strait forward. Love it so far! ~~~~ ~~~ ~~~~ Mine stone and only get random drops of cobble, and the rest of the time, nothing! So now at least i dont have useless items floating around, from the other plugins that would only replace with another item, not just remove them. Just awesome. I hope to see this plugin keep going! THANKS! A Bunch! : )
!!JUST one question, how do i have it remove sugarcane upon break? I have tried , ( BLOCK, ENTITY,MATERIAL, and as SUGAR_CANE,SUGAR_CANES ) , removeitem, SUGAR_CANE, 1.0, none of those work, you can still break and pick them up. Thanks!! : )~
This plugin works fantastically. Very simple and straight forward. However is there any way to add items to be dropped/swapped or whatever you may be doing by using the Items ID instead of it's name? For whatever reason, Gunpowder won't work by name (other materials do just fine). This is also true of the /give command built into bukkit. I have to use the item ID rather than simply typing /give gunpowder or else I get the invalid item message.
EDIT: Discovered that gunpowder is still called Sulphur since it was changed in early beta. However would still be beneficial to have ID support for adding drops based on items added by various mods.
Hello Again,
I've been reviewing the changes requested as well as the upcoming new Minecraft server. It appears that there will be some major re-writes going on.
To that end, I'm going to hold off on making changes to DropSwap until the new release is out. I might change that if there is a delay.
Hello All,
Sorry I have been MIA. Real-life and work keeping me busy. Looks like more people are using this, which is great! Of course, that means that it needs fixed. haha. I will try to make time for this the next couple of weekends.
@littlepsychoLP: I've added the "by block id" to the Future backlog. Not going to be an easy transition inside the code, but I am looking into it.
@Meiryou: All dyes are actually "ink sack" with a sub-id. My guess is that dyes don't work because I have not had time to enable (damage) sub-id values yet. I expect it will work once that is done.
@ioxon: I'll look into dropping XP. Should not be hard to add. Probably something like - DIRT, additem, XP10, 1.0
@Hadersjm: Are you still having that problem with the latest build? I use WorldGuard and when I set DIRT to additem SAND, I don't get the sand to drop. If so, let me know your config.yml settings and I'll try again.
@cia255: It can go pretty low. The decimal value goes out to 6 places or something.
@Meiryou: I'm not familiar with PEX, but I'll take a look. If it is another permission layer, I'll have to ensure that it doesn't work with the more common PermissionsBukkit.
Thanks again everyone for taking a look at and using DropSwap. It started as a simple way to get zombies to drop feathers again. Cool to see that other people have similar needs and wants for drops.
I want to keep the set up simple. As we add more features, I have to be more and more clever about the syntax of the config.yml.