Change all the track in a route

General discussion about Rail Simulator that doesn't really fit in to any specific category. A good place to start if you're not sure what category it should fit in to as well.

Moderator: Moderators

User avatar
mikesimpson
Very Active Forum Member
Posts: 6361
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Change all the track in a route

Post by mikesimpson »

Hi All,

Glad you liked that upgrade. I uploaded v7.1.74, but discovered something else which needed improving, so replaced it with v7.1.76 while you lot were still in bed :-).

Changing the track type certainly works across the switches because there are no switches/points as such in RS they are just intersecting tracks. However I do not know about tight curves or the effect on TrackRules, so you may need to make some changes to track rules on some tracks. (I just make the tools, it is up to the user to work out what they can do :-) ).

The tracks I used were those shown here
http://forums.flightsim.com/vbts/showth ... p?t=274250
from Vias3D.net in Spain. However, the standard gauge versions do not come with winter textures nor the grey trackbed colours. I swapped the grey from the Spanish wide gauge track in the pack.
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
User avatar
charlie99
Very Active Forum Member
Posts: 1206
Joined: Thu Feb 14, 2008 4:01 pm
Location: Earth

Re: Change all the track in a route

Post by charlie99 »

I'll have to try this on a test route.
Regards
Charlie
User avatar
mikesimpson
Very Active Forum Member
Posts: 6361
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Change all the track in a route

Post by mikesimpson »

CaptScarlet wrote:Mike, Great work :D . I have one question though, will this allow the user to ( for instance ) replace on a route missing payware content with free content if the user wanted too ?
No, because all of the items in a route are contained in the route's scenery files, and just looking at the Oxford-Paddington there are 315 such files. So it would require you to open each of these files and do the search/replace over each file.

Now, the check route already opens each of the files and looks for the shapes therein, so it should be possible - I will look into this for you. However it would depend upon the substituted shapes being roughly the same size and alignment or you would get some strange results.
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
User avatar
longbow
Very Active Forum Member
Posts: 3608
Joined: Mon Mar 18, 2002 12:00 am
Location: Noosa, Australia
Contact:

Re: Change all the track in a route

Post by longbow »

Great work Mike. Presumably this will also allow swaps of roads and procedural assets?

If this concept can be extended to replacing a list of content it will be very timely, given the increasingly thorny issue of whether to use payware content in freeware routes. It might also allow routes to be auto-configured for different eras, for example by swapping modern cars for period stuff.

As you imply I think the swap process would have to be defined by the routebuilder, allowing him to either provide a batch file to allow assets to be swapped out automatically by the user, or more simply by allowing him to swap out all content from a particular provider to produce a payware-free version.
User avatar
AndiS
Very Active Forum Member
Posts: 6207
Joined: Fri Sep 23, 2005 4:43 pm
Location: Jester's cell in ivory tower
Contact:

Re: Change all the track in a route

Post by AndiS »

Of course, the person who does the changes has the responsibility of making the substitute fix. That it does must be assumed by anyone providing such a tool.

One check you could implement, if you like is this: The .geofoo file of a shape contains this:
<RootMinExtents ...>-0.3632 -0.0172 -1.2222 1.0000</RootMinExtents>
<RootMaxExtents ...>0.3587 1.3552 1.1007 1.0000</RootMaxExtents>

To me, it looks like a bounding box of for
X = width = [-0.3632 0.3587]
Y = height = [-0.0172 1.3552]
Z = length = [-1.2222 1.1007].
Don't ask me about the 1.0000, let's hope it is a meaningless filler in all cases. Otherwise, I would consider it a scaling factor for the first three values.

Would I have the time to write that tool, I would take a two-column table for input, columns are "before" and "after", i.e., they tell you replace the first by the second thing. A de luxe variant would be to have 3 columns for each of the two, for provider, product, filename, for easier editing, but you can easily make the conversion from the 3 subcolumns to the full path in Excel.

Output would be a list of bounding box deviations. I would not generate any errors for any threshold, it is all up to the user to decide. (I am thinking about trees or background houses where a few metres difference in shape would not matter.) But users will be happy to have that list so they know what to check.

Just thinking aloud, sorry for not getting active right now. I promise betterment when the AI is fixed.
npcleary
Been on the forums for a while
Posts: 193
Joined: Mon Feb 11, 2008 6:40 pm
Location: Forest of Dean

Re: Change all the track in a route

Post by npcleary »

mikesimpson wrote:
CaptScarlet wrote:Mike, Great work :D . I have one question though, will this allow the user to ( for instance ) replace on a route missing payware content with free content if the user wanted too ?
No, because all of the items in a route are contained in the route's scenery files, and just looking at the Oxford-Paddington there are 315 such files. So it would require you to open each of these files and do the search/replace over each file.

Now, the check route already opens each of the files and looks for the shapes therein, so it should be possible - I will look into this for you. However it would depend upon the substituted shapes being roughly the same size and alignment or you would get some strange results.
Mike

This would be an invaluable tweak. In the light of all the payware v freeware debate I have had a look at my route with RS Tools and can see numerous instances where I have duplicated item from different add ons. An example would be where I have used Derek's freeware gorse bushes in one place and then the identical IoW version in others (they use the same display name). I've tried searching the scenery files but with over 200 of them its a bit impractical.. Using RS Tools to do the job would save me hours.

On a related although slightly off topic note can I plead for a bit more logic in the naming of assets to avoid this duplication issue? The naming of the Foliage pack assets is good because their display names are easily identifiable, the same does not apply to the IoW or US addons.

Thanks
Nick
User avatar
TheTazman
Very Active Forum Member
Posts: 4886
Joined: Thu Dec 25, 2003 4:55 pm
Location: Wales

Re: Change all the track in a route

Post by TheTazman »

Hmmm how do i change the style of the rails then? I am not sure how to do it. I downloaded the RPK file for the new rails. But dont know what i have to do in RSTools.
A computer that's more than adequate to run TS
User avatar
petestuart
Well Established Forum Member
Posts: 511
Joined: Mon May 05, 2008 10:22 am
Location: Newcastle-under-Lyme, North Staffordshire

Re: Change all the track in a route

Post by petestuart »

Hi there mike.. again.. Im now getting a Run-time Error when i start the XML Editor bit in your tools..

Run-time Error '-2146697210 (800c0006)': The system cannot locate the object specified.

Regards

pete
Creator of 'The Old Branch Line' and the 'The North Staffordshire Railway - Knotty Lines' for Rail Simulator/RailWorks. Member of the Foxfield Light Railway and Welsh Highland Railway...
letsRole!
User avatar
phat2003uk
SWTVR Assistant Manager
Posts: 7452
Joined: Thu Aug 08, 2002 5:52 pm

Re: Change all the track in a route

Post by phat2003uk »

Mike

Thanks a lot for this, I've yet to try out but I'm sure it'll work great like everything else you do!
Locked

Return to “[RS] General RS Discussion”