Raidable Shelters

Oxide Raidable Shelters 1.7.1

Sign in to download
This plugin randomly spawns shelters near players for them to raid. Each shelter comes with automatically generated entities like boxes and furnaces, along with the items they hold.

You can customize the respawn frequency of these shelters and set how long they stay before despawning.




Shelters Not Spawning

If you're noticing that shelters aren't spawning, it's likely due to certain criteria not being met. Shelters are designed to spawn at random locations around players who meet specific conditions, such as not being in monuments, near enemy bases, or in water. If shelters aren't appearing, it means there were no valid positions available when the plugin checked for spawning.

To help troubleshoot and visualize why shelters may be failing to spawn, you can enable the debug mode in the config. This mode provides visual feedback on the reasons behind shelter spawn failures, including player states (e.g., swimming, near monuments) and environmental factors (e.g., rocks, roads).

Chat Commands

  • /rs.test - Spawns a test shelter at the player's current location. This command is available only to admins and is primarily intended for testing purposes.

Configuration

JSON:
{
  "Version": "1.7.0",
  "Enable Debug": false,
  "Number Of Attempts To Find Shelter Position Near Players": 5,
  "Minimum Search Radius For Shelter Position Around Player": 20.0,
  "Maximum Search Radius For Shelter Position Around Player": 50.0,
  "Shelters Respawn Frequency Minutes": 60.0,
  "Delay Between Each Shelter Spawn Seconds": 5.0,
  "Nearby Entities Avoidance Radius": 6.0,
  "Rocks Avoidance Radius": 5.0,
  "Distance From No Build Zones": 10.0,
  "Shelter Health": 500.0,
  "Shelter Lifetime Seconds": 600.0,
  "Number Of Attempts For Determining Entity Position Inside Shelter": 30,
  "Number Of Attempts For Determining Entity Rotation Inside Shelter": 30,
  "Door": {
    "Skin Ids": [
      809253752,
      2246937402,
      2483070538,
      3076134051
    ]
  },
  "Turret": {
    "Spawn Auto Turret": true,
    "Health": 250.0,
    "Weapon ShortName": "rifle.ak",
    "Clip Ammo": {
      "ShortName": "ammo.rifle",
      "Skin Id": 0,
      "Minimum Amount": 30,
      "Maximum Amount": 30
    },
    "Reserve Ammo": [
      {
        "ShortName": "ammo.rifle",
        "Skin Id": 0,
        "Minimum Amount": 128,
        "Maximum Amount": 128
      }
    ],
    "Attachment Shortnames": [
      "weapon.mod.lasersight"
    ],
    "Peacekeeper": false
  },
  "Trap": {
    "Spawn Landmines": false,
    "Spawn Bear Traps": true,
    "Minimum Number Of Traps To Spawn": 1,
    "Maximum Number Of Traps To Spawn": 5,
    "Minimum Spawn Radius Around Shelter": 3.0,
    "Maximum Spawn Radius Around Shelter": 5.0
  },
  "Notification": {
    "Notify Surrounding Players Of Shelter Spawn": false,
    "Radius For Notifying Nearby Players": 40.0,
    "Send As Toast": false
  },
"Interior Entities": [
    {
      "Prefab Name": "assets/prefabs/deployable/woodenbox/woodbox_deployed.prefab",
      "Skin Ids": [],
      "Minimum Number To Spawn": 1,
      "Maximum Number To Spawn": 3,
      "Percentage To Fill Container With Items If Present": 20
    },
    {
      "Prefab Name": "assets/prefabs/deployable/furnace/furnace.prefab",
      "Skin Ids": [],
      "Minimum Number To Spawn": 1,
      "Maximum Number To Spawn": 1,
      "Percentage To Fill Container With Items If Present": 0
    }
  ],
  "Items To Spawn Inside Entity Containers": [
    {
      "Shortname": "fat.animal",
      "Skin Id": 0,
      "Minimum Amount": 10,
      "Maximum Amount": 25
    },
    {
      "Shortname": "cloth",
      "Skin Id": 0,
      "Minimum Amount": 20,
      "Maximum Amount": 30
    },
    {
      "Shortname": "wood",
      "Skin Id": 0,
      "Minimum Amount": 200,
      "Maximum Amount": 400
    },
    {
      "Shortname": "syringe.medical",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 2
    },
    {
      "Shortname": "rope",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 3
    },
    {
      "Shortname": "cctv.camera",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    },
    {
      "Shortname": "roadsigns",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 2
    },
    {
      "Shortname": "stones",
      "Skin Id": 0,
      "Minimum Amount": 150,
      "Maximum Amount": 350
    },
    {
      "Shortname": "metal.fragments",
      "Skin Id": 0,
      "Minimum Amount": 30,
      "Maximum Amount": 90
    },
    {
      "Shortname": "ammo.grenadelauncher.he",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 2
    },
    {
      "Shortname": "coffeecan.helmet",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    },
    {
      "Shortname": "scrap",
      "Skin Id": 0,
      "Minimum Amount": 10,
      "Maximum Amount": 25
    },
    {
      "Shortname": "icepick.salvaged",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    },
    {
      "Shortname": "ptz.cctv.camera",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    },
    {
      "Shortname": "corn",
      "Skin Id": 0,
      "Minimum Amount": 3,
      "Maximum Amount": 5
    },
    {
      "Shortname": "ammo.rocket.mlrs",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    },
    {
      "Shortname": "wall.frame.garagedoor",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    },
    {
      "Shortname": "pistol.revolver",
      "Skin Id": 0,
      "Minimum Amount": 1,
      "Maximum Amount": 1
    }
  ]
}
  • Enable Debug - This mode provides visual feedback on the reasons for shelter spawn failures, such as player state (e.g., swimming, near monuments) or environmental constraints (e.g., rocks, roads). The debug information is displayed only to players with admin privileges. It's recommended to enable this only when necessary for troubleshooting purposes.
  • Number Of Attempts To Find Shelter Position Near Players - Specifies how many attempts the plugin will make to find a suitable position for a shelter near a player.
  • Minimum Search Radius For Shelter Position Around Player - The minimum distance from a player within which the plugin will search for a suitable shelter position.
  • Maximum Search Radius For Shelter Position Around Player - The maximum distance from a player within which the plugin will search for a suitable shelter position.
  • Shelters Respawn Frequency Minutes - How often, in minutes, the plugin will attempt to respawn shelters.
  • Delay Between Each Shelter Spawn Seconds - The delay, in seconds, that the plugin waits before moving on to check the next player for shelter spawning. This ensures that shelters are spawned without overwhelming the server.
  • Nearby Entities Avoidance Radius - The radius within which the plugin will avoid placing shelters near existing entities.
  • Rocks Avoidance Radius - The radius within which the plugin will avoid placing shelters near rocks.
  • Distance From No Build Zones - The distance from building blocked areas where the plugin will avoid placing shelters.
  • Shelter Health - Defines the total health of the shelter. The health value set here also synchronizes with the health of the shelter's door.
  • Shelter Lifetime Seconds - The duration, in seconds, that a shelter will remain active before being despawned.
  • Number Of Attempts For Determining Entity Position Inside Shelter - How many attempts the plugin will make to find a suitable position for an entity inside a shelter.
  • Number Of Attempts For Determining Entity Rotation Inside Shelter - How many attempts the plugin will make to find a suitable rotation for an entity inside a shelter.
  • Door- Settings for the shelter's door:
    • Skin Ids - A list of skin ids that will be randomly selected and applied to the shelter door when it spawns.
  • Turret- Settings related to the auto turret that can be deployed on top of shelters:
    • Spawn Auto Turret - If enabled, an auto turret will automatically spawn on top of the shelter.
    • Health - Sets the amount of damage the turret can take before being destroyed.
    • Weapon Short Name - Specifies the shortname of the weapon that the turret will be equipped with upon spawning.
    • Clip Ammo- Configures the type and amount of ammo loaded into the weapon's magazine:
      • Short Name - The shortname of the ammunition type to load into the turret's weapon.
      • Skin Id - The skin id to apply to the ammunition (optional).
      • Minimum Amount - The minimum amount of ammo to load into the weapon's clip.
      • Maximum Amount - The maximum amount of ammo to load into the weapon's clip.
    • Reserve Ammo- A list of additional ammo to place in the turret's reserve inventory, which the turret will use once the clip is emptied:
      • Short Name - The shortname of the ammunition type to store as reserve ammo.
      • Skin Id - The skin id to apply to the reserve ammunition (optional).
      • Minimum Amount - The minimum amount of reserve ammo to store.
      • Maximum Amount - The maximum amount of reserve ammo to store.
    • Attachment Short Names - A list of short names for any weapon attachments that will be added to the turret's weapon (e.g., scopes, lasers).
    • Peacekeeper - If enabled, the turret will operate in peacekeeper mode, targeting only hostile players (e.g., players holding a weapon or marked as hostile).
  • Trap- Controls the spawning of traps around the shelter.
    • Spawn Landmines - Enables or disables spawning of landmines around the shelter.
    • Spawn Bear Traps - Enables or disables spawning of bear traps around the shelter.
    • Minimum Number Of Traps To Spawn - Sets the minimum number of traps that will spawn around the shelter.
    • Maximum Number Of Traps To Spawn - Sets the maximum number of traps that will spawn around the shelter.
    • Minimum Spawn Radius Around Shelter - Defines the minimum distance from the shelter within which traps will spawn, preventing them from being too close to the shelter.
    • Maximum Spawn Radius Around Shelter - Defines the maximum distance from the shelter within which traps will spawn.
  • Notification- Settings for notifying players about shelter spawns:
    • Notify Surrounding Players Of Shelter Spawn - Determine whether surrounding players should be notified when a shelter spawns. If set to false, only the player for whom the shelter spawned will be notified.
    • Radius For Notifying Nearby Players - Defines the radius within which nearby players will be notified.
    • Send As Toast - If disabled, notifications will be sent as chat messages.
  • Interior Entities- List of entities to spawn inside the shelter. Each entity configuration includes:
    • Prefab Name - Path to the prefab of the entity.
    • Skin Id - Skin id to apply to the entity.
    • Minimum Number To Spawn - The minimum number of this entity to spawn.
    • Maximum Number To Spawn - The maximum number of this entity to spawn.
    • Percentage To Fill Container With Items If Present - The percentage of the container to fill with items if the entity is a container.
  • Items To Spawn Inside Entity Containers- List of items to spawn inside entity containers. Each item configuration includes:
    • Shortname - Shortname of the item.
    • Skin Id - Skin ID of the item.
    • Minimum Amount - The minimum amount of this item to spawn.
    • Maximum Amount - The maximum amount of this item to spawn.

