Page 1 of 1

Change to third rail?

Posted: Fri Mar 25, 2011 12:14 pm
by Traveller54
I have a route which requires an update and wondered if there is a quick, global way of changing the track status to 'third rail'?
I do appreciate that the laying (graphically) of this rail is a different thing altogether - unless somebody knows differently of course??!
MTIA,

Re: Change to third rail?

Posted: Fri Mar 25, 2011 1:16 pm
by gypbrc
The first thing I would try is searching the relevant tracks.bin file for all instances of

Code: Select all

												<Network-iTrackNetworkElectrification-cPropertyValue>
													<Electrification d:type="cDeltaString">None</Electrification>
												</Network-iTrackNetworkElectrification-cPropertyValue>
and replacing with

Code: Select all

												<Network-iTrackNetworkElectrification-cPropertyValue>
													<Electrification d:type="cDeltaString">ThirdRail</Electrification>
												</Network-iTrackNetworkElectrification-cPropertyValue>
Make a backup of the original tracks.bin. Go into the editor and select the track to see if it shows it has now got third rail electrification.

Re: Change to third rail?

Posted: Fri Mar 25, 2011 3:32 pm
by Traveller54
Thanks for that Richard - partial success. Some of the track has changed some hasn't?
I have checked that every instance of the code you suggested has been changed and done that three times now with the same result.
Onwards .... :roll:

Re: Change to third rail?

Posted: Fri Mar 25, 2011 3:49 pm
by StefanSchmidt
Please have a look in the used Trackrules, i think they should have the same Text:
<DefaultElectrification>
<Network-iTrackNetworkElectrification-cPropertyValue>
<Electrification d:type="cDeltaString">ThirdRail</Electrification>
</Network-iTrackNetworkElectrification-cPropertyValue>
</DefaultElectrification>
Good Luck
Stefan

Re: Change to third rail?

Posted: Fri Mar 25, 2011 4:20 pm
by Traveller54
Thanks Stefan.
I have found the two trackrules that are used:
newc_york_trackrules_default.xml
bath_temp_trackrules_yard.xml
and both are pathed to the ASSETS/Kuju/RailNetwork/Trackrules folder from the routes trackbin file and lots of Loft & Road tiles.
What would happen if I change the trackrules files where they are - would it affect other routes?

Re: Change to third rail?

Posted: Fri Mar 25, 2011 4:30 pm
by gypbrc
My understanding of editing the track rules is that it does not affect the track already laid (as the properties as defined in the track rule can be changed in the editor anyway).

Re: Change to third rail?

Posted: Fri Mar 25, 2011 6:36 pm
by pjt1974
Hi Pete,
Just checked the tracks.bin file and it contains 45 instances of

<DefaultElectrification>
<Network-iTrackNetworkElectrification-cPropertyValue>
<Electrification d:type="cDeltaString">none</Electrification>
</Network-iTrackNetworkElectrification-cPropertyValue>
</DefaultElectrification>

regards
Phil

Re: Change to third rail?

Posted: Sat Mar 26, 2011 6:22 am
by Traveller54
gypbrc wrote:My understanding of editing the track rules is that it does not affect the track already laid (as the properties as defined in the track rule can be changed in the editor anyway).
Just want to get my head around this a little more - if that is the case why is the full path (to the Kuju folder tree) called from the routes tracks.bin file if the two files previously mentioned are not used?

Re: Change to third rail?

Posted: Sat Mar 26, 2011 9:58 am
by pjt1974
I don't think changing the default trackrules in the Kuju folder would make a difference as the info for the track in question is all stored in the tracks.bin file.

Just a quick query
how many instances of

<DefaultElectrification>
<Network-iTrackNetworkElectrification-cPropertyValue>
<Electrification d:type="cDeltaString">none</Electrification>
</Network-iTrackNetworkElectrification-cPropertyValue>
</DefaultElectrification>

did you edit?

regards
Phil

Re: Change to third rail?

Posted: Sat Mar 26, 2011 10:19 am
by Traveller54
pjt1974 wrote:I don't think changing the default trackrules in the Kuju folder would make a difference as the info for the track in question is all stored in the tracks.bin file.

Just a quick query
how many instances of

<DefaultElectrification>
<Network-iTrackNetworkElectrification-cPropertyValue>
<Electrification d:type="cDeltaString">none</Electrification>
</Network-iTrackNetworkElectrification-cPropertyValue>
</DefaultElectrification>

did you edit?

regards
Phil
All 45 and it made no difference to the 'partial' change?! See my PM earlier.

Re: Change to third rail?

Posted: Sat Mar 26, 2011 11:45 am
by bdy26
Correct, you can change the track this way, but if you don't then change the track rule you will then lay any new track on the old basis (as I'm finding out myself!)

If you're changing track rules (and if you haven't already) you'd be best setting up your own route template and your own track rule and then updating your route to use it, then changing the track. I'd always be a bit wary of editing default track rules as you may get an error if steam updates it, though this will depend on your folder structure.

Theres a couple of useful threads here:

http://forums.uktrainsim.com/viewtopic. ... e#p1393796 (and link to the other)

I've had problems swapping tracks and sounds over - if you make the slightest error with spacing in the code it may not work or you may get a "line 113" error on loading. It is worth saving and reloading after every change to check it works. If you search for none</Electrification> you may see a difference in the code as to why the find and replace hasn't worked.

Good luck

B