Page 2 of 2
Re: Change all the track in a route
Posted: Sun Sep 07, 2008 10:54 pm
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.
Re: Change all the track in a route
Posted: Sun Sep 07, 2008 10:58 pm
by charlie99
I'll have to try this on a test route.
Re: Change all the track in a route
Posted: Sun Sep 07, 2008 11:04 pm
by mikesimpson
CaptScarlet wrote:Mike, Great work

. 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.
Re: Change all the track in a route
Posted: Mon Sep 08, 2008 1:51 am
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.
Re: Change all the track in a route
Posted: Mon Sep 08, 2008 11:41 am
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.
Re: Change all the track in a route
Posted: Mon Sep 08, 2008 12:02 pm
by npcleary
mikesimpson wrote:CaptScarlet wrote:Mike, Great work

. 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
Re: Change all the track in a route
Posted: Mon Sep 08, 2008 1:48 pm
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.
Re: Change all the track in a route
Posted: Mon Sep 08, 2008 4:46 pm
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
Re: Change all the track in a route
Posted: Mon Sep 08, 2008 6:16 pm
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!