rRaidProtection
Author: Ftuoil XelrashVersion: 2.2.122
Game: Rust (Oxide/uMod)
Configurable raid protection at the cost of a resource. Protect players' bases, items, vehicles, and traps while they are online, offline, or both — charged periodically from the Tool Cupboard inventory or an economics balance.
Features
- Protection toggles automatically based on owner online/offline status
- Supports item-based costs (TC inventory), Economics, or ServerRewards
- Per-tier protection levels tied to Oxide permissions
- Configurable protection percentage (0–100%) for online and offline states independently
- Optional wipe-progression: protection % increases each day since wipe, up to 100%
- Optional structure damage cost (balance is drained proportional to damage taken)
- Status bar showing current protection state, percentage, and time remaining — stacks correctly with vanilla Rust modifier bars
- In-game TC panel UI with deposit/withdraw controls (Economics/RP mode)
- Admin commands for inspecting and forcing protection levels
/rpadminfull-screen admin panel listing all active TCs with balance, sortable and paginated
Dependencies
| Plugin | Required | Notes |
|---|---|---|
| Economics | Optional | Required if Use economics balance is true |
| ServerRewards | Optional | Required if Use reward points is true |
| ImageLibrary | Optional | Used for the HUD indicator icon |
Permissions
| Permission | Description |
|---|---|
rraidprotection.admin | Admin access — exempted from protection costs, can use admin commands |
rraidprotection.level.0 | Grants protection level 0 (default level) |
rraidprotection.level.N | Grants protection level N (add levels in config) |
Commands
| Command | Description |
|---|---|
/protection | Show protection info for your current TC |
/pro | Alias for /protection |
/protection <tc_id> | (Admin) Show info for a specific TC by network ID |
/rpadmin | (Server admin only) Open the admin panel — paginated table of all TCs with balance |
Admin Panel (/rpadmin)
Requires server admin (IsAdmin). Opens a full-screen GUI panel listing every TC with a meaningful balance (≥ 0.05).Sort order: Protected → Damaged → Pending → Unprotected, then by TC Balance descending within each group.
| Column | Description |
|---|---|
| Name | Display name of the player who placed the TC |
| Steam ID | Placer's Steam ID — click to receive their profile URL in chat |
| Eco Balance | Placer's current Economics or ServerRewards balance (N/A if not in use) |
| TC Balance | Balance stored in the TC for protection payment |
| Time Left | Estimated protection time remaining at current cost rate |
| Location | TC coordinates — click to teleport to the TC |
| Authed | Number of players authorized on the TC |
| $/hr | Protection burn rate per hour. Second line shows building tier counts (T/W/S/M/H) |
| TC Maint | Native Rust TC upkeep time remaining. Second line shows per-hour resource cost (e.g. W:10 S:5). Shows Decaying in red when TC has no upkeep items; estimated rate shown with ~ prefix when exact rate is unavailable |
| %Prot | Effective online/offline protection percentages |
| Status | Current protection status with countdown: Protected, Damaged Xs (damage delay running), Pending Xs (offline delay running), Pending Logoff (waiting for owner to disconnect), or Unprotected |
Configuration
File:oxide/config/rRaidProtection.json{
"General settings": {
"Currency item ID (if not using economics)": -932201673,
"Use economics balance (requires economics plugin)": false,
"Use reward points (requires server rewards plugin)": false,
"Only TC owners can withdraw balance (true/false)": true,
"Refund TC balance to placer on destroy (economics/RP only)": false,
"Refund TC balance to owner on wipe (economics/RP only)": false
},
"Protection settings": {
"Delay after taking damage (seconds)": 10,
"Delay for offline protection (seconds)": 600,
"Protect buildings and deployables (true/false)": true,
"Protect players (true/false)": true,
"Protect vehicles and horses (true/false)": true,
"Protect traps and electronics (true/false)": true,
"Protection levels": {
"0": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0
}
}
},
"Cost settings": {
"Material cost multipliers": {
"twig": 1.0,
"wood": 1.0,
"stone": 1.0,
"metal": 1.0,
"armored": 1.0
},
"Default hourly building cost": 1.0,
"Default hourly base cost": 9.0,
"Default structure damage cost": 0.0
},
"Indicator settings": {
"Enabled": true,
"Persistent": false,
"Image url": ""
}
}
Key Settings
| Setting | Description |
|---|---|
Currency item ID | Item used for payment when not using Economics/RP. Default is scrap (-932201673) |
Use economics balance | Use Economics plugin balance instead of TC inventory items |
Use reward points | Use ServerRewards RP instead of TC inventory items |
Only TC owners can withdraw balance | If true, only authorized TC owners can withdraw the balance (default true) |
Refund TC balance to placer on destroy | If true, full TC balance is refunded to the player who placed the TC when it is destroyed. Economics/RP only — item mode drops naturally (default false) |
Refund TC balance to owner on wipe | If true, any saved TC balance is refunded to the TC placer after a wipe. Economics/RP only (default false) |
Delay after taking damage | Seconds before protection re-activates after the base takes damage |
Delay for offline protection | Seconds after last owner disconnects before offline protection activates |
Default hourly base cost | Flat hourly cost per TC regardless of building size |
Default hourly building cost | Additional cost per floor/foundation tile per hour |
Default structure damage cost | Balance drained per point of damage dealt to the base while protected. 0 disables it |
Material cost multipliers | Per-tier cost multipliers (twig/wood/stone/metal/armored) |
How Costs Are Calculated
Protection is charged every 30 seconds. The hourly cost is made up of two components:Base Cost — a flat charge per TC per hour, regardless of building size.
Default:
9 per hour.Building Cost — charged per floor and foundation tile only (walls, ceilings, etc. are ignored).
Tile weighting:
- Square foundation/floor =
1.0 - Triangle foundation/floor =
0.5
1.0 per hour.Example — a 2×2 base with 4 square foundations:
Structure Damage Cost — an optional additional drain charged per point of damage dealt to protected entities while protection is active. Default is
0 (disabled). Example: setting 0.1 means every 10 damage dealt costs 1 from the TC balance.Material Multipliers — if any multiplier is set to a value other than
1.0, the building cost becomes tier-aware. Each tile's cost is multiplied by its tier's value instead of the flat rate:If all multipliers remain at
1.0 (the default), tier is ignored and all tiles cost the same.Per-Level Cost Overrides — each protection level can define its own
Hourly base cost, Hourly building cost, and Structure damage cost. If not set on the level, the global defaults above apply.Wipe Progression
Each protection level can increase its online and offline protection % automatically each day since the last wipe (usingSaveRestore.SaveCreatedTime), capped at 100%.| Field | Default | Description |
|---|---|---|
Increase online protection % over wipe progression | true | Enable daily increase for online % |
Online protection % increase per day | 1.0 | % added per day to online protection |
Increase offline protection % over wipe progression | true | Enable daily increase for offline % |
Offline protection % increase per day | 1.0 | % added per day to offline protection |
Protection Levels
Add multiple tiers toProtection levels in the config, each with its own percentages and optional cost overrides:"Protection levels": {
"0": {
"Online protection percentage (0-100)": 50.0,
"Offline protection percentage (0-100)": 75.0,
"Increase online protection % over wipe progression": true,
"Online protection % increase per day": 1.0,
"Increase offline protection % over wipe progression": true,
"Offline protection % increase per day": 1.0
},
"1": {
"Online protection percentage (0-100)": 100.0,
"Offline protection percentage (0-100)": 100.0,
"Hourly base cost": 20.0,
"Hourly building cost": 2.0,
"Structure damage cost": 0.1,
"Increase online protection % over wipe progression": true,
"Online protection % increase per day": 1.0,
"Increase offline protection % over wipe progression": true,
"Offline protection % increase per day": 1.0
}
}
Grant level permissions to players or groups:
How It Works
- When a TC is placed or a player authorizes, the plugin registers that TC.
- Every
COLLECTION_INTERVALseconds (30s), each active TC drains its balance by the calculated cost. - If the balance runs out, protection stops.
- Protection only activates when the appropriate condition is met:
- Online protection — at least one authorized owner is connected.
- Offline protection — all authorized owners are offline (after the configured delay).
- A HUD indicator appears on players' screens when they enter a TC zone, but only if the TC has a balance and is in Protected or Pending Logoff state. Unprotected, Damaged, and unfunded TCs show nothing.
Installation
- Copy
rRaidProtection.csto youroxide/plugins/directory. - Restart the server or run
oxide.reload rRaidProtection. - Edit
oxide/config/rRaidProtection.jsonas needed. - Grant permissions to player groups.
Support & Community
Discord Support - Join our community for help and discussions
Development & Testing Server
Darktidia Solo Only - See rAlwaysDay and other custom plugins in action!All players are welcome to join our development server where plugins are tested and refined in a live environment.
- Server: Darktidia Solo Only | Monthly | 2x | 50% Upkeep | No BP Wipes
- Find Server: View on BattleMetrics