Multitile depots

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

J0anJosep
Traffic Manager
Traffic Manager
Posts: 139
Joined: 06 Aug 2011 15:51
Location: Spain

Multitile depots

Post by J0anJosep »

Some time ago I though about adding depots that could use several tiles, very similar to how stations are built. I even wrote the code for them. Unfortunately, nowadays I don't have much time for testing it, so I need feedback and testing from players.

Here you will find binaries for Windows and MacOS provided by openttd.org. In these, you will find this new type of depot. The savegames you create with these binaries will only work with this version. So do take care and do not overwrite any savegame you want to play in vanilla OpenTTD.

I will name the current depots (the ones that have lived in OpenTTD for years) with the name "standard depots" and the ones I introduce "extended depots". The name probably is not ok, but it is debatable how to name them.

How to test the new depots:
  • From the (expert) settings, you can enable the standard/extended version for rail, road and water transport. Search the setting "depot type".
  • Also from settings, you can enable/disable replacement vehicles with different railtypes or roadtypes. Search the setting "cross-replacement" (I am not good at deciding names for new things). If enabled, you can replace your 1950 old rail train with its monorail or maglev version.
  • When building depots, in your building toolbar you will have one or two buttons for depots (depending whether you have one or two depot types enabled). With the tooltip, you can see which one is the standard depot and which one is the extended one.
  • The extended depots are built almost as if they were stations.
  • You can also press CTRL to distant-join depot tiles.
The behavior of these new depots is different from the standard depots:
  • For extended water depots, only one ship can be stopped or servicing in each depot part.
  • For extended road depots, there can be at most 3 vehicles stopped/servicing in each tile.
  • For extended train depots, if you have a train with a length of 5 tiles, you have to build a depot platform of five tiles so it can leave the depot.
These new depots try to make the depot building a little more complex and challenging.

Feedback will be appreciated. Note as well, that there may be some unexpected crashes. Please report them in this forum or in the GitHub repository.

The graphics of the original depots are not good for extended rail depots. You can download and use the "Bigger Depots" NewGRF or any other NewGRF that adds graphics for modular depots.
Last edited by J0anJosep on 13 Mar 2021 21:03, edited 1 time in total.
Formerly known as Juanjo
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Multitile depots

Post by kamnet »

I enabled both types of depots, but in the game I cannot tell the difference between them. Beyond having the same graphics of course, the toolbar icons are identical, the tooltip description is identical. I built two of them, and then tried to use the ctrl key for distant join, only one of them was available (it was the 2nd icon, I'm assuming that's the big depot). When I select the 2nd depot to join, the new one is now listed as #3 and doesn't appear to be linked at all, although the tile does show up as if it's being selected.

I have a couple of crashes and save games. In the first one, I had two NewGRF sets activated that I had forgotten about, so I don't know if they played a factor, but I did not have a NRT set loaded. It crashed while I was trying to distant join a depot. In the second one, I have only RattRoads 1.0.2 enabled. It crashed after I built a bus in the 2nd depot and tried to send it to the first depot.
Attachments
crash-2020-01-02-21h38.zip
(425.97 KiB) Downloaded 110 times
crash-2020-01-02-21h50.zip
(97.05 KiB) Downloaded 99 times
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Re: Multitile depots

Post by Aegir »

With the big rail depots, apart from length restrictions, will the depots still allow only one train (or maybe two?) to be serviced at a time?

Honestly the whole thing sounds absurdly punitive and awkward especially for smaller/technical maps and I can't freakin wait to get my mitts on it 8) .
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Multitile depots

Post by Gadg8eer »

Aegir wrote: 04 Jan 2021 05:14 With the big rail depots, apart from length restrictions, will the depots still allow only one train (or maybe two?) to be serviced at a time?

Honestly the whole thing sounds absurdly punitive and awkward especially for smaller/technical maps and I can't freakin wait to get my mitts on it 8) .
Me too! I hope this is still being worked on. Whoops, I thought this was posted in 2011 because I read the wrong date from OP's post.
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Multitile depots

Post by wallyweb »

Bit busy for time to do some testing but I definitely see the possibilities.
A word of caution ... K.I.S.S. ... Keep It Simple Sam.
I've got some ideas to suggest, but it's a bit early yet.
:bow:
J0anJosep
Traffic Manager
Traffic Manager
Posts: 139
Joined: 06 Aug 2011 15:51
Location: Spain

Re: Multitile depots

Post by J0anJosep »

kamnet wrote: 04 Jan 2021 02:56 I enabled both types of depots, but in the game I cannot tell the difference between them. Beyond having the same graphics of course, the toolbar icons are identical, the tooltip description is identical. I built two of them, and then tried to use the ctrl key for distant join, only one of them was available (it was the 2nd icon, I'm assuming that's the big depot). When I select the 2nd depot to join, the new one is now listed as #3 and doesn't appear to be linked at all, although the tile does show up as if it's being selected.

