Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Feb 23, 2019 6:03 pm

All times are UTC




Post new topic  Reply to topic  [ 129 posts ]  Go to page 1 2 3 4 57 Next
Author Message
PostPosted: Mon Dec 24, 2012 8:59 pm 
Offline
Director
Director

Joined: Tue Jul 17, 2007 5:56 pm
Posts: 608
Update 20th October 2014
=================================================================================================================
Current version: v20 (attached here)
Windows binary of v15 can be downloaded at http://www.tt-ms.de/forum/showthread.ph ... 4#pid87114
Bugtracker can be found at: https://dev.openttdcoop.org/projects/op ... tip/issues
===> Please report problems either here in this thread, or by opening a ticket.

State of the patch: Feature-complete, played (though not the newest version) with bigger train networks, testers welcome :-)



Especially, at some point someone not being interested in timetables at all (for finding out wether I accidentally broke non-timetable functionality) but playing with this patch being applied, and people who more heavily play with timetabled road vehicles, ships, aircrafts than I do would be good.
=================================================================================================================

Readme describing the individual patches, and the general concepts of the patch, in a quite code-oriented way, but also with some examples.

Attachment:
readme.txt [19.4 KiB]
Downloaded 216 times


=============================================================================================================


Merry Christmas!

After about a year of (occasional) development, I am able to publish
version one of the Timetable Improvement Patch. Note that it aims for
people who like to do detailed timetabling on their maps, e.g. trains
meeting always in the same station at some specified time. If you do
not care about that, then this is not the right patch for you ---
however, it does not want to force the player to use timetabling, so
you should be able to ignore the new features even with the patch
being applied.

This patch in fact is a quite big patch queue, introducing the
following features (for a short overview, see the attached screenshot):

- You can enter routes, consisting of route nodes.
- Vehicle orders can refer to routes. They serve as vias: A vehicle
travels from station A via route Foo to station B.
- Timetables are specified using absolute dates: Each OrderList (aka
timetable) has a (global) start date and a length. Individual
vehicles refer to their timetable using an offset. E.g. vehicle one
drives with offset zero months, vehicle two with offset one month.
Arrivals and departures at individual stations are also specified
using absolute dates, and are a property of the timetable, i.e. the
vehicle offsets work for them either.
- Once a vehicle reaches the end of its orders, the timetable length
will be added to its offset. If all shared timetables leave the
range 0 ... timetable length, the global timetable start date and
the offsets will be adjusted accordingly to keep offsets small.
- Timetable offsets and lengths can be specified in days, months and
years. This way, one can easily specify timetables where vehicles
will always do some action the same day of some month.
E.g. timetable length two months, always meet in station bar the
15th of a month with some other vehicle.
- If no timetable information is entered, then everything is supposed
to work the traditional way, without timetabling.
- The Goto tool works either the traditional way, or using a new GUI
supporting routes. Imagine the previous order is for some station
Foo, then the Goto tool will offer all stations reachable from Foo
via some route in a extra window, no scrolling and clicking on the
main map is necessary.
- Timetabling also works using a extra GUI, which allows to specify
several arrivals or departures in a row, without any window closing
and reopening in between.
- Stations have a station timetable.
- For routes, you can open either a train graph, or a tabular route
timetable.

The overall goal is making timetabling in OpenTTD much more robust
(avoid problems with unwanted timetable shifts, when relative dates
in a timetable are changed), and offering tools for planning and
synchronizing timetables in-game, in my games on unchanged trunk
I always had to use several sheets of paper to keep track of information
like which trains meet where etc.

The key to that goal IMHO is the introduction of routes, as for
displaying the traffic on some railway line in some useful way, I
first need some concept representing it.

This patch is neither actually finished, nor was I (for reasons of
time) able to play a bigger game using it yet. But I hope, that the
most severe bugs, problems of user handling, etc. are already fixed,
i.e. that this patch is ready for playing test games using it.

Major problems and tasks I am aware of:
- Generally, GUI handling is not yet tested in a bigger game. I am
quite sure that the ideas are the right ones for the problems I
want to solve using them, but there might be GUI problems which
one notices once a game grows beyond some size.
- The node and route timetables are not yet finished; in the node
timetable some heuristics for choosing the displayed destination is
still needed, in the route timetable I am not sure wether all of the
more complex cases (like trains overtaking each other) do already
work.
- I added the ability to have route nodes formed by a set of tiles.
However, such an ability is not yet introduced into the Goto
meachanism. At first, I thought about just using them for
timetabling (offer routes intersecting outside stations, plus
updated delay information outside stations), but in fact I believe
that supporting order destinations formed by a set of tiles may be
realistic using that infrastructure. After all, in terms of a
pathfinding algorithm, a station with multiple tracks is also a
collection of possible destination tiles (either enter track A, or
B, or C), and in terms of the algorithm, my hope is that this is
more or less equivalent to supporting a set of arbitrary destination
tiles. This might also be a solution for the common problem of defining
that certain trains must enter certain tracks (but not other ones) of some
particular stations. But I did not yet inspect this further.
- Arrivals and departures are currently forced to be in the interval
timetable start ... timetable start plus length. My feeling
currently is that this restriction may be too severe in terms of
easy user handling, maybe just ignoring that interval, or silently
adjusting arrivals outside that interval by multiples of the
timetable length is a better way to deal with that.
- Updating dialogs like the node and route timetables if some affected
piece of information changes is not really implemented at all
affected places.

