Enabling AWS Sounds Externally

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

Moderator: Moderators

User avatar
JustRight
Well Established Forum Member
Posts: 725
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Enabling AWS Sounds Externally

Post by JustRight »

Hi All,

Recently, in my thread on the Class 20 Advanced, I was asked if it was possible to add the ability to have the AWS Horn and Bell play externally on any loco.

I thought this was a good idea and have had a look into it. It would appear to be a FAR simpler operation than I imagined. The only drawback is that unlike the excellent Just Trains style implementation, there is no way to switch off the sounds. Once the change is made it will remain in effect until you remove it. I have tried this now on a few of my loco's for which I have Armstrong Powerhouse Sound Packs, and they all work fine, playing the AWS Horn and Bell externally.

So, what to do.

First, I want you to create a shortcut on your desktop to SERZ.EXE in your Railworks directory. You can name the shortcut something like "SERZ - XML to BIN to XML Converter" and link it to SERZ.EXE in your Railworks folder.

Make sure the shortcut is visible on the desktop when you have Windows Explorer open.

Now, navigate to your Railworks/Assets directory and select the loco you want to modify. Select the "Cab" directory within the "RailVehicles" directory within the "Audio" directory. For this example I am using the Armstrong Powerhouse Class 40 (PRO) Sound Pack.
The path is "RailWorks\Assets\AP\C40P\Audio\RailVehicles\Cab"

Take a copy of the two Cab Audio files "Class 40 Cab.proxybin" and "Class 40 Cab.proxyxml". Rename these as you like, they will be the original backups. Note that the files names will vary depending on the loco you are changing. The names I have used here are just samples.

Now using your favourite text or XML editor, I use 'Notepad++', open the proxyxml file.

Search the code for code segments like the following. You are looking for the "Loop" reference for the AWS Horn, and the "OneShot" reference for the AWS Bell. In some loco's these may be called 'AWS Warn' and 'AWS Clear' etc.
The following samples are from "Class 40 Cab.proxyxml"

Code: Select all

				<kLoud-cControlledLoop d:id="71398368">
					<PlayState d:type="cDeltaString">INSIDE</PlayState>
					<Name d:type="cDeltaString">AWS Horn</Name>
					<Sound d:type="ref">56724120</Sound>
					<ModifierChain d:type="ref">0</ModifierChain>
					<ControllerName d:type="cDeltaString">AWSWarnCount</ControllerName>
					<LoopCondition d:type="cDeltaString">ValueInRange</LoopCondition>
					<ActiveRangeStartValue d:type="sFloat32">0.100000</ActiveRangeStartValue>
					<ActiveRangeEndValue d:type="sFloat32">1.000000</ActiveRangeEndValue>
					<ValueIsChangingGateTime d:type="sFloat32">0.000000</ValueIsChangingGateTime>
					<InstanceGroup d:type="ref">0</InstanceGroup>
				</kLoud-cControlledLoop>

Code: Select all

				<kLoud-cTriggeredOneshot d:id="71998816">
					<PlayState d:type="cDeltaString">INSIDE</PlayState>
					<Name d:type="cDeltaString">AWS Bell</Name>
					<Sound d:type="ref">56785904</Sound>
					<ModifierChain d:type="ref">0</ModifierChain>
					<ControllerName d:type="cDeltaString">AWSClearCount</ControllerName>
					<TriggerType d:type="cDeltaString">ValueIsChanging</TriggerType>
					<TriggerValue d:type="sFloat32">0.000000</TriggerValue>
					<ValueIsChangingGateTime d:type="sFloat32">0.000000</ValueIsChangingGateTime>
					<InstanceGroup d:type="ref">0</InstanceGroup>
				</kLoud-cTriggeredOneshot>
These are the code segments that play the AWS sounds. Note that the 'PlayState' element has a value of >INSIDE<

For both of these code segments, or just the AWS Horn if you only want to hear that one externally, change the value >INSIDE< to be >BOTH<
We are telling the sim to play the sound when the player is both INSIDE and OUTSIDE of the Cab.
Be VERY careful not to introduce extraneous characters into the code. Simply change the word INSIDE to read BOTH

