MixMods Creator Directory

Outside Unsafe Base: what changed and why

By MixMods · Updated · 6 min read

On this page
  1. What it does
  2. What we found in the original
  3. What changed, version by version
  4. How we tested it
  5. What we left alone, and why
  6. Install
  7. Get help

Outside Unsafe Base is a Rust plugin by Frank of Iron Routes: NPC raid parties that come for a base once its owner has earned it, instead of random raids on anyone at any time. MixMods reviewed the original, fixed what we found, and tested every tier on a real base before this release. This page covers what we found, what changed, and how to install it.

The plugin itself is on the Outside Unsafe Base listing, free, for Carbon and Oxide.

What it does

Players earn "threat" by doing things that make them a target: killing NPCs, looting locked crates, destroying a Bradley or a patrol helicopter. Once an online player's threat crosses a line, and they are standing inside their own base, a raid party spawns outside and tries to break in. There are four tiers: Recon just watches, Harassment throws a satchel charge, Breach throws C4, and Suppression fires rockets. Each tier needs more threat, and a base history of having survived earlier raids, before it can be sent. Nothing happens to a sleeping or offline player, and nothing happens to a base nobody is standing in.

What we found in the original

We read the original code line by line before touching anything. Three faults mattered most:

  • Every NPC kill on the server wrote the whole save file to disk. On a busy server, that is a disk write on almost every single NPC kill, not just the ones that actually earned threat.
  • Damage tracking ran on every hit of every object on the server — building blocks, deployables, animals, vehicles — to catch the rare case of a Bradley or helicopter fight, paid on the single busiest event in the game.
  • Rebuilding the tool cupboard reset a base's raid history to zero. Tier progress was tied to the cupboard's own in-game ID, which changes every time one is placed. A player could demolish and replace their cupboard forever and never see anything harder than the easiest tier, no matter how much trouble they caused.

The first two were already fixed by the time we started, in an earlier rewrite of the plugin we built on. The third one, we fixed ourselves: tier progress is now tied to the player's own ID and the base's footprint, which survives a cupboard being rebuilt on the same foundation.

What changed, version by version

  • 2.3.0 — raiders could not walk at all. A raider spawned directly, without the one-time setup step Rust's own navigation system needs before it will plan a route for that specific NPC. Every other NPC in the game gets that step automatically; these raiders did not, so they stood still forever. The fix adds the missing step right after a raider spawns. This version also closed the tool-cupboard reset found above, and added an optional way to give raiders a custom kit of clothes and weapons instead of their stock gear.
  • 2.3.1 — a breacher killed itself with its own charge. On a real base, a lone breacher threw one satchel, then died to the blast, while two support raiders stood outside doing nothing. Now a breacher backs off about 8 metres after every charge and waits for the fuse before going back in. If a breacher dies anyway with the raid still in progress, a support raider takes over the job instead of the raid stalling.
  • 2.3.2 — Breach and Suppression could never start. Those two tiers picked a target wall by searching near the breacher's own spawn point, 35 to 60 metres from the base, so they never found one. Harassment's method — looking down a straight line in front of the raider — worked from any distance. Every tier now uses that same method.
  • 2.3.3 — Recon scouts never moved. Recon has no breacher by design; it is meant to be a visible, watching presence. But its scouts used the same "walk to the locked wall" logic as the attacking tiers, and Recon never locks a wall, so they stood at their spawn point for the whole raid. Scouts (and any tier's support raiders, briefly, before a wall locks) now walk a slow loop around the base instead.
  • 2.3.4 — rocket raiders stood too close, and a raid that ran out of charges just idled. Every tier's breacher walked in to the same close range, even Suppression's rocket raider, which only needs to fire from 18 metres — well inside a rocket's own blast. Breachers firing something that explodes on impact now hold their tier's real firing range instead. Separately, once a tier used up its charges, raiders used to stand there for the rest of the raid's clock. Now they hold a short grace period and then the raid ends itself as a successful defense, the same as any other win.

How we tested it

All four tiers were forced against a real, player-built base and watched from start to finish, not a stand-in test base built by script:

  • Harassment: three raiders, the wall locked in about 20 seconds, satchels placed roughly every 30 seconds, the breacher stepping back after each one, the wall and foundation taking real damage each time.
  • Breach: four raiders, the wall locked within a second, all five allowed C4 charges placed, and the raid ended with the tool cupboard itself destroyed — the first time in testing a raid had taken a base down.
  • Suppression: two breachers, both alive for the whole raid at a steady stand-off distance, four rockets fired roughly a minute apart, the wall destroyed, then a 90-second grace period before the raid ended itself cleanly with charges used up.
  • Recon: two scouts, confirmed walking a loop around the base instead of standing still, no attack, no damage — working as the watching presence it is meant to be.

We also confirmed raider pathing on open ground, charge placement at each tier's own range, and rocket stand-off distance (steady at a little over 8 metres, instead of the earlier close-in distance that killed a breacher with its own blast).

What we left alone, and why

We did not touch the things that were already right: the threat thresholds for each tier, the cooldowns between raids (both per-base and server-wide), which explosive each tier uses, or the save file's name and format. An update from an earlier version keeps every existing setting and every player's saved threat; it only adds the new settings above, with sensible defaults.

One thing is not a bug and nothing in the plugin can fix it: a raid needs open, walkable ground near the base. A base built out over water, wedged into rocks, or perched on a cliff edge may leave raiders with nowhere to stand — the same limitation any NPC in the game has near that kind of terrain.

Install

  1. Drop both OutsideUnsafeBase.cs and the included MixBots.cs into your plugins folder. MixBots is required — raiders use it to get a working navigation handoff when they spawn.
  2. Both compile and load on their own; a default config and save file are created on first load.
  3. There is nothing for players to opt into. Give the admin permission to any staff who should reach the commands without the server's own admin flag.

Full config keys, commands and permissions are on the listing page.