Inventory Drop Chance
Inventory Drop Chance
Version: v1.6
(Follow me on Twitter for updates!)
Inventory Drop Chance is a plugin created by Staartvin from a request by DerekZil.
Do you want to your server to be a little more RPG-ish? Are people frustrated by losing items on death?
Well, then Inventory Drop Chance (IDC for short) is something for you! IDC allows admins to set a percentage of retained items on death. The retain percentage is configurable. When a player dies, x% of his/her inventory will be given back. The items that are not given back are dropped on the ground. All items get chosen randomly. This is to prevent players from cheating. You can also specify a delete percentage. IDC will then remove a percentage of the inventory (Those items aren't dropped nor given back). IDC also has custom WorldGuard flags that can be used. These flags are: 'xploss-percentage', 'retain-percentage' and 'delete-percentage'. You can also setup blacklisted or whitelist items. In short, this plugin is super customisable.
Features:
- Can give players x% of their dropped items back.
- Can delete a percentage of their inventory on death.
- Very lightweight
- Extremely simple
- Drop and play
- Permissions
- Multiworld support
- Group based (Example: Give a donor rank 20% loss, but a noob group 100% loss)
- WorldGuard integration (Custom flags 'retain-percentage' and 'delete-percentage')
- Whitelist and blacklists (Some items will always be dropped, some are always kept)
- Automatic version checking
Permissions:
- - idc.group.<groupname> A player with this permission is bound to a group. All percentages are based on a group. If a player hasn't got this permission, it will lose all their xp and items. Just like vanilla Minecraft.
- -idc.keepallitems A player with this permission will retain all of his items when (s)he dies.
- -idc.keepxp A player with this permission will keep all their xp.
- -idc.noticeonupdate A player with this permission will get noticed when a new version of IDC is available.
Commands:
- None yet
Pictures:
Messages shown when a player respawns
Donations
I'm a poor student and I'm developing this plugin in my free-time, if you like my plugin and want to help me, please donate. Donating is the best way to help me out, it goes towards more bug-fixing. Thanks! Donate is in the top right corner. ;)
Donators
Thanks to all the people who donated and downloaded this plugin! I love you all! <3 Especially thanks to my donators who gave me that little boost:
- WayGroovy with 5 dollars
- RsmKaelub with 10 dollars
- deathhzone with 5 dollars
-
View User Profile
-
Send Message
Posted Jul 1, 2013@CommodoreAlpha
The new features have been added and the download is available soon. (2 days)
-
View User Profile
-
Send Message
Posted Jul 1, 2013Hey sorry but I am bit of a noob to this, how do I change it from 50% to 0% drop on the world? Because I only wanted to flag the chance to 100% on a region. How do I only blacklist and whitelist a region aswell? Thanks :)
-
View User Profile
-
Send Message
Posted Jul 1, 2013@deathhzone
There is a bug right now that armor is always dropped. That is currently being fixed.
-
View User Profile
-
Send Message
Posted Jun 30, 2013Why does the armor I'm wearing drop when I die when I both have the group to retain 100%, AND the idc.keepallitems for my group
-
View User Profile
-
Send Message
Posted Jun 29, 2013@CommodoreAlpha
Okay, good to know. I'll get working on it then.
-
View User Profile
-
Send Message
Posted Jun 28, 2013@Staartvin
To be honest, I'm not all that interested in even having a "Both" function. The idea came to me while I thought of how you could implement running both checks at once. And I only suggested it in case someone wasn't satisfied with the "do either check first" process.
In other words, I'm okay with the quick, simple version rather than the "rewrite algorithm" version. Plus I presume you're pretty busy with real life, so I'd rather put less stress on you. ;)
And thanks for the explanation on experience loss.
-
View User Profile
-
Send Message
Posted Jun 28, 2013@CommodoreAlpha
Okay, this is a great addition. Thank you for your detailed post, which helps me a lot with getting a 'starting point' to code from. However, I do have a few suggestions.
The both function of your check option can't be done (at the moment). This is due to the algorithm I use. Itemstacks get chosen randomly to prevent a player from abusing the algorithm. Due to this, when two checks are running to check items, they will likely not select the same item. All hope isn't lost, though. If I want to make your suggestion work, I'll have to rewrite the (big) algorithm. That is going to cost me a lot of time. I can do this, but it's up to you. Do you want to either have a rather fast update out with a simple version of this or do you want me to shove the algorithm aside and create a whole new one? It is going to take some serious time.
For the xp-loss option:
The percentage you give is used to calculate the xp that you'll keep. (You'll have it after you respawn). The rest of the xp that is not given to you is dropped. This is the formula I use to calculate the xp:
expLoss = (Exp of player * (XPloss percentage / 100));
The plugin will return you (Xp when you died - exploss). Let's say a player has 100 xp. You have configured that he loses 65%.
expLoss = (100 * (65 / 100)) expLoss = (100 * 0,65) expLoss = 65
After he respawns, he will have Totalexp - expLoss. The xp that he has after he respawns will be (100 - 65) = 35
The other xp (65) will be dropped. I hope that helps!
-
View User Profile
-
Send Message
Posted Jun 28, 2013I use ExtraHardMode's "lose a percentage of your inventory forever" feature, in addition to this plugin's "keep a percentage of your inventory upon death," and when players die, they drop approximately double the drops. I suspect it's because both plugins override the same death event, and both try to pass their own version of the event leading to the double drops.
So instead of using two plugins for deciding what items stay and what items go upon a player's death, could you add ExtraHardMode's "permanent loss" feature to this plugin? Permanent loss means that the item never drops, and is deleted.
The way you could configure this new feature would probably just be similar to the way you configure how much of an inventory a player keeps. But wait, wouldn't it be confusing for the plugin to determine which items stay and which items get deleted at the same time?
That's why I'm going to suggest that you implement this extra option. Maybe something like this:
(For the purposes of this example, pretend I configured a group to save 20% of their inventory upon death, and lose 10% of their inventory forever upon death.)
If you choose "Delete" to be checked first, the plugin will look at your entire inventory, and delete a configured percentage (10%) of it, then it will look at what's left of your inventory, then save a configured percentage (20%) of that. Same works vice versa.
Or, if you choose "Both", the plugin will systematically check each "item stack" and apply both percentages at the same time. In this case, we've a 10% delete chance, and a 20% save chance, thus our unfulfilled percentage would be a 70% drop-item chance. Basically, when looking at this item-stack alone, it has a 10% chance of being deleted, a 20% chance of getting saved, and a 70% chance of dropping normally.
Obviously, neither percentage alone or together should add up to over 100%.
Also, I don't understand "xploss" clearly. For the percentage of the xp you do lose, does all of that drop? Some of it? None of it? I'd also like to see an option allowing us to have "the percentage of our xp we retain upon death" in addition to "for the xp that we lose, what percentage of it is actually dropped."
-
View User Profile
-
Send Message
Posted Jun 28, 2013@Shooty_
Yeah, I'll add that to the to-do list.
-
View User Profile
-
Send Message
Posted Jun 27, 2013Can you add a way to remove one of the two message i found this is too much :p
-
View User Profile
-
Send Message
Posted Jun 23, 2013@xMCPlay
(Even though you asked me to PM you, this might be interesting for anybody) Yes, I will fix it soon. I just haven't found the time for it yet.
-
View User Profile
-
Send Message
Posted Jun 23, 2013@xMCPlay
(Even though you asked me to PM you, this might be interesting for anybody) Yes, I will fix it soon. I just haven't found the time for it yet.
-
View User Profile
-
Send Message
Posted Jun 22, 2013Can it be fixed to the armor will be choosen randomly aswell? Becouse of what i've noticed, the armor always drop, and i wish to know if there is any way so the armor will be randomly choosen as the rest of the items aswell. Please notify me by PM :)
Kind regards "xMCPlay"
-
View User Profile
-
Send Message
Posted Jun 19, 2013@shadvalentine
I think I'm just going to make it so it drops the items on the ground if there is not enough space. That is the most convenient way.
-
View User Profile
-
Send Message
Posted Jun 18, 2013@Staartvin
so if it can not remember where your armor is .. is there going to be a fix for when your inventory is full and you have full armor on? .. maybe a command to finish giving you your items when you clear enough spots in your inventory?
and also .. any eta on how long before the next release?
-
View User Profile
-
Send Message
Posted Jun 16, 2013@shadvalentine
No sorry, that won't work.
@broluigi
Yeah, sure!
-
View User Profile
-
Send Message
Posted Jun 16, 2013can you make a reload config command?
-
View User Profile
-
Send Message
Posted Jun 7, 2013is there any way you can make it remember what slots the items where in? so that it will put your armor back on .. if it does not drop
-
View User Profile
-
Send Message
Posted Jun 5, 2013well just found out a work around .. I made a group that tells it to keep all items and xp:
'100':
retain percentage: 100
xp loss: 0
use xp loss: true
This keeps the armor
found a problem with this method .. if you have armor on and your inventory is full when you die IDC will error out
-
View User Profile
-
Send Message
Posted Jun 5, 2013@shadvalentine
That is true. Armor is not counted properly. It will be fixed in the next version.