Patrols on the roads the mod already has. New roads cannot be added from a plugin yet.
For mod authors
Put your own patrol on the road.
A patrol is a quest in your own plugin. You choose who rides, what they ride and where they are heading. The mod finds a road, puts them on it near the player and drives them there. No DLL work and no new models.
What a patrol is
Every group the mod puts on the road, from the Crimson Caravan to the NCR patrol jeep, is built the same way. Yours is no different.
Three parts
- A quest with a script. The script declares a handful of variables by name and the mod reads them.
- Pools: a list of drivers, a list of vehicles and a list of the places the patrol travels to.
- The
DrvEncountersform list. A quest on that list is one the mod will consider.
What the mod does with it
- Picks a road that ends at one of your destinations and admits every vehicle in the group.
- Places the group on that road out of the player’s sight and within reach.
- Drives it along the road, round obstacles and past other traffic, to the far end.
- Retires it once the player has left it behind.
Riders only exist near the player. A patrol is something you meet on the road, not a convoy that crosses the map while you are elsewhere.
Your first patrol
The example is an NCR supply run: one army jeep with a driver and a couple of troopers, travelling between NCR places. Your plugin needs New Vegas Drivables.esm as a master.
The variables
The mod finds each one by its name, so spell them exactly. Declare only the ones you use. A variable you leave out takes its default.
| Variable | Type | What it sets |
|---|---|---|
rDrivers | form list or levelled NPC | Who drives the lead vehicle. |
rVehicles | form list or levelled list | What the lead vehicle can be. The mod only uses entries the chosen road admits. |
rDestinations | form list of map markers | Where the patrol travels to. It appears on a road that ends at one of them. |
iPlacement | int | Set to 6 for a road patrol. |
iCategory | int | 2 for a group, which takes the one group slot near the player and waits out the interval between convoys. 0 for a lone rider counted with ordinary traffic. |
iCount | int | Vehicles in the group, 1 to 4. |
iSizing | int | How iCount is used. 0 draws a size up to it, 1 brings exactly that many, 2 brings any number from one to it. |
iMaxAlive | int | How many of this patrol’s riders may exist at once. |
fCooldown | float | Seconds of play between spawns. Waiting, sleeping and fast travel run it down. |
fWeight | float | Its chance against the other groups that could appear. The shipped patrols use 0.5 to 0.6. |
fDensity | float | Set to 1. Lower it from your script to thin the patrol out, as the Crimson Caravan does when its owner dies. |
iGate | int | Set to 1 while the patrol may appear and 0 while it may not. Your script decides: place, quest stage, reputation, time of day. |
fHaltSeconds | float | Set it and the group halts at each end of its road, stands watch for about that long, then turns round and rides back. |
rEscorts, rEscortDrivers | form lists | Vehicles and drivers for the rest of the group. Without them the followers come from the lead pools. |
rLeaders, fLeaderChance | form list, float | A different lead vehicle at that chance, as the Legion patrol’s chariot. |
rPassengers, iPassengers | form list, int | Crew for the lead vehicle’s spare seats, and how many. |
rTrailers, fTrailerChance | form list, float | A trailer or cart behind the lead vehicle at that chance. |
iInit | int | Your own flag so the set-up block runs once. |
What the mod writes back
| Variable | Type | Holds |
|---|---|---|
fLastSpawn | float | GameDaysPassed at the last spawn. |
iAlive | int | How many of the patrol’s riders exist now. |
rLastLeader | ref | The driver who led the last group. |
Declare all three even if you never read them: the cooldown is kept in fLastSpawn and does nothing without it. They save with the quest, so a cooldown survives a reload. The Drv:OnEncounterSpawn and Drv:OnEncounterEnd events on the Modders page report the same moments.
The roads
A patrol rides one of these 21 roads, either way along it. Put a road’s end marker in your destinations list and the patrol can appear on that road, heading for that end.
| Road | One end | Other end |
|---|---|---|
| The 188 to Boulder City | 188MapMarker | BoulderCityMapMarker |
| The 188 to Novac | 188MapMarker | NovacMapMarker |
| The 188 to Sloan | 188MapMarker | SloanMapMarker |
| The 188 to Camp Golf | 188MapMarker | CampGolfMapMarker |
| Westside to the 188 | WestsideWestEntranceMapMarker | 188MapMarker |
| Crimson Caravan to the 188 | CrimsonCaravanMapMarker | 188MapMarker |
| Crimson Caravan to Bitter Springs | CrimsonCaravanMapMarker | BitterSpringsMarkerREF |
| Sloan to Crimson Caravan | SloanMapMarker | CrimsonCaravanMapMarker |
| Bonnie Springs to Westside | BonnieSpringsMapMarker | WestsideWestEntranceMapMarker |
| Goodsprings to Sloan | Goodsprings map marker (no editor ID, form 000CDF51) | SloanMapMarker |
| Goodsprings to Primm | Goodsprings map marker (no editor ID, form 000CDF51) | PrimmMapMarker |
| Sloan to Primm | SloanMapMarker | PrimmMapMarker |
| Primm to Mojave Outpost | PrimmMapMarker | MojaveOutpostMapMarker |
| Primm to Novac via Nipton | PrimmMapMarker | NovacMapMarker |
| Mojave Outpost to Nipton | MojaveOutpostMapMarker | NiptonMapMarker |
| Mojave Outpost to Novac | MojaveOutpostMapMarker | NovacMapMarker |
| Nipton to Novac | NiptonMapMarker | NovacMapMarker |
| Boulder City to Novac | BoulderCityMapMarker | NovacMapMarker |
| Novac to Searchlight | NovacMapMarker | SearchlightMapMarker |
| Searchlight to Viper’s Encampment | SearchlightMapMarker | Highway95VipersMapMarker |
| Cottonwood Cove to Searchlight | CottonwoodCoveMapMarker | SearchlightMapMarker |
The Goodsprings map marker is the one road end with no editor ID. Pick the reference itself in the GECK when you add it to a form list. Where a script needs a name, such as a GetDistance check in your gate, use GoodspringsArrivalMarker, the fast-travel arrival point the map marker links to.
What each road admits
Use sRouteClass in the vehicle definition. All 21 roads exclude the truck class. Cars, horses, motorcycles and bicycles share a direction on each road. If a patrol of any of those classes is already riding the other way, a new patrol of those classes must find another road or wait.
What it will not do
Better to know before you build around it.
- No new roads from a plugin. The 21 roads are generated from the game’s road surfaces with our own tools. Camp McCarran, the Strip and Freeside are not on any of them.
- No timetable. A cooldown is the nearest thing to a schedule, and a patrol only ever appears near the player.
- No fights started for you. Riders whose factions would fight the people where the patrol would appear are not placed there.
- One group at a time. A group shares the roads with the mod’s own convoys and waits its turn after them.
- Four vehicles at most in a group.
- The riders are ordinary NPCs. Their factions, weapons and packages decide what they do when they meet trouble.
When it does not appear
Run DrvStartEncounter with your quest to see the reason for a refused spawn on screen. For a log on the release build, repeat the attempt within 15 seconds of loading a save. Search new_vegas_drivables.log in the game directory or your mod manager’s overwrite output for the refusal or your quest’s editor ID.