CargoSinks
Cargoship spawns already on path and sinks while still on path. Stops it from running though your land on custom maps.
# CargoSinks
CargoSinks changes how Cargo Ships leave the map by allowing them to be blocked from leaving certain areas, then dramatically sinking the ship when its egress is triggered.
It also includes improved harbor pathing, optional reversed cargo routes, and an admin command to manually sink the Cargo Ship you're looking at.
Features
* 🚢 Prevent Cargo Ships from leaving when inside configured topology
* 🏠 Prevent Cargo Ships from leaving when near player-built structures
* 💥 Dramatic sequential C4/debris explosions before sinking
* 🌊 Smoothly sinks the Cargo Ship below the ocean
* ☢️ Optional radiation while the ship is sinking
* 🤖 Kills scientists on the Cargo Ship before it sinks
* 💰 Preserves players and loot by moving them off the ship before removal
* 🧹 Automatically removes the fully sunk ship
* 👥 Delays ship removal while players are nearby
* ⚓ Improved Cargo Ship harbor approach path calculation
* 🗺️ Detects land blocking potential harbor routes
* 👁️ Uses line-of-sight checks when selecting harbor approach nodes
* 🔄 Optional reversed Cargo Ship patrol path
* 🛠️ Configurable manual sink command
* ⚡ Designed to avoid unnecessary repeated path calculations
How It Works
When a Cargo Ship attempts to leave, CargoSinks checks whether its current location is blocked.
Topology Blocking
If the Cargo Ship is located on a configured topology, its departure is prevented and the plugin retries the egress after the configured delay.
By default, the blocking topology is:
Monument
Player Base Blocking
The plugin can also prevent the Cargo Ship from leaving when player-built structures are detected within the configured radius.
This allows you to effectively keep Cargo Ships around areas such as harbors or custom player-built locations.
Cargo Ship Sinking
Once the Cargo Ship is allowed to begin egress, CargoSinks triggers its sinking sequence.
The process includes:
1. Cargo Ship egress begins.
2. The ship's normal patrol target is disabled.
3. The ship stops its normal throttle.
4. Initial explosion and debris effects are triggered.
5. After the configured delay, additional explosions occur along the ship.
6. Scientists on the ship are killed.
7. The ship begins descending.
8. Optional radiation is enabled while sinking.
9. Once the ship reaches the configured depth, the plugin waits before removing it.
10. Player proximity is checked before removal.
11. If players are nearby, removal is delayed.
12. Players and loot/corpses are detached from the ship.
13. The Cargo Ship is finally removed.
The explosion sequence and sinking behaviour are configurable.
Manual Sink Command
The configured chat command can be used to force-sink the Cargo Ship you're looking at.
Default:
/sinkme
The command performs a raycast from the player's view and starts the Cargo Ship's egress if the targeted entity is a Cargo Ship.
By default, the command is admin-only.
It can instead use a permission by enabling:
"Require Permission Instead Of Admin Only For Sink Command": true
Permission
cargosinks.admin
Harbor Pathing
CargoSinks includes a Harmony patch for Cargo Ship harbor approach calculation.
Instead of simply selecting the closest ocean patrol node, the plugin evaluates potential approach nodes and checks whether the route is actually usable.
It checks:
* Distance to the harbor
* Terrain height along the route
* Land blocking the route
* Line of sight between the ocean node and harbor
* A configurable distance penalty when line of sight is blocked
This helps prevent Cargo Ships from selecting unsuitable approaches to harbors.
Reverse Cargo Path
CargoSinks can optionally reverse the Cargo Ship patrol path:
"Reverse Cargo Ship Patrol Path": true
The original path is restored when the plugin is unloaded.
Configuration
The configuration file is:
oxide/config/CargoSinks.json
General
| Setting | Default | Description |
| ----------------------------------------------------------- | -----------------: | --------------------------------------------------------------- |
| Show Console Debug Messages | false | Enables additional console debug messages. |
| Chat Command To Force-Sink Cargo Ship You're Looking At | sinkme | Chat command used to manually sink a Cargo Ship. |
| Require Permission Instead Of Admin Only For Sink Command | false | Uses a permission instead of admin status for the sink command. |
| Permission Needed For Sink Command | cargosinks.admin | Permission required when permission mode is enabled. |
| Reverse Cargo Ship Patrol Path | false | Reverses the Cargo Ship's ocean patrol route. |
Egress Blocking
| Setting | Default | Description |
| ------------------------------------------------------------ | ---------: | ----------------------------------------------------------- |
| Topology That Blocks Egress (Bitmask, Default = Monument) | Monument | Terrain topology that prevents the Cargo Ship from leaving. |
| Retry Delay When Egress Blocked By Topology (Seconds) | 30 | Time before attempting egress again. |
| Radius To Check For Player Bases Blocking Egress | 100 | Radius used to detect player building blocks. |
| Retry Delay When Egress Blocked By A Player Base (Seconds) | 60 | Time before retrying when a player base blocks egress. |
Sinking
| Setting | Default | Description |
| -------------------------------------------------------------------- | ------: | --------------------------------------------------------------- |
| Delay Before Explosions Start After Egress Is Triggered (Seconds) | 80 | Delay before the main explosion sequence begins. |
| Delay Between Each Explosion (Seconds) | 1.0 | Time between individual explosions. |
| Sink Speed (Negative = Downward, Units Per Second) | -0.85 | Speed at which the Cargo Ship sinks. |
| Height (Y) At Which The Ship Is Considered Fully Sunk | -45 | Y coordinate at which the ship is considered fully sunk. |
| Give Radiation To Nearby Players While Sinking | true | Enables radiation while the ship is sinking. |
| Delay After Fully Sunk Before The Ship Entity Is Removed (Seconds) | 80 | Delay before the ship is removed after reaching the sink depth. |
| Radius To Check For Nearby Players Before Removing A Sunk Ship | 100 | Player proximity radius used before removing the ship. |
| Retry Delay When A Nearby Player Blocks Ship Removal (Seconds) | 60 | Delay before trying removal again when players are nearby. |
Harbor Pathing
| Setting | Default | Description |
| ------------------------------------------------------------------- | -----------: | ------------------------------------------------------------------------------- |
| Harbor Pathing: Terrain Height That Blocks A Path (Meters) | 3 | Terrain height above which a potential route is considered blocked. |
| Harbor Pathing: Step Size Used To Scan For Blocked Paths (Meters) | 2 | Distance between terrain checks along a potential route. |
| Harbor Pathing: Distance Penalty Multiplier When No Line Of Sight | 20 | Multiplier applied when a potential harbor route fails the line-of-sight check. |
| Harbor Pathing: Line Of Sight Layer Mask | 1084293377 | Layer mask used for harbor route line-of-sight checks. |
Permissions
cargosinks.admin
This permission is only used when the sink command is configured to require permission instead of admin access.
Example Configuration
{
"Show Console Debug Messages": false,
"Chat Command To Force-Sink Cargo Ship You're Looking At": "sinkme",
"Require Permission Instead Of Admin Only For Sink Command": false,
"Permission Needed For Sink Command (Only If Above Is True)": "cargosinks.admin",
"Reverse Cargo Ship Patrol Path": false,
"Topology That Blocks Egress (Bitmask, Default = Monument)": 262144,
"Retry Delay When Egress Blocked By Topology (Seconds)": 30.0,
"Radius To Check For Player Bases Blocking Egress": 100.0,
"Retry Delay When Egress Blocked By A Player Base (Seconds)": 60.0,
"Delay Before Explosions Start After Egress Is Triggered (Seconds)": 80,
"Delay Between Each Explosion (Seconds)": 1.0,
"Sink Speed (Negative = Downward, Units Per Second)": -0.85,
"Height (Y) At Which The Ship Is Considered Fully Sunk": -45,
"Give Radiation To Nearby Players While Sinking": true,
"Delay After Fully Sunk Before The Ship Entity Is Removed (Seconds)": 80,
"Radius To Check For Nearby Players Before Removing A Sunk Ship": 100.0,
"Retry Delay When A Nearby Player Blocks Ship Removal (Seconds)": 60.0,
"Harbor Pathing: Terrain Height That Blocks A Path (Meters)": 3.0,
"Harbor Pathing: Step Size Used To Scan For Blocked Paths (Meters)": 2.0,
"Harbor Pathing: Distance Penalty Multiplier When No Line Of Sight": 20.0,
"Harbor Pathing: Line Of Sight Layer Mask": 1084293377
}
Notes
CargoSinks also takes care when removing a fully sunk Cargo Ship. Players, lootable corpses, and player corpses attached to the ship are detached rather than destroyed, while other child entities are removed with the ship. Ship removal is also postponed when nearby players are detected.
