Portable Fort
Throw a grenade to instantly spawn a full base where it lands
Dependencies
Copy Paste (Required)
Works With


This Rust plugin lets players throw special grenades that instantly spawn full prebuilt bases on impact, just like the Port-A-Fort from Fortnite. Using Copy Paste files, you can define multiple grenade types, each with their own builds and fuse times.

Commands

  • pf.givegrenade <playerNameOrId> <configIndex> [amount] - Gives amount (default 1)of the selected fort‑grenade to the target player.
    • playerNameOrId - Full/partial name or Steam ID.
    • configIndex - Index of the grenade entry in the config.
    • amount (Optional) - Number of grenades to give.
This command is intended for admins, useful for testing or for other plugins to dispense grenades.

Configuration

JSON:
{
  "Version": "1.7.0",
  "Ignore Water Shallower Than This Depth": 1.0,
  "Return Grenade If Combat Blocked (Better No Escape)": false,
  "Return Grenade If Raid Blocked (Better No Escape)": false,
  "Fort Grenades": [
    {
      "Grenade Skin Id": 1163186435,
      "Grenade Display Name": "Port-A-Fort",
      "Fuse Length Seconds": 10.0,
      "Paste Files": [
        {
          "Filename": "StarterBase",
          "Override Entity Ownership To Throwing Player": true,
          "Override Building Grade": "None",
          "Raise Building By This Amount": 2.3,
          "Paste Options": {
            "stability": "false",
            "deployables": "true"
          }
        },
        {
          "Filename": "TrapBase",
          "Override Entity Ownership To Throwing Player": false,
          "Override Building Grade": "Twigs",
          "Raise Building By This Amount": 2.8,
          "Paste Options": {
            "stability": "false",
            "blockcollision": "0"
          }
        },
        {
          "Filename": "FurnaceBase",
          "Override Entity Ownership To Throwing Player": true,
          "Override Building Grade": "Wood",
          "Raise Building By This Amount": 1.8,
          "Paste Options": {
            "stability": "true",
            "deployables": "true",
            "inventories": "true"
          }
        }
      ]
    },
    {
      "Grenade Skin Id": 815252048,
      "Grenade Display Name": "Port-A-Fort 2",
      "Fuse Length Seconds": 5.0,
      "Paste Files": [
        {
          "Filename": "HeliTower",
          "Override Entity Ownership To Throwing Player": true,
          "Override Building Grade": "Stone",
          "Raise Building By This Amount": 2.5,
          "Paste Options": {
            "stability": "true",
            "auth": "false"
          }
        },
        {
          "Filename": "RaidCamp",
          "Override Entity Ownership To Throwing Player": false,
          "Override Building Grade": "Metal",
          "Raise Building By This Amount": 3.2,
          "Paste Options": {
            "stability": "true",
            "deployables": "true",
            "inventories": "true"
          }
        }
      ]
    }
  ]
}
  • Ignore Water Shallower Than This Depth - Fort placement is blocked only if the water at the impact point is deeper than this value (in metres). Lets you allow building in puddles and shallow rivers while still preventing ocean drops.
  • Return Grenade If Combat Blocked - If Better No Escape says the thrower is combat-blocked, the fort won't spawn and the grenade is instantly given back to them.
  • Return Grenade If Raid Blocked - Same, but triggered when the thrower is raid-blocked instead of combat-blocked.
  • Fort Grenades- A list of grenade definitions that can spawn forts when thrown.
    • Grenade Skin Id - The skin id of the grenade item to match. If you want to use the default grenade (no skin), set this to 0.
    • Grenade Display Name - Optional custom name to further identify the grenade. Leave this empty to match any name (just relies on the skin id).
    • Fuse Length Seconds - Time in seconds before the fort spawns after the grenade lands.
    • Paste Files - A list of Copy Paste file names the plugin will randomly pick from when this grenade is used.
