The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: sojo on February 01, 2009, 10:23:17 pm

Title: waytypes at tunnel
Post by: sojo on February 01, 2009, 10:23:17 pm
I wish there were a possibility to build a selected waytype at tunnels.

This time you can only build with the tunnel-tool.
Title: Re: waytypes at tunnel
Post by: DirrrtyDirk on February 01, 2009, 10:27:02 pm
You know that exactly this (as far as I understood it) is being worked on right now?
Title: Re: waytypes at tunnel
Post by: sojo on February 01, 2009, 10:29:39 pm

You know that exactly this (as far as I understood it) is being worked on right now?

No. Have I somethink overlooked?
Title: Re: waytypes at tunnel
Post by: prissi on February 01, 2009, 10:31:09 pm
Well, this would be strange. Tunnels are made by excarvation and thus are very expensive. Thus they are only made with the tunnel tool. I think the new patch will not change this; or else I will change it that way, because this is intended.
Title: Re: waytypes at tunnel
Post by: DirrrtyDirk on February 01, 2009, 10:33:23 pm
Well at least that's how I took some remarks (starting here (http://forum.simutrans.com/index.php?topic=1089.msg13846#msg13846)) leading to this (http://forum.simutrans.com/index.php?topic=1089.msg13988#msg13988) - and not to forget what Kieron said... uhh.. some months ago.

Edit:
If pricing is the only factor, then I think it should/could probably be handled differently. Building in UG mode by tunnel tool is counter intuitive (as we see from questions of new users again and again) and having only one type of track (graphically I mean) when building underground is... worth improving, too.
Title: Re: waytypes at tunnel
Post by: The Hood on February 01, 2009, 10:56:16 pm
It would be great if there was a way of choosing to build one of several different tunnel types with different speed and different graphics - unless I'm just being thick and you can already do this???
Title: Re: waytypes at tunnel
Post by: Fabio on February 02, 2009, 08:48:48 am
you can already do this, it's up to the pakset. i already made some for pak 128, i'll release them with the whole new railtracks set i'm working (now and then) for more than one year.
Title: Re: waytypes at tunnel
Post by: Stubbsy on February 02, 2009, 10:50:29 am
Is there going to be a way of a tunnel starting at one height, and ending at a different height, or going down then up again? I wasn't sure if it was going to happen in the new underground that is being worked on.
Title: Re: waytypes at tunnel
Post by: Fabio on February 02, 2009, 11:17:58 am
Is there going to be a way of a tunnel starting at one height, and ending at a different height, or going down then up again? I wasn't sure if it was going to happen in the new underground that is being worked on.

I'm afraid not, although i'd be more than glad to be wrong...
Title: Re: waytypes at tunnel
Post by: Stubbsy on February 02, 2009, 01:01:07 pm
ah that's a shame  :( a lot of the time i have needed something like that, instead i've had to waste thousands/million.
Title: Re: waytypes at tunnel
Post by: DirrrtyDirk on February 02, 2009, 03:54:55 pm
Well, Kieron said a while ago that he was working on all sorts of things for underground - including slopes. And that actually would allow level change, wouldn't it?
Title: Re: waytypes at tunnel
Post by: kierongreen on February 02, 2009, 05:23:31 pm
Yes I was working on something, but I've not got the time for such things at the moment :( Plan was to allow height changes though yes.
Title: Re: waytypes at tunnel
Post by: DirrrtyDirk on February 02, 2009, 05:57:38 pm
Take your time! "Just one day we might" is still enough for me right now.  ;)
Title: Re: waytypes at tunnel
Post by: sojo on February 03, 2009, 12:51:46 pm
you can already do this, it's up to the pakset. i already made some for pak 128, i'll release them with the whole new railtracks set i'm working (now and then) for more than one year.
Can I choose which track or road is used?
Title: Re: waytypes at tunnel
Post by: prissi on February 03, 2009, 01:16:08 pm
THis should be dependent on the max_speed. At least this was the intention.
Title: Re: waytypes at tunnel
Post by: sojo on February 03, 2009, 01:51:02 pm
Simutrans will build the slowest road? Is this right?
Title: Re: waytypes at tunnel
Post by: prissi on February 03, 2009, 10:56:22 pm
Just checked: It uses the road at the entrace.
Title: Re: waytypes at tunnel
Post by: DirrrtyDirk on February 03, 2009, 11:12:53 pm
But only for a "full" tunnel. When you just build the entrance (CTRL-click) then only the first tile is the same as the outside road (or track). Anything you build by hand in underground mode will get painted as the cheapest track / road available (still with the correct tunnel speed, though).
Title: Re: waytypes at tunnel
Post by: prissi on February 04, 2009, 07:52:10 am
Probably taking the way with the closest matching speed would be best then ...
Title: Re: waytypes at tunnel
Post by: Dwachs on February 04, 2009, 08:59:45 am
.. or take the way as the same way, where the building process starts. Since building underground requires to start at an existing way this is also doable.
Title: Re: waytypes at tunnel
Post by: prissi on February 04, 2009, 09:02:10 am
But different tunnels have different speeds: Using a matching waytype would give indication. I think this was the purpose of this request.
Title: Re: waytypes at tunnel
Post by: The Hood on February 04, 2009, 09:30:00 am
But only for a "full" tunnel. When you just build the entrance (CTRL-click) then only the first tile is the same as the outside road (or track). Anything you build by hand in underground mode will get painted as the cheapest track / road available (still with the correct tunnel speed, though).

