[MECH] DeathControl v2.1.0 - Take control over item deaths [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by Bone008, Jun 22, 2011.

  1. Are the items completely gone or do they just drop?
    Did you define UNKNOWN as a death cause with correct settings?

    When I'm home I will try to reproduce the error.
     
  2. Offline

    morizuki

    it's just drop.. and sometimes.. sometimes.. when drowning.. all the items will gone.. no error.. but sometimes the items got back..

    and what do you mean Correct settings?
    \
    EDIT: Now. not just drowning, but everything.. sometimes all the items will gone if you die..
     
  3. @morizuki
    Well that's strange. Do you have any other plugins related to death and what happens before/after (especially damage and changement of items)?
    Could you post your complete config.yml?
    Are you using the "cost"-parameter? If yes, with which economy plugin?
     
  4. Offline

    morizuki

    hmm related to death.. nothing i guess.. before? nothing.. we're just trying the fall, or drowning any related to death and clicking the Title Menu the boom the items will drop.. and it will not get the items when it login.. also.. the sudden drop of items when dying(this is the 2nd problem without the end of stream)

    Code:
    # ====== Settings for DeathControl ======
    # IMPORTANT: Do NOT use tabs in this file! Only use spaces!
    #
    # Formatting works like that:
    #    {CAUSE}:
    #        keep-inventory: {BOOL}
    #        cost: {COST_NUMBER}
    #        method: {METHOD}
    #        timeout: {TIMEOUT}
    #        loss-percentage: {LOSS_NUMBER}
    #
    #
    # For {CAUSE}, insert one of the following words (if seperated with / they are aliases and mean the same):
    #  - CONTACT
    #         when died from a cactus
    #  - FALL
    #         when died due to fall damage
    #  - FIRE
    #         when died of fire
    #  - FIRE_TICK
    #         when died because player was burning
    #  - LAVA
    #         when died in lava
    #  - DROWNING/WATER
    #         when died because player drowned in water
    #  - SUFFOCATION
    #         when died because player was stuck in a block
    #  - EXPLOSION/ENTITY_EXPLOSION
    #         when an explosion killed the player (for example TNT, Ghast's fireball)
    #         NOTE: this is not called at a creeper explosion! (see CREEPER-cause below)
    #  - VOID
    #        when player died in the void
    #  - PVP/PLAYER
    #        when player was killed by another player (pvp)
    #  - CREEPER
    #        when player was killed by a creeper
    #  - MOB/ENTITY
    #        when player was killed by a mob
    #  - UNKNOWN
    #        should never be called. don't use this
    #
    # NOTE: capitalization doesn't matter!
    #
    #
    # For {BOOL}, insert true or false
    #    DEFAULT: false
    #
    # For {COST_NUMBER}, insert any number to specify the cost; decimal numbers are allowed if your economy-plugin supports them
    #    DEFAULT: 0
    # NOTE: costs are ignored if the player has the permission deathcontrol.free
    #
    # For {METHOD}, insert either "auto" or "command"
    # (auto = player keeps his items automatically; command = player needs to type a command to get them back}
    #    DEFAULT: auto
    #
    # For {TIMEOUT}, insert a full number in seconds. When using "command"-method, the items will be dropped after the specified time at the death location
    # NOTE: Has no effect with "auto"-method
    # NOTE: Put -1 to have no timeout.
    #    DEFAULT: 15
    #
    # For {LOSS_NUMBER}, insert a percentage of how many items will always be dropped on death for this cause
    # example: 25 will drop a quarter of the player's items and gives him the rest back (depending on the method)
    #    DEFAULT: 0  (= player keeps every item)
    #
    # NOTE: When you don't define an option for a cause, the default will be used.
    #
    #
    # See the examples below on how finished results could look like!
    #
    
    DeathCauses:
        VOID:
            keep-inventory: true
            timeout: 600
        PVP:
            keep-inventory: true
            timeout: 600
        EXPLOSION:
            keep-inventory: true
            timeout: 600
        CONTACT:
            keep-inventory: true
            timeout: 600
        FALL:
            keep-inventory: true
            timeout: 600
        FIRE:
            keep-inventory: true
            timeout: 600
        FIRE_TICK:
            keep-inventory: true
            timeout: 600
        LAVA:
            keep-inventory: true
            timeout: 600
        DROWNING:
            keep-inventory: true
            timeout: 600
        SUFFOCATION:
            keep-inventory: true
            timeout: 600
        CREEPER:
            keep-inventory: true
            timeout: 600
        MOB:
            keep-inventory: true
            timeout: 600
        UNKNOWN:
            keep-inventory: true
            timeout: 600
        
    not using the cost and i'm using iConomy
     
  5. @morizuki
    Ah, now I got that you are refering to when a Player quits and rejoins. Well, I didn't solve that issue yet, it's rather complicated. At least to have the plugin still remember the player after rejoining. An easier solution would be to simply drop the items when the player ragequits or has an "end of stream".

    And by the way, "timeout" has no effect if you are not using "command" as your method. It doesn't interfere with anything but I just wanted to point that out. ;)
    Apart from that, the config is fine.

    I've got plenty of time again and I'll hopefully can fix this ASAP. Thank you for reporting the issue.
     
  6. Offline

    morizuki

    yes very much.. this is one of the two big issue in my server :D
     
  7. Offline

    Raskull

    The mod is working fine for me on 1.7_3, but I have to put the armour back on myself.. no big deal.
     
  8. That's a more or less intended behaviour since the command method was introduced. Because the player is able to already get some other items before he gets the lost one back via command, simply replacing the inventory with the pre-death one would cause loss. So now all the drops that didn't drop so far are just added to the player's inventory without order.

    Update to version 1.12

    I thought I should push out this small update due to the danger of item loss.
    Because it's fixed now :)

    Changes:
    • stored items no longer get lost when the player ragequits before he can get them back
    • they also won't upon server shutdown/reload
    • in both cases, they are just dropped at the death location
    Download:
    [EDIT: use newer link in the OP]


    One thing I noticed with the /kill-command thingy: Most of the plugins that provide such functionality don't give a reason for the damage. So the death cause that the plugin uses will be the last actual damage cause that the player received. So if he took fall damage and the he is /kill'ed afterwards, the plugin will think it would be fall damage that killed him.
    But there is really nothing I can do about that.
    So if you experiment with killing players on command, don't rely on the UNKNOWN death cause to take effect.

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

    Tesseracto

    No, i meant that it will take a percentage of your money.
    For example, a new player joins and have 100 Dollars.
    He dies of a creeper explosion, and he loses 25% of his money. in the end he have 75 Dollars left.

    Example 2, a veteran player with 50000 get's killed in PvP and it takes 10% of his money, he have 45000 Dollars. Got it?
     
  10. @Tesseracto Dude, I should really learn to read more carefully ;) Yes, I got it now, sorry for the misunderstanding ...
    I'll eventually do this in further development. It should not be too hard.
    *added to to-do list*
     
  11. Offline

    PacmanGamer

    Pls add Wolves as Reasin, dogs...
    pls
     
  12. Offline

    PacmanGamer

    *Reason, Wolfs pls
     
  13. Offline

    Psychoma

    great job !
    exactly what i was looking for =)

    my suggestion :
    is it possible to make it consider groups also

    i have some VIP and regular players, and i would to have my VIPs drop 10% of their stuff, when regular players drop 20%
     
  14. Offline

    Raskull

    One quick point, if you're going to add Chest support, please make it so the feature can be toggled.. I switched from a certain Chest based plugin to this, because if you die in lava or water, it ruins the spot where it places the chest.. this is a MUCH better way of doing it, in my opinion.

    I'm not able to get the "command" feature to work. When I die, it seems to default back to "auto", and all my items are kept.

    Here is a sample of my config.

    Code:
    DeathCauses:
        VOID:
            keep-inventory: true
            method: command
            timeout: 60
        PVP:
            keep-inventory: true
            method: command
            timeout: 60
        LAVA:
            keep-inventory: true
            method: command
            timeout: 60
        CONTACT:
            keep-inventory: true
            method: command
            timeout: 60
        FALL:
            keep-inventory: true
            method: command
            timeout: 60
        FIRE:
            keep-inventory: true
            method: command
            timeout: 60
        FIRE_TICK:
            keep-inventory: true
            method: command
            timeout: 60
        DROWNING:
            keep-inventory: true
            method: command
            timeout: 60
        SUFFOCATION:
            keep-inventory: true
            method: command
            timeout: 60
        EXPLOSION:
            keep-inventory: true
            method: command
            timeout: 60
        CREEPER:
            keep-inventory: true
            method: command
            timeout: 60
        MOB:
            keep-inventory: true
            method: command
            timeout: 60
    
     
  15. Offline

    Tauryuu

    Would it be possible for certain items to be never dropped/always dropped when they died?

    Maybe the format could be like this.
    Code:
        {CAUSE}:
            keep-inventory: {BOOL}
            cost: {COST_NUMBER}
            method: {METHOD}
            timeout: {TIMEOUT}
            loss-percentage: {LOSS_NUMBER}
            always-dropped: {ITEM_ID},{ITEM_ID},etc
            never-dropped: {ITEM_ID},{ITEM_ID},etc
    **If they don't have the item in their inventory, but it's listed in the always-dropped, it won't be dropped. (So items won't be spawned)

    There are going to be certain insanely hard to get items on my server and I don't want my players to drop it when they die. I want 25% of their other stuff to drop though, and they will always lose their armor...

    Please consider! ^^
     
  16. Offline

    fragger505

    Request to log if player has had their items refunded or not.
    Sometimes on our server plyers will get stuck in a beta hole and then disconnect. When this happens they lose their items. Because of the disconnecting issue I don't know how hard that will be on you to tell if they were or were not refunded properly.
     
  17. Offline

    Tesseracto

    Oh, and also, if it would be possible, i'd like to have different amount of percentage of the money it takes depending on what range of money a player have.
    For example:
    If X have less than 500 (100 in this case) Money and dies, he loses 50% (50 Money).
    If X have more than 500 (in this case 1000) Money and he dies, he loses 5% (50 Money in this case).
    Or some kinda lock.
    Like it takes a percentage of your money, but it can't take more than a certain limit.
    If the limit is 100, the player has 1000 and the death cost 50%, it wont cost 500, it will cost 100.
    If the limit is 100, the player has 100, and the death cost is 50%, it will cost 50.
     
  18. Offline

    MarchingSpartan

    CB1000

    Hi, I'm having an issues with the loss-percentage: option. I have it setup to drop a certain percentage but it doesn't seem to be doing that. For example, I have FALL damage setup up to lose 30% items and keep 70%. When ever I die by falling damage I lose 0% and keep 100%.

    Code:
        Fall:
            keep-inventory: true
            method: auto
            Cost: 100
            Loss-percentage: 30
    Is this because I'm an admin with all permissions? Is there a permission that makes loss-less deaths?


    EDIT:
    I think I found the problem. By default, WHITELIST keeps all items. Is there a way to whitelist nothing? Should I just whitelist air (0)?

    EDIT 2:

    Ok now that I've whitelisted some items, I now get no items back. On death it tells me that I got all my items back. My inventory is empty. When I type /death back (for command) it say's that I didn't have items to give back. All items are dropped on death location and are retrievable. They are not returned to inventory.

    Code:
        Water:
            keep-inventory: true
            method: auto
            Cost: 100
            Loss-percentage: 40
            timeout: 30
            whitelist: [276,277,278,279]

    Deaths that have no whitelist (ones that I haven't modified yet) still give items back.

    Also, this plugin HATES /reload.
     
  19. Offline

    IncendiaDrakon

    Is this supposed to preserve armor? My armor was lost upon death. After the timer runs out, there's no armor drop either.
     
  20. Offline

    ferretlegs

    Hi there, I really like the idea of this plugin. We have a hardcore survival server where everything is earned, so for me, I see this plugin as a luxury for very rich players who have put in the hours and can afford an extremely high price for death. For testing therefore, I set all death types active, by use of command with cost of 15000. The plugin seems to work fine by giving me back my stuff, but does not seem to affect my iconomy5 balance - it is the same before and after. Obviously this means that death recovery is effectively free at the moment so I have had to turn it off. Any suggestions on my iconomy deduction is not working, I have pasted my config file below:
    Code:
    DeathCauses:
        VOID:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        CONTACT:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        FALL:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        FIRE:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        FIRE_TICK:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        LAVA:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        DROWNING:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        SUFFOCATION:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        EXPLOSION:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        PVP:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        CREEPER:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
        MOB:
            keep-inventory: true
            cost: 15000
            method: command
            timeout: 60
            loss-percentage: 0
    
    Thanks for this cool inventory restore plugin - I have been looking for one with iconomy support and this level of granular control for a long time.
     
  21. Offline

    Steelstiletto

    I've recently switched over to using BukkitPermissions, and this plugin is not recognizing that. Could you add support please?
     
  22. (sent via PM, but replying is disabled)
    @wuaschtsalod
    Yes, this feature is available.
    It's a setting called "loss-percentage" in the config file.
    Just define it for every death cause, then you get the wished effect.



    Is anyone still interested in updates for this plugin? I kinda stopped working on it, but if anyone wants to see new/improved feature I'm happy to resume work.
     
  23. Offline

    wuaschtsalod

  24. Offline

    DJAddi

    Hey!
    You created a very very nice plugin and I would love it - if it would work.
    The plugin is loading with the following output:
    Code:
    2011-08-04 21:26:37 [INFO] [DeathControl] Version 1.12 is enabled!
    2011-08-04 21:26:37 [INFO] [DeathControl] Detected economy plugin: iConomy 5
    First thing I noticed is that it doesn't say that a permission plugin was found (should it?).
    Second thing is that the messages are shown and the penalty has to be paid (so iConomy is working fine), but all items are dropped instead of being restored and the payment is also applied to the superadmin (which should have all permissions). So I guess the permissions are not working... I am using PermissionsEx 1.13 (because it is simply better than the default permission plugin and there are more plugins compatible with it than with BukkitPerms).
    So yes, I am interested in an update for this very much. Hope you read it...
    Have fun,

    Addi
     
  25. @DJAddi Thank you for your praise :)
    First thing: No, the plugin doesn't output anything if a Permissions plugin was found. It should output the following line if it failed to find one, though:
    Code:
    Permissions plugin not found. Using Op-system.
    That the items are still dropped could be due to a misconfiguration of the plugin. Could you post the relevant part of your config file, please?

    That money is claimed on guys with the permission seems to be an error on my part. I just tested it again and I can't believe I didn't notice it not working at all (probably since a recent update).

    Permissions should be working fine with PermissionsEx, since the plugins seems to find Permissions and there is at least something working for you. Also, I'm only accessing the very basic functions of Permissions, which PermissionsEx has its bridge for.


    I'll fix that grave bug with the .free-permission ASAP, sorry for that ;)
     
  26. Offline

    DJAddi

    OK, thanks in advance.
    €: Tried more things out - as someone already pointed out somewhere in this thread, only deathcauses with a whitelist won't work. So whenever there is no whitelist, I cannot press "Respawn", but I will get my items back on re-login (which is not perfect, but it is acceptable) - when there is a whitelist, I can respawn but I won't get any items back (they just drop).
    €2: Wait... in some cases - stuff seems to be happening randomized. When dieing by cactus, I can respawn and get my inventory back, the 25% defined sometimes drop, sometimes disappear. I could do a list for you for every death cause because it seems to be different for each.
    €3: I did using my configuration. All causes with whitelist: inventory drop, no restore. PvP: respawn not possible, everything else works. Else: inventory restored, the lost items sometimes drop completely, sometimes only one of them drops (which means if I 10 stones and 10 sand and 10 dirt and die e.g. by contact, sometimes there are 2 stones, 2 sand and 2 dirt, sometimes there are only 2 stones (OR 2 sand OR 2 dirt).
    For the config, here we go:
    Show Spoiler
    Code:
    DeathCauses:
        CONTACT:
            keep-inventory: true
            cost: 2.5
            loss-percentage: 25
        FALL:
            keep-inventory: true
            cost: 10
            loss-percentage: 10
            whitelist: [267,268,269,270,271,272,273,274,275,276,277,278,279,290,291,292,293]
        FIRE:
            keep-inventory: true
            cost: 20
            loss-percentage: 20
            whitelist: [298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313]
        FIRE_TICK:
            keep-inventory: true
            cost: 10
            loss-percentage: 10
            whitelist: [298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313]
        LAVA:
            keep-inventory: true
            loss-percentage: 50
        DROWNING:
            keep-inventory: true
            cost: 10
            loss-percentage: 5
            whitelist: [298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313]
        SUFFOCATION:
            keep-inventory: true
            cost: 5
            loss-percentage: 10
            whitelist: [1,2,3,4,5,7,12,13,14,15,16,17,19,20,21,22,24,26,27,28,29,33,34,35,41,42,43,44,45,47,48,49,53,57,73,74,79,80,82,89]
        EXPLOSION:
            keep-inventory: false
        VOID:
            keep-inventory: true
            cost: 30
        PVP:
            keep-inventory: true
            cost: 1
        CREEPER:
            keep-inventory: true
            cost: 5
            loss-percentage: 15
            whitelist: [267,268,269,270,271,272,273,274,275,276,277,278,279,290,291,292,293]
        MOB:
            keep-inventory: true
            cost: 5
            loss-percentage: 15
            whitelist: [267,268,269,270,271,272,273,274,275,276,277,278,279,290,291,292,293]
        UNKNOWN:
            keep-inventory: true
            loss-percentage: 20
            whitelist: [298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,267,268,269,270,271,272,273,274,275,276,277,278,279,290,291,292,293]
            


    Propably you could fix the random drop bug with no-whitelist-causes by adding a new feature (add a new line to the config, true means all items that are not restored get dropped, false means no items are dropped). I could take a look at your source but I guess I don't have enough time atm...
     
  27. That config looks okay. Did you test multiple causes, also something simple without a whitelist (like void or pvp)?
    Also, does any message show up upon death, and which?

    Version 1.13 is released with a quick fix for the deathcontrol.free permission. Try it out, maybe I did fix something I can't remember ;)
    Link is in the OP.
     
  28. Offline

    DJAddi

    Thanks for that. Yes, I tested every single cause and it seems to follow the rules I posted above, independent of the death cause. The messages are correct, even for the causes with whitelist (so the problem is not the cause detection). The respawn bug only appeared when getting killed by another player. Changing the method does not seem to have any effect (the command works fine but only with the given circumstances)
    So, everything works fine except for the whitelist and the drops that stay if the rest is restored (end of my last post, see it as a feature request because it is not that important).
    Have fun,

    Addi
     
  29. Wait, so now I'm entirely mad. I just read the replies since July 15th (period of half a month), and they were completely new to me. I was never notified nor did they show up for me. Last E-Mail/Alert was at July 14th and I swear I checked this thread pretty recently since then - but there was never anything new.
    I think I am going crazy ...

    Sorry to everyone who I didn't reply to, I didn't see any of your posts until now :S
    Now let's make up for it ...

    Should not be hard to do, added to ToDo-list.

    Uh, sounds like a hassle to setup the configuration for that. Maybe if I (or someone else ;)) can think of a good structure to accomplish that.

    First point: Yes, you can be sure that it won't be a forced feature (if I ever take the nerves to implement it).
    Second point: Can't find anything wrong in the config, make sure you have the latest version (1.13 now) of the plugin.
    I'm still getting a ton of downloads for the first ever released .jar-file (v1.0), even though there is no more download link for it :confused:

    Sounds interesting, should be possible when I introduce the new list-system. Noted.

    I'm always a friend of logging stuff. There should already be a basic implementation of that, but it doesn't seem to work properly ... Noted.

    The "lock" would be far easier to configure, ranges would be another huge hassle in the config file. I'll think about the lock when I come to cost percentage in the first place.

    Check your capitalization. I'm not sure if YAML cares about it, but it should be "FALL" instead of "Fall" and "cost" instead of "Cost".
    You wrote "Loss-percentage", which is probably causing your problem with keeping everything. Lower-case on that one!

    FYI, "/death back" is only if you use the command-method. And with your water-whitelist setup only diamond tools are supposed to be kept, that the rest drops is normal.

    And what's wrong with /reload? I'm using it all the time, and it works perfectly for me (and correctly deals with stored items since a couple of versions).

    It should usually capture and save your armor and give it back to your inventory when you say so (automatically or on command, depends on configuration). And it should drop after the time is up. Try some more investigation about that. If it occurs frequently, please post a more detailed report.

    Do you get the message that iConomy was found on startup?
    It should write the following:
    Code:
    [DeathControl] Detected economy plugin: iConomy 5
    Thank you, I'm glad you can use the idea of the plugin :)

    Yup, on its way.



    Dude, I'm really overwhelmed by all this posts I never saw ... Sorry for replying so late :(

    @DJAddi
    Seems like a pretty complex problem, but I could never reproduce it on my test server. Especially the "respawn bug" looks really weird to me.
    There should be no differences at all for different death causes - they are all treated the same way. But "should" doesn't seem to be true lately (look at my last post :confused:).

    Anyway, whitelists and most of the death handling routine will be completely recoded soon, I hope that will fix that strange behavior.

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

    DJAddi

    Wow... after you posted that you are not going to continue this plugin I really got scared (because the features are epic) and I especially didn't think that you would rewrite the whole thing...
    All I can say for that: Keep up the good work!
    By the way, I did not manage to reproduce the respawn fail... I guess it was a bug concerning Residence, not DeathControl. Sorry for that.
    Have fun,

    Addi
     

Share This Page