Inside each Paste File:
  • Filename - The name of the Copy Paste file to load (do not include .json extension).
  • Override Entity Ownership To Throwing Player - If true, the pasted base will belong to the grenade thrower (they can authorize on TC, open doors, etc.). If false, ownership is unchanged and defaults to nobody.
  • Override Building Grade - Forces all blocks in the pasted base to this building grade.
    Available values:
    • None - Keep the grade saved in the paste file
    • Twigs
    • Wood
    • Stone
    • Metal
    • TopTier
  • Raise Building By This Amount- How much to raise the base above the ground (in meters). Use reasonable values:
    • A value too high can make the base float.
    • A negative value can bury it below the terrain.
  • Paste Options - Optional CopyPaste options to control how the base is pasted.
    Supported keys include:
    • stability - Whether to apply building stability (true or false)
    • deployables - Include deployable items (true or false)
    • auth - Automatically authorize the thrower on cupboards (true or false)
    • inventories - Load saved container contents (true or false)
Some options are forced internally and cannot be changed:
  • autoheight is always false
  • blockcollision is always 0

Localization

JSON:
{
  "GiveGrenade.Usage": "Usage: pf.givegrenade <playerNameOrId> <configIndex> [amount]",
  "GiveGrenade.IndexInvalid": "Invalid configIndex '{0}'. It must be a number.",
  "GiveGrenade.NoConfigFound": "No grenade config found at index {0}.",
  "GiveGrenade.NoPlayerFound": "No active player found matching '{0}'.",
  "GiveGrenade.FailedCreate": "Failed to create grenade.f1 item!",
  "GiveGrenade.Success": "Gave '{0}' grenade (index {1}) x{2} to player {3}.",
  "Grenade.Refund": "Couldn't place the fort: {0}\nYour grenade has been returned!"
}

Developer Hooks

C#:
object OnFortDeploy(BasePlayer player, TimedExplosive grenade, string pasteFile)
Called immediately after the grenade's fuse expires but before the fort is pasted, giving other plugins a chance to approve, cancel, or modify the deployment.
  • player - The player who threw the grenade.
  • grenade - The TimedExplosive entity that is about to trigger the paste.
  • pasteFile - The name of the CopyPaste file the plugin intends to paste.
  • Return values:
    • false - Cancel the deployment and refund the grenade.
    • string - Cancel the deployment and show the returned string as the refund reason.
    • Dictionary<string,string> - If it contains a key "PasteFile", the value replaces the file that will be pasted; any other return is ignored.
C#:
void OnFortFinishedPasting(BasePlayer player, List<BaseEntity> entities)
Called once, after every block has been placed and upgraded to its final grade.
  • player - The owner of the new fort.
  • entities - A complete List<BaseEntity> representing every entity that was spawned for this fort.
  • Like
Reactions: magnumk
Author
VisEntities
License duration
Unlimited
Price
9.99 USD
First release
Last update

Ratings

5.00 star(s) 1 reviews

Also by VisEntities

  • Nerfed Raid Building
    Nerfed Raid Building
    Prevents entities placed during raids from starting at full health, gradually healing them afterward
  • Unarmed Parachuting
    Unarmed Parachuting
    Prevents players from equipping items while parachuting
  • Extended Demolish
    Extended Demolish
    Lets you change how long players can demolish their own structures

Latest updates

  1. 1.7.0

    The config structure has been completely reworked. You must delete the old config file before...
  2. 1.6.0

    Added a ground-impact explosion effect the moment the fort grenade begins deploying. Added...
  3. 1.5.0

    Added Refund Grenade On Combat Block and Refund Grenade On Raid Block settings that...

Latest reviews

Plugin works wonderfully!

When you are adding the grenade to the Loottable, ensure you match up the Name with the grenade skin ID in the same block so it works correctly. I made this mistake and the grenade will perform as a grenade rather than the Fort grenade.

The fuse length makes it interesting as well with the ability to decide how long until the base starts building.

Amazing addition to the plugins already put out.
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