The International Simutrans Forum

 

Author Topic: Cannot build tunnel entrance  (Read 1771 times)

0 Members and 1 Guest are viewing this topic.

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Cannot build tunnel entrance
« on: January 16, 2021, 04:58:22 PM »
Perhaps some recent feature introduced a bug. If you try to build tunnel, there seems to be some check if it is buildable, and see a tooltip "This cannot be built here" - almost everywhere. Only if it is possible to build straight tunnel, the tooltip changes to "Estimated cost:". 

1. bug: the estimate is shown also on hlaf-height slope, where building the tunnel fails.
2. bug: ctrl-click works only in places where straight tunnel can be built. It fails everywhere else.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20814
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot build tunnel entrance
« Reply #1 on: January 16, 2021, 05:01:20 PM »
It has never been possible - intentionally - to build a tunnel in a half-height slope. Can you confirm whether this is still an issue on full height slopes?

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #2 on: January 16, 2021, 05:04:05 PM »
Yes I know that it should not be possible on half-height slope. But It fails on double slope too.

#1 is that the tooltip shows "estimated cost" on half-height, where it should show "cannot build"
#2 is that I cannot build tunnel entrance (ctrl-click) on any full-height slope

Online Ranran

  • Devotee
  • *
  • Posts: 1553
  • Languages: ja
Re: Cannot build tunnel entrance
« Reply #3 on: January 17, 2021, 01:10:12 AM »
Can this be reproduced in standard?

Offline Matthew

  • Devotee
  • *
  • Posts: 582
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Cannot build tunnel entrance
« Reply #4 on: January 17, 2021, 09:05:32 AM »
I noticed this a couple of days ago and tried to get a reproducible example. But I failed because of a complicating factor. The tunnel builder no longer requires a double-height§ slope at both ends. If you have a double-height slope at one end, it can sometimes create a double-height slope at the other end. But not always.

§ "Full height" if you use the confusing "half-heights" terminology.

Online Freahk

  • Devotee
  • *
  • Posts: 1528
  • Languages: DE, EN
Re: Cannot build tunnel entrance
« Reply #5 on: January 17, 2021, 03:34:29 PM »
That bug was introduced in standard, so I guess it was merged in.
But it was also fixed in standard quite recently, so me might just need to cherry pick the related commit.
I'll try to find the standard bugreport thread.

Online Ranran

  • Devotee
  • *
  • Posts: 1553
  • Languages: ja
Re: Cannot build tunnel entrance
« Reply #6 on: January 17, 2021, 03:44:23 PM »
I think it's another issue that has been fixed in standard. It was not possible to create just a tunnel portal anywhere. The bug currently pointed out is that if you can't create a tunnel portal on the other side of the straight line, you can't create a tunnel portal.

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #7 on: January 19, 2021, 07:07:27 PM »
More tests - it is possible to build tunnel even if the other side is not the required slope, but can be "adjusted" a little. This works well including the tooltip.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20814
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot build tunnel entrance
« Reply #8 on: January 20, 2021, 11:40:19 PM »
I think it's another issue that has been fixed in standard. It was not possible to create just a tunnel portal anywhere. The bug currently pointed out is that if you can't create a tunnel portal on the other side of the straight line, you can't create a tunnel portal.

Yes, I can confirm that tunnel portal creation is not working properly. Are you able to track down where this was fixed in Standard and incorporate the fixes? That would be most helpful.

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #9 on: January 21, 2021, 09:33:45 PM »
I have tried standard, and it is broken too:

- it reports some places as unsuitable even if at least the entrance could be built
- it reports some places as suitable, when they are not.
- if holding ctrl and moving the mouse, the estimate changes to 1 tile, and some places previously unsuitable get the estimate
- but even with ctrl - the entrance is not built in all cases when estimate is shown

1. tooltip on half-height slope tells the estimated price of tunnel, but it should tell the place is not suitable. Building the tunnel fails.
2. if there is another tunnel on the same level (of the same type), it estimates the price all the way to the tunnel, but refuses to build it. However it allows to build the entrance.
3. if there is another tunnel on the same level but of a different waytype, it says tunnel not possible. If holding ctrl an estimate is shown, but building the entrance fails
4. it the opposite slope is occupied by building, the estimate is shown. Building straight tunnel fails, tunnel entrance can be built
5. if the tunnel would lead to the edge of the world, tooltip says unsuitable, ctrl-tooltip shows estimate, but build fails.

Test save (pak128.britain - standard), with labels around (100,70).
http://list.extended.simutrans.org/~simutrans/debug-saves/tunnel-fail.sve
Test save (pak128.britain - extended), labels around (180,160).
http://list.extended.simutrans.org/~simutrans/debug-saves/tunnel-fail-ex.sve

IMHO both standard and extended show the same behavior

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20814
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot build tunnel entrance
« Reply #10 on: January 21, 2021, 11:04:07 PM »
Thank you, that is helpful. I have moved this to the Standard bug reports forum as this has confirmed as being reproducible in Standard.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10682
  • Languages: De,EN,JP
Re: Cannot build tunnel entrance
« Reply #11 on: January 22, 2021, 01:43:53 AM »
The estimation is just a rough estimation, as it omits detailed checks whether the terraforming at the end would work. They did not check properly for double height requirement, that was indeed wrong.

Also the connection sideways was intended to work in the tunnel builder but was broken.

Both issues are fixed in r9577

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #12 on: January 22, 2021, 06:14:55 PM »
I confirm that issues #1 and #2 are fixed, but #3, #4 and #5 are not

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10682
  • Languages: De,EN,JP
