Author guide

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.

66 commands ↓

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.

  1. Make the model

    Author the body, wheel controls and collision in your NIF. Measure the axle positions, wheel sizes, seat and camera points from that model.

  2. Create the vehicle record

    In your own ESP, add a CONT record and point its model path at your NIF. Use IDLE records for driver poses. Detached parts usually use MSTT records.

  3. Describe it in a pack

    Create pack.ini and a vehicle definition under config/NewVegasDrivables/addons/. Give the pack and vehicle stable names. Fill every measured field in the template. If the car will appear in road patrols, keep sRouteClass=car so the mod can check which roads admit it.

  4. Fit the driver and tune it

    Choose a driver idle or animation pack, fit the seat and check both cameras. Set mass, engine torque, braking and gear ratios. Keep optional damage disabled until its parts are ready.

  5. Validate, package, then test

    The author kit checks files and definitions. Check driving, collision, entry, exit and saving in game yourself. Package the ESP, models, textures and definitions as a separate mod.

Pack and vehicle identity

pack.ini

[Pack]
iFormatVersion=1
sID=yourname.cars
sName=Your cars
sRequiredPlugins=FalloutNV.esm,YourCars.esp

[Files]
sVehicles=vehicles/coupe.ini

Vehicle identity

[Vehicle coupe]
sTemplate=drivables:road-car-v1
sForm=YourCars.esp|001234
sPrompt=Drive Coupe
sRouteClass=car
sDriverIdleID=YourCars.esp|001235

This is the identity portion only. Complete the geometry and drivetrain fields in the downloaded template.

001234 is a local FormID. Leave out the load-order prefix. Keep yourname.cars:coupe unchanged when updating a released pack.

Using the author kit

From the extracted author kit, create a project, fill in its files and then run validation and packaging. These commands are for a terminal, not the game console.

python tools\drivables_author.py new --template road-car-v1 --id yourname.cars --output MyCar
python tools\drivables_author.py validate --pack MyCar --data "PATH_TO_RESOLVED_DATA"
python tools\drivables_author.py package --pack MyCar --data "PATH_TO_RESOLVED_DATA" --output MyCar.zip

Replace PATH_TO_RESOLVED_DATA with the Data directory containing the dependencies the game sees. Install the kit’s Python requirements first. PASS means the offline checks passed. ERROR and INCOMPLETE block packaging.

The full kit is not bundled on this page yet. Its red and blue example cars have offline checks, but still need their first in-game sign-off. The optional exporter creates simple examples from dimensions. A general Blender scene exporter is not included.

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
         └─ WheelRR

Measure, 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.
SteerFLsteeringWheelFLrotationTyre meshappearance

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 bGlassShatter only 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.

  • HeadlightL and HeadlightR locate the front lights.
  • The fleet uses beam geometry named HeadlightConeL and HeadlightConeR.
  • 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.
  • bHoodDamage covers 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].

Brakebrake glow parentReversereverse glow parentBrokendamaged shapes

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.

Query passengers →

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.DrvGetVehicleSpeed

The reference before the dot is the vehicle being queried. In the console, selecting that vehicle supplies the calling reference.

Explicit argument

DrvSetFuel 10 MyCarRef

The 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

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
endif
DrvAddDriverNPC 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.DrvAddDriver
DrvContinueRideNPC 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 MyCarRef
DrvDamageVehicleService & damage

Apply damage to a vehicle.

DrvDamageVehicle <value> [vehicle]
Returns
1 on success, 0 on refusal.
Use
Script / console
  • value · Float · required
  • 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. Amount is raw health damage, not a percentage.

DrvDamageVehicle 25 MyCarRef
DrvDismountVehicles

Request that the player dismount.

DrvDismount
Returns
1 if accepted, 0 otherwise.
Use
Script / console

No arguments.

DrvEndRaceRaces

Queue the end of the current race.

DrvEndRace
Returns
1 after queuing the request.
Use
Script / console

No arguments.

DrvGetActiveHorseHorses

Get the selected stable horse.

DrvGetActiveHorse
Returns
Horse reference, or 0.
Use
Script / console

No arguments.

