Page 1 of 2

Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Sun Jan 24, 2016 5:16 pm
by Terrier060
I have used 'Track Bath Wood Old' in my TS2015 route from Barry to Bridgend which should have mainline default speeds of 70 (max) and 50 (freight). For some reason all the track now is rated at 100. Is there any way of altering this default speed back to 70 for the whole route? As it is, it makes it impossible for me to use the Kuju speed markers which show the mainline speed as 100.

Any help would be much appreciated.

Ed

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Sun Jan 24, 2016 6:58 pm
by AndiS
It depends on how speed came to be 100 mph.

I would do this (warning: hacky):

1) Open Tracks.bin in Networks in your route folder, using RW-Tools. Or convert to .xml using serz.exe, then use Notepad++, and remember to use serz.exe to convert .xml to .bin again.
Search for the word trackrules. Most people keep their track rules in a folder with that name, so this is a quick proxy.

Note what you find. What matters is the stuff between > and < in the line you find plus Provider and Product a few lines above.
You should only find exactly one track rule used, in theory.

2) Open the track rule file, found in Asset/"Provider"/"Product"/"the path you found".
Search for DefaultSpeedLimit. Primary is for fast trains, Secondary for freight. Edit as desired.

If that still reads 70 and 50, you set the speed in World Editor. In that case, the safer way is to mark all track in World Editor and set the speed there. This can be tiresome.

The alternative is to search for Network-cTrackNetworkSpeedLimit in Tracks.xml (Tracks.bin) and delete the XML element wherever you find it. This means that you delete the line that starts
<Network-cTrackNetworkSpeedLimit ...
and the lines that follow, up to and including
</Network-cTrackNetworkSpeedLimit>

This can be tiring, too. What you consider safer is up to you. :roll:

Be sure to keep backups, if you follow any advice from me. I am dangerous and my advices even more so.

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Sun Jan 24, 2016 8:39 pm
by Terrier060
Hi AndiS
I am not sure I did the right thing when I first set up the route - I think I have done everything Globally as I am not sure of the difference between local and global setup.
When I go into the route and lay a new piece of Bath track it has the correct mainline speed of 70. I do not know how the whole of my route changed to 100, as I am fairly sure I used old Bath track throughout. It now comes out BLACK when I page through the space bar to speed limits. I think it used to be yellow.

I have already looked at the .bin files and they seem to be OK (see below).

There is no TrackRules folder containing .bin files in my route:
Railworks/Assets/EdCloutman/Vale_of_Glamorgan_Railway/RailNetwork

only in the Kuju route and they are:
Railworks/Assets/Kuju/RailSimulator/RailNetwork/TrackRules:
1 Default Track Rules
-All Track TR-
Bath_Temp_TrackRules_MainDown 70
Bath_Temp_TrackRules_Yard
Loft Rules 1_in_x
Loft Rules Percent
Loft Rules Permille
Newc_York_TrackRules_Default
Newc_York_TrackRules_Yard
Oxfo_Padd_DefaultTR
Oxfo_Padd_ElectricTR
Sieg_Hage_Main
Sieg_Hage_Yard

The relevant bits in the first three files I think are:

1 Default Track Rules.bin
<BlueprintID d:type="cDeltaString">RailNetwork\Track\bath_temp_track01.xml
<DefaultSpeedLimit>
<Network-iTrackNetworkSpeedLimit-cPropertyValue>
<Primary d:type="sInt32">70</Primary>
<Secondary d:type="sInt32">40</Secondary>
</Network-iTrackNetworkSpeedLimit-cPropertyValue>

-AllTrack TR_.bin
<BlueprintID d:type="cDeltaString">RailNetwork\Track\bath_temp_track01.xml
<DefaultSpeedLimit>
<Network-iTrackNetworkSpeedLimit-cPropertyValue>
<Primary d:type="sInt32">70</Primary>
<Secondary d:type="sInt32">50</Secondary>
</Network-iTrackNetworkSpeedLimit-cPropertyValue>