Now save the modified proxyxml file.

Finally, drag the modified proxyxml file and drop it on to the shortcut you created to SERZ.EXE. This will recreate the associated proxybin file.
If you have any trouble running SERZ.EXE, or the proxybin file does not get recreated. You may need to edit the shortcut and set the 'Compatibility' option for 'Run this program as Administrator'. This may be particularly true if you have Steam installed under the Windows default 'Program Files' or 'Program Files x(86)' directories. I suspect this will only apply to Windows 7 and 8 users. I am using Windows 8.1 myself.

Clear the Cache in the sim and away you go :D

Note that this should work for any loco, AP Sounds or otherwise. As long as you can find the proxyxml file that contains the code that plays the AWS sounds, this should work.

If it all goes pear shaped, then simply delete the proxyxml and proxybin files that you modified and rename the copies back to their correct names.

No guarantees of course, but this has worked for me on each loco I have tried so far.
Enjoy
danwatto
Getting the hang of things now
Posts: 63
Joined: Wed Dec 21, 2011 5:59 am

Re: Enabling AWS Sounds Externally

Post by danwatto »

Great, thanks!

I'm going to try this... no time at the moment but will definitely give it a go. Hopefully I can enable this for all my favourites, then leave the rest as AI only trains.

Cheers
User avatar
mikesimpson
Very Active Forum Member
Posts: 6361
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Enabling AWS Sounds Externally

Post by mikesimpson »

To simplify the above, I think you will find that unlike the .bin files, the .proxybin files are never used in TS2014. So editing the .proxyxml file is all you need to do.

You can check this by removing the .proxybin files from one of the Audio folders and testing the loco, you will find the sounds are still OK.

This has been the case since the original RailSimulator.

Mike
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
User avatar
JustRight
Well Established Forum Member
Posts: 725
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Re: Enabling AWS Sounds Externally

Post by JustRight »

mikesimpson wrote:To simplify the above, I think you will find that unlike the .bin files, the .proxybin files are never used in TS2014. So editing the .proxyxml file is all you need to do.

You can check this by removing the .proxybin files from one of the Audio folders and testing the loco, you will find the sounds are still OK.

This has been the case since the original RailSimulator.

Mike
Really? Well there you go, I had presumed that because they were there, that they would be required.

Thanks for the tip Mike,
Trevor
User avatar
Carinthia
Very Active Forum Member
Posts: 1123
Joined: Tue Mar 06, 2012 7:07 pm
Location: at the end of the regulator

Re: Enabling AWS Sounds Externally

Post by Carinthia »

JustRight wrote:I thought this was a good idea and have had a look into it. It would appear to be a FAR simpler operation than I imagined.
May I ask if you have tried this on a steam locomotive?

I tried this a long while back with no success but have had a fresh try following your guidelines. I have made these changes on the DT 4MT 2-6-4T and something from a developer I mustn't name but had no success with either.

I can't for the life of me think why, but could there possibly be a further setting peculiar to steam engines that requires editing? I know that it can be (and has been) done as I have read the Railsimulator.com A4 is so designed but I don't have that model to make comparison with.

John
deltic009
Very Active Forum Member
Posts: 4017
Joined: Fri Nov 27, 2009 1:06 am

Re: Enabling AWS Sounds Externally

Post by deltic009 »

Carinthia wrote:
JustRight wrote:I thought this was a good idea and have had a look into it. It would appear to be a FAR simpler operation than I imagined.
May I ask if you have tried this on a steam locomotive?

I tried this a long while back with no success but have had a fresh try following your guidelines. I have made these changes on the DT 4MT 2-6-4T and something from a developer I mustn't name but had no success with either.

I can't for the life of me think why, but could there possibly be a further setting peculiar to steam engines that requires editing? I know that it can be (and has been) done as I have read the Railsimulator.com A4 is so designed but I don't have that model to make comparison with.

