Help needed with Track Rules
Moderator: Moderators
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Help needed with Track Rules
I'm in the middle of tidying up the assets etc in my route and have a potential problem with track rules. I created my own track rule for the route but RS Tools is also showing the use of the IoW track rule. Is there any way in which I can easily find the tile or section of track where the IoW rule is in use? Which .bin files should I be checking?
Thanks
Thanks
- 3DTrains
- Very Active Forum Member
- Posts: 1090
- Joined: Wed Nov 20, 2002 11:08 am
- Location: Another Planet
- Contact:
Re: Help needed with Track Rules
I believe all track shapes and rules are listed in the Tracks.bin file within the route's Network folder.
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Hi Marc,3DTrains wrote:I believe all track shapes and rules are listed in the Tracks.bin file within the route's Network folder.
I've already checked Tracks.bin and can only find my own track rules referenced in their - no sign of island line track rule.bin although it is still showing when I check the route in RS Tools. I'm baffled.
Thanks anyway....
- M1ckran
- Well Established Forum Member
- Posts: 762
- Joined: Mon Mar 17, 2008 2:40 am
- Location: Cheshire, England
Re: Help needed with Track Rules
Have you tried checking the xml of your route template? It could be that it's referencing the IOW sound files and all you need to do is change them to the Kuju versions.
Your track rule could also be referencing IOW components instead of your own so you might want to check that too, if you haven't already.
If you've created your own track components, any of them might have a reference to IOW bits that you weren't aware of.
I think it's just a question of searching down the hierarchy until you find the problem(s). I find the freeware Notepad2 is invaluable for mucking about with xml files.
Good luck.
Michael
Your track rule could also be referencing IOW components instead of your own so you might want to check that too, if you haven't already.
If you've created your own track components, any of them might have a reference to IOW bits that you weren't aware of.
I think it's just a question of searching down the hierarchy until you find the problem(s). I find the freeware Notepad2 is invaluable for mucking about with xml files.
Good luck.
Michael
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Thanks Michael,
I installed Notepad2 last week - big improvement! I am just going to have to wade through all the .bin docs until I find it. I've checked tracks.bin, lofts.bim and roads.bin to no avail and am now going to wade through the rest - that'll teach me to be careless. I have checked my track rules again and that just references the bath_temp track, no call on the IoW at all.
I'll get there.....
I installed Notepad2 last week - big improvement! I am just going to have to wade through all the .bin docs until I find it. I've checked tracks.bin, lofts.bim and roads.bin to no avail and am now going to wade through the rest - that'll teach me to be careless. I have checked my track rules again and that just references the bath_temp track, no call on the IoW at all.
I'll get there.....
- longbow
- Very Active Forum Member
- Posts: 3608
- Joined: Mon Mar 18, 2002 12:00 am
- Location: Noosa, Australia
- Contact:
Re: Help needed with Track Rules
Have you checked what filenames the IoW Track Rule actually points to and searched for those?
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Hi longbowlongbow wrote:Have you checked what filenames the IoW Track Rule actually points to and searched for those?
Thanks for your input. I started that process but I think the answer may lie in the scenery .bin files - problem is that there are over 200 of them! I've noticed in another thread - http://forums.uktrainsim.com/viewtopic. ... &sk=t&sd=a - that Mike Simpson is looking at tweaking RS Tools to enable a global find and replace so I think that I will just have to wait for that. It's a very good example of what happens when you are not careful with your route building...
Thanks again
- AndiS
- Very Active Forum Member
- Posts: 6207
- Joined: Fri Sep 23, 2005 4:43 pm
- Location: Jester's cell in ivory tower
- Contact:
Re: Help needed with Track Rules
All the references to track rules are in Tracks.bin file in the Network folder.
I would be more than surprised, if you find them anywhere else.
This is how I do the search:
Double-check that Tracks.xml is younger than Tracks.bin. If it is not, use serz.exe to convert.
Copy Tracks.xml to some safe place.
Open it in any editor and look for a typical occurrence of what you are interested in. In our case, we find that interesting lines look like this:
<BlueprintID d:type="cDeltaString">railnetwork\trackrules\bath_temp_trackrules_maindown 70.xml</BlueprintID>
Now the safest search criterion is BlueprintID. However, in some cases, this tag is used for many things, not just what you are looking for. In such a case, seaching for railnetwork or trackrules would also be good ideas, but doing so would not find trackrules that are stored in an unusual location. So let's stick with BlueprintID.
Open a DOS window and go to the folder where your copy of Tracks.xml resides. Easiest way to do this is copy the path from an explorer window and then type "cd " (with the blank, without the quotes) in the command window, then right-click and select "paste", then press Enter.
Type
grep BlueprintID Tracks.xml >out.txt
out.txt now contains all lines that contain BlueprintID.
If you don't have grep on your computer, get it from the net.
There is some find tool which seems included with windows but I did not get it to work. Maybe someone has a simpler idea, I am used to grep so I never looked for alternatives.
Now start Excel, and open out.txt with it.
You will see the text import assistant, select "separated by tabs", and "treat succeeding separators as one", then finish.
You will see lots of line in column B.
Insert a line on top, and write something arbitrary into it, like XXX.
Now select column B and select Data - Pivot table.
Click "finish".
Drag XXX with the mouse to the big white area to the left, you will see XML lines appear in the table.
Drag XXX from the same dialogue box to the area just right of where the XML lines are now, you will see the count of each of the lines appear.
Click somewhere outside the new table, to make the dialogue box disappear.
Now you have an alphabetically sorted list of all occurrences of lines containing BlueprintID in the whole big file.
Of course, most of it does not interest you, like references to signals, and audio stuff.
But then again, browsing the list could give you an idea about other things fishy.
Near the bottom, you will find the track rule references.
I know, it is a lengthy and complex procedure, but once you have digested the result, you know all about this aspect of your file. If you try browsing, you are doomed, because you are not a computer.
I would be more than surprised, if you find them anywhere else.
This is how I do the search:
Double-check that Tracks.xml is younger than Tracks.bin. If it is not, use serz.exe to convert.
Copy Tracks.xml to some safe place.
Open it in any editor and look for a typical occurrence of what you are interested in. In our case, we find that interesting lines look like this:
<BlueprintID d:type="cDeltaString">railnetwork\trackrules\bath_temp_trackrules_maindown 70.xml</BlueprintID>
Now the safest search criterion is BlueprintID. However, in some cases, this tag is used for many things, not just what you are looking for. In such a case, seaching for railnetwork or trackrules would also be good ideas, but doing so would not find trackrules that are stored in an unusual location. So let's stick with BlueprintID.
Open a DOS window and go to the folder where your copy of Tracks.xml resides. Easiest way to do this is copy the path from an explorer window and then type "cd " (with the blank, without the quotes) in the command window, then right-click and select "paste", then press Enter.
Type
grep BlueprintID Tracks.xml >out.txt
out.txt now contains all lines that contain BlueprintID.
If you don't have grep on your computer, get it from the net.
There is some find tool which seems included with windows but I did not get it to work. Maybe someone has a simpler idea, I am used to grep so I never looked for alternatives.
Now start Excel, and open out.txt with it.
You will see the text import assistant, select "separated by tabs", and "treat succeeding separators as one", then finish.
You will see lots of line in column B.
Insert a line on top, and write something arbitrary into it, like XXX.
Now select column B and select Data - Pivot table.
Click "finish".
Drag XXX with the mouse to the big white area to the left, you will see XML lines appear in the table.
Drag XXX from the same dialogue box to the area just right of where the XML lines are now, you will see the count of each of the lines appear.
Click somewhere outside the new table, to make the dialogue box disappear.
Now you have an alphabetically sorted list of all occurrences of lines containing BlueprintID in the whole big file.
Of course, most of it does not interest you, like references to signals, and audio stuff.
But then again, browsing the list could give you an idea about other things fishy.
Near the bottom, you will find the track rule references.
I know, it is a lengthy and complex procedure, but once you have digested the result, you know all about this aspect of your file. If you try browsing, you are doomed, because you are not a computer.
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Thanks Andy,
I will give this a try! The asset printout I got for the route from RS Tools references "RSDL\Island Line\railnetwork\trackrules\island line track rule.bin" and what I have been doing to date is to open tracks.bin in RS Tools and then use the find function to look for this track rule. All to no avail. I'll let you know how I get on.
I will give this a try! The asset printout I got for the route from RS Tools references "RSDL\Island Line\railnetwork\trackrules\island line track rule.bin" and what I have been doing to date is to open tracks.bin in RS Tools and then use the find function to look for this track rule. All to no avail. I'll let you know how I get on.
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Hi Andy
Ran grep as per your instructions but then ran into a problem with Excel. I'm running Excel 2007 and could not follow your instructions, are you using an earlier version?
Nick
Ran grep as per your instructions but then ran into a problem with Excel. I'm running Excel 2007 and could not follow your instructions, are you using an earlier version?
Nick
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Hi Andy
Eventually got it all to work but the only track rules refernced in the list is my own fod_track_rules.xml. No mention of the IoW one as per the asset list! Strange...
Eventually got it all to work but the only track rules refernced in the list is my own fod_track_rules.xml. No mention of the IoW one as per the asset list! Strange...
- AndiS
- Very Active Forum Member
- Posts: 6207
- Joined: Fri Sep 23, 2005 4:43 pm
- Location: Jester's cell in ivory tower
- Contact:
Re: Help needed with Track Rules
Interesting. I have no idea what Mike checks, he might know something that I do not.
Glad you got it working in the end, yes, I use Office 2003, and not in English, so I had to guess the text in the user interface for you.
I ought to check for new version of the RS_tools more frequently, did not know that Mike had already included that function. Sounds easier to use than my approach. But you know those old stone heads, old pony doesn't learn new tricks, just stuffs it all into Excel and meditates about it ....
Glad you got it working in the end, yes, I use Office 2003, and not in English, so I had to guess the text in the user interface for you.
I ought to check for new version of the RS_tools more frequently, did not know that Mike had already included that function. Sounds easier to use than my approach. But you know those old stone heads, old pony doesn't learn new tricks, just stuffs it all into Excel and meditates about it ....
- M1ckran
- Well Established Forum Member
- Posts: 762
- Joined: Mon Mar 17, 2008 2:40 am
- Location: Cheshire, England
Re: Help needed with Track Rules
I'm not sure whether you've solved the problem or not, but I'm ussuming that it's still there even though the xml files have been cleared of blame.
It's occurred to me that, when I was poking around with track files and track rules, I noticed that *.Xsec and *.GeoPcDx files also contain references to graphics files. For example, the IOWtrack01cap.Xsec file references iowballast_junction and iowrail_junction, and the IOWtracksleeper01.GeoPcDx file references iowsleeper.
You might have created your own graphics files to replace the IOW items but if you're useing the IOW Xsec and GeoPcDx files, they'll still be looking for the original IOW versions. I'm not entirely sure what these files do, but RS_Tools can be used to replace the "iow" references with your own.
With a little luck, this could be a backdoor. Fingers crossed.
Michael
It's occurred to me that, when I was poking around with track files and track rules, I noticed that *.Xsec and *.GeoPcDx files also contain references to graphics files. For example, the IOWtrack01cap.Xsec file references iowballast_junction and iowrail_junction, and the IOWtracksleeper01.GeoPcDx file references iowsleeper.
You might have created your own graphics files to replace the IOW items but if you're useing the IOW Xsec and GeoPcDx files, they'll still be looking for the original IOW versions. I'm not entirely sure what these files do, but RS_Tools can be used to replace the "iow" references with your own.
With a little luck, this could be a backdoor. Fingers crossed.
Michael
-
npcleary
- Been on the forums for a while
- Posts: 193
- Joined: Mon Feb 11, 2008 6:40 pm
- Location: Forest of Dean
Re: Help needed with Track Rules
Thanks again for your input Andi, at least I know about pivot tables now!AndiS wrote:Interesting. I have no idea what Mike checks, he might know something that I do not.
Glad you got it working in the end, yes, I use Office 2003, and not in English, so I had to guess the text in the user interface for you.
I ought to check for new version of the RS_tools more frequently, did not know that Mike had already included that function. Sounds easier to use than my approach. But you know those old stone heads, old pony doesn't learn new tricks, just stuffs it all into Excel and meditates about it ....
Hi Michael, yes the problem is still there. It's definitely not a reskin graphics issue as I have not touched the IoW assets. Problem still seems to lie with the track rule though as when I check the route in Mike Simpsons RSTMB the "list of shapes" includes the line " C:\Program Files\Rail Simulator\Assets\RSDL\IslandLine\railnetwork\trackrules\island line track rule.bin". From the work I've done so far it must be referenced in the individual tile .bin files somewhere... BTW I've also got references to trackrules\oxfo_padd_electrictr.bin and trackrules\sieg_hage_main.bin which I can't find either....M1ckran wrote:I'm not sure whether you've solved the problem or not, but I'm ussuming that it's still there even though the xml files have been cleared of blame.
It's occurred to me that, when I was poking around with track files and track rules, I noticed that *.Xsec and *.GeoPcDx files also contain references to graphics files. For example, the IOWtrack01cap.Xsec file references iowballast_junction and iowrail_junction, and the IOWtracksleeper01.GeoPcDx file references iowsleeper.
You might have created your own graphics files to replace the IOW items but if you're useing the IOW Xsec and GeoPcDx files, they'll still be looking for the original IOW versions. I'm not entirely sure what these files do, but RS_Tools can be used to replace the "iow" references with your own.
With a little luck, this could be a backdoor. Fingers crossed.
Michael
- M1ckran
- Well Established Forum Member
- Posts: 762
- Joined: Mon Mar 17, 2008 2:40 am
- Location: Cheshire, England
Re: Help needed with Track Rules
Very strange. I know RS_Tools can point to a narrow-gauge trackrule when it's not included in the route (it's happened to me and I ignored it) but not other trackrules like this.
It's just possible that it could be a program bug in RS_Tools, and your work is perfect. I wouldn't know how you could check this, other than a new installation of RS followed by your route. Perhaps you could try it on a different computer that's not already had RS installed? Seems a bit drastic, though.
Michael
It's just possible that it could be a program bug in RS_Tools, and your work is perfect. I wouldn't know how you could check this, other than a new installation of RS followed by your route. Perhaps you could try it on a different computer that's not already had RS installed? Seems a bit drastic, though.
Michael