I have a couple of crashes and save games. In the first one, I had two NewGRF sets activated that I had forgotten about, so I don't know if they played a factor, but I did not have a NRT set loaded. It crashed while I was trying to distant join a depot. In the second one, I have only RattRoads 1.0.2 enabled. It crashed after I built a bus in the 2nd depot and tried to send it to the first depot.
I also don't like that both depot types have the same graphics. But it is out of scope right now. I fixed the tooltips, which weren't descriptive enough.
I fixed joining with the Ctrl key, as the depot joiner was shown even for small depots.
The other problem with orders is also fixed in the new binaries (2021/01/08). Thanks for noticing these bugs.
Aegir wrote: 04 Jan 2021 05:14 With the big rail depots, apart from length restrictions, will the depots still allow only one train (or maybe two?) to be serviced at a time?
Yes, each train can be serviced only if it has an assigned platform.
But rail depots allow rearrangement of vehicles and this makes having only one train in each platform more difficult. So, right now there is a certain freedom allowed in train depots when buying/rearranging vehicles.
Formerly known as Juanjo
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Multitile depots

Post by kamnet »

One thing that should be noted, and I don't know if it's a bug or a limitation on OpenTTD's part, but the cloned depots cannot be built end-on-end to make one long depot because the entrance for each depot sprite must be connected to a road. If you build them end-to-end and start cloning vehicles, due to the limitation of available storage slots, the extra ones will be built in the 2nd depot and not be able to leave.

So far have I have no uncovered any new crashes.
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Re: Multitile depots

Post by Aegir »

Juanjo wrote: 08 Jan 2021 14:36
Aegir wrote: 04 Jan 2021 05:14 With the big rail depots, apart from length restrictions, will the depots still allow only one train (or maybe two?) to be serviced at a time?
Yes, each train can be serviced only if it has an assigned platform.
But rail depots allow rearrangement of vehicles and this makes having only one train in each platform more difficult. So, right now there is a certain freedom allowed in train depots when buying/rearranging vehicles.
Perhaps allow two/three trains per depot? Should allow construction to still take place and provide a gameplay reason to build sprawling depot complexes. Or only allow multiple if they're turned off? Should solve the edge case of re-arranging consists but only allow one train to service at a time.

Edit: Just doing some fooling around since it looks like you've squashed the crashes, a couple of things I noticed; when creating a new train and letting it lose it tried to drive away from the track before hitting the end, reversing, and then leaving the depot (Minor, doesn't do that when servicing). When constructing a multi-tile length depot (4 and 5) side by side the train on a return to depot order always tries to go to the closest one, can't fit due to tile length, and pops back out again. It never tries to reach the other depot platform. I remember this was a problem back in the super super early days of TTDPatch with 'irregular shaped' train stations, we used to work around it back then with waypoints before the path finder was able to handle it.

Also, I love the subtle detail of using only the two views and then depending which side a track is placed then swapping the graphics, looks beautiful with Ufiby's track sets!
depot pathfinding.PNG
depot pathfinding.PNG (197.36 KiB) Viewed 11947 times
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Multitile depots

Post by wallyweb »

Now this is getting interesting. I'm having visions of using this with Karn's realistic shunting to build the maximum length trains (~200 car consists) that I have been experimenting with.
madrito
Engineer
Engineer
Posts: 37
Joined: 05 Jul 2018 15:38

Re: Multitile depots

Post by madrito »

It's nice that someone took this option topic to develop.

If the following conditions are met, it can be a contribution to the railways :
- for entry and exit from one side
minimum length of the depot with the possibility of extension
* in the depot maximum train length in tiles not greater than the lagging length in tiles
- number of parallel levels in the depot, max. 2
* the train could enter the depot only when all levels are not occupied

Of course this is subjective concept
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Re: Multitile depots

Post by Aegir »

Okay, wow, I didn't even notice you could do RO-RO with the train depots now... This changes things dramatically! I think I might actually give this a proper game playthrough since it's seeming stable enough.
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: Multitile depots

Post by michael blunck »

Got a crash when buying a train, see below.
In addition it's not possible to built any waypoints?

Hm, can't upload crash.log, "invalid extension"?

regards
Michael

[edit]
Assertion failed at line 254 of ..\src\train_pos_backup.cpp: this->info > PI_FAILED_PLATFORM_TYPE
Image
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Multitile depots

Post by Eddi »

michael blunck wrote: 12 Jan 2021 15:02 Hm, can't upload crash.log, "invalid extension"?
rename it to "crash.log.txt"
J0anJosep
Traffic Manager
Traffic Manager
Posts: 139
Joined: 06 Aug 2011 15:51
Location: Spain

Re: Multitile depots

Post by J0anJosep »

