Road-car authoring and the scripting reference. Author kit downloads and further vehicle templates are still being prepared.
For mod authors
Make something drive.
Bring your own model, give it a place in the Mojave, or use vehicles in a quest. Start with a simple car and add the details once it drives properly.
A car, piece by piece
Pick a numbered part to read what it needs. The DeSoto illustrates the components. The starter template uses your own model and measurements.
Your first car
The current template is drivables:road-car-v1, for a wheeled car with one physical body. You supply a NIF, an ESP and an INI pack.
Build the rig before the details
Use the starter hierarchy as a reference. The body and wheels share one vehicle, with one rigid body providing collision.
Vehicle root · BSFadeNode
├─ collision · one rigid body
└─ Bip01
└─ Base
└─ RotControl
├─ Body
│ ├─ body geometry
│ └─ DriverSeat
├─ SteerFL
│ └─ WheelFL
├─ SteerFR
│ └─ WheelFR
├─ WheelRL
└─ WheelRRMeasure, don’t guess
The template asks for front and rear axle distances, half-track, wheel radii and widths, suspension positions, contact probes, seat offsets and camera fit.
The required controls include Base, RotControl, both front steering nodes and all four wheel nodes. The model also needs usable rigid-body mass and valid transforms.
Check the exported model, including its collision. A shape that looks correct in the viewport can still have the wrong origin, winding or pivot.
This tree follows the simple author-kit example. The numbered DeSoto picture is a component index, not a dump of its NIF hierarchy.
01 / Rolling gear
Wheels & tyres
Front wheels spin under their steering controls. Put the steering pivot at the wheel centre and keep the wheel geometry under its spin node.
- Measure front and rear radius and half-width separately.
- Match axle positions and suspension offsets to the exported rig.
- Check spin direction, steering and ground contact in game.
- After mirroring a wheel, check outward normals and triangle winding.
Puncture behaviour is enabled with bTyrePop. Test it with DrvPopTyre. A convincing flat tyre needs a compatible deformation rig, beyond a spinning wheel.
A worked tyre-deformation example is still needed for the public kit.
02 / Windows
Glass
Keep breakable panes in named geometry shapes. Declare those shapes and their damage groups in [Glass local-id] definitions, linked through your parts set.
- Leave the opaque window frames outside the shattering shapes.
- Check transparency from inside and outside the car.
- Enable
bGlassShatteronly when the definitions and shapes exist. - Test damage, repair and reload together.
The current parts set supports up to sixteen glass shapes. Its names must resolve to geometry in the loaded model.
03 / Seeing the road
Headlights
A lamp lens, a visible beam and light falling on the world are separate things. Check each one when authoring the front lamps.
HeadlightLandHeadlightRlocate the front lights.- The fleet uses beam geometry named
HeadlightConeLandHeadlightConeR. - Fit the anchors to the model and check aim after steering, pitch and roll.
- Check the lights both parked and while driving.
The dedicated front-light recipe still needs an add-on example covering lens materials, beam orientation and profile settings. These node names describe the existing implementation.
04 / Bodywork
Doors, bonnet, boot & bumpers
A detachable part needs an attached control node, a separate debris model and a matching prop record. Its definition supplies the node, prop, marker and measured offsets or bounds.
- Most detached props use MSTT records. A bonnet may explicitly use CONT.
bHoodDamagecovers bonnet and boot parts. Doors and bumpers have separate gates.- Fit entry and exit animations to the doors you actually authored.
- Check the part after damage, repair and save/load.
Per parts set: one bonnet, one boot, two doors and two bumpers. The blue author-kit example demonstrates a detachable bonnet.
05 / Rear lamps
Braking, reversing & damage
Declare the brake and reverse parent nodes, their glow shapes, the damaged shapes and hit bounds in [RearLamp local-id].
The glow must be beneath the parent which switches it. Merely giving a shape the right name is not enough. Rear-lamp damage uses the glass-shatter gate.
Two lamp slots are supported. Number them from zero without gaps. Test brake and reverse separately, then shoot and repair each lamp.
06 / People
Driver & passengers
Fit hands, feet and seating height to your model. An existing animation pack provides motion, but its pose will still need checking against a new steering wheel and seat.
- Author the driver anchor and first-person camera separately.
- Allow room for a standing exit beside the car.
- Declare passenger positions explicitly. Their count excludes the driver.
- Check entry and exit from both sides where supported.
Named driver packs bind through sDriverPack. Entry and exit definitions bind through sTransitionPack. Custom transitions include durations and seat-transfer timing.
Give it its own character
Once the rig works, tune the parts the player will feel and hear.
Handling
Start with mass, wheel geometry, engine torque and brake torque. Set a positive gear ratio for every active gear, decreasing as the gears rise. Check acceleration, turning, braking and rough ground before chasing a top-speed number.
Sound
Use [AudioProfile local-id] for RPM banks and cues, bound with sAudioProfile. Fit acceleration and coasting recordings, then ignition and other one-shots. Impact banks have their own material classes and tap, hit and break folders.
Fuel & damage
The blank template starts with fuel and boost disabled. Decide which systems suit the vehicle, then configure and test them. Keep the player’s service transaction separate from direct script repairs and fuel changes.
Effects & variants
Add liveries, exhaust and a wreck only where the matching resources and configuration exist. Some fleet-specific effects and body dent meshes still use built-in definitions. They need their own add-on support before being promised as generic features.
Command reference
66 registered commands, grouped by what they do. Expand a row for syntax and return values. Reserved, removed command slots are omitted.
Calling reference
MyCarRef.DrvGetVehicleSpeedThe reference before the dot is the vehicle being queried. In the console, selecting that vehicle supplies the calling reference.
Explicit argument
DrvSetFuel 10 MyCarRefThe older service commands accept an explicit vehicle after the value. Follow each signature. Square brackets mean an optional argument.
Examples use placeholder editor IDs such as MyCarRef. Replace them with your own records or script variables. In the console, select a placed reference or use its resolved FormID. A base form defines a vehicle type. A reference is one particular vehicle in the world.
66 commands
No matching commands. Try a broader search or reset the filters.
CanUseVehicleAccess & restoration
Check whether an actor can begin a fresh ride now.
vehicle.CanUseVehicle <actor>- Returns
- 1 if eligible, otherwise 0.
- Use
- Script / console / condition
actor· Actor · required
Does not reserve the vehicle or approve takeovers, theft confirmation or route availability. A later action can still fail.
if MyCarRef.CanUseVehicle Player
DrvMount MyCarRef
endifDrvAddDriverNPC driving
Spawn a driver at the calling vehicle and start a wandering ride.
DrvAddDriver [driver base]- Returns
- Spawned driver reference, or 0.
- Use
- Script / console
driver base· AnyForm · optional
Call on the vehicle. The optional argument is an actor base, not an existing actor. If omitted, the traffic driver pool is used.
let driver := MyCarRef.DrvAddDriverDrvContinueRideNPC driving
Send a ride stopped at a route mark on its way.
DrvContinueRide [vehicle]- Returns
- 1 if the ride was standing at a mark, 0 otherwise.
- Use
- Script / console
vehicle· ObjectRef · optional
With no vehicle named, the calling reference is used, then the ride carrying the player.
DrvContinueRide MyCarRefDrvDamageVehicleService & damage
Apply damage to a vehicle.
DrvDamageVehicle <value> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
value· Float · requiredvehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Amount is raw health damage, not a percentage.
DrvDamageVehicle 25 MyCarRefDrvDismountVehicles
Request that the player dismount.
DrvDismount- Returns
- 1 if accepted, 0 otherwise.
- Use
- Script / console
No arguments.
Link to DrvDismount →DrvEndRaceRaces
Queue the end of the current race.
DrvEndRace- Returns
- 1 after queuing the request.
- Use
- Script / console
No arguments.
Link to DrvEndRace →DrvGetActiveHorseHorses
Get the selected stable horse.
DrvGetActiveHorse- Returns
- Horse reference, or 0.
- Use
- Script / console
No arguments.
let horse := DrvGetActiveHorseDrvGetActorVehicleOccupants
Find an actor’s current vehicle or horse, including passengers.
actor.DrvGetActorVehicle- Returns
- Vehicle or horse reference, or 0.
- Use
- Script / console
No arguments.
let vehicle := Player.DrvGetActorVehicleDrvGetEncounterAliveNPC driving
Count surviving members of a configured encounter.
DrvGetEncounterAlive <encounter quest>- Returns
- Number of surviving members.
- Use
- Script / console
encounter quest· Quest · required
DrvGetFuelService & damage
Read the stored fuel reserve.
DrvGetFuel [vehicle]- Returns
- Stored reserve in litres, or -1 for an invalid vehicle.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Use DrvGetFuelCapacity to check whether the vehicle has a supported fuel system.
Link to DrvGetFuel →DrvGetFuelCapacityService & damage
Read the capacity of a supported fuel system.
vehicle.DrvGetFuelCapacity- Returns
- Capacity in litres, or -1 if unsupported.
- Use
- Script / console / condition
No arguments.
Link to DrvGetFuelCapacity →DrvGetHorseBondHorses
Read the horse’s bond.
horse.DrvGetHorseBond- Returns
- 0–100 percent, or -1 if invalid.
- Use
- Script / console / condition
No arguments.
Link to DrvGetHorseBond →DrvGetHorseCommandHorses
Read the horse’s current command.
horse.DrvGetHorseCommand- Returns
- 0 free, 1 follow, 2 wait, or -1 if invalid.
- Use
- Script / console / condition
No arguments.
Link to DrvGetHorseCommand →DrvGetHorseStaminaHorses
Read the horse’s current stamina.
horse.DrvGetHorseStamina- Returns
- 0–100, or -1 if invalid.
- Use
- Script / console / condition
No arguments.
Includes resting recovery. A profile with stamina disabled returns 100.
Link to DrvGetHorseStamina →DrvGetHorseTraitHorses
Read one of the horse’s individual ratings.
horse.DrvGetHorseTrait <trait>- Returns
- Rating 1–5, or -1 if invalid.
- Use
- Script / console / condition
trait· Integer · required
Trait: 0 speed, 1 endurance, 2 nerve. Ratings are not physics multipliers.
let nerve := MyHorseRef.DrvGetHorseTrait 2DrvGetPassengerOccupants
Get the passenger assigned to a seat.
vehicle.DrvGetPassenger <seat>- Returns
- Passenger reference, or 0.
- Use
- Script / console
seat· Integer · required
Passenger seats start at 1. Query the driver separately.
let passenger := MyCarRef.DrvGetPassenger 1DrvGetPassengerCountOccupants
Count passengers assigned to this vehicle.
vehicle.DrvGetPassengerCount- Returns
- Passenger count, excluding the driver.
- Use
- Script / console / condition
No arguments.
Passenger support concerns the player’s vehicle.
Link to DrvGetPassengerCount →DrvGetPlayerVehicleVehicles
Get the player’s current vehicle.
DrvGetPlayerVehicle- Returns
- Vehicle reference, or 0.
- Use
- Script / console
No arguments.
let vehicle := DrvGetPlayerVehicleDrvGetRideDriverNPC driving
Read the driver assigned to an NPC ride.
DrvGetRideDriver <vehicle>- Returns
- Driver reference, or 0.
- Use
- Script / console
vehicle· ObjectRef · required
For a query that also covers the player, use vehicle.DrvGetVehicleDriver.
Link to DrvGetRideDriver →DrvGetRideStateNPC driving
Read the NPC ride state.
DrvGetRideState <vehicle>- Returns
- 0 none, 1 pending, 2 route, 3 wander, 4 destination, 5 chasing.
- Use
- Script / console
vehicle· ObjectRef · required
DrvGetRideTargetNPC driving
Read an NPC ride’s chase target.
DrvGetRideTarget <vehicle>- Returns
- Target reference, or 0.
- Use
- Script / console
vehicle· ObjectRef · required
DrvGetVehicleConditionService & damage
Read rounded vehicle health as a percentage.
vehicle.DrvGetVehicleCondition- Returns
- 0–100, or -1 for an invalid vehicle.
- Use
- Script / console / condition
No arguments.
Use DrvGetVehicleHealth for raw health points.
Link to DrvGetVehicleCondition →DrvGetVehicleDriverOccupants
Get a vehicle’s active player or NPC driver.
vehicle.DrvGetVehicleDriver- Returns
- Driver reference, or 0.
- Use
- Script / console
No arguments.
Pending NPC rides do not count as active drivers.
Link to DrvGetVehicleDriver →DrvGetVehicleHealthService & damage
Read raw vehicle health.
DrvGetVehicleHealth [vehicle]- Returns
- Health points, or -1 if unavailable.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Use DrvGetVehicleCondition for a percentage.
Link to DrvGetVehicleHealth →DrvGetVehicleSpeedVehicles
Read horizontal speed, including reverse and sideways motion.
vehicle.DrvGetVehicleSpeed- Returns
- Speed in metres per second, or -1 if unavailable.
- Use
- Script / console / condition
No arguments.
Loaded parked vehicles return 0. Unloaded vehicles and untracked bumped hulls return -1. Multiply by 3.6 for km/h or 2.23694 for mph.
let speed := MyCarRef.DrvGetVehicleSpeedDrvGetVehicleTypeVehicles
Read the vehicle category.
vehicle.DrvGetVehicleType- Returns
- 0 invalid, 1 road, 2 motorcycle, 3 human-powered, 4 hover, 5 aircraft, 6 boat, 7 horse or living mount.
- Use
- Script / console / condition
No arguments.
Link to DrvGetVehicleType →DrvGetVehicleUseFailureAccess & restoration
Explain why an actor cannot begin a fresh ride.
vehicle.DrvGetVehicleUseFailure <actor>- Returns
- 0 if allowed, otherwise a failure code from the table below.
- Use
- Script / console / condition
actor· Actor · required
Uses the same eligibility check as CanUseVehicle.
Link to DrvGetVehicleUseFailure →DrvHasVehicleFaultAccess & restoration
Check whether a vehicle has a recorded fault.
DrvHasVehicleFault [vehicle]- Returns
- 1 with a fault, otherwise 0.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride.
Link to DrvHasVehicleFault →DrvHorseCrapHorses
Request the horse’s manure action.
DrvHorseCrap [vehicle]- Returns
- 1 if queued, 0 if unavailable.
- Use
- Script / console
vehicle· ObjectRef · optional
Choose a calm, stationary horse. Pass the horse, select it in the console, or omit the target while riding a horse.
Link to DrvHorseCrap →DrvMarkRouteNPC driving
Mark the spot you are standing on in the route being recorded.
DrvMarkRoute <mark name> [wait seconds]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
mark name· String · requiredwait seconds· Float · optional
wait seconds: 0 or omitted passes the mark, a positive wait stops there that long, a negative wait stops until DrvContinueRide. Rides announce each mark through Drv:OnRideWaypoint.
DrvMarkRoute Checkpoint -1DrvMountVehicles
Request mounting the player on a vehicle.
DrvMount [vehicle]- Returns
- 1 if the transition was requested, 0 otherwise.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. This starts an action. It does not mean the transition has finished.
Link to DrvMount →DrvPopTyreService & damage
Mark a tyre as punctured.
DrvPopTyre <value> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
value· Integer · requiredvehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Use indices 0–5 for wheel slots. -1 punctures all slots. The vehicle must have an appropriate tyre rig for the expected visual result.
DrvPopTyre -1 MyCarRefDrvRecordRouteNPC driving
Record a route by riding it.
DrvRecordRoute [route name]- Returns
- 1 when a recording starts, otherwise the number of points written.
- Use
- Script / console
route name· String · optional
With a name, recording starts. With no name, the running recording is written to Data\config\drivables\routes\<name>.txt, ready for DrvStartRide.
DrvRecordRoute MyRouteDrvRecoverVehicleVehicles
Request recovery of a vehicle.
DrvRecoverVehicle [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Recovery can be refused by the vehicle’s current state or race restrictions.
Link to DrvRecoverVehicle →DrvRefuelService & damage
Fill a vehicle’s configured fuel reserve.
DrvRefuel [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. This directly fills the reserve without consuming inventory supplies. Active race service restrictions still apply.
DrvRefuel MyCarRefDrvRepairVehicleService & damage
Restore vehicle health and supported damaged parts.
DrvRepairVehicle [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. This is a direct repair. It does not consume repair tools or apply the menu’s skill check. Active race service restrictions still apply.
DrvRepairVehicle MyCarRefDrvRestoreVehicleAccess & restoration
Attempt the configured restoration using the player’s skill and inventory.
DrvRestoreVehicle [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Requires the vehicle to be loaded, nearby, unlocked and unoccupied. On success the required item is consumed. This is separate from DrvRepairVehicle.
DrvRestoreVehicle MyCarRefDrvSeatPlayerOccupants
Seat the player as a passenger on an NPC-driven ride.
DrvSeatPlayer [seat] [vehicle]- Returns
- 1 when the seat is taken or waits for the ride to get going, 0 when refused.
- Use
- Script / console
seat· Integer · optionalvehicle· ObjectRef · optional
Seat 0 or no seat takes the first free passenger seat. With no vehicle named, the calling reference is used.
DrvSeatPlayer 0 MyCarRefDrvSetFuelService & damage
Set the stored fuel reserve.
DrvSetFuel <value> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
value· Float · requiredvehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. The value is litres, clamped to the vehicle’s capacity. No inventory supply is consumed.
DrvSetFuel 10 MyCarRefDrvSetHorseBondHorses
Set a stabled horse’s bond for testing.
horse.DrvSetHorseBond <percent>- Returns
- 1 on success, 0 on refusal.
- Use
- Console only
percent· Float · required
Development console only. Requires a living, enabled, registered horse and a finite percentage from 0 to 100.
DrvSetHorseBond 50DrvSetHorseCommandHorses
Give a living stabled horse a command.
horse.DrvSetHorseCommand <command>- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
command· Integer · required
0 free, 1 follow, 2 wait. Asking a new horse to follow moves the previous follower to wait.
MyHorseRef.DrvSetHorseCommand 2DrvSetHorseNameHorses
Rename a living player-owned stabled horse.
horse.DrvSetHorseName <name>- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
name· String · required
Accepts a string literal or string variable. Names are trimmed and limited to 31 allowed characters. An empty string restores the base name.
MyHorseRef.DrvSetHorseName "Dusty"DrvSetHorseTackHorses
Show or hide a horse’s tack.
DrvSetHorseTack <value> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
value· Integer · requiredvehicle· ObjectRef · optional
Use 0 to hide or 1 to show. Pass a horse reference or call on the horse.
DrvSetHorseTack 1 MyHorseRefDrvSetRideAggressionNPC driving
Change the aggression value of an active NPC ride.
DrvSetRideAggression <vehicle> <value>- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · requiredvalue· Float · required
Requires an active NPC driving session. The ride request default is 1.0.
Link to DrvSetRideAggression →DrvSetRideSpeedNPC driving
Change the cruise speed of an active NPC ride.
DrvSetRideSpeed <vehicle> <value>- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · requiredvalue· Float · required
Speed is metres per second. Requires an active NPC driving session.
DrvSetRideSpeed MyCarRef 12DrvSetVehicleFaultAccess & restoration
Set a fault message which prevents normal use.
DrvSetVehicleFault <reason> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
reason· String · requiredvehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. An empty string clears the fault.
DrvSetVehicleFault "The engine needs a replacement part." MyCarRefDrvSetVehicleLockedAccess & restoration
Set the plugin’s vehicle lock.
DrvSetVehicleLocked <value> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
value· Integer · requiredvehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. Use 0 to unlock, 1 to lock.
DrvSetVehicleLocked 1 MyCarRefDrvSetVehicleRestorationAccess & restoration
Assign a restoration component and Repair requirement.
DrvSetVehicleRestoration <component> <repair skill> [vehicle]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
component· ObjectID · requiredrepair skill· Integer · requiredvehicle· ObjectRef · optional
Pass a vehicle reference explicitly, or call on the vehicle / select it in the console. Omitting the argument does not automatically select your current ride. The component must be a MISC form. Repair skill must be between 0 and 100. Set a fault separately. This defines the requirement, it does not perform a repair.
DrvSetVehicleRestoration MyRepairPart 50 MyCarRefDrvSpawnVehicleVehicles
Spawn a registered vehicle base.
DrvSpawnVehicle <vehicle base> [at]- Returns
- New vehicle reference, or 0.
- Use
- Script / console
vehicle base· AnyForm · requiredat· ObjectRef · optional
Pass a base form, not a placed reference. The optional placement reference supplies position and heading. It falls back to the caller, then the player. Use an anchor in the player’s current world or cell. Arena unlock restrictions still apply.
let car := DrvSpawnVehicle MyCarBase MyParkingMarkerDrvStartChaseNPC driving
Ask an NPC driver to pursue a target reference.
DrvStartChase <vehicle> <driver> <target>- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · requireddriver· Actor · requiredtarget· ObjectRef · required
The target may be a vehicle or actor.
DrvStartChase MyCarRef MyDriverRef PlayerDrvStartEncounterNPC driving
Start a configured vehicle encounter.
DrvStartEncounter <encounter quest>- Returns
- Leader reference, or 0.
- Use
- Script / console
encounter quest· Quest · required
The quest must be running and its script must declare encounter variables. You can test it directly before adding it to DrvEncounters for automatic spawns. A refused spawn shows its reason on screen.
Link to DrvStartEncounter →DrvStartRaceRaces
Queue race setup with optional vehicle assignments.
DrvStartRace [laps] [player vehicle base] [opponent vehicle list]- Returns
- 1 if queued, 0 if refused.
- Use
- Script / console
laps· Integer · optionalplayer vehicle base· AnyForm · optionalopponent vehicle list· FormList · optional
Omitted options use defaults. The opponent argument is a FormList of supported vehicle bases, up to 16 entries. This queues setup rather than confirming the race has begun.
DrvStartRace 3DrvStartRideNPC driving
Start an NPC following a route, or wandering if the route is omitted.
DrvStartRide <vehicle> <driver> [route file]- Returns
- 1 if accepted, 0 if refused.
- Use
- Script / console
vehicle· ObjectRef · requireddriver· Actor · requiredroute file· String · optional
The route is a name, read from Data\config\drivables\routes\<name>.txt, the file DrvRecordRoute writes. Starting a ride that is already running reroutes it. Acceptance may queue a ride while its model loads.
DrvStartRide MyCarRef MyDriverRefDrvStartRideToNPC driving
Send an NPC in a vehicle to a destination reference.
DrvStartRideTo <vehicle> <driver> <destination>- Returns
- 1 if accepted, 0 if refused.
- Use
- Script / console
vehicle· ObjectRef · requireddriver· Actor · requireddestination· ObjectRef · required
Use a placed destination reference. A successful request is not proof of arrival. Starting a ride that is already running reroutes it.
DrvStartRideTo MyCarRef MyDriverRef MyDestinationRefDrvStopRideNPC driving
Stop an NPC ride. With no vehicle named, it stops the ride selected in the console.
DrvStopRide [vehicle] [retain motion]- Returns
- 1 on success, 0 on refusal.
- Use
- Script / console
vehicle· ObjectRef · optionalretain motion· Integer · optional
retain motion: 0 stops the ride without retaining motion, 1 requests retaining motion.
DrvStopRide MyCarRef 0IsDrivableVehicles
Check whether a reference is a recognised vehicle or horse.
ref.IsDrivable- Returns
- 1 if recognised, otherwise 0.
- Use
- Script / console / condition
No arguments.
Link to IsDrivable →IsDrivingOccupants
Check whether an actor is driving.
actor.IsDriving- Returns
- 1 if driving, otherwise 0.
- Use
- Script / console / condition
No arguments.
Covers non-living vehicles, including stationary active driving sessions. IsRiding is the living-mount query.
if Player.IsDriving
let vehicle := DrvGetPlayerVehicle
endifIsEngineRunningVehicles
Check whether a motorised engine is running.
vehicle.IsEngineRunning- Returns
- 1 if running, otherwise 0.
- Use
- Script / console / condition
No arguments.
Horses and human-powered rides return 0.
Link to IsEngineRunning →IsHorsePanickingHorses
Check for active panic or a panic rear.
horse.IsHorsePanicking- Returns
- 1 during panic, otherwise 0.
- Use
- Script / console / condition
No arguments.
An unmounted horse returns 0.
Link to IsHorsePanicking →IsInVehicleOccupants
Check whether an actor is aboard a specific vehicle.
actor.IsInVehicle <vehicle>- Returns
- 1 if driver or passenger of that vehicle, otherwise 0.
- Use
- Script / console / condition
vehicle· ObjectRef · required
if Player.IsInVehicle MyCarRef
let condition := MyCarRef.DrvGetVehicleCondition
endifIsPassengerOccupants
Check whether an actor is assigned as a passenger.
actor.IsPassenger- Returns
- 1 if assigned, otherwise 0.
- Use
- Script / console / condition
No arguments.
Reports logical seat assignment, including temporary save suspension.
Link to IsPassenger →IsRidingOccupants
Check whether an actor is riding a horse or another living mount.
actor.IsRiding- Returns
- 1 if riding, otherwise 0.
- Use
- Script / console / condition
No arguments.
This is the living-mount query. IsDriving covers non-living vehicles. Use IsPassenger for passenger assignment.
Link to IsRiding →IsStabledHorses
Check whether a horse is registered in the stable.
horse.IsStabled- Returns
- 1 if registered, otherwise 0.
- Use
- Script / console / condition
No arguments.
Link to IsStabled →IsVehicleLockedAccess & restoration
Read the plugin’s vehicle lock.
vehicle.IsVehicleLocked- Returns
- 1 if locked, otherwise 0.
- Use
- Script / console / condition
No arguments.
Link to IsVehicleLocked →IsVehicleOccupiedOccupants
Check for an active driver or assigned passenger.
vehicle.IsVehicleOccupied- Returns
- 1 if occupied, otherwise 0.
- Use
- Script / console / condition
No arguments.
Link to IsVehicleOccupied →IsVehicleWreckedService & damage
Check for a destroyed hull or dead vehicle / mount.
vehicle.IsVehicleWrecked- Returns
- 1 if wrecked or dead, otherwise 0.
- Use
- Script / console / condition
No arguments.
Link to IsVehicleWrecked →React to a ride
Use events for changes such as mounting or wrecking. These ten events are registered with xNVSE. Handlers are flushed on load, so register them again when your game-load initialisation runs.
| Event | Arguments, in order | Use |
|---|---|---|
Drv:OnMount | vehicle, actor | React when a rider mounts. |
Drv:OnDismount | vehicle, actor | React when a rider dismounts. |
Drv:OnVehicleWrecked | vehicle | Handle the loss of a vehicle. |
Drv:OnRideEnd | vehicle, driver, reason | Distinguish arrival from an interrupted NPC ride. |
Drv:OnEncounterSpawn | quest, leader | Track the newly started encounter. |
Drv:OnEncounterEnd | quest | Handle the end of an encounter. |
Drv:OnPassengerEnter | vehicle, actor | React when the player takes a passenger seat. |
Drv:OnPassengerExit | vehicle, actor | React when the player leaves a passenger seat. |
Drv:OnRideArrive | vehicle, driver | React when a ride carrying the player arrives. |
Drv:OnRideWaypoint | vehicle, driver, mark name, stands | Follow a ride along the marks laid with DrvMarkRoute. Stands is nonzero when the ride stops there. |
Ride-end reasons: 0 arrived, 1 aborted, 2 stopped, 3 driver lost, 4 wrecked, 5 handover, 6 world reset, 7 robbed.
Check that a returned reference still exists before acting on it. An accepted command can start a transition or queue work. Use the appropriate state query or event to follow the result.
A complete event-handler example, including save/load registration, will accompany the wiki reference.
A few useful starting points
These snippets belong inside your own script. Declare the variables you use and replace the example records with your own.
Check a player’s ride
let vehicle := Player.DrvGetActorVehicle
if vehicle
let condition := vehicle.DrvGetVehicleCondition
let passengers := vehicle.DrvGetPassengerCount
endifThis also finds the vehicle when the actor is a passenger. The driver is queried separately.
Unlock a placed quest reward
DrvSetVehicleLocked 0 MyRewardCarRefRun from your quest’s reward logic. This clears the plugin lock. Ownership, keys, faults and other access rules still apply. A placed reference gives you a fixed parking spot.
Set up a restoration
DrvSetVehicleFault "The engine needs a replacement part." MyCarRef
DrvSetVehicleRestoration MyRepairPart 50 MyCarRefRun setup once. MyRepairPart must be a MISC item. Later, DrvRestoreVehicle attempts the repair using the player’s inventory and Repair skill.
Give a horse a command
let horse := DrvGetActiveHorse
if horse
horse.DrvSetHorseCommand 2
endifCommand 2 means wait. It requires a living stabled horse. Use 1 for follow or 0 for free.
When it doesn’t work
Start with the validator’s file, section and field message. For runtime rejection, check new_vegas_drivables.log in the game directory or your mod manager’s overwrite output.
Before sharing your vehicle
Keep the pack’s stable IDs and dependency declarations intact. Package only the files your add-on needs, with its asset credits.
- Enter, drive, reverse, brake and exit.
- Check collision and wheel contact on uneven ground.
- Check the driver, passengers and both cameras.
- Damage and repair every optional component.
- Save, reload and return after a cell change.
- Install the packaged ZIP in a clean mod-manager profile.
Template support: road cars have the current author template. Aircraft, boats, bikes and living mounts need their own converted templates and examples. Some model-specific effects still need to move into pack definitions.