The future: In the short term, I have quite little time to even answer
in this thread during the next about two weeks. But also in the longer
term, do not expect too much activity from me concerning this patch.
If there is real interest in this patch, then probably opening a bug
tracker for it is the best choice.

And now: Have fun :-)


Attachments:
stip_v20.zip [164.13 KiB]
Downloaded 46 times


Last edited by ic111 on Sun Apr 23, 2017 6:49 pm, edited 13 times in total.
Top
   
PostPosted: Tue Dec 25, 2012 12:24 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2365
Location: Location, Location
I've never really liked the default timetables, so this may push me to use them a bit more

And that's some strange formatting you have there :L

Merry Christmas!

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
PostPosted: Tue Dec 25, 2012 3:43 pm 
Offline
Director
Director

Joined: Tue Jul 17, 2007 5:56 pm
Posts: 608
Concerning layout, I typed it in an external text editor to avoid the danger of loosing it if I do something wrong :-)

Also, I just noticed that the two new settings in the Vehicles settings tree also suffered from that problem: viewtopic.php?f=33&t=40844&start=900#p1058434
(those settings control to what degree the player is offered the new GUI dialogs by default).

I added a version two, see above in the updated first message.

Furthermore, maybe I should have pointed it out better: The route management dialogs are accessible from the menu where also the minimap is located.


Top
   
PostPosted: Tue Dec 25, 2012 5:33 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7281
maybe it makes more sense from the train/truck/whatever menu? (from the "manage list" dropdown, where autoreplace etc. is)

it would be easier to separate the routes for different vehicle types (it would be unlikely that trucks and ships would share timetables)

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Dec 25, 2012 6:03 pm 
Offline
Director
Director

Joined: Tue Jul 17, 2007 5:56 pm
Posts: 608
Do you mean as a second top level entry for each of the train / road / ship /aircraft menus? Or as a new button etc. in the train / road / ship / aircraft list?

If the latter, it would come at the cost of a more difficult access to the route management dialog, so I would probably prefer the first solution.

You are right with the observation that trucks and ships etc. probably won´t share routes. So, obviously this can be done (although I probably wouldn´t regard it first priority), technically it would just mean adding a type attribute to the Route data structure and filtering accordingly.

Regarding bug tracker for such a project, is http://dev.openttdcoop.org/ and there the link "Please, create a ticket for a new project here." the right place to look at?


Top
   
PostPosted: Tue Dec 25, 2012 6:08 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7281
i mean in the train list window, on the lower end the "manage list" dropdown. maybe it's not the best place, but it certainly is more logical than the map menu... (imho)

on the other hand, maybe this and the autoreplace window should go into a more easily accessible spot anyway, so maybe the train/whatever menus could have sub-entries:
  • your trains
  • routes
  • autoreplace [all-vehicles group]
  • other companies' trains

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Dec 25, 2012 6:32 pm 
Offline
Director
Director

Joined: Tue Jul 17, 2007 5:56 pm
Posts: 608
Yes, this might indeed be a good idea, as those menus all have just one subentry at present.

Also, known problems I found while playing a bit:

There seems to be an off-by-one-line error when setting arrivals/departures in some, but not all, circumstances. (you click "Change Arrival for station B", and it opens the dialog for station A). Workaround: Set data for station A to the identical data, and use Choose and Next.

I will have to think about what to do if a player alters (parts of) routes that are in use by some timetables, probably some cases are not yet handled properly.


Top
   
PostPosted: Tue Dec 25, 2012 6:54 pm 
Offline
Director
Director

Joined: Tue Jul 17, 2007 5:56 pm
Posts: 608
... and in the meantime, I am quite sure that I´ll have to relax checking Arrival / Departure dates in some way. At present, it in fact forces you to start the timetable with the first station of the OrderList, and this is not senseful.


Top
   
PostPosted: Thu Dec 27, 2012 1:47 pm 
Offline
President
President
User avatar

