About ScrapRaidProtection
ScrapRaidProtection
Offline raid protection powered by Scrap upkeep inside the Tool Cupboard.
Protection activates only when a base is truly offline and scales automatically by base size using clean 5-piece steps (0–100+).

What This Plugin Does
Allows TC-authorized players to enable or disable offline raid protection per Tool Cupboard.
Protection is fair, transparent and fully automated using Scrap upkeep.
Core Features
Per Tool Cupboard offline raid protection
/raid toggle command with live status feedback
Clean in-game status UI
Optional HUD warning for attackers
Automatic Scrap upkeep system
English & German language support (player-based)
Offline Protection Logic
Protection does NOT activate instantly.
All of the following conditions must be met:
Tool Cupboard is registered for protection
All authorized players are offline
Offline delay has fully elapsed
Enough Scrap is available in the Tool Cupboard
Important note:
If an authorized player has never logged in since the plugin started, protection will not activate until that player is seen online at least once.
Damage Rules (While Active)
Unauthorized players deal zero damage to protected entities:
Building blocks
Doors
Simple building entities
Authorized players are never restricted.
Scrap Upkeep System
Scrap cost is calculated per hour
Cost scales automatically by base size
Scrap is deducted at fixed intervals
Fractional Scrap usage is tracked internally
Protection disables automatically if Scrap cannot be paid
No exploits. No silent failures.
Base Size Calculation
Counts connected building blocks linked to the Tool Cupboard
Twig blocks are excluded
Internal hard cap at 5000 blocks
Bases larger than 100 pieces are treated as 100+
HUD Warning (Optional)
Unauthorized players near a protected base receive periodic HUD warnings when protection is active.
Uses gametip.showtoast
Title, message and interval are configurable via config.
Commands
/raid
Toggle raid protection for the Tool Cupboard you are looking at.
Requirements:
Within 3 meters
TC authorization required
The status UI opens automatically.
User Interface
The status UI displays:
Protection state
Base size
Scrap cost per hour
Scrap stored in the Tool Cupboard
Offline delay requirement
Current activation state
UI close command:
raidprot.ui.close
Permissions
No Oxide permissions are used.
Access is controlled exclusively via Tool Cupboard authorization.
Language Support
English
German
Messages automatically follow the player’s language setting.