This seems to be the issue - can the current behaviour be changed so that the way graphics in the tunnel are different for the different types of tunnel?  Matching to closest speed of above ground way would be one way, or maybe you could specify in the tunnel dat file "tunnel_graphics=foo" where foo is the name of a way object that would be used for the graphics?
Title: Re: waytypes at tunnel
Post by: prissi on February 04, 2009, 10:28:41 am
Since tunnel are a special object, this should be easy to be done, as soon as I understood the cross reference reader ...
Title: Re: waytypes at tunnel
Post by: VS on February 04, 2009, 10:47:59 am
Which has become a synonym for "never" :D

Making tunnels reference their "inner way" seems quite good solution; if someone wanted a tunnel with special inner graphics, a hidden way with system type invisible in menu would do that.
Title: Re: waytypes at tunnel
Post by: Fabio on February 04, 2009, 10:50:13 am
I wanted to do something like this for pak 128...
How do system types work?
Title: Re: waytypes at tunnel
Post by: VS on February 04, 2009, 11:14:15 am
Menuconf.tab has extensive comments with overview of way and system types; since you can now select toolbar parts to be composed from icons matching ways(waytype) or ways(waytype, system_type), you can filter out the unwanted ones etc.

# following waytypes are defined (for nearly everything)
# road_wt          =   1
# track_wt         =   2
# water_wt         =   3
# monorail_wt      =   5
# maglev_wt        =   6
# tram_wt          =   7
# narrowgauge_wt   =   8
# air_wt           =  16
# powerline_wt     = 128
#
# subtypes for ways(x,#)
# flat = 0
# elevated/runway = 1
# tram = 7 (only for track)
# special (eg. fence) = 255
Title: Re: waytypes at tunnel
Post by: sojo on February 04, 2009, 12:37:15 pm
Or we need a new parameter in tunnel.dat.

F.e.: way-name: xyz --- If it is not defined than use it like it is yet.
Title: Re: waytypes at tunnel
Post by: Fabio on February 08, 2009, 12:12:27 pm
So can you make new/arbitrary system types to sort better the menu?
Title: Re: waytypes at tunnel
Post by: gauthier on February 08, 2009, 01:48:52 pm
I think waytypes of tunnels must depend of properties of the tunnel tool. For example with the default pak128 tunnel, the max speed is 280 km/h
Title: Re: waytypes at tunnel
Post by: z9999 on February 14, 2009, 02:44:50 am
[patch] underground way image

I wrote a patch for this.

New makeobj50 allows to refer to a way object, and tunnel tools use its images as underground ways images if there. ("way=")
It can use any way objects but to hide them from toolbar, I used "type_underground=64" in weg.h. If this number is bad, please change it.

New tunnel object is version 3, and node length is 1 byte larger to add "uint8 has_way".

Known problem:
Underground way still use sidewalk image. Currently I don't know hot to remove this. Should be removed sidewalk image or not ?

Quote
# for tunnel obj
obj=tunnel
way=dirt_road

# for road obj
system_type=64
Title: Re: waytypes at tunnel
Post by: gerw on February 14, 2009, 08:23:04 am
Known problem:
Underground way still use sidewalk image. Currently I don't know hot to remove this. Should be removed sidewalk image or not ?
Then you have to define a new underground for tunnels. Otherwise it will be looking ugly...
Title: Re: waytypes at tunnel
Post by: gauthier on February 14, 2009, 10:00:45 am
I haven't understood the way to make tunnels as you did :/  :-X  :-[
Title: Re: waytypes at tunnel
Post by: Fabio on February 14, 2009, 10:33:49 am
AWESOME, Z9999, i'll use it!
i think the ground should be customizeable in tunnel pak (one ground image)
Title: Re: waytypes at tunnel
Post by: VS on February 14, 2009, 12:03:51 pm
Now that is an idea...
Title: Re: waytypes at tunnel
Post by: gerw on February 14, 2009, 07:23:29 pm
i think the ground should be customizeable in tunnel pak (one ground image)

I think, slopes in tunnels are coming ;) Therefore you need also 4 slopes.
Title: Re: waytypes at tunnel
Post by: z9999 on February 23, 2009, 05:11:11 pm
My patch was denied ? If so, I will make a bug report topic.
Title: Re: waytypes at tunnel
Post by: prissi on February 23, 2009, 08:12:37 pm
Not denied, but currently only bugfixes, because we are on the 102 release feature freeze. But honestly, I overlooked your patch.
Title: Re: waytypes at tunnel
Post by: Fabio on September 10, 2009, 01:06:43 pm
[patch] underground way image

I wrote a patch for this.

New makeobj50 allows to refer to a way object, and tunnel tools use its images as underground ways images if there. ("way=")
It can use any way objects but to hide them from toolbar, I used "type_underground=64" in weg.h. If this number is bad, please change it.

New tunnel object is version 3, and node length is 1 byte larger to add "uint8 has_way".

Known problem:
Underground way still use sidewalk image. Currently I don't know hot to remove this. Should be removed sidewalk image or not ?


Has this patch been incorporated in latest versions? I want/need to use this feature for pak128.

Ugly workaround if not used is: tunnelspeed 129 km/k (instead of 130) + hidden road with max speed 129 km/h.
But i would really like to avoid this solution!
Title: Re: waytypes at tunnel
Post by: z9999 on September 10, 2009, 02:43:57 pm
Has this patch been incorporated in latest versions?

The patch had been incorporated, but makeobj50 is not released yet.
You need to complite it by youself or ask someone to do it.
Title: Re: waytypes at tunnel
Post by: Fabio on September 10, 2009, 03:01:51 pm
it's a very good piece of news.

but is there a plan for its release?

i have NO IDEA how to compile a source. Additionally, i would like to test it and produce for the official release.
Title: Re: waytypes at tunnel
Post by: Dwachs on September 10, 2009, 07:15:53 pm
Maybe prissi want to release it with the simutrans 103 version?