Stored Data

The plugin also saves the following information:
JSON:
{
  "Raidable Shelters": {
    "4480682": {
      "Interior Entities": [
        4480686,
        4480692
      ],
      "Removal Timer": 339.9337158203125
    }
  }
}
  • Raidable Shelters- Stores the unique ids of active shelters.
    • InteriorEntities - Lists the ids of entities spawned inside each shelter.
    • Removal Timer - Tracks the time remaining (in seconds) before each shelter is removed.
This ensures that shelters are always removed as scheduled, even after server crashes.

Localization

JSON:
{
  "RaidableShelterSpawned": "A raidable shelter has spawned nearby!"
}

Developer API

C#:
bool API_IsShelterRaidable(LegacyShelter shelter)
  • Checks if the given shelter is a raidable shelter.

Developer Hooks

C#:
object OnShelterInteriorEntitySpawn(LegacyShelter shelter, string prefabName, Vector3 position, Quaternion rotation)
  • Called when an entity is about to be spawned inside a raidable shelter.
  • Returning false will prevent the entity from being spawned.
  • Returning null will result in the default behavior.
C#:
void OnShelterInteriorEntitySpawned(LegacyShelter shelter, BaseEntity entity)
  • Called after an entity has been spawned inside a raidable shelter.
  • No return behavior.
Author
VisEntities
Downloads
182
First release
Last update

Ratings

5.00 star(s) 7 reviews

Also by VisEntities

Latest updates

  1. 1.7.1

    Shelters will no longer spawn if no interior entities can be successfully placed due to bad...
  2. 1.7.0

    Traps can now be spawned around shelters, including landmines and bear traps.
  3. 1.6.0

    Added possibility to spawn an auto turret on top of shelters. See the documentation for a full...

Latest reviews

very good plugin
Very fun idea especially for early wipe, gives players the opportunity to have a mini raid on our PvE server. The latest autoturret option makes it extra fun. Nice configuration
This plugin is dope!! Good work man
Back
Top