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.
Now with full control over what items to keep and what items should stay in the SleepingPlayer!
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
Companion Plugin:
Add SleepingPlayerWatcher to your server to prevent potential issues caused by loader downtimes or other problems load SleepingPlayers.
Known Issues:
- Not compatible with Allow_Per_Character_Saves (this will be automatically disabled)
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
SleeperSpawnDelayInSec: Spawns SleepingPlayers after a specified delay (allowing players a chance to reconnect)
Decay_Time: The time in seconds until SleepeingPlayers should decay (0 = max value / default = 1209200 = 14 days)
SafezoneDecay_Time: The time in seconds until SleepeingPlayers in safezones should decay 900 = 15min by default (Decay only happens upon server restart!)
Changing decay times 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!
SleepingPlayerSearchRadius: The radius, in decimeters, within which StorageExtensions are searched in (4 by default).
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
DestroyEmptySleepingPlayersInSafezone: When the inventory of a SleepingPlayer in the safezone is emptied, the SleepingPlayer is automatically removed from the safezone (killing the owner)
SpareKilledSleepingPlayers: Decides if returning players should be killed if their SleepingPlayer was destoyed (killed while offline)
If enabled it will only remove all items and not kill the player
IgnoreAdmins: If admins should spawn SleepingPlayers
SleeperFlagRequirement: If a player flag value needs to meet a certain condition to spawn sleepers
Enabled: To enable the flag check
FlagId: The flag id to check
FlagValue: The value to check against
Condition: Vanilla flag conditions (make sure to spell them correctly, they are case sensitive!):
LESS_THAN,
LESS_THAN_OR_EQUAL_TO,
EQUAL,
NOT_EQUAL,
GREATER_THAN_OR_EQUAL_TO,
GREATER_THAN
BetterSpawnChecks: Prevents teleport abuse by returning players who were crouched or prone under objects
RemovedItems: Allows defining items as ItemExtensions that will be completely removed on logout! (old name ItemBlacklist)
SaveLogoutItems: Allows defining items as ItemExtensions that are save to logg out with. No sleeper will be spawned as long as you only carry those items, this includes worn clothing (old name ItemWhitelist)
AllowEmptySleepingPlayers will override this!
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
Advanced Item Settings:
Do not edit those settings without clearing all SleepingPlayers first as this could lead to duplicated or lost items!
All kept items will not show up in the SleepingPlayer and can not be stolen, not even when killing them. They will still be in your inventory when logging back in! For more info check the examples below.
DropKeptItemsOnOfflineDeath: Decides what happens with kept items if you get killed while being offline. If this is enabled your items will drop on the ground once you reconnect, if it is disabled you will respawn with all items still on you.
RestrictedSleeperItemsUsage: decides how to use the RestrictedSleeperItems and supports 2 option RestrictStoredItems / KeepItems.
- KeepItems: will not store those items in the SleepingPlayer!
- RestrictStoredItems: will only store those items in the SleepingPlayer and nothing else (This takes priority over RestrictSleeperEquipment)!
RestrictedSleeperItems: Allows defining items as ItemExtensions that will be used according to the RestrictedSleeperItemsUsage.
RestrictSleeperEquipment: Allows defining which clothing items are kept (not stored in SleepingPlayers) including primary and secondary weapons.
The following settings would prevent people from stealing backpacks and the primary weapons of logged out palyers. All other inventory and clothing items can still be stolen!
<RestrictSleeperEquipment>
<KeepBackpack>true</KeepBackpack>
<KeepVest>false</KeepVest>
<KeepShirt>false</KeepShirt>
<KeepPants>false</KeepPants>
<KeepHat>false</KeepHat>
<KeepMask>false</KeepMask>
<KeepGlasses>false</KeepGlasses>
<KeepPrimary>true</KeepPrimary>
<KeepSecondary>false</KeepSecondary>
<KeepHands>false</KeepHands>
</RestrictSleeperEquipment>
The following settings would prevent people from stealing police vests and hammers of logged out palyers. All other inventory and clothing items can still be stolen!
<RestrictedSleeperItemsUsage>KeepItems</RestrictedSleeperItemsUsage>
<RestrictedSleeperItems>
<ItemExtension Id="10" Name="Vest_Police" />
<ItemExtension Id="138" Name="Hammer" />
</RestrictedSleeperItems>
ItemExtension:
Allows for easier configuration by automatically adding the item name if a valid item id is given.
<RemovedItems>
<ItemExtension Id="52200" Name="SleepingPlayer" />
<ItemExtension Id="52201" Name="SleeperBackpack" />
</RemovedItems>
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 destroy 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" only palyers with this permission and admins will see the workshop warning
"SleepingPlayer.Bypass" allows to bypass SleepingPlayers (players with this permission do not spawn a SleepingPlayer)
Most 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 Remove [Radius] <Spare> (removes all sleepers in a given m radius around the player, Spare will only remove sleepers and not kill owners or take items)
// by default this removes all sleepers around the caller, if Spare is used this will also remove them from the CurrentSleepers list
(3) /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
(4) /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 safezones" />
<Translation Id="safe_logout_empty" Value="with an empty inventory (no items and no clothing)" />
Asset File Setup:
Make sure to disable ShowWorkshopWarning in the config if you use your own sleepers Your .dat file should include:
- 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:
<SleepingPlayerConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Version>1.8.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>
<SafezoneDecay_Time>900</SafezoneDecay_Time>
<SaveIntervalInSec>120</SaveIntervalInSec>
<SleepingPlayerSearchRadius>4</SleepingPlayerSearchRadius>
<AllowEmptySleepingPlayers>true</AllowEmptySleepingPlayers>
<AllowSleepingPlayersInSafezone>true</AllowSleepingPlayersInSafezone>
<IgnoreAdmins>false</IgnoreAdmins>
<BetterSpawnChecks>true</BetterSpawnChecks>
<SpareKilledSleepingPlayers>false</SpareKilledSleepingPlayers>
<DestroyEmptySleepingPlayersInSafezone>true</DestroyEmptySleepingPlayersInSafezone>
<Debug>false</Debug>
<RemovedItems />
<SaveLogoutItems>
<ItemExtension Id="59395" Name="UnknownItem" />
<ItemExtension Id="59396" Name="UnknownItem" />
<ItemExtension Id="59397" Name="UnknownItem" />
</SaveLogoutItems>
<DropKeptItemsOnOfflineDeath>false</DropKeptItemsOnOfflineDeath>
<RestrictedSleeperItemsUsage>KeepItems</RestrictedSleeperItemsUsage>
<RestrictedSleeperItems />
<RestrictSleeperEquipment>
<KeepBackpack>false</KeepBackpack>
<KeepVest>false</KeepVest>
<KeepShirt>false</KeepShirt>
<KeepPants>false</KeepPants>
<KeepHat>false</KeepHat>
<KeepMask>false</KeepMask>
<KeepGlasses>false</KeepGlasses>
<KeepPrimary>false</KeepPrimary>
<KeepSecondary>false</KeepSecondary>
</RestrictSleeperEquipment>
</SleepingPlayerConfiguration>
Bugs
If you find any bugs, please contact me on Discord @derspeedmann
User Reviews
Все працює
It seems like I installed everything according to the instructions, but the plugin doesn’t work. Perhaps there is an error in the installation of "Product" id prouct can be taken simply in the link? or just use the name
Been a user since 2022; all I can say that it just works as stated :handshake:
The SleepingPlayers mod was conflicting IDs with one of the mods my server was using, so I reached SpeedMann and he helped me solve this problem in less than 12 hours so it was awesome. The plugin is easy to configure and does it's job.
Что можно о нем сказать, работает хорошо, как надо! тех.поддержка быстрая, приятная. Все четко!
Plugin works excellently and although we had some issues at first, the dev was incredibly easy to reach and helped us resolve them.
In the following review, I will use Google translator. The plugin is great, the developer always answered any questions, as soon as there was some kind of problem with the plugin, or it broke after the last update, the developer immediately made a fix, the keyword IMMEDIATELY. The plugin has excellent optimization, after it was added to the servers, the fps counter or ping did not change in any way. Its functionality deserves a separate point, I saw with my own eyes how new functions were added to the plugin, now this plugin can be configured in general for any situation you need, you rarely find a plugin that would provide such deep customization functionality. I have been using the plugin since the beginning of 2022 (it used to be sold elsewhere) and I can safely recommend it to everyone without exception.
this plugin will make my server be RP Survival same rust 90% I want you to make a skin player for remmember who is it thank for this plugins <3
Skinned sleepers where already recommended by multiple people sadly unturned does not support this, at least not with the way my plugin works at the moment Since barricades can’t be mannequins and have storage at the same time