Joined: Sat May 20, 2006 7:30 pm
Posts: 896
Location: West Sussex, England
If anyone has created a win32 binary based on beta 1.3 would they be willing to post it to allow easier testing? :)

_________________
The TT forums trivia tournament! Come along and join in the fun
http://www.funtrivia.com/private/main.cfm?tid=90722


Top
   
PostPosted: Mon Dec 31, 2012 11:46 am 
Offline
Moderator
Moderator
User avatar

Joined: Wed Dec 18, 2002 6:00 pm
Posts: 3420
Location: High Wycombe, England
Forgive me if this is answered already, but I didn't see it when I glanced through - does this patch offer or can it integrate with another patch which allows timetabling based on a 24 hour clock (hh:mm)?

_________________
(British) Modular Stations Set - Thread: | Website:
Swiss Set - Thread: | Website:
Route Map Creator
Image


Top
   
PostPosted: Tue Jan 01, 2013 9:16 pm 
Offline
Engineer
Engineer

Joined: Tue Dec 07, 2004 6:34 pm
Posts: 53
Location: Grafing bei München (Munich)
I'm playing around with your patch(set) right now.

While I managed to get a simple test tram line with 4 stations and 2 trains working, I'm wondering about a few things:
1. Is there any way to get the Autofill working? The button always snaps out again right away.
2. Why do I have to specify start date, offset and especially a duration before I can even start setting up times? I understand that it's impossible to specify absolute times without an origin to refer to. But right now, creating a timetable seems to involve a lot more hassle than really needed.

In addition to this, I'd love to have some way to (semi-)automatically set up offsets to spread my vehicles over the timetable. (Analogous to the various timetable separation patches out there)

Anyway, I see a lot of potential in your work and would love to see it refined. :]

... and now back to finding some workflow to tackle this thing. ^_^

Edit:
Proposed feature for order assembly: A button "Add whole route" with a "return trip" option. Should save a few clicks...


Top
   
PostPosted: Thu Jan 03, 2013 3:31 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jul 09, 2010 6:07 pm
Posts: 28
Location: Minsk, Belarus
jvassie wrote:
can it integrate with another patch which allows timetabling based on a 24 hour clock (hh:mm)?
I'd like to ask the same question. :) Realistic timetable based on days (instead of time) looks rather odd.

_________________
Belarusian translation for OpenTTD
Epochal xUSSR Set


Top
   
PostPosted: Fri Jan 11, 2013 11:22 pm 
Offline
Director
Director

Joined: Tue Jul 17, 2007 5:56 pm
Posts: 608
Autofill: Just not implemented yet.

Timetables based on time: The problem IMHO is that time in OpenTTD is a concept of days, not of hours and minutes. At the bottom of the screen, you see "now is January 12th", not "now is 0:12 a.m.". Thus: One could think about using hours and minutes throughout the timetabling dialogs, but how would you connect that information with the concept of date shown elsewhere in the game? I mean, IMHO it is an absolute must that you can easily compare the time as given in the timetabling dialogs with the global OpenTTD time. E.g. the timetable says "leave station at January 17th",one has a look at the global date "ah, it´s January 7th", so "ok, vehicle will leave in 10 days". Thus, unless one changes the global concept of time (at least in a graphically sense) I think displaying time in days and months is senseful.

But, now a question from me: I have heard some time ago that for projects like this one having a bugtracker at http://dev.openttdcoop.org/ is possible. Is this correct? I assume that it is the link "Please, create a ticket for a new project here." on that page. However, if I click it I am asked for username/password (I assume that it means the one I use e.g. for this forum), and a OpenID URL. What is the latter? Can anyone help?


Top
   
PostPosted: Sat Jan 12, 2013 12:49 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7281
no, the username/password is separate to the forum or to the openttd (bugtracker/translator/...) login.

"OpenID" is something for lazy people who can't remember passwords, you don't have to use it... ;)

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Sat Jan 12, 2013 1:01 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Oct 04, 2008 11:05 pm
Posts: 2655
Location: Lost in spaces
The account that you would use at the openttdcoop devzone would be seperate from the one you have here.
I can not redirect you to the correct page to create an account there because of being on the wrong computer.

Also, you can not just create a new project IIRC, at least not before you managed another one or something like that.
Maybe send a pm to planetmaker or Ammler for more, more accurate, details?

_________________
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.


Top
   
PostPosted: Tue Jan 15, 2013 9:59 pm 
Offline
Engineer
Engineer

