Passenger count for vehicles

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
PFQNiet
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Passenger count for vehicles

Post by PFQNiet »

Currently we have a boolean value to allow passengers at all. So for a car we can have zero or two occupants.

Personally I have a use case where I want a car to only allow one occupant, the driver. I have to implement this via script, by ejecting any passengers who try to enter.

It could also be neat to allow more than two occupants. An advanced tank for example might allow four occupants. I'm not sure how this would work for weapons, it could either be the first passenger or maybe new UI for selecting a passenger to be the gunner?

Okay maybe more than two occupants is unnecessary, but being able to say "driver only" would be nice.

Amarula
Filter Inserter
Filter Inserter
Posts: 511
Joined: Fri Apr 27, 2018 1:29 pm
Contact:

Re: Passenger count for vehicles

Post by Amarula »

+1
Allowing a mod to determine the maximum number of passengers opens up lots of fun possibilities like tour buses and centipedes.
The last time I checked, trains only allowed one passenger per locomotive/cargo wagon/fluid wagon (so I needed to add two cargo wagons to my personal train in order to give both kids a ride around my base). Giving mod control over passenger counts for those vehicle types also opens up shenanigans.
I could see a mod wanting to know how many passengers were present for things like a train that leaves when enough passengers have boarded.
My own personal Factorio super-power - running out of power.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Passenger count for vehicles

Post by Klonan »

PFQNiet wrote:
Fri Jun 04, 2021 2:21 am
Okay maybe more than two occupants is unnecessary, but being able to say "driver only" would be nice.
It is a possibility to split into 2 bools, 'allow_drivers' and 'allow_passengers'. It wouldn't be so simple, but possible
Amarula wrote:
Fri Jun 04, 2021 12:53 pm
Allowing a mod to determine the maximum number of passengers opens up lots of fun possibilities like tour buses and centipedes.
This is just not possible at the moment, the game only stores 1 driver and 1 passenger, and the logic is very specific

I mean with programming anything is possible, we can change the passengers to a vector of players, etc.,
But that moves into more feature territory, rather than just a simple clean interface request for a feature that already exists

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 315
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Passenger count for vehicles

Post by Stringweasel »

+1 for dissallowing passengers with a second bool flag.

It would be very useful for my beta-ish Demolition Derby mod. Currently I need to add a lot of fluff code to ensure that there's never more than one player in a vehicle. This generates a lot of extra events (passenger getting in + script removing passenger).
Alt-F4 Author | Factorio Modder
Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 489
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Passenger count for vehicles

Post by Silari »

Klonan wrote:
Fri Jun 04, 2021 3:09 pm
PFQNiet wrote:
Fri Jun 04, 2021 2:21 am
Okay maybe more than two occupants is unnecessary, but being able to say "driver only" would be nice.
It is a possibility to split into 2 bools, 'allow_drivers' and 'allow_passengers'. It wouldn't be so simple, but possible
If this does happen, I would suggest allowing for a passenger only vehicle - ie one occupant who can't move the vehicle. I'm sure there's a mod that could make use of it.

pleegwat
Filter Inserter
Filter Inserter
Posts: 258
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Passenger count for vehicles

Post by pleegwat »

Silari wrote:
Mon Jun 21, 2021 4:51 pm
Klonan wrote:
Fri Jun 04, 2021 3:09 pm
PFQNiet wrote:
Fri Jun 04, 2021 2:21 am
Okay maybe more than two occupants is unnecessary, but being able to say "driver only" would be nice.
It is a possibility to split into 2 bools, 'allow_drivers' and 'allow_passengers'. It wouldn't be so simple, but possible
If this does happen, I would suggest allowing for a passenger only vehicle - ie one occupant who can't move the vehicle. I'm sure there's a mod that could make use of it.
Player-controlled turrets?

Post Reply

Return to “Modding interface requests”