John
The most obvious first question is do these steam locos have AWS in the cab as standard? I believe this guide is tailored to extending such a feature to the outside views. Adding AWS as a feature from scratch to a loco without it is an entirely different matter.
Matthew Wilson, development team at Vulcan Productions

http://www.vulcanproductions.co.uk
https://www.facebook.com/VulcanFoundry/
User avatar
Carinthia
Very Active Forum Member
Posts: 1123
Joined: Tue Mar 06, 2012 7:07 pm
Location: at the end of the regulator

Re: Enabling AWS Sounds Externally

Post by Carinthia »

deltic009 wrote:The most obvious first question is do these steam locos have AWS in the cab as standard? I believe this guide is tailored to extending such a feature to the outside views. Adding AWS as a feature from scratch to a loco without it is an entirely different matter.
Yes indeed. I wouldn't otherwise be trying to modify them!

We had probably best focus on the DT 4MT 2-6-4T as there are complications with the other one.

John
danwatto
Getting the hang of things now
Posts: 63
Joined: Wed Dec 21, 2011 5:59 am

Re: Enabling AWS Sounds Externally

Post by danwatto »

Hi John

Steam locos it is most important of all to hear the AWS with head out as it is very hard to drive otherwise when you can't see!

I had success with some of these, changed the flying scotsman recently.

What you need to do is copy the entries that you change above in the cab folder xml to also add into the normal sound xml for that loco. Then they will be picked up externally.

Sorry I can't post exact details I'm in Hawaii and no computer allowed is the rule from the girlfriend ;)
User avatar
JustRight
Well Established Forum Member
Posts: 725
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Re: Enabling AWS Sounds Externally

Post by JustRight »

Carinthia wrote:
JustRight wrote:I thought this was a good idea and have had a look into it. It would appear to be a FAR simpler operation than I imagined.
May I ask if you have tried this on a steam locomotive?

I tried this a long while back with no success but have had a fresh try following your guidelines. I have made these changes on the DT 4MT 2-6-4T and something from a developer I mustn't name but had no success with either.

I can't for the life of me think why, but could there possibly be a further setting peculiar to steam engines that requires editing? I know that it can be (and has been) done as I have read the Railsimulator.com A4 is so designed but I don't have that model to make comparison with.

John
Hi John,

Turns out that there was a little more to it that I first thought. One possible thing that may impact what you have tried with a Steam Loco is the 'Type' entry in the "xxxxx Cab Sound.bin" file. If the value of the 'Type' element is "Cab", then the sounds defined in the Cab proxyxml will ONLY be heard in the Cab. I found this on some Diesel Locos where the AWS sounds would not play. If you modify the 'Type' element value to be "RailVehicle" then the sounds will play externally.

The code you are looking for will look something like the following. Depending on which Loco etc you are editing.

Code: Select all

			<SoundComponent>
				<cSoundComponentBlueprint>
					<ProxyName d:type="cDeltaString">AP\C31P\Audio\RailVehicles\Class 31 Engine</ProxyName>
					<Type d:type="cDeltaString">RailVehicle</Type>
				</cSoundComponentBlueprint>
If the 'Type' element has a value of "Cab", change it to "RailVehicle" and see how you go.

I also found that it was actually better to duplicate the XML code block for the AWS Horn and Bell, leaving the original with a 'PlayState' of "INSIDE" whilst modifying the other to be "OUTSIDE". This seemed to fix an issue whereby if the AWS Horn/Bell played for the first time whilst you were outside of the Cab, when it next played inside the cab the Cab Occlusion seemed to be applied making the sound much softer than it should be.

Cheers, and good luck.

*EDIT*

I have just had a quick look at my DT 4MT, and sure enough the Cab Sound BIN file "4mt_cab_sound.bin" has a type value of 'Cab'

Code: Select all

			<SoundComponent>
				<cSoundComponentBlueprint>
					<ProxyName d:type="cDeltaString">DT\DT_4MT_loco\audio\RailVehicles\Steam\4mt\Cab\4mt_Cab</ProxyName>
					<Type d:type="cDeltaString">Cab</Type>
				</cSoundComponentBlueprint>
			</SoundComponent>
