JGRennison / OpenTTD-patches

OpenTTD - http://www.openttd.org/ - with additional patches
Other
572 stars 130 forks source link

How to add road vehicles to slots? #627

Closed Nrgte closed 8 months ago

Nrgte commented 9 months ago

So I'm trying to experiment with slots and there is a nice order to remove a vehicle from a slot, but I haven't found a way to add a vehicle to a slot. Basically what I'm trying to do is only have a certain amount of road vehicles in an area to prevent dead locks.

But I only found the option to remove vehicles from slots, but not add them once they enter a station or as an order.

It would also be nice to increase or decrease the amount of slots depending on how many goods are waiting at a station.

JGRennison commented 9 months ago

The vehicle in slot conditional order has modes to try to acquire a slot, and then jump if the vehicle is/isn't in the slot. There isn't a non-conditional version of this because if a slot is already full, the vehicle won't be able to acquire it.

It isn't possible to dynamically change the capacity of a slot, however you could do something with the waiting cargo amount conditional order.

Nrgte commented 9 months ago

Where is the option to aquire a slot in the conditional order jump? The conditional order can only jump to an order depending on a condition. It can't set a condition. At least I don't see anything like this.

JGRennison commented 9 months ago

slot

See also: https://github.com/JGRennison/OpenTTD-patches/wiki/Signalling#slots

Nrgte commented 8 months ago

Thanks a lot. I play with the language set to german and the translation of "Vehicle in slot" is a not very accurate in german, so I totally missed that.

JGRennison commented 8 months ago

No problem. I can update the translation files if there's a better way to put it?

https://github.com/JGRennison/OpenTTD-patches/blob/jgrpp/src/lang/extra/german.txt#L21 https://github.com/JGRennison/OpenTTD-patches/blob/jgrpp/src/lang/extra/german.txt#L1334

Nrgte commented 8 months ago

I'd just write "Zug im Slot" and "Fahrzeug im Slot". "Zeitfenster" translates to time window and suggests it has something to do with the time tables.

Also it would be nice if there was a straight order to add a vehicle to a slot, similar to the one to remove a vehicle from the slot. That way it would be really easy to just put a waypoint at a chokepoint and make them add and remove when they go through there.

JGRennison commented 8 months ago

OK, I've changed that.

I'll have a look at adding a non-conditional order to try to acquire a slot.

JGRennison commented 8 months ago

041f36d56542e914704661f8d5acf7da9591515f should do the trick

Nrgte commented 8 months ago

Thanks a lot. I'll make sure to try it out with the next build.