SleepingPlayers (Rust)

( )( )( )( )( ) (0)

SleepingPlayers

This Plugin was created to stop people from logging off with their best gear or store it on multiple characters to not lose it when being raided. This makes secure bases a must have!

When logging off your character with all its items will stay on the server. Your Inventory can be looted and you can be killed when not logging out in a secure spot.

Plugin Features:

  • Save logout options available

  • Use your own Sleepers

  • Supports plugin reloading

  • Prevent obstructed player teleport abuse

  • Easy server integration / removal

  • No lag

  • Crash resistant

Sleeper Features:

  • Auto resizing Sleeper Inventory
  • Walkthrough
  • Affected by player orientation
  • Changeable Decay Timer

Workshop Mod

The plugin should be used with this Mod. There is also the option to use your own storage assets!


Settings

In newer versions you are now free to change config settings while the plugin is running, but keep in mind that you should never change storage ids in config without using the proper commands first!

General Settings:

Version: Shows the current plugin version (do not change this)
ShowWorkshopWarning: Disable this when using your own sleepers to prevent warnings
ShowWelcomeMessage: If the welcome message explaining the new logout logics should be shown

SleepingPlayerStorageId: Allows selecting the preferred Barricade by id (default 52200)
The SleepingPlayerStorageId should only be changed using the command /SleepingPlayers ChangeSleeper [AssetId] or on wipe!
StorageExtensions: Allows adding StorageExtensions to store more than 200 items, see StorageExtension at the bottom.

If you use your own barricades check the Barricade Requirements further down!

StorageWidth: Sets the default width (1-255) of all SleepingPlayers and StorageExtensions (10 is good for most screen scales)
StorageHeight: Sets the default height (1-255) of all SleepingPlayers and StorageExtensions If AutoResize is disabled this is min height (height automatically scales up to 255 if current size does not fit all items)

AutoResize: AutoResize fits the storage size to the stored items This reduces the height of the storage to the minimum considering the stored items
Decay_Time: The time in seconds until SleepeingPlayers should decay (0 = max value / default = 1209200 = 14 days)
Changing this will only affect new SleepingPlayers
SaveIntervalInSec: defines how often the SleepingPlayers info should be written to CurrentSleepers.json
This also prevents item loss on server crash!
AllowEmptySleepingPlayers: If players with empty inventory (no items and no clothing) stay on the server as SleepingPlayers (prevent empty Sleepers from cluttering the beaches)
AllowSleepingPlayersInSafezone: If players logging off in a safezone should stay on the server as SleepingPlayers
IgnoreAdmins: If admins should spawn SleepingPlayers
BetterSpawnChecks: Prevents teleport abuse by returning players who where crouched or prone under objects

Debug: Enables debug output.

SleepingPlayers: this list was replaced with CurrentSleepers.json which stores steam ids and display name of all disconnected players with a SleepingPlayer


StorageExtension:

Unturned storages are limited to 200 items; to overcome this issue the support for StorageExtensions was added. Each StorageExtension is its own barricade and provides space for 200 additional items. They will be spawned in the order they are defined and only if they are required. You can change position offset and rotation of each barricade. All settings applying to the SleepingPlayer also apply to the StorageExtensions (Width, Height, AutoResize, Decay_Time) To kill a SleepingPlayer you will need to destoy the Sleeper and every StorageExtension!

    <StorageExtension>
      <ExtensionId>52201</ExtensionId>
      <Offset>
        <x>-0.3</x>
        <y>0</y>
        <z>0.1</z>
      </Offset>
      <Rotation>
        <x>-5</x>
        <y>90</y>
        <z>-90</z>
      </Rotation>
    </StorageExtension>

Setup / Removal:

Integration with and without wipe is now supported!

Only things to keep in mind are:

  • Use "/SleepingPlayers Remove" before removing this plugin! This command removes all the current SleepingPlayers and prevents new ones from spawning until the plugin is reloaded or server is restarted

  • If you want to change SleepingPlayerStorageId or any StorageExtension values use "/SleepingPlayers Remove" before changing any values!

  • Use "/Rocket Load SleepingPlayer", "/Rocket Reload SleepingPlayer" or restart the server to apply changes


Commands