Additionally, I have also come across some Cab sound files that specify a very short activation distance in the proxyxml. This can also prevent the sounds from playing externally if your external view is outside of this distance.

For example the DT 4MT proxyxml file "4mt_Cab.proxyxml" specifies an Activation Distance of only 50 meters.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<kLoud-cProxyControlLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
	<ProxyControl>
		<cGenericAudioControl xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
			<ActivationDistance d:type="sFloat32">50.000000</ActivationDistance>
			<Sound>
Increase this value to a much higher amount. Eg: 1000 would mean you would hear the sounds inside of a 1000 meter radius. If you have a look at other Loco's versions of their Cab proxyxml files you will see a wide variation in the size of this prarmeter.

I reckon if you change the Sound Type to "RailVehicle", and increase the size of the Activation Distance it might work :D

Cheers,
Trevor
User avatar
DaveDewhurst
Very Active Forum Member
Posts: 1994
Joined: Wed Nov 28, 2007 10:21 am
Location: Birkenhead
Contact:

Re: Enabling AWS Sounds Externally

Post by DaveDewhurst »

JustRight wrote:Turns out that there was a little more to it that I first thought. One possible thing that may impact what you have tried with a Steam Loco is the 'Type' entry in the "xxxxx Cab Sound.bin" file. If the value of the 'Type' element is "Cab", then the sounds defined in the Cab proxyxml will ONLY be heard in the Cab. I found this on some Diesel Locos where the AWS sounds would not play. If you modify the 'Type' element value to be "RailVehicle" then the sounds will play externally.
WARNING

Do this with caution.
If you modify "Type" to "RailVehicle", any sound in the cab of an AI train of the type you edit will become audible as you pass it in your cab.
See the 317 by Dave Brindley (you get a click everytime you pass one) or the 4BIG/CIG/VEP by RSC for an example (the bell of all AI trains is heard in your cab)

The proper way would be to make a new blueprint to only handle your new AWS external sounds.

Dave
User avatar
JustRight
Well Established Forum Member
Posts: 725
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Re: Enabling AWS Sounds Externally

Post by JustRight »

DaveDewhurst wrote:
JustRight wrote:Turns out that there was a little more to it that I first thought. One possible thing that may impact what you have tried with a Steam Loco is the 'Type' entry in the "xxxxx Cab Sound.bin" file. If the value of the 'Type' element is "Cab", then the sounds defined in the Cab proxyxml will ONLY be heard in the Cab. I found this on some Diesel Locos where the AWS sounds would not play. If you modify the 'Type' element value to be "RailVehicle" then the sounds will play externally.
WARNING

Do this with caution.
If you modify "Type" to "RailVehicle", any sound in the cab of an AI train of the type you edit will become audible as you pass it in your cab.
See the 317 by Dave Brindley (you get a click everytime you pass one) or the 4BIG/CIG/VEP by RSC for an example (the bell of all AI trains is heard in your cab)

The proper way would be to make a new blueprint to only handle your new AWS external sounds.

