Automated timetables and separation

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Automated timetables and separation

Post by ColdIce »

Alberth wrote:Why not try that instead?
:) I know that if i compile against r22816 (last revision it was created for) it will work. but then i will not be able to enjoy the newgrfs that require latest trunk revision. I know what the patch does. I played chills patch pack. I know its not a piece of cake to bump it to current trunk. if it was, I was able to do it :) .
ImageImage

User avatar
FooBar
Tycoon
Tycoon
Posts: 6559
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Automated timetables and separation

Post by FooBar »

If you want to give it another try:
- update your repo to r22816
- apply patch
- update repo to tip (or head or whatever it's called in your VCS)
- merge

The last part is the hardest. Especially merging a 1000 revisions at once is not easy.
If you want to make it yourself easier:
- update your repo to r22816
- apply patch
- update repo to r22817
- merge
- update repo to r22818
- merge
- etc.

That way you only get small chunks to merge, which are far more understandable in terms what changes were made and how these influence the patch. Instead of updating revision by revision, you can of course also do it in steps of 10 or 100.

Still, if trunk changed variables that the patch hooks into, it will be difficult to update the patch without knowlegde of C++.

User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 283
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Automated timetables and separation

Post by ColdIce »

I managed to fail. Again X(

It was great to spend all those hours for a big, juicy, final fail!

I will stick to the "Please, can someone with skills update this. Thank you"

anyway, thank for the tip Foobar
ImageImage

MAG101
Engineer
Engineer
Posts: 28
Joined: 14 Dec 2011 00:55

Re: Automated timetables and separation

Post by MAG101 »

AT_ET-TOWN_FOUNDED doest exist when ai crash when finsh building secord route
Attachments
Unnamed, 2nd Jul 1950.png
(111.13 KiB) Downloaded 10 times

User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Automated timetables and separation

Post by SwissFan91 »

Apologies if this is the incorrect place for this...

I'm using this patch within Chill's Patchpack, and my vehicles, well... don't seperate. In fact, they seem to bunch up more! Am I doing something wrong?

Save game can be produced if necessary.
Total Alpine Replacement Set: Industry, Town, Objects

User avatar
wouter2512
Engineer
Engineer
Posts: 6
Joined: 08 Feb 2010 20:27
Location: Delft, The Netherlands

Re: Automated timetables and separation

Post by wouter2512 »

This thread has been dead for quite a while, although some posts have been made in the last couple of weeks. The original developer responsible for this patch has not worked on it for a long time.

Also questions regarding the behavior of this automated separation as in Chill's Patchpack should be asked in a thread regarding that patch.

User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2393
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Automated timetables and separation

Post by SwissFan91 »

wouter2512 wrote:This thread has been dead for quite a while, although some posts have been made in the last couple of weeks. The original developer responsible for this patch has not worked on it for a long time.

Also questions regarding the behavior of this automated separation as in Chill's Patchpack should be asked in a thread regarding that patch.
Hmmm, I guessed that someone who knows how the patch works may be able to help.

It was a toss-up between this thread and Chill's thread - I thought maybe that I'd get told in there to come here!
Total Alpine Replacement Set: Industry, Town, Objects

hthhs
Engineer
Engineer
Posts: 107
Joined: 03 Sep 2010 12:58
Location: London, UK

Re: Automated timetables and separation

Post by hthhs »

Patch updated to r24155. I've only done limited testing and guarantee nothing. Use -p1. :)
Attachments
ats-r24155.diff
(30.87 KiB) Downloaded 111 times

The_Terminator
Engineer
Engineer
Posts: 19
Joined: 04 Feb 2010 15:26

Re: Automated timetables and separation

Post by The_Terminator »

And here's the patch with the latest version (7d3043e) of cargodist. I'm only providing a Win32 build and no actual patch file because a) I based it on a prepatched version of cargodist downloaded from the git repo and I can't for the life of me figure out what trunk revision it's based on to patch from, and b) because I had to do remove a bit of debugging code to get it to work - and while everything appears to be working fine, this should not be considered anything more than a temporary build until someone with more C++ knowledge does one properly. It may or may not work for you, use at your own risk, etc.

(For those familiar with the code, there's an assertion in strings_func.h that failed every time the player tried to access the vehicles sub-menu in advanced options. I commented it out to see if I'd be able to find out what error it was meant to prevent, but haven't had any kind of error or bug since. I've played a couple of games with it, and everything seems fine, so I'm assuming whatever caused it isn't really a problem.)

Download Link

The_Terminator
Engineer
Engineer
Posts: 19
Joined: 04 Feb 2010 15:26

Re: Automated timetables and separation

Post by The_Terminator »

Patch updated to r24397. I made a couple of changes - I added description strings for the two advanced settings added by the patch, moved a couple of blocks of code around where it looked like leaving it might cause problems, and I changed the savegame version to 190 in order to restore savegame compatibility with recent trunk revisions, which was previously broken (although now if you load savegames created by any previous version of this patch, any automated timetables in use might break). Other than that, I didn't really change too much from hthhs' version. The bug I mentioned in my previous post is still there as well, so I've commented out the offending line in this patch; it all seems to work fine, but it should probably be fixed at some point (not by me though, I'm completely stumped).

I've done hardly any testing with this patch, so I can't guarantee it'll work, but my working copy works fine, so it should do. Use at your own risk.

