Offline Raid Shield

Offline Raid Shield 1.1.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.
  • 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 keywords
  • Only 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 to 0, 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)
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.
Author
VisEntities
License duration
Unlimited
Price
9.99 USD
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

Latest updates

  1. 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