Just Trains AP Track Patch

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

User avatar
smarty2
Very Active Forum Member
Posts: 9976
Joined: Sun Aug 21, 2005 8:16 am
Location: 1963, at Snow Hill!
Contact:

Re: Just Trains AP Track Patch

Post by smarty2 »

Yeah, I would always go for tried and tested first rather than not, jury still out on that venture.
Best Regards
Martin (smarty2)
Non technically minded individual!

Is There A God?
Dudley Bible web page
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Just Trains AP Track Patch

Post by gptech »

You can still use the AP track by going about things "ye olde way" (a better way in my opinion) simply by giving the AP track it's own .bin file, with a suitable descriptive name field, and editing the Tracks.bin file to suit. Easier to do than explain but I'm at work so can't provide pictures or examples of the .bin files. Last shift today though, so I'll tohhrow something together Monday or so if you want.
User avatar
457trains
Been on the forums for a while
Posts: 185
Joined: Wed Jun 14, 2017 4:12 pm

Re: Just Trains AP Track Patch

Post by 457trains »

gptech wrote:You can still use the AP track by going about things "ye olde way" (a better way in my opinion) simply by giving the AP track it's own .bin file, with a suitable descriptive name field, and editing the Tracks.bin file to suit. Easier to do than explain but I'm at work so can't provide pictures or examples of the .bin files. Last shift today though, so I'll tohhrow something together Monday or so if you want.
That would be excellent and thank you. Some of us are new to this and feeling our way (in my case, very slowly and very badly) so any help would be most welcome.
Unashamed Heavy Metal/Progressive Rock/Goth Symphonic Metal fan.

Current earworm: Playing For Change - The Weight - Love this idea.

https://www.youtube.com/watch?v=ph1GU1qQ1zQ
brysonman46
Very Active Forum Member
Posts: 2047
Joined: Sun Jul 21, 2013 10:30 am
Location: Larbert Central Scotland

Re: Just Trains AP Track Patch

Post by brysonman46 »

457trains wrote: Is that how it's done! I've just spent two weeks swapping out a donor route's default track for WHL bullhead. To be fair, it was my first attempt at editing a route so I'm still on the learning curve but laborious? Tell me about it. The result was successful so I figured I was on the right track (no pun intended) but I wish I'd known there was an easier way.

