Solved Permanent death (permadeath)

Discussion in 'Plugin Requests' started by Duxor, Jan 16, 2016.

  1. Hi everyone, I'm new to the forum but have been playing rust since legacy. I'm currently in the process of setting up a dedicated server for Rust and I'm looking to work with someone interested in helping develop a perma death mod for rust.

    This isn't a discussion about whether it is a good idea or not, instead it's a discusion on

    1. how this could be implemented
    2. who is interested in helping

    Summary

    A mod that introduces perma-death to Rust.
    Perma-death resets when server is wiped.

    Possible Methods Implementation

    1. Ban player until reset

    If a player is killed, they are automatically added to the banned list until the server is wiped (using CanBeWounded Oxide hook)

    - If player is automatically banned, can a custom message be given to the player if they try to join? Something like "You're dead, next wipe is xx/xx/xx.

    - When server is wiped (force wipe or admin wipe), banned list should automatically reset.

    - How to deal with issue of banning hackers and unbanning dead players? Can banned users have a comment associated with them?

    - Can the unbanning process be automated? Perhaps when a killed player is banned, their steam ID is stored. When the server is wiped, those particular users are unbanned (usingremoveid "steamid" and the Oxide data table feature)

    2. Timed ban until reset

    To minimise admin work a schedule for server wipe could be configured and the player could be banned for x time calculated as scheduled wipe date time minus current time.

    3. Remove ability to respawn

    This seems like something that is hardcoded, but might be possible.

    3. Purgatory

    When a player respawns, they are spawned into a zoned/private area where they can no longer interact with living players. Possibly using the OnFindSpawnPoint Oxide hook.

    Other Issues/Ideas

    1. Automation

    As a mod, it should require minimal admin duties such

    Unbanning dead players
    Announcing new wipe

    2. Publishing data to web

    What kind of data can be captured from the game and made available as XML for web publishing? It would be great if a record of each wipe/season could be published to a website with who survived each wipe/season along with some of their stats.
    1. Does anyone have any other suggestions for how perma-death could be achieved?
    2. Is anyone interested in helping develop the mod? (I have pretty limited coding skills but keen to learn)
    3. Which language would be best to use for this mod?
     
  2. That actually sounds rather interesting. I might (privately) tinker with the idea a bit.
    Regarding your last question, C# is generally the best language for Rust plugins.
     
  3. Awesome!

    Having had a look through some of the plugins, here are a few more thoughts.

    Start protection - Start Protection for Rust | Oxide

    Probably a good idea if it's perma death

    Zone manager - Zones Manager for Rust | Oxide

    Refers to a jail. This could be used to create Purgatory. Players that are killed are teleported to a zoned area inside a building they can't leave.
    Additionally, if the anti-offline raid mod is used, the building those players are in can be non-destructable (so other players don't free them from purgatory).

    However, that could introduce another game feature. Players in purgatory could be freed by the living if they break in to purgatory. Purgatory would have to be re-built by admin which is manual work and not idea.

    Custom spawn points - Custom Spawn Points for Rust | Oxide

    Might be useful for purgatory.

    SQL Stats for web stats - SQLStats for Rust | Oxide

    Have a website for recording stats of each season/wipe
     
  4. This could be done with something like this totally untested code that i wrote in Notepad :p

    Code:
            private object CanClientLogin(Network.Connection connection)
            {
                //Check how many deaths they have had.
                if (Convert.ToInt32(DeathsDatabase.CallHook("PlayerDeathsFromID", connection.userid)) > 1 )
                    return "You have died already and cannot play here";            // Client is not in the DB already, allow them to play
                return true;
            }
    
    Of course, this uses a fictional plugin called DeathsDatabase to see how many times the player has died by userid.

    If the player has died before, their connection will be terminated with the reason of "You have died already and cannot play here", which will be shown to them in the servers description window at the bottom.

    Neat idea though, perhaps ConnectionsDB can be modified to save Deaths of players too.
     
  5. Or you could just be a little less lazy and save it yourself in 5 minutes of work. :p
     
  6. You can use Whitelist plugin and customize message with : You are dead, come back next wipe!
    Just call whitelist plugin and remove him from the whitelist, You should add the player to list when init and remove from list when dead :D
     
  7. Thanks for the suggestions, Tuntenfisch wrote a barebones version. Send him a message if you're interested in testing it out.
    [DOUBLEPOST=1453527164,1453435165][/DOUBLEPOST]If you're interested, I've set up a server running this mod in OZ.

    Search for "perma death" in modded servers or connect to 45.121.209.1:49375
     
  8. Every player has 1 life (or more), when they are out of lives, they cannot play anymore.

    What counts as a death?
    - killed by Player
    - Bleed Out, Suicide, Fall, Trap
    - Hunger, Heat, Cold, Drown, Radiation
    - killed by Animal

    How to permadeath?
    - ban, kick on connect
    - no respawn, but can still chat
    - each death gives you a growing penalty, 1st death = 10 minutes, 2nd death = 30 min, 3rd death = 1 hour etc

    How to restart/reset?
    - map wipe
    - console/chat command
    - periodic/scheduled mass unban (every X hours)

    References:
     
    Last edited by a moderator: May 21, 2017
  9. how bout, after x amount of deaths all items related to that player is despawned.
    sleeping bags, house, weapons, boxes you name it...

    awakens as a fresh new naked.

    this way they stay on the server and realizes hmm I need to be more careful or ALL the crap i just worked hours for will be gone again.

    EDIT: Maybe even have a reward for surviving longer... after 48 hours can earn 1 life back?
     
    Last edited by a moderator: Jun 5, 2017
  10. I have finished the plugin, will post once I test.
     
  11. Im curious which direction you went, many different possibilities! :) :D
     
  12. HEY! you used my idea man! thats awesome!

    :-D