Offline Raid Shield

Offline Raid Shield 1.2.0

Protects player bases while they're offline with timed shields
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.


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.
  • Closes the loophole where alt accounts can keep a base protected while someone else is inside.
  • 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.2.0",
  "Only Protect Bases That Have A Tool Cupboard": true,
  "Never Protect Entities Matching These Keywords (prefab or type name)": [
    "sign",
    "furnace",
    "refinery"
  ],
  "Only Block These Damage Types (leave empty to block all damage types)": [
    "Explosion",
    "Bullet",
    "Blunt",
    "Slash",
    "Stab",
    "Arrow"
  ],
  "Seconds After Last Owner Logout Before Shield Turns On (0 = instant)": 600,
  "Maximum Shield Duration Minutes (0 = stays on until someone logs in)": 360.0,
  "Shield Strength Percent (100 = no damage, lower = partial damage)": 100,
  "Do Not Enable Shield If Base Was Damaged Within Last X Seconds (0 = disabled)": 900,
  "Disable Shield When A Non-Ally Unlocks A Door (prevents alt account exploit)": true,
  "Who Counts As Allies (owner is always included)": {
    "Include Tool Cupboard Authorized Players": true,
    "Include Teammates": true,
    "Include Friends (from Friends plugin)": true,
    "Include Clanmates (from Clans plugin)": true,
    "Include Allied Clans (from Clans plugin)": false
  }
}
  • Only Protect Bases That Have A Tool Cupboard - If true, only entities that belong to a base with an active tool cupboard are eligible for offline protection; if false, any owned entity can be protected.
  • Never Protect Entities Matching These Keywords - List of prefab/type name substrings; any entity whose prefab or type name contains one of these keywords will never be protected (for example signs, furnaces, refineries).
  • Only Block These Damage Types - Limits which damage types are affected by the shield; leave empty to reduce/block all damage, or list specific damage types (like Explosion, Bullet, etc.) to only protect against those.
  • Seconds After Last Owner Logout Before Shield Turns On - How many seconds the owner/allies must be offline before the shield starts protecting the base (0 means protection starts as soon as everyone is offline).
  • Maximum Shield Duration Minutes - Maximum number of minutes the shield can stay active while everyone is offline; after this time the base becomes fully raidable again (0 means it stays active until someone logs in).
  • Shield Strength Percent - How strong the offline protection is; 100 means the base takes no damage, lower values allow a percentage of damage through (for example 80 means the base takes 20% of normal damage).
  • Do Not Enable Shield If Base Was Damaged Within Last X Seconds - Cooldown window in seconds that blocks the shield from turning on if the base was recently damaged; set to 0 to ignore recent damage and always allow the shield to activate.
  • Disable Shield When A Non-Ally Unlocks A Door - When enabled, a non-ally successfully entering a door code marks the base as recently raided so the shield cannot stay active, closing the alt-account “safe base” loophole.
  • Who Counts As Allies- Group of settings that define which players are treated as allies of the base owner for online/offline checks and shield eligibility.
    • Include Tool Cupboard Authorized Players - If true, players authorized on the base's tool cupboard are treated as allies for shield checks.
    • Include Teammates - If true, players in the same Rust team as the owner are treated as allies for shield checks.
    • Include Friends - If true, friends from the configured Friends plugin are treated as allies for shield checks.
    • Include Clanmates - If true, members of the same clan (via Clans plugin) are treated as allies for shield checks.
    • Include Allied Clans - If true, members of clans that are allied with the owner's clan are also treated as allies for shield checks.

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)
Returns whether the given entity is currently protected by the offline raid shield system.
  • 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, otherwise false.
  • Like
Reactions: (Manky)sieve
Author
VisEntities
License duration
Unlimited
Price
7.99 USD
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

Latest updates

  1. 1.2.0

    Added a configurable ally scope so you can choose who counts as part of the base (tc auth...
  2. 1.1.1

    Patched for the November 6th Rust update.
  3. 1.1.0

    Added API_HasOfflineRaidProtection for other plugins to check if a base is currently protected.
Back
Top
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin. Parameters in < > are required, while [ ] are optional.
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Ensure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart