Join the Game4Freak Discord Get exclusive plugin sneak peeks, talk directly with VisEntities, never miss important updates, and unlock special discount codes!
Portable Fort

Portable Fort 1.8.0

Throw grenades to instantly deploy complete bases anywhere on the map
Dependencies
Copy Paste (Required)
Works With


Portable Fort allows players to deploy instant structures by throwing specially configured grenades. When a grenade with a matching skin ID and custom name is thrown, it spawns a complete base from your Copy Paste files instead of exploding.

You can set up multiple grenade types, each with its own deploy timer, building grade, and selection of base designs. The plugin handles everything from validating placement to authorizing players on tool cupboards. If deployment fails due to water, terrain, or proximity issues, the grenade is refunded with an explanation.

This opens up gameplay possibilities like starter base kits for new players, tactical raid camps, mobile furnace arrays, or mystery grenades that randomly choose between different designs. The plugin integrates with Copy Paste for structure spawning and optionally with Better No Escape for combat/raid restrictions.

Features

  • Instant base deployment - Throw a grenade and watch a complete structure materialize
  • Multiple grenade configurations - Set up different grenade types with unique skins and behaviors
  • Random base selection - Configure multiple paste files per grenade for variety
  • Smart placement validation - Prevents deployment in water, on roads, in monuments, or near other entities
  • Combat/raid blocking - Optional integration with Better No Escape to prevent deployment during combat
  • Customizable building grades - Force specific grades or preserve original design
  • Animated construction - Choose between instant deployment or progressive twig-to-final-grade animation
  • Ownership system - Automatically authorize throwers on tool cupboards
  • Grenade refund system - Returns grenades when deployment fails with helpful error messages
  • Height adjustment - Fine-tune vertical positioning for each paste file

Dependencies

Required

  • Copy Paste -- Required for all base spawning functionality. The plugin cannot function without it.

Optional

  • Better No Escape -- Enables combat and raid blocking features. Without this, combat/raid blocking settings are ignored.

Commands

Admin Commands

  • pf.give <playerNameOrId> <grenadeName> [amount]-- Gives a configured fort grenade to a player
    • playerNameOrId -- Target player's name or Steam ID (partial names supported)
    • grenadeName -- Name of the grenade configuration (supports partial matching)
    • amount -- Number of grenades to give (optional, defaults to 1)
    • Partial name matching works for both players and grenade names
    • If multiple grenades match the search term, you'll be prompted to be more specific
    • Grenades are given with the correct skin and custom name
    • Examples:
      • pf.give Awesome Port-A-Fort
      • pf.give 76561198012345678 Port-A-Fort 5
      • pf.give player1 Fort 3
  • pf.list-- Lists all configured fort grenades with their details
    • Shows grenade name, skin ID, and number of paste files
    • Helps admins see what grenade configurations are available

Configuration

JSON:
{
  "Version": "1.8.0",
  "Minimum Water Depth To Block Placement": 1.0,
  "Refund Grenade If Combat Blocked (Requires Better No Escape)": false,
  "Refund Grenade If Raid Blocked (Requires Better No Escape)": false,
  "Fort Grenades": [
    {
      "Grenade Skin ID (0 For Default Skin)": 1163186435,
      "Custom Grenade Name": "Port-A-Fort",
      "Seconds Until Fort Deploys After Throw": 10.0,
      "Paste Files (One Is Randomly Chosen)": [
        {
          "Paste File Name (Without Extension)": "StarterBase",
          "Height Offset (Negative Goes Underground)": 2.3,
          "Set Building Owner To Thrower (Authorizes On Tool Cupboard)": true,
          "Build Directly In Final Grade (Skip Twig Animation)": false,
          "Force Building Grade (None Keeps Original)": "None",
          "Copy Paste Plugin Options": {
            "stability": "false",
            "deployables": "true"
          }
        }
      ]
    }
  ]
}

Global Settings

  • Minimum Water Depth To Block Placement-- Controls how deep water must be before blocking fort deployment. If the grenade lands in water deeper than this value, deployment is prevented and the grenade is refunded.
    • 0.5 -- Blocks deployment in shallow puddles
    • 1.0 -- Default; prevents deployment in typical rivers/lakes
    • 2.0 -- Only blocks deployment in deep water
    • 0.0 -- Allows deployment even in water (not recommended)
  • Refund Grenade If Combat Blocked-- When enabled, prevents players in combat from deploying forts and refunds their grenade with an explanatory message. Requires Better No Escape plugin.
    • Use this to prevent combat disengagement by deploying instant cover
  • Refund Grenade If Raid Blocked -- When enabled, prevents players engaged in raiding from deploying forts and refunds their grenade with an explanatory message. Requires Better No Escape plugin.
    • Use this to prevent raiders from instantly deploying defensive positions during raids

Fort Grenade Configuration

Each entry in the Fort Grenades array defines a grenade type that will spawn structures.
  • Grenade Skin ID-- The Workshop skin ID that identifies this grenade type. Players must use grenades with this exact skin ID for the configuration to activate. Set to `0`to match grenades with no skin (default appearance).
  • Custom Grenade Name-- The exact display name the grenade must have. This is checked in addition to the skin ID. Both skin ID AND name must match for the configuration to activate. Leave empty if you only want to match by skin ID.
    • Give the grenade a custom name in-game or use another plugin to rename it
  • Seconds Until Fort Deploys After Throw-- Time delay between throwing the grenade and the fort spawning. This replaces the grenade's normal explosion timer.
    • Shorter times create urgency but less predictability
    • Longer times allow for tactical positioning

Paste File Configuration

Each grenade can have multiple paste files; one is randomly selected when the grenade deploys.
  • Paste File Name-- The name of the Copy Paste file to spawn (without the `.json`extension). File must exist in oxide/data/copypaste/[YourFileName].json
  • Height Offset-- Vertical adjustment applied to the spawned structure relative to the ground position. Positive values raise the structure above ground, negative values lower it (potentially underground).
    • 2.0 to 3.0 -- Typical offset to prevent foundation clipping into terrain
    • 1.0 to 1.5 -- Minimal offset for flat terrain builds
    • 0.0 -- No offset (may clip into uneven terrain)
    • -1.0 -- Partially buried bunker entrance
  • Set Building Owner To Thrower-- When enabled, all spawned entities (including building blocks and tool cupboards) will have their `OwnerID`set to the player who threw the grenade. Player is automatically authorized on spawned tool cupboards and owns all building blocks and deployables.
  • Build Directly In Final Grade-- Controls the visual construction process
    • false (default) -- All blocks spawn as Twig, progressive upgrade animation plays, blocks sequentially upgrade to final grade, construction effects play for each upgrade, takes several seconds to complete
    • true -- Blocks spawn directly in final grade, no twig phase or animation, instant deployment, still plays placement effect for each block
  • Force Building Grade-- Overrides the building grade saved in the paste file. Applies ONLY to building blocks (foundations, walls, etc.), not deployables.
    • None -- Use the grade saved in the paste file
    • Twigs -- Force all blocks to Twig
    • Wood -- Force all blocks to Wood
    • Stone -- Force all blocks to Stone
    • Metal -- Force all blocks to Sheet Metal
    • TopTier -- Force all blocks to Armored
  • Copy Paste Plugin Options-- Advanced options passed directly to the Copy Paste plugin during pasting. See the Copy Paste plugin documentation for all available options and their descriptions.
    • Common options: stability, deployables, auth, inventories, blockcollision
    • Note: The plugin automatically forces autoheight to "false" and blockcollision to "0" regardless of your config for reliable deployment

Localization

JSON:
{
  "Error.NoPermission": "You do not have permission to use this command.",
  "Error.NoMatch": "No grenade found matching '{0}'. Use pf.list to see available grenades.",
  "Error.Ambiguous": "Multiple grenades match '{0}': {1}. Be more specific.",
  "Error.NoPlayerFound": "No active player found matching '{0}'.",
  "Error.FailedCreate": "Failed to create grenade.f1 item!",
  "Error.InvalidAmount": "Invalid amount '{0}'. It must be a positive number.",
  "Give.Usage": "Usage: pf.give <playerNameOrId> <grenadeName> [amount]",
  "Give.Success": "Gave {1}x '{0}' grenade to {2}.",
  "List.Header": "Available Fort Grenades:",
  "List.Entry": "  - {0} (skin: {1}, {2})",
  "List.Empty": "No fort grenades configured.",
  "Info.GrenadeRefund": "Could not place the fort: {0}\nYour grenade has been returned!"
}

Developer Hooks

OnFortDeploy

Called before a fort begins deploying, allowing other plugins to prevent or modify deployment.
C#:
object OnFortDeploy(BasePlayer player, TimedExplosive grenade, string pasteFile)
Parameters:
  • player -- The player who threw the grenade
  • grenade -- The TimedExplosive entity (the grenade itself)
  • pasteFile -- The name of the paste file about to be deployed
Return Values:
Allow deployment (return null):

C#:
return null;
Block deployment with custom message:
C#:
return "You cannot deploy forts in this area!";
Block deployment silently:
C#:
return false;
Modify paste file:
C#:
return new Dictionary<string, string> { ["PasteFile"] = "AlternateFort" };
Example Usage:
C#:
// Block deployment in safe zones
object OnFortDeploy(BasePlayer player, TimedExplosive grenade, string pasteFile)
{
    if (IsInSafeZone(player.transform.position))
    {
        return "Cannot deploy forts in safe zones!";
    }
    return null;
}

// Replace paste file based on player permission
object OnFortDeploy(BasePlayer player, TimedExplosive grenade, string pasteFile)
{
    if (permission.UserHasPermission(player.UserIDString, "portablefort.vip"))
    {
        return new Dictionary<string, string>
        {
            ["PasteFile"] = "VIPFort"
        };
    }
    return null;
}

// Count deployments
object OnFortDeploy(BasePlayer player, TimedExplosive grenade, string pasteFile)
{
    IncrementPlayerFortCount(player.userID);

    if (GetPlayerFortCount(player.userID) > 5)
    {
        return "You've reached your fort deployment limit!";
    }
    return null;
}

OnFortFinishedPasting

Called after a fort has completely finished spawning and all construction/upgrade animations are complete.
C#:
void OnFortFinishedPasting(BasePlayer player, List<BaseEntity> entities)
Parameters:
  • player -- The player who threw the grenade
  • entities -- All entities that were spawned (building blocks, deployables, etc.)
Return Value: None (void hook)
Example Usage:
C#:
// Announce fort deployment
void OnFortFinishedPasting(BasePlayer player, List<BaseEntity> entities)
{
    PrintToChat($"{player.displayName} deployed a fort with {entities.Count} entities!");
}

// Track spawned entities
void OnFortFinishedPasting(BasePlayer player, List<BaseEntity> entities)
{
    foreach (var entity in entities)
    {
        RegisterEntity(player.userID, entity.net.ID);
    }
}

// Auto-lock doors
void OnFortFinishedPasting(BasePlayer player, List<BaseEntity> entities)
{
    foreach (var entity in entities)
    {
        Door door = entity as Door;
        if (door != null)
        {
            door.SetFlag(BaseEntity.Flags.Locked, true);
            CodeLock codeLock = GameManager.server.CreateEntity("assets/prefabs/locks/keypad/lock.code.prefab") as CodeLock;
            if (codeLock != null)
            {
                codeLock.Spawn();
                codeLock.SetParent(door);
                // Additional codelock setup...
            }
        }
    }
}

// Trigger server event
void OnFortFinishedPasting(BasePlayer player, List<BaseEntity> entities)
{
    Interface.CallHook("OnPlayerDeployedFort", player, entities);
}
  • 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

  • Offline Raiding Weakened
    Offline Raiding Weakened
    Lowers the damage inflicted on buildings when owners are offline
  • Dancing NPC
    Dancing NPC
    Allows players to spawn an npc that performs various dance gestures
  • Recoil Tracker
    Recoil Tracker
    Records weapon recoils and analyzes player shot accuracy against them

Latest updates

  1. 1.8.0

    Note: This update will reset your existing config. Please back it up before updating. Replaced...
  2. 1.7.0

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

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

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