Apply the patch using -p0.
Attachments
autotimetables_r24397.diff
(31.62 KiB) Downloaded 211 times

dbkblk
Traffic Manager
Traffic Manager
Posts: 154
Joined: 29 Mar 2008 18:38

Re: Automated timetables and separation

Post by dbkblk »

Will this patch ever be included in trunk ?

This patch is quite essential to enjoy passengers and mail servicing.

User avatar
wouter2512
Engineer
Engineer
Posts: 6
Joined: 08 Feb 2010 20:27
Location: Delft, The Netherlands

Re: Automated timetables and separation

Post by wouter2512 »

dbkblk wrote:Will this patch ever be included in trunk ?

This patch is quite essential to enjoy passengers and mail servicing.
Probably not in its current stage. If it were picked up by one or more developers who could put some serious time in it; then it might... But currently this feature patch is not being maintained and thus it is sort of dead...

EDIT: You might want to look at http://www.tt-forums.net/viewtopic.php?t=54332 as an alternative

frabac
Engineer
Engineer
Posts: 10
Joined: 17 Oct 2013 07:15

Re: Automated timetables and separation

Post by frabac »

Hello There!!

First of all thanks and congrats for this fantastic patch.
I have used it for months with the Hard Pack but now I started playing with the source code and I wish I could apply the patches myself.
I have tried it against r26156; I have many errors leading to the same problems:

Code: Select all

Error	1	error C2039: 'ahead_separation' : is not a member of 'Vehicle' (..\src\articulated_vehicles.cpp)	n:\giochi\openttd_src\src\vehicle_base.h	590	1	openttd
Error	2	error C2039: 'behind_separation' : is not a member of 'Vehicle' (..\src\articulated_vehicles.cpp)	n:\giochi\openttd_src\src\vehicle_base.h	596	1	openttd
Error	33	error C2039: 'timetable_automated' : is not a member of 'OrderSettings' (..\src\settings.cpp)	N:\giochi\openttd_src\objs\settings\table\settings.h	343	1	openttd
Error	34	error C2039: 'timetable_separation' : is not a member of 'OrderSettings' (..\src\settings.cpp)	N:\giochi\openttd_src\objs\settings\table\settings.h	344	1	openttd
Error	47	error C2039: 'current_loading_time' : is not a member of 'Vehicle'	N:\giochi\openttd_src\src\vehicle.cpp	2145	1	openttd
Error	57	error C2227: left of '->behind_separation' must point to class/struct/union/generic type	N:\giochi\openttd_src\src\vehicle.cpp	2523	1	openttd
Error	60	error C2227: left of '->ahead_separation' must point to class/struct/union/generic type	N:\giochi\openttd_src\src\vehicle.cpp	2524	1	openttd
Can you help me with that, please?

User avatar
wouter2512
Engineer
Engineer
Posts: 6
Joined: 08 Feb 2010 20:27
Location: Delft, The Netherlands

Re: Automated timetables and separation

Post by wouter2512 »

If you want to make it work against a recent trunk revision, you'll have to dive into the sourcecode yourself.
This project is not actively being maintained.
You might want to look at Slim Timetable Separation as an alternative.

Gathers
Engineer
Engineer
Posts: 44
Joined: 25 Nov 2007 13:26

Re: Automated timetables and separation

Post by Gathers »

Hello again! I have recently found the time, energy and motivation to update my old patch again. :)

Via-orders should finally be fixed, conditional orders should be "less bad" and ctrl-click behaviour when stopping automation has been inverted.

The first post is updated with new files. I have only done some quick testing, but I didn't find any obvious bugs or crashes. Apologies for the delay!

dbkblk
Traffic Manager
Traffic Manager
Posts: 154
Joined: 29 Mar 2008 18:38

Re: Automated timetables and separation

Post by dbkblk »

Hi !

I've applied your patch v0.8 against the build 26235M.

Here is a x64 windows build:
https://mega.co.nz/#!KQx2HCBI!GQqdbVSwP ... mpJrbu4JL4

Thanks for your patch !

KeldorKatarn
Transport Coordinator
Transport Coordinator
Posts: 274
Joined: 13 Apr 2010 21:31

Re: Automated timetables and separation

Post by KeldorKatarn »

Using this in a current youtube series. I'm quite happy with it :)

Patagonicus
Engineer
Engineer
Posts: 26
Joined: 24 Oct 2011 20:42

Re: Automated timetables and separation

Post by Patagonicus »

I managed to update The_Terminator's version from r24397 to the newest (as of writing) version r27118.

Note: It compiles, I currently play with it, but besides that it has not been tested, so use it at your own risk ;)

I attached the file in the case anyone find this of interest.
Attachments
autotimetables_r27118.diff
(31.81 KiB) Downloaded 115 times

MasterPyoda
Engineer
Engineer
Posts: 1
Joined: 24 May 2015 08:53

Re: Automated timetables and separation

Post by MasterPyoda »

Thank you for the update! :bow: :bow: :bow:

Seems like it`s also working with newest r27291 :)

tlpwka
Engineer
Engineer
Posts: 16
Joined: 09 Feb 2015 17:12

Re: Automated timetables and separation

Post by tlpwka »

win32-bundle based on trunk r27336
OpenTTDPortable (patched-r27336M)

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 13 guests