Joined: Tue Jan 15, 2013 9:42 pm
Posts: 3
It looks good, but I have problem with patching:
Code:
martin@martin-laptop:~/openttd$ patch -p1 -i /home/martin/patches/600_RouteTimetableData.patch
patching file src/timetable.h
Hunk #1 FAILED at 13.
Hunk #2 FAILED at 29.
2 out of 2 hunks FAILED -- saving rejects to file src/timetable.h.rej
patching file src/timetable_cmd.cpp
Hunk #1 FAILED at 15.
Hunk #2 succeeded at 218 with fuzz 2 (offset 196 lines).
Hunk #3 FAILED at 660.
2 out of 3 hunks FAILED -- saving rejects to file src/timetable_cmd.cpp.rej

OS: Ubuntu
Any idea?


Top
   
PostPosted: Wed Jan 16, 2013 7:38 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Oct 04, 2008 11:05 pm
Posts: 2655
Location: Lost in spaces
Hello MacaCZ,

You most likely patched a different revision than the patch was intended for.
You can try to fix the rejects yourself (as in manually) but as this patch series is rather big, I suggest patching r24853 instead, which was the last revision made the day the first post was last modified, and see if that goes any better. ;)

_________________
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.


Top
   
PostPosted: Wed Jan 16, 2013 8:38 am 
Offline
Engineer
Engineer

Joined: Tue Jan 15, 2013 9:42 pm
Posts: 3
Hello,
I update source to r24853, but the new problem is there :D :
Code:
martin@martin-laptop:~/openttd$ patch -p1 -i /home/martin/patches/265_UpdateRouteNodesInOrders.patch 
patching file src/route_cmd.cpp
Hunk #1 FAILED at 329.
Hunk #2 succeeded at 401 (offset 6 lines).
Hunk #3 succeeded at 463 (offset 8 lines).
1 out of 3 hunks FAILED -- saving rejects to file src/route_cmd.cpp.rej

?(

And one question: Is it possible to put all patches in one-file patch?


Top
   
PostPosted: Wed Jan 16, 2013 11:09 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Oct 04, 2008 11:05 pm
Posts: 2655
Location: Lost in spaces
As I wanted to give this patch a test myself one of these days ...

I can patch r24853 without conflicts and only have a few compiler warnings:
Code:
[SRC] Compiling route_cmd.cpp
~/route_cmd.cpp: In functie ‘CommandCost CmdAddNodeToRoute(TileIndex, DoCommandFlag, uint32, uint32, const char*)’:
~/route_cmd.cpp:388:3: let op: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘std::vector<RouteNode*>::size_type {aka long unsigned int}’ [-Wformat]
~/route_cmd.cpp: In functie ‘CommandCost CmdRemoveNodeFromRoute(TileIndex, DoCommandFlag, uint32, uint32, const char*)’:
~/route_cmd.cpp:435:3: let op: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘std::vector<RouteNode*>::size_type {aka long unsigned int}’ [-Wformat]

[SRC] Compiling timetable_gui.cpp
~/timetable_gui.cpp: In static member function ‘static const char* TimetableWindow::GetTimetableLineString(char*, const char*, const Order*, VehicleOrderID, const Vehicle*)’:
~/timetable_gui.cpp:717:12: let op: variable ‘timetable_length’ set but not used [-Wunused-but-set-variable]

[SRC] Compiling traingraph_gui.cpp
~/traingraph_gui.cpp: In functie ‘bool InsertIntervalIfPossible(BlockedIntervals*, int, int, bool)’:
~/traingraph_gui.cpp:78:2: let op: format ‘%i’ expects argument of type ‘int’, but argument 3 has type ‘std::vector<int>::size_type {aka long unsigned int}’ [-Wformat]
~/traingraph_gui.cpp: In memberfunctie ‘bool NodeLine::InsertIntervalIntoLine(int, int, int, bool)’:
~/traingraph_gui.cpp:185:3: let op: format ‘%i’ expects argument of type ‘int’, but argument 7 has type ‘std::map<int, std::vector<int>*>::size_type {aka long unsigned int}’ [-Wformat]


Attached is a complete version of the patch, anything other than compiling and starting the game I have not yet tested.
Hope this works better you.

EDIT:
Removed the patch for now ... seems like something went wrong when I created it and instead it was a patch for removing the patch. :P
EDIT2:
Ah ... "-rtip:19897" != "-r19897:tip" (the latter being the correct thing to do). Added the complete version of the patch.
A version that adds code this time. :roll:


Attachments:
File comment: Note: patch might be against a different revision as intended by ic111.
HG patch apply with -p1

TIP_v2_r24853.diff [742.13 KiB]
Downloaded 181 times

_________________
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Top
   
PostPosted: Wed Jan 16, 2013 12:39 pm 
Offline
Engineer
Engineer

Joined: Tue Jan 15, 2013 9:42 pm
Posts: 3
Now it works! Thank you :bow:


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 129 posts ]  Go to page 1 2 3 4 57 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.