michael blunck wrote: 12 Jan 2021 15:02 Got a crash when buying a train, see below.
In addition it's not possible to built any waypoints?
I have been fixing some bugs I found, but I am not sure whether I fixed the one you came across. Could you describe what did you do to cause the crash with some more details? A savegame to produce it would be great. Were you playing with the binaries from the link above or did you compile the branch? (I am asking as the branch was updated after building the binaries.)
About waypoints, I tried and it seemed to work as expected. You should build them over already built rail.
Aegir wrote: 09 Jan 2021 02:22 Perhaps allow two/three trains per depot? Should allow construction to still take place and provide a gameplay reason to build sprawling depot complexes. Or only allow multiple if they're turned off? Should solve the edge case of re-arranging consists but only allow one train to service at a time.

Edit: Just doing some fooling around since it looks like you've squashed the crashes, a couple of things I noticed; when creating a new train and letting it lose it tried to drive away from the track before hitting the end, reversing, and then leaving the depot (Minor, doesn't do that when servicing). When constructing a multi-tile length depot (4 and 5) side by side the train on a return to depot order always tries to go to the closest one, can't fit due to tile length, and pops back out again. It never tries to reach the other depot platform. I remember this was a problem back in the super super early days of TTDPatch with 'irregular shaped' train stations, we used to work around it back then with waypoints before the path finder was able to handle it.

Also, I love the subtle detail of using only the two views and then depending which side a track is placed then swapping the graphics, looks beautiful with Ufiby's track sets!
Good choice of depot graphics. The way for drawing big rail depots is just some hack as there are no specific graphics for the different depots by now. It doesn't look so good for maglev or monorail base graphics.

Yes, there are some cases to solve with pathfinding (like selecting a platform long enough), but if the train has a specific order set, after servicing it should automatically reverse if that is the best path for the train.
kamnet wrote: 08 Jan 2021 15:25 One thing that should be noted, and I don't know if it's a bug or a limitation on OpenTTD's part, but the cloned depots cannot be built end-on-end to make one long depot because the entrance for each depot sprite must be connected to a road. If you build them end-to-end and start cloning vehicles, due to the limitation of available storage slots, the extra ones will be built in the 2nd depot and not be able to leave.
I don't want it to be more complex right now, but it is something to consider. Anyway, I think it is very difficult to do it, as you have to deal with converting the road type or destroying one depot tile when a vehicle is inside.
Formerly known as Juanjo
User avatar
Aegir
Tycoon
Tycoon
Posts: 2883
Joined: 09 Feb 2004 10:02
Contact:

Re: Multitile depots

Post by Aegir »

Juanjo wrote: 15 Jan 2021 18:10Yes, there are some cases to solve with pathfinding (like selecting a platform long enough), but if the train has a specific order set, after servicing it should automatically reverse if that is the best path for the train
I was finding they weren't servicing if the train was too long and they were just turning around and leaving the depot.

Still, superb progress, I wish you a speedy inclusion to the base game!
Currently working under the name 'reldred' on Github, and Discord.
NFO/NML coder, part-time patch writer for JGRPP, and all round belligerent.

14:40 <orudge> I can't say I discriminate against any particular user
14:41 <Aegir> orudge: I can!
User avatar
Gadg8eer
Traffic Manager
Traffic Manager
Posts: 190
Joined: 14 Dec 2019 14:22

Re: Multitile depots

Post by Gadg8eer »

Did I misremember, or did someone say somewhere that this patch would be folded into trunk soon?
I have Asperger's, please be easy on me about stuff. My apologies if I've been a problem for you in the past.
User avatar
jfs
Tycoon
Tycoon
Posts: 1750
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Multitile depots

Post by jfs »

Gadg8eer wrote: 10 Mar 2021 10:14 Did I misremember, or did someone say somewhere that this patch would be folded into trunk soon?
https://github.com/OpenTTD/OpenTTD/pull/8480

It's still work in progress and not close to being merged, but it's being considered.
J0anJosep
Traffic Manager
Traffic Manager
Posts: 139
Joined: 06 Aug 2011 15:51
Location: Spain

Re: Multitile depots

Post by J0anJosep »

The binaries have been updated today. I think I fixed the reported problems and crashes.

I still haven't worked out proper names to differentiate the two depot types (the current ones/the bigger ones). "Normal depots"/"Advanced depots"? Or maybe "Depot"/"Advanced depot"?
Gadg8eer wrote: 10 Mar 2021 10:14 Did I misremember, or did someone say somewhere that this patch would be folded into trunk soon?
Sorry, but it is far from being a candidate for trunk inclusion. I posted about it in the forums because I need feedback from the players (bug hunting, suggestions...), which is really welcome.
Formerly known as Juanjo
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Multitile depots

Post by wallyweb »

Juanjo wrote: 10 Mar 2021 21:18I still haven't worked out proper names to differentiate the two depot types (the current ones/the bigger ones). "Normal depots"/"Advanced depots"? Or maybe "Depot"/"Advanced depot"?
"Depot" / "Extended depot" ?

"Extended" can define several things such as "size" and "functionality".
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 8 guests