Dave
Thanks for the tip Dave. I wondered about something like that :(

Interestingly, the use of the 'Cab' and 'RailVehicle' sound type seems very inconsistent on many Cab blueprints. Some are set to 'Cab', but many others are set to 'RailVehicle' by default. Still something to keep in mind and watch out for.

I will have to go back and re-evaluate some of the locos I have modified to see if this becomes a problem.

Thanks again,
Trevor
User avatar
Carinthia
Very Active Forum Member
Posts: 1123
Joined: Tue Mar 06, 2012 7:07 pm
Location: at the end of the regulator

Re: Enabling AWS Sounds Externally

Post by Carinthia »

Many thanks, all.

Having just got in from a non-virtual day out (!) now isn't the time to start experimenting but I will certainly have a look at this when a chance presents itself.

Couldn't agree more with danwatto - this is definitely worth getting to the bottom of.

J
User avatar
JustRight
Well Established Forum Member
Posts: 725
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Re: Enabling AWS Sounds Externally

Post by JustRight »

Further to the potential issue of Cab Sounds being heard from AI trains as you pass, I have had a look at my Class 47 Loco's. I modified the proxyxml files for the Class 47 to enable the external AWS sounds, and this worked well for the Class 47. It is worth noting as well that the Class 47 sound blueprint file "Class 47 Cab Sound.bin" already had a Sound Type of "RailVehicle" as default, as is the case with many Cab Sound blueprints.

Now, Class 47's are used a lot as AI trains and so far I have not heard a peep from them. That is to say, I have not heard the AWS sounds from a passing AI train. I wonder if the triggers for the AWSWarnCount and AWSClearCount and their associated blueprint controls only function on the designated 'Player' train, and not on the AI trains?

Anyway, so far I have modified a number of my favourite Loco's to have external AWS Sounds, and, touch wood, have not yet heard any misbehaviour from their AI run versions.

Time will tell I guess.
User avatar
Carinthia
Very Active Forum Member
Posts: 1123
Joined: Tue Mar 06, 2012 7:07 pm
Location: at the end of the regulator

Re: Enabling AWS Sounds Externally

Post by Carinthia »

JustRight wrote:Further to the potential issue of Cab Sounds being heard from AI trains as you pass, I have had a look at my Class 47 Loco's. I modified the proxyxml files for the Class 47 to enable the external AWS sounds, and this worked well for the Class 47. It is worth noting as well that the Class 47 sound blueprint file "Class 47 Cab Sound.bin" already had a Sound Type of "RailVehicle" as default, as is the case with many Cab Sound blueprints.

Now, Class 47's are used a lot as AI trains and so far I have not heard a peep from them. That is to say, I have not heard the AWS sounds from a passing AI train. I wonder if the triggers for the AWSWarnCount and AWSClearCount and their associated blueprint controls only function on the designated 'Player' train, and not on the AI trains?

Anyway, so far I have modified a number of my favourite Loco's to have external AWS Sounds, and, touch wood, have not yet heard any misbehaviour from their AI run versions.

Time will tell I guess.
I was thinking along the same lines - for instance will we hear a the fireman stoking a steam locomotive when we pass it? My concern isn't hugely about hearing background sounds of this nature but whether the need to load additional sounds will take its toll on resources in a complex scenario.

I'm certainly not concerned about hearing the AWS at a quarter of a mile away (500 meters is more than that, surely?) and the lower that figure, the less distraction there should be from hearing the AWS of other trains. You really only need to hear the AWS in "head out" position, which can surely only be a few meters from the designated source point.

It would be interesting to see how Railsimulator.com actually did it with the A4 and maybe others which I don't have and the coming Castle) which I will most certainly be purchasing) which I gather will have similar features.

I will come clean with my personal interest here. I have a steam-era main line route which feels dangerously near to completion. In the 1960s, there would have been a certain amount of AWS in semaphore areas and if there was an easy way to fix locomotives I would provide it for realism's sake, but if it is a difficult conversion I would rather release the route without AWS to make it usable for all. My dream is that one day somebody would develop a little utility that could be used to make such a conversion but unfortunately my dreams frequently consist of snorting pink animals with wings . . .

John
User avatar
JustRight
Well Established Forum Member
Posts: 725
Joined: Mon Nov 21, 2011 7:06 am
Location: Adelaide, South Australia

Re: Enabling AWS Sounds Externally

Post by JustRight »

Hi John,

Out of curiosity I have just modified my own DT 4MT. I started with the DT 4MT BR 'Standard' loco which lives in the "Assets/DT/DT_4MT_loco" directory.

I can confirm that applying my changes does make the AWS Bell and Horn audible from outside the Cab. Both the 'Outside' and 'Head Out' views seem to work OK. I have not as yet heard any instances of those sounds playing from passing AI trains.

So, it does work. The only caveat being the possibility of the AWS sounds being audible from passing AI trains, which as yet I have not encountered.

Give it a go, you may be pleasantly surprised.

Cheers,
Trevor
Locked

Return to “[TS] General Discussion”