Flavor 17 - Track Location/Draw in Switch



This flavor is used in together with the Flavor #11 to specify the objects and part of the track that must be drawn when the driver is inside the range defined here.

     1      Flavor Flag   (11 00 00 80)
     2      Track Position
     3      Track Position
     4      Track Position
     5      Track Position

Track Position
        Is a value in the range 0 - (track length). Values can be repeated multiple times in a flavor. As far as I can tell,
        flavor 17's values are based on the initial position value in flavor 12. and when looking at flavor 17 you must
        also look at the flavor11 that accompanies the fl17. in that flavor 11 you will find a call to 7 offsets. Each offset
        calls to a particular section of track which coincides with the beginning section value in Flavor12. The first four
        offsets always call to four textured [T]  sections of track, these four textured sections are usually the total
        section length divided by four. The 5th and 6th offsets called will each call to a section of plain polygons, each
        section is 1/2 of the total length of the section. The 7th and last offset will call to a set of plain polygons that
        stretch the entire length of the section. This creates the draw order, when you are driving, you will notice plain
        polygons being drawn off in the distance.

        The asscoiated FL11 will look like this (I've begun to refer to them as 11/17 because
        it is really a combination of the 2.

        F11  264123           127468     128412       87128      87128   127656      87128  126656
        F17  246143         42634925     46817748      46817748       46817748

        Ok, the 87128 line I threw in is actually F00, it is a null flavor, it tells the sim that nothing is needed in that
        position but to read on to the next.

        When writing values out for flavor 17 you can do it like this. If the flavor 11 has 7 offsets (NO null flavor calls)
        the Flavor 17 values are very easy to write. The four values of F17 are the beginning section values in F12, so
        trace the first four F11 offsets from the 11/17 combination and trace them down to their F12 values.When
        doing this make sure that you are looking at beginning section values in TEXTURED sections. Your values will
        be inaccurate if you use the wrong section.

        Now In the cases of having null flavors in there it gets a little more tricky.
        In the case of a line like this:

        F11  268111     199166    87128     87128      87128     199411      87128      199846

        In the case of the f11 above you f17 would be pretty easy. All four values
        of f17 would use the initial pos value of the 1st textured section.

        In the case of a f11 that looked like this:

        f11  268111     199166   199228     87128      87128     199411      87128      199846

        In a line like this the f17's 1st value would be the initial pos value of
        the first textured section, since there are only 2 textured sections being callex
        to the last 3 values of fl17 would use the initial pos value of the 2nd and last
        textured section..you will NEVER see a f17 with the values split like this:

        F17  270000    42634925     42634925    46811176    46811176

        I've found that it always looks like this when only 2 textured sections are called to

        F17  270000    42634925     46811176    46711176    46811176

        Also, I've never seen a flavor 11/17 that calls to 3 textured sections. always 1/2/4.
        usually in corners it will call one or 2, four for straight sections..this makes sense
        because you dont need as much track called in a turn...