Announcement

Collapse
No announcement yet.

How to get rid of negatively placed items

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to get rid of negatively placed items

    One of the nasty things about TSRE is that once you "hide terrain shape" there is almost no bottom to where a misplaced item will wind up. Eric suggested finding any items in a world file with a negative "Y" value and change the "Y" value to some positive amount, which works, so I am going to explain my procedure, which incorporates his.

    The tools we will use are TSRE, Trackviewer (comes with ORTS), and a text editor, Context being a good one. So you just finished a few miles of track including a tunnel and to lay that tunnel you just had to turn off the terrain shape. It was a struggle and you didn't hit delete quick enough when one piece of track failed to link to one that was in place. Now what? I am not sure that all those bits and pieces laying around at Ycoordinate = -3766.55 really hurt anything but it just seems sloppy to me to leave them in place. So here is what I do.

    First I bring the route up in Track Viewer and here and there I see little dashes & some bigger pieces in the world file view, many of which are not in a area where there is any other track. Or it could be a road piece as well. Each square in Track Viewer has coordinates and these will be noticed when the mouse is moved from square to square. So I keep some scrap paper handy and as I come to each world file, I write down the value, which is also the coordinates and I make a note about where the orphan dash is. North is toward the top of the screen, so I note the position relative to which side of the square the anomoly is located on.

    Then if necessary, I decompress the world file, but it seems that TSRE does not compress them so I just open the world file in my text editor and scroll down through the entries in it. I am specifically looking at the POSITION entry. So I see an entry like this:

    SIMISA@@@@@@@@@@JINX0w0t______

    Tr_Worldfile (
    TrackObj (
    UiD ( 8 )
    SectionIdx ( 28177 )
    Elevation ( 0 )
    CollideFlags ( 39 )
    FileName ( M1tC0100d0050r.s )
    StaticFlags ( 00200180 )
    Position ( -691.383 -3765.22 655.877 )
    QDirection ( 0 -0.957366 0 0.288877 )
    VDbId ( 4294967295 )
    )
    TrackObj (
    UiD ( 12 )
    SectionIdx ( 28199 )
    Elevation ( 0 )
    CollideFlags ( 39 )
    FileName ( M1tC0200d0100r.s )
    StaticFlags ( 00200180 )
    Position ( -641.286 343.206 584.368 )
    QDirection ( 0 -0.949846 0 0.312718 )
    VDbId ( 4294967295 )
    )
    TrackObj (
    UiD ( 13 )
    SectionIdx ( 28177 )
    Elevation ( 0 )
    CollideFlags ( 39 )
    FileName ( M1tC0100d0050r.s )
    StaticFlags ( 00200180 )
    Position ( -737.843 343.206 729.8 )
    QDirection ( 0 -0.964288 0 0.264855 )
    VDbId ( 4294967295 )
    )
    )
    The highlighted text is an obvious problem. So now what. The track piece is valid but it's location is way down under and I need to be rid of it. So That part of the file entry will be changed to this:

    TrackObj (
    UiD ( 8 )
    SectionIdx ( 28177 )
    Elevation ( 0 )
    CollideFlags ( 39 )
    FileName ( M1tC0100d0050r.s )
    StaticFlags ( 00200180 )
    Position ( -691.383 375.0 655.877 )
    QDirection ( 0 -0.957366 0 0.288877 )
    VDbId ( 4294967295 )
    )
    I noticed that most of the entries in the world files had "Y" values around 340, so I chose 375.0 just to make that entry stand out a bit, but I don't want to blast it into the far reaches of space either. It is also critical that it not be an integer. Evidently TSRE does not like integers so I use 375.0. NOW, VERY IMPORTANT, DO NOT DELETE THE ENTRY, JUST CHANGE THE ELEVATION OR "Y" VALUE. Now go into TSRE and jump to the problem world file. Turn off terrain shape and turn on the compass. If you took notes about the approximate location just fish around in the file until you got to the expected area. Other wise just hunt around in the world file. Eventually you will find a valid track piece floating in space either a little above or a little below the terrain. Select the piece and use the "Z" key to delete the database entry and then the "Delete" key to delete the element. Then save the route which will force writing a new world file with corrected data in it.
    I just finished the track for Grafton to Parkersburg, WV, about 110 miles and I had 30 or such errors and they were easy to fix, except: In some cases there were pieces showing up in world files that had no entries, or no error entries in them. Somebody smarter than me will have to explain that one.

    PRECAUTION: BACK UP THE ROUTE FIRST!

    Jerry Sullivan

    #2
    Trackviewer will display it correctly positionally, and is a good source for finding fragments. Finding orphaned track sections would have been a logical test for TSRE had Goku continued the project.

    I've seen a few cases where the XY values exceeded the tile size... meaning the object logged itself in one tile, but the coordinates placed it outside the tile's boundaries. In some cases, those were 3 tiles away...

    If you like what you see here at Trainsim.com, be it the discussions and knowledge in the forums, items saved in our library or the ongoing development of our TSRE Fork, I hope you'll consider a paid membership to help support keeping the site operating.... Thanks!

    Comment


      #3
      Eric,

      I suspect I have a few like that because they appear in what are actually empty tiles. Another issue I find interesting is that you can have some pretty gross errors in the track visually but if the yellow line is smooth, there is no blip when the train crosses the joint. I am going back over the Parkersburg route with a train and correcting those that I find. Also I find that if you can adjust the gradient and not lose the piece, thus having to add a new one, then saved activities still work, otherwise you have to regenerate the path - MSTS was pretty much like that. I am doing this one for Mark in Ohio and when I finish checking it out, I'm going to privately send it to him but I am going inject a little railroad humor with a picture I will take of the train as in--Dang it dispatcher who threw the wrong switch? I have enough saved consists to last beyond my life on this earth, so at least I don't have to contend with the consist editor.

      Jerry Sullivan

      Comment


        #4
        Originally posted by eric View Post
        I've seen a few cases where the XY values exceeded the tile size... meaning the object logged itself in one tile, but the coordinates placed it outside the tile's boundaries. In some cases, those were 3 tiles away...
        TSRE Errors & Messages window will show you these objects as a warning with suggestions.

        Comment

        Working...
        X