Bath_Temp_TrackRules_MainDown 70.bin
<BlueprintID d:type="cDeltaString">RailNetwork\Track\bath_temp_track01.xml
</BlueprintID>
</iBlueprintLibrary-cAbsoluteBlueprintID>
</DefaultTrackType>
<DefaultLineType>
<Network-iTrackNetworkLineType-cPropertyValue>
<LineType d:type="cDeltaString">MainLine</LineType>
</Network-iTrackNetworkLineType-cPropertyValue>
</DefaultLineType>
<DefaultSpeedLimit>
<Network-iTrackNetworkSpeedLimit-cPropertyValue>
<Primary d:type="sInt32">70</Primary>
<Secondary d:type="sInt32">50</Secondary>
</Network-iTrackNetworkSpeedLimit-cPropertyValue>

Does this make any sense?
Thank you for sparing me your time,

Ed

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Sun Jan 24, 2016 10:19 pm
by AndiS
The missing bits are these:

1) When you search for <Network-cTrackNetworkTrackRule in Tracks.bin, what do you find? We need Provider and Product (9th and 10th line from matching line) and BlueprintID three more lines down. Check a few occurrences as they may differ.

2) When searching for <Network-cTrackNetworkSpeedLimit in the same file, do you get lots of hits and is Primary and Secondary there 100?

The reasoning behind (1) is that you might link to some track rule that you are not aware of.

The reasoning behind (2) is that you might have set the speed individually, i.e., directly for the track pieces in question.

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Mon Jan 25, 2016 1:19 am
by Terrier060
Yes in the -All Track TR_.bin file I get the following:

<?xml version="1.0" encoding="utf-8"?>
<cBlueprintLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
<Blueprint>
<cTrackRulesBlueprint>
<TrackTypes>
<iBlueprintLibrary-cAbsoluteBlueprintID d:id="44945912">
<BlueprintSetID>
<iBlueprintLibrary-cBlueprintSetID>
<Provider d:type="cDeltaString">Kuju</Provider>
<Product d:type="cDeltaString">RailSimulator</Product>
</iBlueprintLibrary-cBlueprintSetID>
</BlueprintSetID>
<BlueprintID d:type="cDeltaString">RailNetwork\Track\bath_temp_track01.xml



d:type="cDeltaString">RailNetwork\Track\bath_temp_track01.xml</BlueprintID>
</iBlueprintLibrary-cAbsoluteBlueprintID>
</DefaultTrackType>
<DefaultLineType>
<Network-iTrackNetworkLineType-cPropertyValue>
<LineType d:type="cDeltaString">MainLine</LineType>
</Network-iTrackNetworkLineType-cPropertyValue>
</DefaultLineType>
<DefaultSpeedLimit>
<Network-iTrackNetworkSpeedLimit-cPropertyValue>
<Primary d:type="sInt32">100</Primary>
<Secondary d:type="sInt32">100</Secondary>
</Network-iTrackNetworkSpeedLimit-cPropertyValue>
</DefaultSpeedLimit>
<DefaultLineDirection>
<Network-iTrackNetworkLineDirection-cPropertyValue>
<LineDirection d:type="cDeltaString">Both</LineDirection>
</Network-iTrackNetworkLineDirection-cPropertyValue>
</DefaultLineDirection>
<DefaultElectrification>
<Network-iTrackNetworkElectrification-cPropertyValue>
<Electrification d:type="cDeltaString">None</Electrification>
</Network-iTrackNetworkElectrification-cPropertyValue>
</DefaultElectrification>
<DefaultSCollision>
<Network-iTrackNetworkSpecialCollision-cPropertyValue>
<SpecialCollision d:type="cDeltaString">Off</SpecialCollision>
</Network-iTrackNetworkSpecialCollision-cPropertyValue>
</DefaultSCollision>
<GradientValue d:type="cDeltaString">OneInX</GradientValue>
<SpeedUnitValue d:type="cDeltaString">MPH</SpeedUnitValue>
<TrackGauge d:type="sFloat32" d:alt_encoding="00000080C2F5F63F"

