Track shape names

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kraus
    1000 Post Veteran

    • Jan 2001
    • 1086
    • Madison, Wisconsin
    • General

    #1

    Track shape names

    I remember reading some problems with the naming of the original tracks and that it was too late to make changes. The primary problems were the sorting of tracks in the selection dialogs and that ScaleRail used a better naming schema.

    I have thought of two possible solutions, one implemented in TSRE and the other renaming track shapes in the global tsection.dat and route world files.

    Create a CSV file with three columns, track shape number, track shape file name, track shape display name.

    TSRE would use track shape file name when reading and writing to world files while using track shape display name in the user interface.

    For users who want to continue using MSTS Route Editor then a program could be created that uses the same CSV file to rename the track shapes.

    Some sample data for this CSV file
    id,name,display
    2,A1t100mStrt.s,A_1tStr_w_100m.s

    This CSV file would not need all track shapes, those not in this file would use their file name as display name.
    Last edited by kraus; 08-22-2025, 15:48.
  • derekmorton
    5500 Post Veteran



    • Nov 1999
    • 5699
    • Eltham, Victoria, Australia.
    • ORTS

    #2
    Originally posted by kraus
    renaming track shapes in the global tsection.dat and route world files
    That will break every activity that uses that shape, not a viable option.

    Comment

    • kraus
      1000 Post Veteran

      • Jan 2001
      • 1086
      • Madison, Wisconsin
      • General

      #3
      To test changing track shape name in the global tsection.dat file I altered the first five tracks. This is the original file with 263 shapes.

      TrackShape ( 0
      FileName ( A_1tStr_w_010.s )
      NumPaths ( 1 )
      SectionIdx ( 1 0 0 0 0 0 )
      )
      TrackShape ( 1
      FileName ( A_1tStr_w_050.s )
      NumPaths ( 1 )
      SectionIdx ( 1 0 0 0 0 1 )
      )
      TrackShape ( 2
      FileName ( A_1tStr_w_100.s )
      NumPaths ( 1 )
      SectionIdx ( 1 0 0 0 0 2 )
      )
      TrackShape ( 3
      FileName ( A_1tStr_w_250.s )
      NumPaths ( 1 )
      SectionIdx ( 1 0 0 0 0 3 )
      )
      TrackShape ( 4
      FileName ( A_1tStr_w_500.s )
      NumPaths ( 1 )
      SectionIdx ( 1 0 0 0 0 4 )
      )

      I then ran several activities on the original Marias Pass route in Open Rails with no noted difference including one on single track, Running with Hotbox.

      Edit: And the Running with Hotbox activity ran in MSTS without any noted problem.

      Edit 2: Changed name to avoid conflict with other tracks.
      Last edited by kraus; 08-22-2025, 15:47.

      Comment

      • slipperman
        3500 Post Veteran



        • May 2010
        • 3787
        • Worksop, UK
        • MSOR

        #4
        Hi Kraus,
        The files you listed from the Global Tsection.dat file are ScaleRail shapes.
        You say you ran the default Marias Pass route. That does NOT use ScaleRail track sections (unless you have changed it, in which case it's no longer the default route! ).

        Cheers,
        Ged

        Comment

        • kraus
          1000 Post Veteran

          • Jan 2001
          • 1086
          • Madison, Wisconsin
          • General

          #5
          I did not make any changes to the route, just changes to the global tsection.dat file. I expect that changes to this file would only affect the route editor when changing track. My tests confirmed no effect when running activities in Open Rails and MSTS.

          Comment

          • derekmorton
            5500 Post Veteran



            • Nov 1999
            • 5699
            • Eltham, Victoria, Australia.
            • ORTS

            #6
            Kraus,

            Global track shape names MUST be unique, that is the whole purpose of the standardised global tsection.

            The entries have been put there by route builders for their own routes, the individial route builders own those entries, I do not have the authority to change these.

            There will be NO renaming of entries within the standardised global tsection.

            As you have already done, you have a selection of shapes within the standardised global tsection, this is where you may make changes, nowhere else.

            Derek Morton
            Custodian standardised global tsection.

            Comment

            • slipperman
              3500 Post Veteran



              • May 2010
              • 3787
              • Worksop, UK
              • MSOR

              #7
              Hi Kraus,
              Why don't you try running an activity in a route which actually uses the ScaleRail shape entries you've changed? If that's successful, then try using a route editor, either MSTS RE or TSRE, and try editing those track entries. If that is successful, THEN you may be able to claim that your system works!

              Alternatively, if you want to use the default Marias Pass route, then I suggest you try your system with A1 or A2 track shapes.

              Cheers,
              Ged

              Comment

              • kraus
                1000 Post Veteran

                • Jan 2001
                • 1086
                • Madison, Wisconsin
                • General

                #8
                Since the track shapes must have unique names, I can try names like A_1tStr_w_010.s. The reason for changing the names is to improve their order in the selection dialogs.

                Edit: The activity ran with the new track shape names that avoid duplicate names.
                Last edited by kraus; 08-22-2025, 15:47.

                Comment

                • kraus
                  1000 Post Veteran

                  • Jan 2001
                  • 1086
                  • Madison, Wisconsin
                  • General

                  #9
                  The shapes with the new names are not shown in the list of tracks for TSRE. The track shapes are shown in MSTS Route Editor.

                  A tracks new name.jpg

                  Comment

                  • kraus
                    1000 Post Veteran

                    • Jan 2001
                    • 1086
                    • Madison, Wisconsin
                    • General

                    #10
                    How does TSRE use the other track systems? I can only find those for the A1t, A2t, A3t, ..., A10t tracks. For the install with build 60 of tsection.dat I can only see the original A track system. I cannot see ScaleRail, UKFS, and other track systems.

                    Edit: Hiding track shapes defined in global tsection.dat but not in the shapes folder.

                    Edit 2: Adding the new named track shapes did not appear in the list of track sections in TSRE, only a1t, a2t, a3t, and a4t are shown.
                    Last edited by kraus; 08-22-2025, 16:27.

                    Comment

                    • kraus
                      1000 Post Veteran

                      • Jan 2001
                      • 1086
                      • Madison, Wisconsin
                      • General

                      #11
                      Changed this setting and can now see the new track shape names.

                      ignoreMissingGlobalShapes = false // false shows only track/road shapes present in Global\Shapes

                      Comment

                      • eric
                        9500 Post Veteran and Administrator



                        • Dec 2002
                        • 9583
                        • NS MP245.4 CNO&TP South District
                        • English, SQL
                        • General

                        #12
                        What's the underlying problem you're trying to solve - how the track shapes are sorted in the object picker?

                        One of the items on the TSRE v8 backlog is to have favorites or groupings of related track sections e.g. one for yard ladders, one for crossovers, one for compound pieces [turnout + frog + end), which would require a user defined lookup file. It might be possible to include a sorting order field in that data structure.
                        If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, or items available in our library, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

                        Comment

                        • kraus
                          1000 Post Veteran

                          • Jan 2001
                          • 1086
                          • Madison, Wisconsin
                          • General

                          #13
                          The underlying problem is the order of tracks in the object picker. The straights and curves are mixed together, and they are not in order by size.

                          Also, I don't know why they are shown or not depending on the setting of ignoreMissingGlobalShapes. They are defined in tsection.dat and the shapes are in the global\shapes folder.

                          Comment

                          • Pecho Lata
                            Member
                            • Dec 2006
                            • 40
                            • .
                            • General

                            #14
                            Originally posted by kraus
                            Also, I don't know why they are shown or not depending on the setting of ignoreMissingGlobalShapes. They are defined in tsection.dat and the shapes are in the global\shapes folder.
                            Do the shapes in the GLOBAL/SHAPES folder have the same name as the one you entered in FileName ( ) in the tsection.dat file? If the shape file names and FileName ( ) do not match, they will never be displayed in the TSRE list if ignoreMissingGlobalShapes = True.

                            Comment

                            • kraus
                              1000 Post Veteran

                              • Jan 2001
                              • 1086
                              • Madison, Wisconsin
                              • General

                              #15
                              Yes, the shapes have the same name.

                              Edit: Correction, the shape names were not the same. They were missing the last character, "m".
                              Last edited by kraus; 08-23-2025, 06:47.

                              Comment

                              Working...