Re: Cannot build tunnel entrance
« Reply #13 on: January 23, 2021, 01:39:10 PM »
Yes 3, 4, and 5 require more checks than the simple find end routine currently does. However, upon building you should get a proper error message and before you did not get any estimate at all. (It is anyway an estimate, not the correct final result.)

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #14 on: January 23, 2021, 03:19:09 PM »
I understand it is an estimate, that's not a problem. The problem is that the tunnel entrance (ctrl click) cannot be built in many places where it is possible, even if cost estimate is shown.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20814
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Cannot build tunnel entrance
« Reply #15 on: January 24, 2021, 11:36:40 AM »
I understand it is an estimate, that's not a problem. The problem is that the tunnel entrance (ctrl click) cannot be built in many places where it is possible, even if cost estimate is shown.

I can confirm that this still appears to be a problem in Extended after incorporating these fixes.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10682
  • Languages: De,EN,JP
Re: Cannot build tunnel entrance
« Reply #16 on: January 24, 2021, 01:48:46 PM »
I could put single rail tunnel entries in all allowed positions in pak128.Britain and there was also a tooltip with an estimate before. Please give me a standard map with this problem.

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #17 on: January 24, 2021, 02:35:20 PM »
It is in the post #9. Places are marked with labels, remove label and try to build tunnel entrance

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10682
  • Languages: De,EN,JP
Re: Cannot build tunnel entrance
« Reply #18 on: January 25, 2021, 04:50:59 AM »
The only place where the tooltip shows something but actual building fails is where the castle sits on the exit. in the other cases the tooltip is unsuitable ground, if not even an entrance can be placed.

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #19 on: January 25, 2021, 07:32:31 PM »
At (96,67) - tunnel entrance (ctrl-click) should be possible, tooltip estimates the cost, but nothing can be built
At (107,71) - RAIL tunnel is OK, ROAD tunnel entrance should be possible, tooltip estimates the cost, but nothing can be built.
At (108,74) - tunnel entrance should be possible, tooltip estimates the cost, but nothing can be built.

Also the tooltip does not change when ctrl is pressed. It is necessary to move the mouse to some other tile and back.
Also if the focus is on some other window, then ctrl is ignored completely.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10682
  • Languages: De,EN,JP
Re: Cannot build tunnel entrance
« Reply #20 on: January 26, 2021, 01:03:37 AM »
The tooltip change, they say "length 1" instead the full length.

(96,67) and (107,71) were errors. (One was more general, the control state of a tool was only set after checking the position in question. This seems to fix also the bug with the other window. Hence more tools with cotnrol+click may have failed. Second was a bug introduced with the last fix.)

(108,74) You can only build an entrance there. Full tunnel requires too much terraforming and thus fails.

The tooltip is only asked upon tile change. No easy way to fix this.

Check r9590
« Last Edit: January 26, 2021, 01:29:07 AM by prissi »

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #21 on: January 26, 2021, 07:32:00 PM »
(108,74) You can only build an entrance there. Full tunnel requires too much terraforming and thus fails.
It was possible to build tunnel to the north, even though it required quite a funny terraforming. But towards south not even the tunnel entrance was possible.

But now all problematic places seem to be fixed. Thank you very much.

Offline Vladki

  • Devotee
  • *
  • Posts: 3725
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Cannot build tunnel entrance
« Reply #22 on: February 03, 2021, 09:48:09 PM »
There is still one problem.

When the tunnel entrance is built with ctrl click, it is not possible to continue buildiing the tunnel in sliced underground mode. (classic underground mode works). Once you build a piece of tunnel in classic underground mode, then you can continue in sliced mode. But you cannot expand tunnel from the entrance in sliced mode.

The ctrl click used to build not only the entrance, but one tile of "plain" tunnel as well, but now it builds only the entrance tile.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10682
  • Languages: De,EN,JP
Re: Cannot build tunnel entrance
« Reply #23 on: February 04, 2021, 01:51:04 AM »
I did not change this tool This must be some other change, some time ago.

Offline Matthew

  • Devotee
  • *
  • Posts: 582
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: Cannot build tunnel entrance
« Reply #24 on: July 09, 2021, 01:00:07 PM »
There is still one problem.

When the tunnel entrance is built with ctrl click, it is not possible to continue buildiing the tunnel in sliced underground mode. (classic underground mode works). Once you build a piece of tunnel in classic underground mode, then you can continue in sliced mode. But you cannot expand tunnel from the entrance in sliced mode.

The ctrl click used to build not only the entrance, but one tile of "plain" tunnel as well, but now it builds only the entrance tile.

I tried to replicate this, but I could not. What I noticed is that when you switch into sliced underground view after building a tunnel, it's sometimes one level off from the tunnel level, so you can see the tunnel entrance but not the one tile of proper tunnel that has been built. So maybe that's what Vladki was seeing.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1624
    • Simutrans-BLOG
  • Languages: ES
Re: Cannot build tunnel entrance
« Reply #25 on: July 09, 2021, 03:04:57 PM »
There is still one problem.

When the tunnel entrance is built with ctrl click, it is not possible to continue buildiing the tunnel in sliced underground mode. (classic underground mode works). Once you build a piece of tunnel in classic underground mode, then you can continue in sliced mode. But you cannot expand tunnel from the entrance in sliced mode.

The ctrl click used to build not only the entrance, but one tile of "plain" tunnel as well, but now it builds only the entrance tile.
This was what I reported several weeks ago, at first I thought it only affected scripts, but later I discovered that it was a general error.

https://forum.simutrans.com/index.php/topic,20902.0.html

Offline Andarix

  • *
  • Posts: 279
  • Languages: de