If I alter the values in this file, won't it mess up the other TS2015 routes that came with the game and also mess up the scenarios?

Ed

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Mon Jan 25, 2016 8:54 am
by AndiS
I referred to Content/Routes/some route code/Networks/Tracks.bin, not Assets/Kuju/RailSimulator/....

When you edit the track rule files, it does influence all routes that use them. I would only suggest that in case you find you referred to a track rule that is not used elsewhere. We still don't know which one is used. There is an option I did not mention before, that you referred to a track rule from the default set that has speed limit 100. So we really need to know what is referenced in Tracks.bin in folder Networks in your route folder as this file is the starting point of the quest.

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Tue Jan 26, 2016 12:48 pm
by Terrier060
I think this may all be a bit above me and I don't want to waste your time AndiS, but I am not sure which is my folder - is this in Content/routes? And if so they all have code names and there are 25 of them - examples below:
00000001-0000-0000-0000-000000000000
3e8ae621-0eee-4f18-9bba-50b551bda71a
00000006-0000-0000-0000-000000000000
etc.

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Tue Jan 26, 2016 3:33 pm
by AndiS
There is a new goodie in your Railworks folder (C:\Program Files (x86)\Steam\SteamApps\common\railworks).

Double-click application NameMyRoute there. It brings up a sober window listing these codes together with the route names. Yet another feature of RW-Tools that they took over after a few years of delay.

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Tue Jan 26, 2016 8:25 pm
by Terrier060
Brilliant! Yes I have found the one. Would it be possible to see if you can make sense of it. I am not sure if I can attach a .bin file. It has the following blueprints in it:

\-All Track TR-.xml</BlueprintID>
\bath_temp_track01.xml</BlueprintID>
\1 Default Track Rules.xml</BlueprintID>

Ed

Re: Vale of Glamorgan Railway - Mainline Speed problem

PostPosted: Tue Jan 26, 2016 9:05 pm
by AndiS
Right, we are getting there.
-All Track TR- is the one with the speed limit of 100/100, 1 Default Track Rules has 70/40. bath_temp_track01 is a track type, not a track rule. Anyway, it is safe to say that -All Track TR- is the problem.

Now you have three options:

1) Edit -All Track TR-.bin to set the speed limit to 70/40. This will influence all route that use it. I have no idea how many of your routes do. This track rule was introduced on popular demand for home-made routes. I would be surprised if a DTG route used it.

2) Edit Tracks.bin of your route, replacing "-All Track TR-" by "1 Default Track Rules". However, the latter does not have all track types listed that are in the former -- surprise, surprise. So before you do this, search for the following strings in Tracks.bin:
bath_temp_track01_tun01
bath_temp_track02_tun01
oxfo_padd_track01o
oxfo_padd_track02o
tunnel_trackless
tunnel_track0
sieg_hage_track
SanB_Bars_track

The last three are fragments of track names, matching several track types that you are unlikely to use. The hot ones are the ones that come first on the list. You may be sure that you did not touch German or US track. But be sure to check for tunnel_track0.

If none of these occur in your route, it is relatively safe to replace all occurrences of "-All Track TR-" by "1 Default Track Rules", using some string search and replace in some editor (RW-Tools or Notepad++).

3) Combine both for maximum safety and reduction of hassle:
Copy -All Track TR-.bin and name it -My Track TR-.bin.
Edit -My Track TR-.bin to set the speed limits (Primary and Secondary) to 70 and 40.
In Tracks.bin, replace all occurrences of -All Track TR- by -My Track TR-.

This implies none of the dangers that are attributed to retrospective change of track rules. And it influences no other route, because no other route uses -My Track TR-.bin.

(Sorry for taking you through option 2 at length. It is important if you want to share your route and shy away from the requirement of -My Track TR-.bin that lives in Assets/Kuju/RailSimulator/... .