Page 1 of 2

Multitile depots

Posted: 03 Jan 2021 21:37
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.

Re: Multitile depots

Posted: 04 Jan 2021 02:56
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.

Re: Multitile depots

Posted: 04 Jan 2021 05:14
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) .

Re: Multitile depots

Posted: 05 Jan 2021 01:29
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.

Re: Multitile depots

Posted: 05 Jan 2021 10:13
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:

Re: Multitile depots

Posted: 08 Jan 2021 14:36
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.

Re: Multitile depots

Posted: 08 Jan 2021 15:25
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.

Re: Multitile depots

Posted: 09 Jan 2021 02:22
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 12706 times

Re: Multitile depots

Posted: 09 Jan 2021 09:33
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.

Re: Multitile depots

Posted: 10 Jan 2021 11:58
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

Re: Multitile depots

Posted: 12 Jan 2021 12:20
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.

Re: Multitile depots

Posted: 12 Jan 2021 15:02
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

Re: Multitile depots

Posted: 14 Jan 2021 13:56
by Eddi
michael blunck wrote: 12 Jan 2021 15:02 Hm, can't upload crash.log, "invalid extension"?
rename it to "crash.log.txt"

Re: Multitile depots

Posted: 15 Jan 2021 18:10
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.

Re: Multitile depots

Posted: 17 Jan 2021 04:07
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!

Re: Multitile depots

Posted: 10 Mar 2021 10:14
by Gadg8eer
Did I misremember, or did someone say somewhere that this patch would be folded into trunk soon?

Re: Multitile depots

Posted: 10 Mar 2021 12:09
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.

Re: Multitile depots

Posted: 10 Mar 2021 21:18
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.

Re: Multitile depots

Posted: 10 Mar 2021 23:57
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".

Re: Multitile depots

Posted: 11 Mar 2021 00:54
by kamnet
Standard Depot, Enhanced Depot.