let horse := DrvGetActiveHorse
DrvGetActorVehicleOccupants

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.DrvGetActorVehicle
DrvGetEncounterAliveNPC 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.

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.

DrvGetHorseBondHorses

Read the horse’s bond.

horse.DrvGetHorseBond
Returns
0–100 percent, or -1 if invalid.
Use
Script / console / condition

No arguments.

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.

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.

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 2
DrvGetPassengerOccupants

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 1
DrvGetPassengerCountOccupants

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.

DrvGetPlayerVehicleVehicles

Get the player’s current vehicle.

DrvGetPlayerVehicle
Returns
Vehicle reference, or 0.
Use
Script / console

No arguments.

let vehicle := DrvGetPlayerVehicle
DrvGetRideDriverNPC 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.

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.

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.

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.

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.DrvGetVehicleSpeed
DrvGetVehicleTypeVehicles

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.

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.

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.

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.

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 · required
  • wait 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 -1
DrvMountVehicles

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.

DrvPopTyreService & damage

Mark a tyre as punctured.

DrvPopTyre <value> [vehicle]
Returns
1 on success, 0 on refusal.
Use
Script / console
  • value · Integer · required
  • 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 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 MyCarRef
DrvRecordRouteNPC 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 MyRoute
DrvRecoverVehicleVehicles

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.

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 MyCarRef
DrvRepairVehicleService & 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 MyCarRef
DrvRestoreVehicleAccess & 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 MyCarRef
DrvSeatPlayerOccupants

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 · optional
  • vehicle · ObjectRef · optional

Seat 0 or no seat takes the first free passenger seat. With no vehicle named, the calling reference is used.

DrvSeatPlayer 0 MyCarRef
DrvSetFuelService & damage

Set the stored fuel reserve.

DrvSetFuel <value> [vehicle]
Returns
1 on success, 0 on refusal.
Use
Script / console
  • value · Float · required
  • 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. The value is litres, clamped to the vehicle’s capacity. No inventory supply is consumed.

DrvSetFuel 10 MyCarRef
DrvSetHorseBondHorses

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 50
DrvSetHorseCommandHorses

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 2
DrvSetHorseNameHorses

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 · required
  • vehicle · ObjectRef · optional

Use 0 to hide or 1 to show. Pass a horse reference or call on the horse.

DrvSetHorseTack 1 MyHorseRef
DrvSetRideAggressionNPC 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 · required
  • value · Float · required

Requires an active NPC driving session. The ride request default is 1.0.

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 · required
  • value · Float · required

Speed is metres per second. Requires an active NPC driving session.

DrvSetRideSpeed MyCarRef 12
DrvSetVehicleFaultAccess & restoration

Set a fault message which prevents normal use.

DrvSetVehicleFault <reason> [vehicle]
Returns
1 on success, 0 on refusal.
Use
Script / console
  • reason · String · required
  • 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. An empty string clears the fault.

DrvSetVehicleFault "The engine needs a replacement part." MyCarRef
DrvSetVehicleLockedAccess & restoration

Set the plugin’s vehicle lock.

DrvSetVehicleLocked <value> [vehicle]
Returns
1 on success, 0 on refusal.
Use
Script / console
  • value · Integer · required
  • 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 0 to unlock, 1 to lock.

DrvSetVehicleLocked 1 MyCarRef
DrvSetVehicleRestorationAccess & 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 · required
  • repair skill · Integer · required
  • 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. 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 MyCarRef
DrvSpawnVehicleVehicles

Spawn a registered vehicle base.

DrvSpawnVehicle <vehicle base> [at]
Returns
New vehicle reference, or 0.
Use
Script / console
  • vehicle base · AnyForm · required
  • at · 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 MyParkingMarker
DrvStartChaseNPC 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 · required
  • driver · Actor · required
  • target · ObjectRef · required

The target may be a vehicle or actor.

DrvStartChase MyCarRef MyDriverRef Player
DrvStartEncounterNPC 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.

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 · optional
  • player vehicle base · AnyForm · optional
  • opponent 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 3
DrvStartRideNPC 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 · required
  • driver · Actor · required
  • route 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 MyDriverRef
DrvStartRideToNPC 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 · required
  • driver · Actor · required
  • destination · 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 MyDestinationRef
