- Dependencies
- Playtime Tracker (Required)
- Works With
This Rust plugin automatically protects player bases when all owners are offline by activating a damage-reducing shield. You can control how long it takes to activate, how long it lasts, how strong it is, and what damage types it blocks. It also supports teams, friends, and clans to decide who counts as a base ally.
This plugin requires Playtime Tracker to function, as it uses it to detect when players last disconnected and how long they've been offline.
Returns whether the given entity is currently protected by the offline raid shield system.
This plugin requires Playtime Tracker to function, as it uses it to detect when players last disconnected and how long they've been offline.
Features
- Automatically activates a shield on player bases when all owners go offline.
- Shield can fully block or partially reduce incoming damage.
- Option to delay shield activation after the last owner logs off (e.g. wait 10 minutes before activating).
- Option to limit how long the shield stays active while offline, or leave it running until someone logs back in.
- Only applies to entities with a tool cupboard if enabled, preventing random deployables from being protected.
- Allows you to define which damage types are protected (e.g. only raiding damage like explosions and bullets).
- Lets you exclude certain entities from protection using name-based keyword filters.
- Ignores friendly fire from teammates, friends, and clan members.
- Works with Friends and Clans to determine who counts as an owner or ally.
Permissions
offlineraidshield.use
- Players must have this permission for their base to be eligible for protection.
Configuration
JSON:
{
"Version": "1.0.0",
"Only Protect Buildings With Tool Cupboard": true,
"Bypass Protection For These Entity Keywords (prefab or type name substring)": [
"sign",
"furnace",
"refinery"
],
"Only Protect Against These Damage Types (leave empty to protect against everything)": [
"Explosion",
"Bullet",
"Blunt",
"Slash",
"Stab",
"Arrow"
],
"Seconds To Wait After Logout Before Enabling Protection (0 = instant)": 600,
"Protection Duration Minutes (0 = stays active until someone logs in)": 360.0,
"Shield Strength Percent (100 = full immunity, lower means partial)": 100
}
Only Protect Buildings With Tool Cupboard
- If true, protection only applies to bases that have a tool cupboard. This prevents small deployables or objects placed out in the open from being protected. If false, protection applies to any owned entity, even if it's not part of a real base.Bypass Protection For These Entity Keywords
- Entities are not protected if their prefab name or type name contains one of these keywordsOnly Protect Against These Damage Types
- Limits what kinds of damage are blocked by the shield. If left empty, all damage is blocked. If filled in, only those types of damage are reduced or blocked. Supported damage types:- Bullet
- Slash
- Blunt
- Stab
- Arrow
- Explosion
- AntiVehicle
- Collision
- Decay
- ElectricShock
Seconds To Wait After Logout Before Enabling Protection
- Controls how long all base owners and allies must be fully offline before the shield activates. This timer only starts when the last online owner disconnects.Protection Duration Minutes
- How long the shield stays on after everyone logs off. If set to0
, the shield stays up until someone reconnects. If set to a number, it automatically expires after that many minutes.Shield Strength Percent
- Determines how strong the protection is.100
means the base is fully immune and takes no damage. Any lower number allows some damage through. For example,80
means the base takes 20% damage while protected.
Localization
JSON:
{
"Info_OfflineProtected": "This base is protected while its owners are offline.",
"Info_OfflineProtectedRemaining": "This base is protected for another {0}.",
"Info_OfflineProtectedPercent": "This base only takes {0}% damage while its owners are offline.",
"Info_OfflineProtectedPercentRem": "This base only takes {0}% damage for another {1}."
}
Developer API
C#:
bool API_HasOfflineRaidProtection(BaseCombatEntity entity, BasePlayer attacker)
entity
- The entity being attacked (typically a building block or door).attacker
- The player attempting to deal damage to the entity.- Returns
true
if the entity is protected by an active offline raid shield, otherwisefalse
.