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
BTW, impossible to add cocoa beans. I've tried COCO_BEANS, COCOA_BEANS, BROWN_DYE and whetever it can be called, it just doesn't work... :( Can't wait for you to keep coding =)
Maybe i'm doing this wrong but it doesn't work for me with PEX. I read on a previous comment it does, but it clearly doesn't. Plugin works great with Perm set to false, but I would LOVE to be able to use PEX with it, and make my people's job more realistic, like chances of failing loot if you don't have the proper job. Still great for basic changes but it would be oh so much greater with PEX support... Please add it! :s
Can I use (damaged-)item IDs for the swap items or blocks?
Great work on this plugin!
Suggestion:
It would be nice to be able to set XP orbs as drops
Thanks!
How Low Can i make the chance of an item dropping?
if its only .1% could i ask that maybe you add a lower chance for things to drop maybe
extend is to like .0000001% or something - thanks (that is if this dosnt already work)
otherwise just the plugin i was looking for.
Hey, this is a truly epic plugin, and my users love it. But i have a small problem It appears to drop the items BEFORE worldguard checks for protections, so it will drop the swapped/extra items, then say "You do not have permission for this area" So people can grief protected areas with stone/netherack. However, it only happens with blocks that have extra drops, so it must be this plugin. I was just wondering if there is a way to fix this? Thanks, Haders
hi,
sounds very interesting. Do you think it would be possible to have different drops per biome?
@rexar2
Hello, and thank you for the feedback. I didn't realize that the log-level would be case sensitive. Please use upper case SEVERE to reduce the logging to only show errors.
I will fix the case sensitivity in the next release.
- Kalem
Hi, how to stop the plugin from spamming the console? I've tried what you suggested on second page: "To change the logging, change the logging: info tag to logging: severe"
It doesn't work. Console says on load; EXCEPTION SETTING LOG LEVEL: Bad level "severe".
Edit; using latest version v1.3
Help?
@don97322
The lines for block drops are:
Both blocks give the error and kick the player. As for other plugins, the only ones running that have anything to do with block break events are Dynmap, Logblock and Worldguard. I can try disabling them one at a time but that will have to wait until the server is quiet.
Meanwhile mob drops are now behaving perfectly, thanks, it's the main thing I was after.
@Deadlock989
I've tried to reproduce the problem, but no luck. Here are the lines I am using:
- DIRT, swapitem, DIRT, SAND
- SAND, swapitem, SAND, DIRT
What are you trying? Also, if possible, can you remove other plugins and see the problem continues? If not, and you have the time, try to add them back in and see what plugin is incompatible. I'll try and see if I can reproduce the conflict and find a work-around.
I've updated to v1.3, but it was unrelated to the problem you described.
- Kalem
@don97322
That's great, thanks. I checked it out and mob drops now work as expected with permissions set to false.
I don't want to seem annoying but with 1.2 I'm having an issue with block drops (I haven't tested block drops before). When I break a block that has a block drop set up, I'm booted from the server with the message "Internal server error". This is from the log:
I'm running a pretty non-typical set-up (MCPC port of Bukkit, with server side mods) so I don't know if that's a factor.
Thanks for your work on this. Despite the teething troubles, this plug-in is so easy to use compared to other drop table plug-ins.
@Deadlock989
Wow, what a silly mistake. When I added the check for player/non-player event, I didn't keep where it allows the player caused events to process the drops.
Sorry about that. - Kalem
Hi Don,
With 1.1 I'm now finding that mobs drop their drops if not killed by a player - but they don't drop anything (not even their normal drops) except XP if they are killed by a player. This is with permissions set to false.
Cheers.
PS. The list of block names would be useful - is it PLANK, PLANKS, WOODEN_PLANK?
Cheers.
@don97322
That's great, much appreciated.
@Deadlock989
Thanks for the feedback. Good to hear that people are enjoying it.
Good find about the creature drops not processing for non-player events. I've fixed that in v1.1.
I've added your suggestion to use data values (and sub-sets) to my future development.
have fun,
- Kalem
This is a really nifty little plug-in. I've started using it as it's about a million times easier to configure than the plug-in I was using before (Mobs). Nice work!
I've noticed that the drops only activate if the mob was killed directly by a player. Drops don't seem to activate if the mob dies "naturally" (eg. by burning in sunlight, being pushed off a cliff, getting stamped into pizza by pistons etc.) Is that intended? I have permissions set to false so that shouldn't be an issue.
PS. Some useful things would be to have a list of the names used (eg. is it CAVESPIDER or CAVE_SPIDER). Also, would it be possible to specify block IDs and metadata instead of names? My server uses several mods which add new blocks, it would be nice to specify, for example 212:2 as a block, or LEAVES:3 or WOOL:5 for only a specific colour/type of leaves and wool.
Can you make a player drop certian items?
@gladiozzo
Try again with v1.0
To change the logging, change the logging: info tag to logging: severe
for permissions, use whatever permissions addon equates to PermissionsBukkit where you can do things like:
dropswap.COW: true
The permissions implementation is only at the creature/block level, not at the material level. I'll consider that next level of permissions in a future expansion.