The International Simutrans Forum

 

Author Topic: Specify road/rail crossing  (Read 4517 times)

0 Members and 1 Guest are viewing this topic.

Offline rfg123

  • *
  • Posts: 101
Specify road/rail crossing
« on: January 13, 2011, 05:19:00 PM »
Currently road/rail crossing parameters have generic waytype[0]=road and waytpe[1]=track input. Would it be possible to specify which specific road/rail the image will be used for?

An example would be waytype[0]=dirt_road and waytype[1]=sand_track. With these parameters the specific graphic would only be used for a crossing between the dirt road and sand track.

I make this request because I drew a new crossing for dirt roads and sand track, but the crossing is used on all roads that sand tracks cross..

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Specify road/rail crossing
« Reply #1 on: January 13, 2011, 08:40:19 PM »
way[0] detrmines the speed and thus the type of crossing that will be chooses. Probably use this for ways first.

Offline rfg123

  • *
  • Posts: 101
Re: Specify road/rail crossing
« Reply #2 on: January 16, 2011, 06:45:41 PM »
way[0] detrmines the speed and thus the type of crossing that will be chooses. Probably use this for ways first.

I tried changing some of the numbers and speed limits to see if I could get it to work, but without success. I am drawing new rail crossings for each road and rail type to make networks look a little more streamlined, but each time the game chooses only one of them and replicates it over all crossings. This is why I feel it necessary to specify the name of the waytypes being crossed, and absent a specific parameter a generic crossing would be chosen.

Offline mobo

  • Devotees (Inactive)
  • *
  • Posts: 199
Re: Specify road/rail crossing
« Reply #3 on: January 16, 2011, 07:24:58 PM »
... , but the crossing is used on all roads that sand tracks cross..

There used to be  only one kind of level crossing for 2 waytypes, so this would mean you also get that crossing if you use a different track. If not then this has been changed. I doubt that this was changed but i really don't know for sure, maybe try a different track, see what happens.


Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Specify road/rail crossing
« Reply #4 on: January 17, 2011, 05:22:55 PM »
@rfg123 : the type of crossing should be dictated by the max-speed of the road. Did you check that the wanted crossing type is available? Crossings have intro/retire dates.

Could you upload all your crossing paks?

Offline rfg123

  • *
  • Posts: 101
Re: Specify road/rail crossing
« Reply #5 on: January 17, 2011, 06:38:24 PM »
@rfg123 : the type of crossing should be dictated by the max-speed of the road. Did you check that the wanted crossing type is available? Crossings have intro/retire dates.

Could you upload all your crossing paks?

I will upload 3 of them, which should sufficiently illustrate the point.

Included in the zip are 2 crossings for dirt roads, one for sand track, one for wooden sleeper rails. When I draw a dirt road over wooden sleeper rails, the crossing for sand track appears. This is why I have a problem, because the dirt road speed is set at 25 k/h for both, even though the track speed is 55 k/h and 120 k/h.

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Specify road/rail crossing
« Reply #6 on: February 21, 2011, 09:37:49 PM »
I'm having the same problem - only the low speed one ever gets built, no matter how I change the dats of the faster one.  I've tested altering both track and road speeds.  Ideally I'd have one image for the low speed rail track and another for the high speed rail track (i.e. waytype[1]).  Is this a program bug?

PS Either that or allow the user to choose which one to use somehow?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Specify road/rail crossing
« Reply #7 on: February 22, 2011, 06:14:57 AM »
As I wrote above, currently only the road-maxspeed is taken into account.

Edit: As of rev 4312 the maxspeed of second way is taken into account when selecting the crossing.

Edit2: Please report, if some choices of crossings do not match your expectations. This could happen with cityroads for instance (I did not test).

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Specify road/rail crossing
« Reply #8 on: February 22, 2011, 12:57:51 PM »
Works a treat for what I want so far - thanks!

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Specify road/rail crossing
« Reply #9 on: February 27, 2011, 07:49:59 PM »
The current implementation goes against my original intention to put a malus on the roads. Also a seldom used sand track often has no barriers and a left-over cobblestone paving quite frequently. If there is a faster track, it gets barriers and allows for faster crossing.

In many countries there is also a 30 kph speed limit between on a crossing without barrier. With the new system, even completely unused sand tracks get very fast crossings. (Thus I based it on first waytype.)

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Specify road/rail crossing
« Reply #10 on: February 27, 2011, 08:19:40 PM »
In many countries there is also a 30 kph speed limit between on a crossing without barrier. With the new system, even completely unused sand tracks get very fast crossings. (Thus I based it on first waytype.)
If no fast crossing is available in timeline games, no fast crossing will be build. If there is a fast crossing available, then this will be build. As long as the user is cannot choose the type of crossing to be build, I think it is fair to build the fastest available one.

But I am not sure if I understood your post correctly.

i think you can recover the old behavior by introducing two crossings without barriers and different maxspeeds: fast road / slow track and slow road / fast track. For pak64, something like 160 / 60 and 40 / 500.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Specify road/rail crossing
« Reply #11 on: February 27, 2011, 08:56:39 PM »
I wanted to slow roads to 30 kph on crossings without barriers (as was default on sand track) and thus make routing over "unbarriered" crossings an unfavourable choice. I am not sure how to achieve this in the current system, as even the slow sand track always gets the barrier.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4568
  • Languages: EN, DE, AT
Re: Specify road/rail crossing
« Reply #12 on: February 28, 2011, 07:59:37 AM »
I think one has to play around with the crossing maxspeeds. Please try the attached dat-file for pak64.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9460
  • Languages: De,EN,JP
Re: Specify road/rail crossing
« Reply #13 on: March 01, 2011, 11:03:38 AM »
I think the problem is, that I do not want a rail road crossing with a speed higher than 30 without barriers ... I know I can work around this with this definitions. But usually crossings are fwe, so I can still live with this.

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Specify road/rail crossing
« Reply #14 on: March 01, 2011, 11:16:09 AM »
Could this be a pak-set dependent thing set in simuconf?  Prissi wants crossing choice by road type, but I would prefer it by rail type (or both).  Presumably it's no different to code one or the other?

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: Specify road/rail crossing
« Reply #15 on: March 19, 2011, 07:56:36 PM »
It´s possible to make rail-roadcrossing chooseabel ?
I want creat rail-roadcrossing with different topspeeds,stylls,buildforms and sounds.
I Know that the Evulotion by the Rail-roadcrossing be was very big!

greenling