- Works With
This Rust plugin lets you control exactly where vehicles spawn on your server and how many are available at any time. Instead of relying on random vanilla spawns, you decide exactly where minis, scrap helis, boats, cars, and other vehicles appear. You create simple “spawn groups” (like road minis, harbor boats, or heli pads), give each group its own set of spawn points, and the plugin keeps those spots stocked with vehicles in the background.
For each group, you choose which vehicles can spawn, how many can be alive, how often they respawn, and how much fuel they get. You can mix different vehicles with weighted chances (for example, mostly minis with a rare scrap heli), and decide whether destroyed vehicles should be automatically replaced.
Related Plugins
Need spawn points for loot instead of vehicles?- Custom Crate Spawns - Lets you add additional spawn points for loot containers.
Permissions
customvehiclespawns.admin- Allows you to use all admin console commands for this plugin (managing spawn groups, spawn points, prefabs, and manual spawn/clear actions).
Commands
cvs.spawngroup- Create, edit, and manage vehicle spawn groups.create <alias>- Create a new spawn group with default settings and start editing it.alias- Short name for the group (for exampleroad_minis,harbor_boats).
edit <alias>- Load an existing spawn group and start editing it.alias- Name of the group you want to edit.
remove- Delete the spawn group you are currently editing and its runtime spawner.set <property><value>- Change a basic setting on the current spawn group (active state, max population, spawn count, delay, fuel, etc.).property- One of the supported group settings (likeactive,maxpop,minspawn,maxspawn,mindelay,maxdelay,randrot,replacedead,fuel).value- New value for that setting (bool, number, etc. depending on the property).
done- Save your changes, (re)create the spawner for this group, and stop editing it.
cvs.spawnpoint- Add, remove, and edit spawn points for the currently edited spawn group.add <position|'here'> [radius]- Add a new spawn point to the group.position- World coordinatesx y z(snapped to terrain/water).here- Use your current player position instead of typing coordinates.radius- Optional area radius around the point where vehicles can spawn.
remove [spawnPointId]- Remove a spawn point by id, or the closest one to you if no id is given.spawnPointId- Optional id of the spawn point to remove.
set <spawnPointId> radius <value>- Change the radius for an existing spawn point.spawnPointId- Id of the spawn point you want to edit.value- New radius value.
cvs.prefab- Control which vehicle prefabs are part of the currently edited spawn group.add <shortPrefabName> [weight] <shortPrefabName2> [weight2] ...- Add one or more vehicle prefabs with optional weights.shortPrefabName- Short prefab name (for exampleminicopter.entity).weight- Optional spawn weight (higher = more common).
remove <shortPrefabName> <shortPrefabName> ...- Remove one or more prefabs from the group.shortPrefabNameX- Each prefab you want to remove.
set <shortPrefabName> <property> <value>- Adjust settings for a specific prefab.shortPrefabName- Prefab entry to change.property- One ofweight,fuel,health.value- New value for that property (for example new weight, fuel amount, or health percentage).
cvs.spawnvehicles <spawnGroupAlias> [amount]- Manually spawn vehicles for a specific group.spawnGroupAlias- Alias of the spawn group to use.amount- Optional number of vehicles to spawn (defaults to 1 and never exceeds the group’s max).
cvs.clearvehicles <spawnGroupAlias>- Remove all vehicles currently spawned by a group.spawnGroupAlias- Alias of the spawn group you want to clear.
Configuration
JSON:
{
"Version": "1.0.0",
"Notify Players When Vehicle Spawns Nearby": false
}
Notify Players When Vehicle Spawns Nearby- Controls whether players near a newly spawned vehicle see a small on-screen toast telling them that a vehicle just spawned nearby.
Stored Data
JSON:
{
"Alias": "road_minicopters",
"Enabled": true,
"Maximum Active Vehicles": 5,
"Minimum Number To Spawn Per Tick": 1,
"Maximum Number To Spawn Per Tick": 2,
"Spawn Immediately On Startup": true,
"Minimum Respawn Delay Seconds": 60.0,
"Maximum Respawn Delay Seconds": 120.0,
"Randomize Vehicle Y Rotation": true,
"Automatically Replace Destroyed Vehicles": true,
"Default Fuel Amount On Spawn": 50,
"Vehicle Prefabs": [
{
"Short Prefab Name (e.g. 'minicopter.entity')": "minicopter.entity",
"Spawn SpawnWeight (higher = more common)": 3,
"Override Fuel Amount On Spawn (0 = use group default)": 0,
"Health Percentage On Spawn (0 = use prefab default)": 0.0
},
{
"Short Prefab Name (e.g. 'minicopter.entity')": "scraptransporthelicopter",
"Spawn SpawnWeight (higher = more common)": 1,
"Override Fuel Amount On Spawn (0 = use group default)": 0,
"Health Percentage On Spawn (0 = use prefab default)": 0.0
}
],
"Spawn Points": [
{
"Id": "a1b2c3d4",
"Position": {
"x": -123.4,
"y": 12.3,
"z": 456.7
},
"Rotation (euler angles)": {
"x": 0.0,
"y": 90.0,
"z": 0.0
},
"Spawn Area Radius": 10.0
},
{
"Id": "e5f6g7h8",
"Position": {
"x": -130.0,
"y": 12.0,
"z": 460.0
},
"Rotation (euler angles)": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"Spawn Area Radius": 0.0
}
]
}
Alias- Unique name of the vehicle spawn group. This is the identifier you use in commands and API calls.Enabled- Controls whether this spawn group is active and allowed to spawn vehicles at runtime.Maximum Active Vehicles- Maximum number of vehicles this group may have alive at the same time. The spawner stops spawning when it hits this number.Minimum Number To Spawn Per Tick- Minimum number of vehicles the spawner tries to spawn each time its timer fires.Maximum Number To Spawn Per Tick- Maximum number of vehicles the spawner can try to spawn per timer tick (actual amount is a random value between min and max).Spawn Immediately On Startup- If true, the group can spawn vehicles immediately when the plugin starts instead of waiting for the first respawn delay.Minimum Respawn Delay Seconds- Lower bound of the random delay (in seconds) between spawn cycles for this group.Maximum Respawn Delay Seconds- Upper bound of the random delay (in seconds) between spawn cycles for this group.Randomize Vehicle Y Rotation- If true, the spawner randomizes the Y (yaw) rotation of spawned vehicles so they don't all face the same direction.Automatically Replace Destroyed Vehicles- If true, the spawner automatically queues a new vehicle to replace one that was destroyed, respecting max population.Default Fuel Amount On Spawn- Default fuel to give each spawned vehicle (unless a prefab overrides it).Vehicle Prefabs- List of vehicle prefab entries this group is allowed to spawn and their spawn weights and overrides.Spawn Points- List of spawn point entries where this group can place vehicles in the world.
Vehicle Prefabs entry:Short Prefab Name- Short prefab name of the vehicle to spawn (must match a Rust entity prefab, likeminicopter.entity).Spawn SpawnWeight- Weight used when randomly picking which vehicle to spawn; higher values make that prefab more likely.Override Fuel Amount On Spawn- If greater than 0, overridesDefault Fuel Amount On Spawnfor this prefab. If 0, group default fuel is used.Health Percentage On Spawn- Health percentage to give this prefab on spawn (0 means keep the prefab's default health).
Spawn Points entry:Id- Short identifier of the spawn point, used by commands when you edit or remove it.Position- World position where vehicles will be spawned (x, y, z).Rotation- Rotation in degrees (x, y, z) for vehicles spawned at this point, before any optional random Y rotation is applied.Spawn Area Radius- Radius aroundPositionwhere the plugin can randomize the exact spawn location (0 means always spawn at the exact position).
Localization
JSON:
{
"Error.NoPermission": "You do not have permission to use this command.",
"VehicleSpawn.Toast": "A {0} has spawned nearby.",
"SpawnGroup.Usage": "Usage: cvs.spawngroup <create|edit|remove|set|done> ...",
"SpawnGroup.CreateUsage": "Usage: cvs.spawngroup create <alias>",
"SpawnGroup.CreateAlreadyExists": "A vehicle spawn group with the alias '{0}' already exists.",
"SpawnGroup.Created": "Vehicle spawn group '{0}' created and selected for editing.",
"SpawnGroup.EditUsage": "Usage: cvs.spawngroup edit <alias>",
"SpawnGroup.NotFound": "Vehicle spawn group '{0}' not found.",
"SpawnGroup.Edited": "Vehicle spawn group '{0}' selected for editing.",
"SpawnGroup.NoGroupBeingEdited": "You are not currently editing any vehicle spawn group. Use 'cvs.spawngroup edit <alias>' first.",
"SpawnGroup.Removed": "Vehicle spawn group '{0}' removed.",
"SpawnGroup.UnknownCommand": "Unknown subcommand '{0}' for cvs.spawngroup.",
"SpawnGroup.Set.NoGroupBeingEdited": "You must select a vehicle spawn group to edit before changing its settings.",
"SpawnGroup.Set.Usage": "Usage: cvs.spawngroup set <property> <value>\n\nAvailable properties:\n{0}",
"SpawnGroup.Set.InvalidActive": "Invalid value for 'active'. Use 'true' or 'false'.",
"SpawnGroup.Set.InvalidInitialSpawn": "Invalid value for 'initialspawn'. Use 'true' or 'false'.",
"SpawnGroup.Set.InvalidMaximumPop": "Invalid value for 'maxpop'. Please enter a non-negative integer.",
"SpawnGroup.Set.InvalidMinimumSpawn": "Invalid value for 'minspawn'. Please enter a non-negative integer.",
"SpawnGroup.Set_InvalidMaximumSpawn": "Invalid value for 'maxspawn'. It must be an integer greater than or equal to 'minspawn'.",
"SpawnGroup.Set.InvalidMinimumDelay": "Invalid value for 'mindelay'. Please enter a positive number of seconds.",
"SpawnGroup.Set.InvalidMaximumDelay": "Invalid value for 'maxdelay'. It must be a number of seconds greater than or equal to 'mindelay'.",
"SpawnGroup.Set.InvalidRandomYRotation": "Invalid value for 'randrot'. Use 'true' or 'false'.",
"SpawnGroup.Set.InvalidReplaceDestroyedVehicles": "Invalid value for 'replacedead'. Use 'true' or 'false'.",
"SpawnGroup.Set.InvalidFuel": "Invalid value for 'fuel'. Please enter a non-negative integer.",
"SpawnGroup.Set.UnknownProperty": "Unknown property '{0}'.\n\nAvailable properties:\n{1}",
"SpawnGroup.Set.PropertyUpdated": "Property '{0}' set to '{1}' for vehicle spawn group '{2}'.",
"SpawnGroup.Done.NoGroupBeingEdited": "You are not currently editing any vehicle spawn group. Use 'cvs.spawngroup edit <alias>' first.",
"SpawnGroup.Done.FinishedEditing": "Finished editing vehicle spawn group '{0}' and applied changes.",
"SpawnPoint.Usage": "Usage: cvs.spawnpoint <add|remove|set> ...",
"SpawnPoint.NoGroupBeingEdited": "You must select a vehicle spawn group to edit before managing its spawn points.",
"SpawnPoint.Add.Usage": "Usage: cvs.spawnpoint add <position|'here'> [radius]",
"SpawnPoint.Add.InvalidPosition": "The selected position is invalid. Could not find a valid surface there.",
"SpawnPoint.Add.InvalidRadius": "Invalid radius. Please enter a valid number.",
"SpawnPoint.Add.RadiusNegative": "Radius cannot be negative.",
"SpawnPoint.Add.Success": "Spawn point '{0}' added with radius {1} at position {2}.",
"SpawnPoint.Remove.NotFound": "No spawn point found with id '{0}'.",
"SpawnPoint_Remove_NoInRange": "No spawn point found within range of your position.",
"SpawnPoint.Remove.Success": "Spawn point '{0}' at position {1} removed.",
"SpawnPoint.UnknownSubcommand": "Unknown subcommand '{0}'. Valid options are 'add', 'remove', or 'set'.",
"SpawnPoint.Set.Usage": "Usage: cvs.spawnpoint set <spawnPointId> radius <value>",
"SpawnPoint.Set.NotFound": "No spawn point found with id '{0}'.",
"SpawnPoint.Set.InvalidProperty": "Unknown spawn point property '{0}'. Currently only 'radius' can be changed.",
"SpawnPoint.Set.InvalidRadius": "Invalid radius value. Please enter a non-negative number.",
"SpawnPoint.Set.Updated": "Spawn point '{0}' property '{1}' set to '{2}'.",
"Prefab.Usage": "Usage: cvs.prefab <add|remove|set> ...",
"Prefab.NoGroupBeingEdited": "You must select a vehicle spawn group to edit before managing its prefabs.",
"Prefab.Add.UnrecognizedPrefab": "Could not resolve prefab '{0}'. Make sure you are using the short prefab name (for example 'minicopter.entity').",
"Prefab.Add.AlreadyExists": "Prefab '{0}' is already in the vehicle spawn group.",
"Prefab.Add.InvalidWeight": "Invalid weight for prefab '{0}'. Defaulting to weight 1.",
"Prefab.Add.Success": "Added prefabs:\n- {0}",
"Prefab.Add.NoneAdded": "No prefabs were added.",
"Prefab.Remove.NotFound": "Prefab '{0}' not found in the vehicle spawn group.",
"Prefab.Remove.Success": "Removed prefabs:\n- {0}",
"Prefab.Remove.NoneRemoved": "No prefabs were removed.",
"Prefab.UnknownSubcommand": "Unknown subcommand '{0}'. Valid options are 'add', 'remove', or 'set'.",
"Prefab.Set.Usage": "Usage: cvs.prefab set <shortPrefabName> <weight|fuel|health> <value>",
"Prefab.Set.NotFound": "Prefab '{0}' not found in the vehicle spawn group.",
"Prefab.Set.InvalidProperty": "Unknown prefab property '{0}'. Valid options are 'weight', 'fuel', or 'health'.",
"Prefab.Set.InvalidWeight": "Invalid value for 'weight'. Please enter a positive integer.",
"Prefab.Set.InvalidFuel": "Invalid value for 'fuel'. Please enter a non-negative integer.",
"Prefab.Set.InvalidHealth": "Invalid value for 'health'. Please enter a value between 0 and 100.",
"Prefab.Set.Updated": "Prefab '{0}' property '{1}' set to '{2}'.",
"SpawnCommand.Usage": "Usage: cvs.spawnvehicles <spawnGroupAlias> [amount]",
"SpawnCommand.GroupNotFound": "Vehicle spawn group '{0}' not found.",
"SpawnCommand.Spawned": "Spawning {0} vehicle(s) from vehicle spawn group '{1}'.",
"ClearCommand.Usage": "Usage: cvs.clearvehicles <spawnGroupAlias>",
"ClearCommand.GroupNotFound": "Vehicle spawn group '{0}' not found.",
"ClearCommand.Cleared": "Cleared all vehicles for vehicle spawn group '{0}'."
}
Developer API
C#:
void API_SpawnVehiclesForGroup(string spawnGroupAlias)
spawnGroupAlias- Alias of the spawn group you want to fill with vehicles.
C#:
void API_ClearVehiclesForGroup(string spawnGroupAlias)
spawnGroupAlias- Alias of the spawn group whose vehicles you want to clear.
C#:
bool API_SpawnGroupExists(string spawnGroupAlias)
spawnGroupAlias- Alias of the spawn group you want to check.true- A spawn group with this alias exists in the plugin's data folder.false- No spawn group data file exists for this alias.
C#:
System.Collections.Generic.List<string> API_GetAllSpawnGroupAliases(
return List<string>- List of unique spawn group aliases that the plugin has loaded and created spawners for.
C#:
bool API_IsVehicleFromCustomSpawner(BaseEntity vehicleEntity)
vehicleEntity- The vehicle entity you want to test.true- The entity is tracked by one of this plugin's spawners and was spawned by Custom Vehicle Spawns.false- The entity is not associated with this plugin's spawners (either it's vanilla or from somewhere else).
Developer Hooks
C#:
object OnCustomVehicleSpawn(string spawnGroupAlias, string prefabPath, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation)
spawnGroupAlias- Alias of the spawn group that is about to spawn the vehicle.prefabPath- Full prefab path of the vehicle that will be spawned.position- World position where the vehicle is about to be spawned.rotation- Rotation that will be applied to the spawned vehicle.
false- Cancel this spawn. The plugin will not create the vehicle.nullor anything else - Allow the spawn to proceed normally.