As it happens, I've had to uninstall this patch (read reinstall the original routes to overwrite it) as I've had some Access Violations and straight refusals to load routes at certain points. As this has only been happening since the patch installation and has now disappeared, I can only assume a link. But the cause? Beats me. Pity. It did look good.
It would have taken about 10 minutes using RWTools (see http://www.agenetools.com/tutorials.html Replacing Track 2)
User avatar
457trains
Been on the forums for a while
Posts: 185
Joined: Wed Jun 14, 2017 4:12 pm

Re: Just Trains AP Track Patch

Post by 457trains »

brysonman46 wrote:It would have taken about 10 minutes using RWTools (see http://www.agenetools.com/tutorials.html Replacing Track 2)
There, you see? I didn't even know this page existed, and it's quite clear it contains a lot of useful how-to info for people like me who want to make changes to a route. Is this pinned somewhere on the forum? And if not, shouldn't it be?

Many, many thanks.
Unashamed Heavy Metal/Progressive Rock/Goth Symphonic Metal fan.

Current earworm: Playing For Change - The Weight - Love this idea.

https://www.youtube.com/watch?v=ph1GU1qQ1zQ
brysonman46
Very Active Forum Member
Posts: 2047
Joined: Sun Jul 21, 2013 10:30 am
Location: Larbert Central Scotland

Re: Just Trains AP Track Patch

Post by brysonman46 »

457trains wrote:
brysonman46 wrote:It would have taken about 10 minutes using RWTools (see http://www.agenetools.com/tutorials.html Replacing Track 2)
There, you see? I didn't even know this page existed, and it's quite clear it contains a lot of useful how-to info for people like me who want to make changes to a route. Is this pinned somewhere on the forum? And if not, shouldn't it be?

Many, many thanks.
Probably find it in the dedicated Forum Name "RW Tools" , which is next to the bottom of the list (above UKTS Freeware Packs)

There are also some instructions on how to do it in one of the Topics "Changing Track"
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Just Trains AP Track Patch

Post by gptech »

457trains wrote:Some of us are new to this and feeling our way (in my case, very slowly and very badly)
That's how everybody starts off, and no matter how much we all *improve* there's still loads of stuff of learn! :o
457trains wrote: I didn't even know this page existed, and it's quite clear it contains a lot of useful how-to info for people like me who want to make changes to a route
RW Tools is invaluable in that respect (as well as many others) so grab a copy of it ASAP.

Life is much easier if you have some understanding of how the game works so to start expanding that nutshell I mentioned earlier.....

The track a route uses is referenced in the route's Track.bin file, but this referenced file is not the asset we see on screen but merely a link to another .bin file that determines that.
Confused?...yeah, it can be confusing and tracking many things in the game can be a bit of a paper chase but once you "get yer 'ed round how it all hangs together" it becomes a pretty simple sequence of files.

I only have the AP track used in WCML-N to work with, so that's the track/route I'll have to use for this.

The track's references in the Tracks.bin file are in this kind of format:

Code: Select all

												<iBlueprintLibrary-cAbsoluteBlueprintID>
													<BlueprintSetID>
														<iBlueprintLibrary-cBlueprintSetID>
															<Provider d:type="cDeltaString">keithmross</Provider>
															<Product d:type="cDeltaString">WCMLNorth</Product>
														</iBlueprintLibrary-cBlueprintSetID>
													</BlueprintSetID>
													<BlueprintID d:type="cDeltaString">RailNetwork\Track\WCML_track01.xml</BlueprintID>
												</iBlueprintLibrary-cAbsoluteBlueprintID>
If we look at the referenced WCML_track01.bin file (it's reported as .xml in RW Tools but read that as .bin) we find that that file tells the game to use the track shape file (.xsec) like this:

Code: Select all

				<cSectionRenderBlueprint>
					<CrossSectionID d:type="cDeltaString">keithmross\WCMLNorth\RailNetwork\Track\WCML_track01</CrossSectionID>
The .xsec file is the one that determines which textures are wrapped around that shape model.

When these files are read the game displays:

Image


The WCML_track01.bin file is the file the AP pack replaces, pointing instead to the AP track:

Code: Select all

				<cSectionRenderBlueprint>
					<CrossSectionID d:type="cDeltaString">AP\TrackEP\Track\Concrete1\Concrete1</CrossSectionID>
which then gives:

Image

Whilst this is a very easy and elegant way of changing track it does affect any route using that WCML-N track--OK, that may be desirable but that choice of which track to use has been taken from you. Also consider that if anybody is building a new route and wants to use AP track they have to enable the Provider/Product for an *enhanced* route, whether any other assets from that route are used or not.
Giving the AP track it's own .bin file to make it available as a track type in it's own right is very simple---simply putting the WCML_track01.bin file in the ..\Assets\AP\TrackEP\Track\Concrete1 folder, renaming it to AP_Concrete1_Track.bin (as it's not unique to WCML-N) and then editing it to have it's own descriptive name thus:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<cBlueprintLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
	<Blueprint>
		<cTrackSectionBlueprint>
			<DisplayName>
				<Localisation-cUserLocalisedString>
					<English d:type="cDeltaString">AP Track Concrete 1</English>
makes it available in the editor, as long as the P/P boxes AP/TrackEP are ticked of course.

You now can have....

Image

That of course doesn't change the track used in the route, but that's not a hard job to do.

As outlined earlier, the track is referenced in Tracks.bin so to swap the default WCML-N track used in:

Image

it's just a matter of changing every reference of keithmross\WCMLNorth\RailNetwork\Track\WCML_track01 to the AP track. Hell of a job doing that track section by section but thankfully it's something that can be done in one hit.

Open the Tracks.bin file in RW Tools and use the "Search and Replace" routine. Click on Search and Replace in the menu bar, then on Find. In the top pane of the little window that appears you'd paste a previously copied section of the reference to the file that points to the default track:

Code: Select all

												<iBlueprintLibrary-cAbsoluteBlueprintID>
													<BlueprintSetID>
														<iBlueprintLibrary-cBlueprintSetID>
															<Provider d:type="cDeltaString">keithmross</Provider>
															<Product d:type="cDeltaString">WCMLNorth</Product>
														</iBlueprintLibrary-cBlueprintSetID>
													</BlueprintSetID>
													<BlueprintID d:type="cDeltaString">RailNetwork\Track\WCML_track01.xml</BlueprintID>
												</iBlueprintLibrary-cAbsoluteBlueprintID>
In the lower pane goes the reference you want to change it to:

Code: Select all

												<iBlueprintLibrary-cAbsoluteBlueprintID>
													<BlueprintSetID>
														<iBlueprintLibrary-cBlueprintSetID>
															<Provider d:type="cDeltaString">AP</Provider>
															<Product d:type="cDeltaString">TrackEP</Product>
														</iBlueprintLibrary-cBlueprintSetID>
													</BlueprintSetID>
													<BlueprintID d:type="cDeltaString">Track\Concrete1\AP_Concrete1_Track.xml</BlueprintID>
												</iBlueprintLibrary-cAbsoluteBlueprintID>
Click on "Replace All" and RW Tools goes through the file changing every instance of that section.
As this function will replace every instance it finds of the text string it's pointed at it's important that you make the search string unambiguous---use enough (too much is better than not enough) of the surrounding text to ensure that only the track ribbon sections are changed.
Save the file, and you'll get:

Image

Adding that track type to the routes TrackRules file is the icing on the cake; then you'd be able to select sections in the World Editor and changes the properties (if required) in game. Handy if you then decide to use a variant with rusty rails for example.

The Track rule defines which track types are automatically made available when that rule is used:

Code: Select all

				<iBlueprintLibrary-cAbsoluteBlueprintID d:id="56091056">
					<BlueprintSetID>
						<iBlueprintLibrary-cBlueprintSetID>
							<Provider d:type="cDeltaString">keithmross</Provider>
							<Product d:type="cDeltaString">WCMLNorth</Product>
						</iBlueprintLibrary-cBlueprintSetID>
					</BlueprintSetID>
					<BlueprintID d:type="cDeltaString">RailNetwork\Track\WCML_track01.xml</BlueprintID>
				</iBlueprintLibrary-cAbsoluteBlueprintID>
Simply copying that section, pasting it in the list of track types (doesn't matter where but it's easier at the start or the end rather than in the middle) and editing it to point to the AP track:

Code: Select all

				<iBlueprintLibrary-cAbsoluteBlueprintID d:id="66666666">
					<BlueprintSetID>
						<iBlueprintLibrary-cBlueprintSetID>
							<Provider d:type="cDeltaString">AP</Provider>
							<Product d:type="cDeltaString">TrackEP</Product>
						</iBlueprintLibrary-cBlueprintSetID>
					</BlueprintSetID>
					<BlueprintID d:type="cDeltaString">Track\Concrete1\AP_Concrete1_Track.xml</BlueprintID>
				</iBlueprintLibrary-cAbsoluteBlueprintID>
see's to that. You'll notice I've changed the ID number in the first line---this doesn't seem to matter, but we've seen many things that didn't matter that following upgrades to the game become something important; it's a sensible idea to get into the habit of changing these IDs to start with, just in case there's an issue as the game progresses.


Hope that hasn't confused things too much!!
User avatar
457trains
Been on the forums for a while
Posts: 185
Joined: Wed Jun 14, 2017 4:12 pm

Re: Just Trains AP Track Patch

Post by 457trains »

Not at all! A thorough explanation that I'm sure I won't be alone in understanding and making use of. Again, thank you for this. Unlike changing tracks, this must have taken you a while to post. :(

I have RW Tools, just no idea how to use them. I'm going to give this a try with the JT Valley Corridor route but changing the track to the DB stuff in the RWAustria folder. It works very well on the Hagen-Siegen route, and I assume that it's not lowered as the AP track is so there should be no bleed through of ground textures. Hopefully, it'll be more stable, too. :turn-l:
Unashamed Heavy Metal/Progressive Rock/Goth Symphonic Metal fan.

Current earworm: Playing For Change - The Weight - Love this idea.

https://www.youtube.com/watch?v=ph1GU1qQ1zQ
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Just Trains AP Track Patch

Post by gptech »

457trains wrote:Unlike changing tracks, this must have taken you a while to post.
From start to finish, which included searching for where I'd *hidden* the files that Kevin sent me (I was only looking at putting the pinkish ballast back for him, which was unnecessary in the end as he decided to uninstall it anyway) was about an hour. I'm old, but not that old that spending an hour on anything is going to make a big difference :wink:
Posting, once all the screen shots were done and the URLs noted, was no more than 10 minutes so I haven't put myself out at all---I'm lazy, everything I do (and report on) is what can be done very easily.
457trains wrote:I have RW Tools, just no idea how to use them. I'm going to give this a try with the JT Valley Corridor route but changing the track to the DB stuff in the RWAustria folder.
As you're still "feeling your way" it may be worthwhile creating a new route as a test piece.....just lay a few hundred yards of track using the JT track, stick a junction or two in to make it interesting and play about changing things in that. When it goes 'boobs up' (unless you're lucky) simply just delete it and start again. That way you don't jeopardise a working route.

There's a huge amount of tips, hints, and tutorials for the use of RW Tools available, along with a huge number of users pretty competent in using it in here so if you hit a brick wall it wouldn't be long after posting about it that you received the answer to any problem. When you hit that 'brick wall' just ask, and wait rather than randomly flit about the options.
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Just Trains AP Track Patch

Post by gptech »

You'll notice I've changed the ID number in the first line---this doesn't seem to matter, but we've seen many things that didn't matter that following upgrades to the game become something important
Just as an aside, to illustrate how as the game has progressed those asset ID numbers come into play....

I've just played about with a reskin, using a reskin blueprint which is a simple way of assigning a different single texture to an existing livery---I'm playing about with a domino version of a class 86 so all I needed to change was the single texture to have a black plate instead of yellow.
The way we've always done this sort of thing is to copy an existing file and just change the file paths and names, but in this case the ID for the alternate texture needed also to be changed for it to be implemented. In the past this hasn't been necessary, so to rule it out as just being an inexplicable 'one-off' I've tested with 2 other items---same result, had to change the number to get the revised texture to be used.
User avatar
457trains
Been on the forums for a while
Posts: 185
Joined: Wed Jun 14, 2017 4:12 pm

Re: Just Trains AP Track Patch

Post by 457trains »

So I finally got around to trying this. And it works.
20190409205823_1.jpg
The route is the JT Valley Corridor Route with all OHLE and buildings gutted using RW Tools. No, you may not ask me what the hell I'm playing at :wink: , suffice to say that little of the original route will be left other than scenery and gradient profiles. Signals will be next to go then the track layout will be altered. After that, buildings and infrastructure more pleasing to my architectural eye will be added. I have to tell you, I'm enjoying this hugely and would recommend learning how to hack a route about to anyone. Individuality is good.

I discovered when testing that the DB Track I'm using also has a lower profile than standard so there was again some ground texture bleeding through the ballast in places - easily corrected using the RW Tools Raise/Lower Track tool. Damn useful program, that!

I have a few routes that don't alias to developers' default track and that's probably just as well: some of it is frankly pitiful. This DB stuff comes from the Hagen-Siegen V3 route available on rail-sim.de. A lot of my routes (fortunately) are now covered by the excellent AP Track Enhancement Pack, but one freeware Danish route boasts track that also really looks the part - Jylland 1960 from railworks.dk. There are a number of viable sources available to anyone who fancies carrying out an upgrade, and I again recommend trying it. But (though everyone's heard it before, I'm going to repeat it) always, always make a back-up of the route you're working on and keep backing up as you go. My first track attempt on this route crashed out big time - wouldn't even load - and I'd already ripped out all this stuff I didn't want so though reinstalling would have solved the problem, it would also have meant starting again from scratch.

Looks like I've hijacked this thread, which was supposed to be about an AP upgrade, so I'll stop here before the moderators notice. More updates when I have them.
Unashamed Heavy Metal/Progressive Rock/Goth Symphonic Metal fan.

Current earworm: Playing For Change - The Weight - Love this idea.

https://www.youtube.com/watch?v=ph1GU1qQ1zQ
Locked

Return to “[TS] General Discussion”