Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestion: option to automatically space out vehicles in a shared order #8095

Open
twpol opened this issue Apr 22, 2020 · 5 comments
Open

Comments

@twpol
Copy link

@twpol twpol commented Apr 22, 2020

Version of OpenTTD

1.10.0

Expected result

A single-click option to space out vehicles evenly, which is particular useful for road vehicles carrying passengers/mail around towns.

Actual result

You need to:

  1. Already have all the vehicles going around the route, so they game knows which order they're running in
  2. Fully timetable the route, which means "Autofill" and waiting for that vehicle to go around once
  3. Add a small bit of slack somewhere, lest they be stuck forever delayed
  4. Control-click "Start date"
  5. Manually select the expected arrival date shown for the first order
  6. Click "Set date"
  7. Keep a constant eye out for vehicles which are delayed and stuck behind another vehicle which is on time

And then, if anything changes about the route, number or type of vehicles, you have to repeat the whole process from the top.

Notes

This is probably a resurrection of #5354, and something I have wanted since before the timetable feature arrived. :)

I have an algorithm worked out and have been poking around the code, so I think this is a very achievable feature that will make many people happy.

@sheepo99
Copy link

@sheepo99 sheepo99 commented Apr 24, 2020

If you already have an algorithm planned, I'd say finish something that's workable first, and then submit a PR. That's the best way of obtaining feedback and of testing whether or not this is feasible.

@techgeeknz
Copy link
Contributor

@techgeeknz techgeeknz commented Jun 4, 2020

JGRPP has this feature, along with automatic timetabling. If you're happy with the way they work there, and there is sufficient interest in adding this feature, it may be possible to isolate the patches and port them to mainline.

@twpol
Copy link
Author

@twpol twpol commented Jun 7, 2020

I am amused as "JGR" are my initials too, but I've already written all the code for this feature. I am in the testing and tidying-up phase.

@techgeeknz
Copy link
Contributor

@techgeeknz techgeeknz commented Jun 7, 2020

I am amused as "JGR" are my initials too

Two JGRs working on the same project? What are the odds, @JGRennison?

@JGRennison
Copy link
Contributor

@JGRennison JGRennison commented Jun 7, 2020

That is quite a coincidence. :)

The implementation in my branch is based on this one: https://www.tt-forums.net/viewtopic.php?p=1140899#p1140899, it's not something I came up with myself, though I have fixed/extended various bits of it.

There are many patches which do this sort of thing already on the forum, it's probably worth having a browse to see what's been done before for background context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.