Driving NPCs

Is it possible? I imagine ordering an NPC to take the driver seat and then ordering it to go forward/turn at a certain speed isn’t in the realm of impossibility. Could even have a simple dialogue option like “hold the wheel for me” where the NPC attempts to drive relatively straight with its driving skill for the player while he mounts the gun/flings nukes.

Putting NPCs at a wheel of a supercar would be a fun way to suicide too.

Maybe if assigning waypoints was possible? But then you might have to be assigning them all the time if you were riding along with the NPC. Obviously (avoiding) obstacles would be the biggest danger. And how would an AI know if it could pilot a vehicle through a gap?

It might be far easier to make an NPC operate a vehicle turret…?

On the other hand, it might be doable to make NPCs drive on roads only. Even that might entail multiple issues. Wrecks, other cars, landmines, turrets/roadblocks, messes made by triffid queens… But then again, it could be left up to the player to clear routes for future use. Include option to assign phantom roads (to be placed on fields, potentially providing shortcuts).

Another thought: Have an NPC come pick you up with a vehicle. The NPC would appear right outside the reality bubble on a valid spot after a certain period of time, in a car.

Or alternatively, you would have to assign the rendezvous spot using a shadowed outline of the selected vehicle, within the reality bubble. Leave an NPC to guard your house (or any spot), leave a vehicle nearby, go out there to loot, call NPC with an radio:

Or alternatively, assign and save rendezvous spots as you travel. They would have to have enough space around them for a vehicle, and it would be up to the player to judge the measurements. After all, vehicles have a center point, which is the same tile that is selected by default whenever you examine a vehicle.

(The dialogue would go like:)
“Go to rendezvous point XXXXX, use vehicle XXXXX”.
“Roger, ETA 30 minutes.”
(30-40 minutes later)
“OK, I’m just north of you.”

(or if player is too far away from the agreed-upon meeting place:)
“OK, I’m here. Can’t see you, though.”

(after a certain amount of time has passed, and the player hasn’t shown up:)
“Hello? Are you coming or not?”

Every now and then, the NPC would be “outside earshot”, or sleeping, and you would need repeated attempts to make radio contact. :smiley:
(note: check for Heavy Sleeper or Poor Hearing traits on the NPC)

Sounds like an interesting idea, a good counterpoint for having them man the turrets… its probably a far harder thing to code though.

I think normal driving mishaps, such as fumbling with vehicle controls, should be disabled for NPC pilots, at least at first. Procedures could be programmed for actions, such as turning 90 degrees:

  • drive along the centerline of the road “well before the turn” (= 20 tiles?)
  • slow down to 32km/h at 10 squares before turning
  • begin turning exactly at the intersection (or 5 squares before it)
  • turn until facing north/east/south/west
  • course correct to the centerline
  • accelerate to 64km/h

Something like that. Some annoyances might arise if the road goes “diagonally”, having repeated short 90 degree turns = slow driving.

NPCs could follow the centerlines of the road or drive 3 squares to the side of it, or choose a lane (= the center between the road centerline and the edge).

All NPC piloting could be made just for a normal sized car in mind. 6x4 squares, is it? Having an NPC pilot any larger vehicle would be on player’s responsibility. This could also be informed to the player in dialogue:

NPC: “You know, I can drive a car, too. Just don’t ask me to pilot a truck or anything big like that. I can drive it but I’ll probably hit something with it sooner rather than later.”

How fast should an NPC drive? Should the NPC be like “Don’t tell me what to do.” and then he/she’d drive like a maniac (or a snail), or should the player be able to only command like “Drive slowly/moderately.” or “Stomp it.”

Personally I’d want to see NPCs comment my driving and generally yammer:
“You drive slower than my grandma did, you know?”
“Sheesh! Slow down. It’s not like you’re late for work.”
“You do realize there’s a 150mph speed limit in this area?”
“Do you think there still are cop bots monitoring speed limits, trying to pull drivers over?”
“Want some apple juice? Potato chips?” [check vehicle inventory for food items, select randomly one or two to ask]
“We’ve got company.” [hostile entity targets either the player or the NPC]
“Moose at 9 o’clock.” [sometimes, when a [creature] is spotted, disable if large amount of creatures]
“Had a V12 back in the day. Left it at my parents’ house. Wonder if it’s still there…” [spawn a muscle car in a home garage far away, put it on map, once per character, or world]