About Offline Raid Protection
The Offline Raid Protection plugin is a comprehensive solution designed to protect players' structures and vehicles while they are offline. It offers a range of customisable protection levels based on real-time or the length of time a player has been offline, and integrates with the Clans plugin and the in-game teams feature to determine protection status based on the online status of all clan or team members and authorised players.
Key Features
Configurable Protection Levels: Set protection levels based on real time or the amount of time since a player went offline. For example, a building can have 100% protection one hour after a player goes offline, and 50% protection after two hours. This feature is highly configurable.
Clan/Team Integration: The plugin integrates with the Clans plugin and the in-game teams feature. The protection status of a structure or vehicle is determined by the online status of all clan or team members and authorised players.
Penalty System: An optional penalty system is implemented to prevent abuse of the protection feature. For example, if a player leaves a clan or team, a penalty can be applied to all members and protection can be disabled for a configurable period of time.
Game Tip Messages: The plugin displays game tip messages to players when they hit a protected structure or vehicle. The message includes the percentage of protection and is colour coded according to the level of protection. It supports all the languages available in Rust.
Commands: Players with permission can use commands to check the protection status of other players, change the offline time of other players, and change the penalty status.
Cache System: The plugin uses a caching system to optimise performance and keep the impact on the server to a bare minimum.
Configuration: The plugin includes a configuration file that allows you to customise the behaviour of the plugin.
Commands
All commands can be configured.
- /orp or /ao <steam id or full name> — Check a player's offline protection status. You can type the command without a name when looking at a player's structure.
- /raidprot — Display offline raid protection information.
- /orp.fill.onlinetimes — Fill all players offline times. (Chat & Console command)
- /orp.test.offline <steam id or full name> <hours> — Change a player's offline time.
- /orp.test.online <steam id or full name> — Change a player's offline time to the current time.
- /orp.test.penalty <steam id or full name> <hours> — Change the duration of a player's penalty. A negative value or zero would disable the penalty.
- /orp.update.permission — Update the permissions status (offlineraidprotection.protect) for all players.
- orp.update.prefabs <true> - Updates the 'Prefabs to protect' list in the configuration. Overwrites the list with the 'true' argument. (Console command)
- orp.dump.prefabs - Clears the 'Prefabs to protect' list in the configuration. (Console command)
Permissions
All permissions can be configured.
- offlineraidprotection.protect — Allows a player to be protected from raids when offline.
- offlineraidprotection.check — Allows a player to check the offline protection status of other players.
- offlineraidprotection.admin — Allows a player to use all admin commands of the plugin.
To grant a permission, use carbon/oxide.grant <user or group> <steamname or ID> <permission>. To revoke a permission, use carbon/oxide.revoke <user or group> <steamname or ID> <permission>.
Configuration
The configuration is to a large extent self-explanatory.
Raid Protection Options
Only mitigate damage caused by players:
-
Choose whether or not to only mitigate damage caused directly by players.
Protect players that are online:
- Choose whether or not to protect the bases of the players who are online.
-
Works when "Scale of damage depending on the current hour of the real day" is configured.
Scale of damage depending on the current hour of the real day:
- Defines the protection levels based on the current hour of the real day.
- The key is the hour of the day (0-23), and the value is the protection scale (0 — 340282300000000000000000000000000000000).
Example:
"0": 0.0, "1": 0.0, "2": 0.0, "3": 0.0 This means that the protection level is 100% from midnight to 3am.
Scale of damage depending on the offline time in hours:
- Defines the protection levels based on the time since the player went offline. The key is the number of hours since the player went offline, and the value is the protection scale (0 — 340282300000000000000000000000000000000).
- The value of the hours can also be a decimal number.
Example:
"12": 0.25, "24": 0.5, "48": 1.0, "96": 2.0 This means that 12 hours after the player goes offline, the protection level will be 75%. After 24 hours it will be 50% and after 48 hours it will be 0%. After 96 hours, the damage is increased by 200%.
Cooldown in minutes:
-
During this time, damage levels will remain vanilla. Raids are possible.
Scale of damage between the cooldown and the first configured time:
-
During this time, the level of damage between the cooldown and the first configured time can be set to a specific value, such as 0.0
Online time to qualify for offline raid protection in minutes:
-
Time to qualify for offline raid protection after a player connects
Protect all prefabs:
- Choose whether to protect all prefabs or only specific ones.
-
This will protect anything in the TC range.
Protect AI (animals, NPCs, Bradley and attack helicopters etc.) if 'Protect all Prefabs' is enabled:
- Choose whether or not to protect AI entities if "Protect all Prefabs" is enabled.
-
May cause high hook times if set to true.
Protect vehicles:
- Choose whether to protect vehicles or not.
- Vehicle authorisation always has priority.
-
If you want to exclude certain vehicles from protection, add them to the blacklist.
Protect twigs:
-
Choose whether to protect twigs or not.
Prefabs to protect:
- List of prefabs that will be protected.
-
Make sure you remove the prefabs you don't want to protect, some of them are pointless.
Prefabs blacklist:
- List of prefabs that will not be protected.
- Prefabs in the blacklist will always have priority to be unprotected.
Timezone Options
The fallback timezone is UTC if you leave it blank in the configuration, or if your configured timezone doesn't exist.
The timezone identifiers are different for Windows and Linux.
You can check the appendices to find your preferred timezone.
Conclusion:
The Offline Raid Protection plugin provides a comprehensive solution for protecting players' structures and vehicles when they are offline. This plugin is essential for any Rust server owner who wants to provide a fair and enjoyable gaming experience for their players.
Acknowledgments
Special thanks to @Kulltero for his valuable feedback and suggestions during the development of this plugin.
Windows_Timezones.txt Linux_Timezones.txt