Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: OpenRails / MSTS TSECTION.DAT file format

  1. #11
    Join Date
    Aug 2004
    Location
    Oregon, US.
    Posts
    124

    Default

    You almost have it! I was recently working on a project with custom track shapes, and may be able to offer a solution:

    Any time a new curved "TrackSection" is defined, you need to make two entries - one with a negative curve angle and one with a positive curve angle (for when you flip it with "x")

    So, your entries would look like this:

    Code:
    TrackSection ( 1010
     SectionSize ( 1.5 0 )
     SectionCurve ( 147.5075 -5 )
    )
    TrackSection ( 1011
     SectionSize ( 1.5 0 )
     SectionCurve ( 147.5075 5 )
    )
    TrackSection ( 1012
     SectionSize ( 1.5 0 )
     SectionCurve ( 152.4925 -5 )
    )
    TrackSection ( 1013
     SectionSize ( 1.5 0 )
     SectionCurve ( 152.4925 5 )
    )
    Code:
    TrackShape (1166
        FileName (t2c150r5d.s)
          Numpaths (2)
          SectionIdx ( 1 -2.4925 0 0 0 1010 )
          SectionIdx ( 1 2.4925 0 0 0 1012 )
    )
    Notice how the "SectionIdx" lines within the "TrackShape" definition call on sections with a negative curve angle only, which is why curves turn to the left when initially placed in the editor.

    Also, I found it very helpful to write an include file to store my route-specific tsection modifications and additions. The OpenRails manual has a great description on how to do this so you can avoid altering the global file directly

    Hope this helps!
    - Matt

  2. #12
    Join Date
    Apr 2003
    Location
    Silicon Valley, CA, USA.
    Posts
    3,441

    Default

    IMO the best thing a noob can do when trying to master new entries in the tsection file is to search the tracksection portion of the file for a set of specifications that matches what you want. When found you now have a valid SectionIdx() value to use with the shape you have created. That's half of the problem solved. Next search for a trackshape that uses that index, copy/paste that and change the file name to your file and the shape number to one assigned to you. It should be good but always test.

    It's always best to start with single track tangents, then multiple track tangents, then a single track curve, etc. When in doubt find the data for a similar shape that you are trying to add and examine what somebody else has already done.

    And of course get a block of numbers assigned to you before you start.
    Dave Nelson

    Seldom visiting, posting less often that that.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •