The International Simutrans Forum

 

Author Topic: Tram lengths  (Read 661 times)

0 Members and 1 Guest are viewing this topic.

Offline Freahk

  • Devotee
  • *
  • Posts: 1423
  • Languages: DE, EN
Tram lengths
« on: February 07, 2020, 04:41:40 PM »
Most UK trams have a length of slightly (1-3m) more than the graphics scale of 30m.
Due to the tile nature of simutrans these will require two full tiles.
I have shortened the last car of any tram up to 33m to fit into a single tile.
Otherwise there are only exactly two trams in the whole pakset that fit into a single tile. Now any, except for CAF edingburgh(42.8m), siemens-duewag supertram(34.8m) and sheffield Vossloh Tram-Train(37.2m) should fit into a single tile.

However, for some reason they still display as 2 tiles in the depot although their summed-up length is exactly 16=1tile and observating track reservations, they can fit into a single tile. When assigning a single tile station, they will however complain.

The changes can be found there: https://github.com/irgend42/simutrans-pak128.britain/commits/tramLength

Offline Ranran

  • Devotee
  • *
  • Posts: 1458
  • Languages: ja
Re: Tram lengths
« Reply #1 on: February 11, 2020, 11:53:24 AM »
Quote
However, for some reason they still display as 2 tiles in the depot although their summed-up length is exactly 16=1tile and observating track reservations, they can fit into a single tile.
The tiles display is always correct but the length and tiles may not match.
5+5+5 is not 15 but 18. 16 + 0 is not 16 but 24.
So this fix is meaningless.
See below for details.
https://forum.simutrans.com/index.php/topic,18496.0.html
https://forum.simutrans.com/index.php/topic,3376.0.html

Offline Freahk

  • Devotee
  • *
  • Posts: 1423
  • Languages: DE, EN
Re: Tram lengths
« Reply #2 on: February 11, 2020, 12:11:47 PM »
I have noticed and pointed out that it is currently useless.

That far from intuitive length calculation needs to be fixed and once it's fixed it will work.
« Last Edit: February 11, 2020, 12:49:55 PM by Freahk »

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Tram lengths
« Reply #3 on: February 14, 2020, 10:28:20 AM »
I have noticed and pointed out that it is currently useless.

That far from intuitive length calculation needs to be fixed and once it's fixed it will work.

The length calculation system is unchanged from Standard so far as I am aware.

Offline Vladki

  • Devotee
  • *
  • Posts: 3690
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Tram lengths
« Reply #4 on: April 25, 2020, 12:29:31 AM »
Bombardier flexity swift can be fixed by setting length=8 (or just commenting the length)
It will look a bit funny, but will fit on one tile.

Offline Freahk

  • Devotee
  • *
  • Posts: 1423
  • Languages: DE, EN
Re: Tram lengths
« Reply #5 on: April 25, 2020, 11:27:35 AM »
Maybe also modifying graphic offsets of the first or second car might look better.
Didn't play around with it yet.

Offline Vladki

  • Devotee
  • *
  • Posts: 3690
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Tram lengths
« Reply #6 on: April 25, 2020, 01:02:24 PM »
How about this?  - offset applied only to rear car in red livery

Code: [Select]
diff --git a/trams/bombardier-flexity-swift.dat b/trams/bombardier-flexity-swift.dat
index 6611a4084..35d39f0a8 100644
--- a/trams/bombardier-flexity-swift.dat
+++ b/trams/bombardier-flexity-swift.dat
@@ -13,7 +13,7 @@ intro_month=3
 waytype=tram_track
 freight=Passagiere
 payload=35
-length=9
+#length=9
 # http://en.wikipedia.org/wiki/CR4000
 overcrowded_capacity=69
 weight=18.2
@@ -83,7 +83,7 @@ intro_month=3
 waytype=tram_track
 freight=Passagiere
 payload=35
-length=7
+#length=9
 # http://en.wikipedia.org/wiki/CR4000
 overcrowded_capacity=69
 weight=18.2
@@ -109,14 +109,14 @@ liverytype[0]=Tramlink-red
 liverytype[1]=Tramlink-green
 liverytype[2]=Metrolink-yellow
 
-EmptyImage[E][0]=./images/flexity-swift-croydon-red-rear.1.4
-EmptyImage[SE][0]=./images/flexity-swift-croydon-red-rear.1.5
-EmptyImage[S][0]=./images/flexity-swift-croydon-red-rear.1.6
-EmptyImage[SW][0]=./images/flexity-swift-croydon-red-rear.1.7
-EmptyImage[W][0]=./images/flexity-swift-croydon-red-rear.1.0
-EmptyImage[NW][0]=./images/flexity-swift-croydon-red-rear.1.1
-EmptyImage[N][0]=./images/flexity-swift-croydon-red-rear.1.2
-EmptyImage[NE][0]=./images/flexity-swift-croydon-red-rear.1.3
+EmptyImage[E][0]=./images/flexity-swift-croydon-red-rear.1.4,-4,-2
+EmptyImage[SE][0]=./images/flexity-swift-croydon-red-rear.1.5,0,-2
+EmptyImage[S][0]=./images/flexity-swift-croydon-red-rear.1.6,4,-2
+EmptyImage[SW][0]=./images/flexity-swift-croydon-red-rear.1.7,4,0
+EmptyImage[W][0]=./images/flexity-swift-croydon-red-rear.1.0,4,2
+EmptyImage[NW][0]=./images/flexity-swift-croydon-red-rear.1.1,0,2
+EmptyImage[N][0]=./images/flexity-swift-croydon-red-rear.1.2,-4,2
+EmptyImage[NE][0]=./images/flexity-swift-croydon-red-rear.1.3,-4,0
 
 EmptyImage[E][1]=./images/flexity-swift-croydon-green-rear.1.4
 EmptyImage[SE][1]=./images/flexity-swift-croydon-green-rear.1.5

Offline Freahk

  • Devotee
  • *
  • Posts: 1423
  • Languages: DE, EN
Re: Tram lengths
« Reply #7 on: April 25, 2020, 01:04:38 PM »
Yes, something like that.
Imho it's fine that way.

Offline Vladki

  • Devotee
  • *
  • Posts: 3690
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Administrator
  • *
  • Posts: 20700
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Tram lengths
« Reply #9 on: April 26, 2020, 12:35:38 PM »
Now incorporated - thank you.