DrvStopRideNPC 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 · optional
  • retain motion · Integer · optional

retain motion: 0 stops the ride without retaining motion, 1 requests retaining motion.

DrvStopRide MyCarRef 0
IsDrivableVehicles

Check whether a reference is a recognised vehicle or horse.

ref.IsDrivable
Returns
1 if recognised, otherwise 0.
Use
Script / console / condition

No arguments.

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
endif
IsEngineRunningVehicles

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.

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.

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
endif
IsPassengerOccupants

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.

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.

IsStabledHorses

Check whether a horse is registered in the stable.

horse.IsStabled
Returns
1 if registered, otherwise 0.
Use
Script / console / condition

No arguments.

IsVehicleLockedAccess & restoration

Read the plugin’s vehicle lock.

vehicle.IsVehicleLocked
Returns
1 if locked, otherwise 0.
Use
Script / console / condition

No arguments.

IsVehicleOccupiedOccupants

Check for an active driver or assigned passenger.

vehicle.IsVehicleOccupied
Returns
1 if occupied, otherwise 0.
Use
Script / console / condition

No arguments.

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.

Vehicle-use failure codes

DrvGetVehicleUseFailure explains the same eligibility check used by CanUseVehicle.

0
Allowed
1
Invalid or disabled vehicle
2
Invalid or disabled actor, or actor is the vehicle
3
Dead actor or wrecked vehicle
4
Occupied or reserved vehicle
5
Actor already aboard, mounting or reserved
6
Race restriction
7
Vehicle fault
8
Locked
9
Missing player key
10
Water restriction
11
Ownership or theft confirmation required
12
Hostile horse
13
Vehicle or driver not ready
14
Unsupported NPC driving configuration
15
Session or access-record capacity exhausted

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.

EventArguments, in orderUse
Drv:OnMountvehicle, actorReact when a rider mounts.
Drv:OnDismountvehicle, actorReact when a rider dismounts.
Drv:OnVehicleWreckedvehicleHandle the loss of a vehicle.
Drv:OnRideEndvehicle, driver, reasonDistinguish arrival from an interrupted NPC ride.
Drv:OnEncounterSpawnquest, leaderTrack the newly started encounter.
Drv:OnEncounterEndquestHandle the end of an encounter.
Drv:OnPassengerEntervehicle, actorReact when the player takes a passenger seat.
Drv:OnPassengerExitvehicle, actorReact when the player leaves a passenger seat.
Drv:OnRideArrivevehicle, driverReact when a ride carrying the player arrives.
Drv:OnRideWaypointvehicle, driver, mark name, standsFollow 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
endif

This also finds the vehicle when the actor is a passenger. The driver is queried separately.

Unlock a placed quest reward

DrvSetVehicleLocked 0 MyRewardCarRef

Run 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 MyCarRef

Run 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
endif

Command 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.

The pack is rejected

Check required plugins, qualified FormIDs, record types, duplicate ownership and missing files. Two packs cannot claim the same vehicle base or livery. Unknown definition keys are errors. INCOMPLETE means a check could not run, not that the pack passed.

The car appears, but I cannot mount it

Check the loaded rigid body, mass, required control nodes and transforms. Then check any declared part nodes, debris models and driver animations. On the release build, reproduce the problem within 15 seconds of loading a save to capture the vehicle ID and rejection reason in the log. DrvGetVehicleUseFailure can identify a gameplay access restriction.

The wheels float, turn strangely or shade incorrectly

Compare the exported wheel centres and radii with the INI measurements. Check steering and spin pivots, front/rear offsets and contact probes. For a mirrored wheel, inspect triangle winding and outward normals before changing its textures or specular settings.

A light or damage feature does nothing

Check that the feature is enabled, its parts set is bound and its exact node or shape names exist. For rear lamps, confirm that each glow is a child of its switched parent. Test with a fresh model load after changing the definitions.

I changed the files, but the old setup remains

Restart the game after changing manifests, forms, models, feature definitions or animations. Use the workshop for supported live numeric tuning. Check which copy of the file wins in your mod manager.

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.

Back to your first car ↑Command reference ↑