News:

SimuTranslator
Make Simutrans speak your language.

Cannot build tunnel entrance

Started by Vladki, January 16, 2021, 04:58:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vladki

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.

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

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

Ranran

Can this be reproduced in standard?

Matthew

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.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Mariculous

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.

Ranran

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.

Vladki

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.

jamespetts

Quote from: Ranran 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.

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Vladki

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

jamespetts

Thank you, that is helpful. I have moved this to the Standard bug reports forum as this has confirmed as being reproducible in Standard.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

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

Vladki

I confirm that issues #1 and #2 are fixed, but #3, #4 and #5 are not

prissi

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.)

Vladki

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.

jamespetts

Quote from: Vladki 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.

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

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

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.

Vladki

It is in the post #9. Places are marked with labels, remove label and try to build tunnel entrance

prissi

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.

Vladki

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.

prissi

#20
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

Vladki

Quote from: prissi on January 26, 2021, 01:03:37 AM(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.

Vladki

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.

prissi

I did not change this tool This must be some other change, some time ago.

Matthew

Quote from: Vladki 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.

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.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

Yona-TYT

Quote from: Vladki 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.
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