About DestroyUnlootedCrates
DestroyUnlootedCrates is a plugin designed for Rust servers to automatically handle loot containers (crates) that have not been looted within a specified time frame. This plugin provides a way to manage the environment, ensuring that loot containers do not remain forever, encouraging players to interact with them. It can be customized to convert items to scrap or gradually destroy items in the container. Server admins can easily configure which loot containers are affected, how long they remain before being cleared, and if they should be converted to scrap upon destruction.
Features:
Automatic Crate Cleanup: Loot containers that are not looted within a specific time are automatically destroyed.
Item Conversion to Scrap: Items in the crates can be converted into scrap when they are destroyed.
Gradual Destruction: Instead of instant deletion, items in the crates can be destroyed over time.
Configurable: Every aspect of the plugin can be adjusted via a configuration file, including crate types, time delays, and whether items are converted to scrap.
Multi-Language Support: Supports multiple languages for in-game notifications.
Flexible Settings: You can enable or disable crate types in the config file, and even set different destruction delays for each crate.
Installation:
Download: Download the DestroyUnlootedCrates plugin file and place it in the oxide/plugins/ folder on your Rust server.
Configuration:
Upon first installation, the plugin will automatically generate a configuration file (DestroyUnlootedCrates.json) in the oxide/config/ folder.
Open the configuration file to customize the plugin settings. All crates, delays, and scrap conversion options can be set here.
Configuration File:
The configuration file (DestroyUnlootedCrates.json) contains several customizable options:
PluginEnabled: Enable or disable the plugin.
NotifyPlayer: Whether players should receive a notification when items are converted to scrap or destroyed.
ConvertToScrap: Determines if items should be converted to scrap when the container is destroyed.
GradualDestruction: Whether items should be destroyed gradually instead of immediately.
ScrapAmount: Defines how much scrap an item should be converted into.
AffectedContainers: A dictionary of loot containers that can be affected by the plugin (each crate type can be individually enabled or disabled).
ContainerDestroyDelays: The time (in seconds) before a crate is destroyed after its contents have not been looted.
Example Configuration:
{ "PluginEnabled": true,
"NotifyPlayer": true,
"ConvertToScrap": false,
"GradualDestruction": false,
"ScrapAmount": 5,
"AffectedContainers": { "crate_normal": true, "crate_basic": true, "crate_tools": true, "crate_elite": true, "crate_military": true },
"ContainerDestroyDelays": { "crate_normal": 10, "crate_basic": 10, "crate_tools": 15, "crate_elite": 20, "crate_military": 30 } }
How It Works:
Crate Cleanup: Once a loot container is placed and has been left unopened for a set time (based on the container’s destroy delay), the plugin will either destroy the items or convert them to scrap, depending on your settings.
Item Conversion: If enabled, all items inside the crate will be converted into scrap upon destruction. The amount of scrap given can be adjusted in the configuration.
Gradual Destruction: If gradual destruction is enabled, the plugin will destroy items over a specified period rather than instantly.
Notification: Players who are near the affected crate will receive a notification when the loot is either converted to scrap or destroyed.
Commands:
No specific commands are needed for this plugin, as it works automatically based on the configuration settings.
Example Use Case:
Imagine you are running a Rust server where you want to ensure that crates don't sit around forever, cluttering the map. You could configure the plugin to delete basic crates after 10 minutes if they are not looted. You could also configure elite crates to convert any remaining items to scrap after 30 minutes. This helps to maintain server performance and adds an additional challenge for players who need to loot crates before they are destroyed.
Troubleshooting:
"Entität ist keine LootContainer!": This error occurs when the plugin is trying to interact with an entity that is not a loot container. Make sure the entities in your server are valid loot containers.
Config not loading properly: If the configuration is not loading correctly, check the oxide/config/ folder for the DestroyUnlootedCrates.json file. If it's missing or corrupted, the plugin will generate a new one.
Notes:
Make sure your server's performance is optimal when running plugins that modify loot containers frequently.
Test the plugin on a local server first to ensure it meets your needs before deploying it to a live server.
Regularly back up your server configuration and plugin files.
Conclusion:
The DestroyUnlootedCrates plugin provides server admins with an efficient way to manage loot containers in Rust. With its customizable settings, it ensures that the game world remains dynamic and prevents clutter from containers that are left unattended for too long. Whether you want to clear the loot, convert it to scrap, or gradually destroy items, this plugin has you covered!