Permission: "SleepingPlayers.Admin" "SleepingPlayer.Bypass" allows to bypass SleepingPlayers (players with this permission do not spawn a SleepingPlayer) All commands can be used in console and by admins / players with the permission

These are all commands of the SleepingPlayers-Plugin
(0) /SleepingPlayers Help (shows this info)
(1) /SleepingPlayers Remove (call this before you remove the plugin from your server; removes all sleepers and prevents new ones)
// this command is required to remove the plugin safely from your server / change Asset ids
(2) /SleepingPlayers Sleep <All> (test sleeper spawning with last save file of your character, adding All spawns sleeper with all StorageExtensions)
// this command is used to test SleepingPlayers and update positioning of your own Barricades
(3) /SleepingPlayers Wakeup (test SleepingPlayerSearchRadius, sleeper detection and removal)
// remove Sleepers spawned by Sleep command / check SleepingPlayerSearchRadius
// searches for valid Speepers and StorageExtension in the given SleepingPlayerSearchRadius with the palyer as center

Translation:

  <Translation Id="welcome_message" Value="This server is using {0} {1}, your body will stay on the server when logging out!" />
// The {0} is filled with "SpeedMann's SleepingPlayer", {1} is filled with the current version numer
  <Translation Id="safe_logout_main" Value="You can safely logout {0}" />
// The {0} is filled with the selected safe_logout translations
  <Translation Id="safe_logout_savezone" Value="in savezones" />
  <Translation Id="safe_logout_empty" Value="with an empty inventory (no items and no clothing)" />

Make sure to disable ShowWorkshopWarning in the config


Asset File Setup:

Make sure that your .dat file has:

  • Useable Barricade
  • Build Storage
  • Storage_X 10 (10 is max to still be visible on most resolutions)
  • Storage_Y 25 (storage size 250 is recommended for Vanilla)
  • Vulnerable (to allow damage by any means)
  • DONT ADD! Unpickupable (this would break the plugin because owner would not be set)

Unity Setup:

If you use your own model you might want to make the barricade walkthrough like the original. This can be achieved by changing the Layer of all the components in the Barricade to Small. You can change the impact effect by changing the Material of your Colliders, eg. Flesh will result in blood splatters and flesh hit sounds


Default Settings:

  <Version>1.6.0.0</Version>
  <ShowWelcomeMessage>true</ShowWelcomeMessage>
  <ShowWorkshopWarning>true</ShowWorkshopWarning>
  <SleepingPlayerStorageId>52200</SleepingPlayerStorageId>
  <StorageExtensions>
    <StorageExtension>
      <ExtensionId>52201</ExtensionId>
      <Offset>
        <x>-0.3</x>
        <y>0</y>
        <z>0.1</z>
      </Offset>
      <Rotation>
        <x>-5</x>
        <y>90</y>
        <z>-90</z>
      </Rotation>
    </StorageExtension>
    <StorageExtension>
      <ExtensionId>52202</ExtensionId>
      <Offset>
        <x>-0.7</x>
        <y>0.3</y>
        <z>-0.3</z>
      </Offset>
      <Rotation>
        <x>85</x>
        <y>90</y>
        <z>0</z>
      </Rotation>
    </StorageExtension>
  </StorageExtensions>
  <StorageWidth>10</StorageWidth>
  <StorageHeight>60</StorageHeight>
  <AutoResize>true</AutoResize>
  <Decay_Time>1209200</Decay_Time>
	<SaveIntervalInSec>150</SaveIntervalInSec>
  <SleepingPlayerSearchRadius>4</SleepingPlayerSearchRadius>
  <AllowEmptySleepingPlayers>false</AllowEmptySleepingPlayers>
  <AllowSleepingPlayersInSafezone>false</AllowSleepingPlayersInSafezone>
  <IgnoreAdmins>false</IgnoreAdmins>
  <BetterSpawnChecks>true</BetterSpawnChecks>
  <Debug>true</Debug>

Bugs

If you find any bugs, please contact me on Discord SpeedMann#7437

User Reviews

No reviews found.

Store: SpeedMann

Price: $10



Supported payment methods
PayPal, Skrill, WebMoney

Supported Platforms
RocketMod

All future updates (bug fixes, new features, etc.) are included in the price.