Page 1 of 1

File hacking: .xml vs.bin?

Posted: Wed Aug 31, 2016 12:01 pm
by ttjph
Would some kind person please remind which takes priority when there's both a .xml and .bin file?

Thank you!

Re: File hacking: .xml vs.bin?

Posted: Wed Aug 31, 2016 1:19 pm
by malkymackay
The .bin file is what is read by the game, the .xml file is generated as part of the asset export process and doesn't really need to be kept, though it won't do harm just leaving it alone.

Re: File hacking: .xml vs.bin?

Posted: Wed Aug 31, 2016 9:00 pm
by ttjph
Thanks Malky!

Now, that's a good start but unfortunately things aren't working as I expected.

Specifically, I'm trying to alter some sound volumes: the JT 20 Advanced AWS horn (which seems too quiet) and bell (which seems too loud). They appear to be referenced only in jt_20_engine_cab_audio.proxybin (and .proxyxml), but altering the BaseVolume value (default: 1) seems to do nothing.

Code: Select all

				<kLoud-cSingleSampleSound d:id="2510">
					<Name d:type="cDeltaString">AWS Warn</Name>
					<IsLooped d:type="bool">1</IsLooped>
					<Priority d:type="sUInt32">50</Priority>
					<BaseVolume d:type="sFloat32" d:alt_encoding="0000000000002440" d:precision="string">10</BaseVolume>
					<VolumeVariation d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</VolumeVariation>
					<BasePitchShift d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</BasePitchShift>
					<PitchShiftVariation d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</PitchShiftVariation>
					<AttenuationStartDist d:type="sFloat32" d:alt_encoding="0000000000F07840" d:precision="string">399</AttenuationStartDist>
					<NoFutherAttenuationDist d:type="sFloat32" d:alt_encoding="0000000000007940" d:precision="string">400</NoFutherAttenuationDist>
					<InstanceGroup d:type="ref">0</InstanceGroup>
					<Sample>
						<kLoud-cSampleID>
							<Pathname d:type="cDeltaString">JustTrains/Class20</Pathname>
							<Filename d:type="cDeltaString">JustTrains\Class20\Audio\RailVehicles\Diesel\Class20\Cab\jt_20_int_aws_warn.dav</Filename>
						</kLoud-cSampleID>
					</Sample>
				</kLoud-cSingleSampleSound>
				<kLoud-cSingleSampleSound d:id="2524">
					<Name d:type="cDeltaString">AWS Clear</Name>
					<IsLooped d:type="bool">0</IsLooped>
					<Priority d:type="sUInt32">50</Priority>
					<BaseVolume d:type="sFloat32" d:alt_encoding="000000A09999C93F" d:precision="string">0.2</BaseVolume>
					<VolumeVariation d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</VolumeVariation>
					<BasePitchShift d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</BasePitchShift>
					<PitchShiftVariation d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</PitchShiftVariation>
					<AttenuationStartDist d:type="sFloat32" d:alt_encoding="0000000000F07840" d:precision="string">399</AttenuationStartDist>
					<NoFutherAttenuationDist d:type="sFloat32" d:alt_encoding="0000000000007940" d:precision="string">400</NoFutherAttenuationDist>
					<InstanceGroup d:type="ref">0</InstanceGroup>
					<Sample>
						<kLoud-cSampleID>
							<Pathname d:type="cDeltaString">JustTrains/Class20</Pathname>
							<Filename d:type="cDeltaString">JustTrains\Class20\Audio\RailVehicles\Diesel\Class20\Cab\jt_20_int_aws_clear.dav</Filename>
						</kLoud-cSampleID>
					</Sample>
				</kLoud-cSingleSampleSound>
Can anyone offer any further pointers?

If I can make this work, then I think I can also see how to make AWS audible outside the cab for everything (it already is on the 20)...

Re: File hacking: .xml vs.bin?

Posted: Wed Aug 31, 2016 9:42 pm
by gptech
For AWS externally, have a look at this..

http://forums.uktrainsim.com/viewtopic. ... y#p1704155

springer6 followed this up in another thread about the class 91 DSD, can't find the URL but the gist of it is:
Springer6 wrote:
Just a thought on this one.

I've been trying to use the 91 again , after installing the Virgin "coke can " repaint. However I'd forgotten why I stopped using it ! That pesky DSD that you can't switch off ! A disaster when using helicopter view to admire the livery and the scenery.

Instead of trying to switch the DSD off, is there any way that the warning sound can be made to be heard outside the cab, like on some Just Trains locos. That might be easier to do than making DSD "switchable".

I may be answering my own question, but I found this:

viewtopic.php?f=361&t=137714&st=0&sk=t&sd=a&hilit=Re%3A+AWS+sounds+externally#p1704155

Has anyone tried this for the Class 91 or similar ? Note Mike Simpson's comments (3rd one down) about not bothering with the .proxybin file and only modifying the .proxyxml file.

I know it is really for the AWS sounds, but there is a similar entry for the DSD sound in the Class 91.

I might try it, to see if it works, unless of course someone with much more knowledge about these things can see a problem ?

Ok sucess ! ( I think) For anyone who is interested and want's to drive the Class 91 ( 225 set ) in outside view.

I followed JustRight's intructions given in the topic linked above. i.e. I used Notepad++ to modify the "Class 91 Cab .proxyxml " file in the Class91Addon/Audio/RailVehicles/Electric/Class91/Cab folder. After backing up the original. I also backed up the "Class91 Cab .proxybin" file, but as Mike Simpsons states, you probably don't need to modify this file.
Even so, after modding the .proxyxml file I used the serz shortcut method decribed by JustRight to create a new .proxybin file.

In modding the .proxyxml file, I searched with Notepad++ for AWS and then DSD. Whenever I found a place where ">INSIDE</PlayState>" appeared in the line above AWS and then DSD, I changed "INSIDE" to "BOTH".

Seemingly this did not work at first, but reading on in the linked topic (bottom of 9th post down by JustRight) I found that the "ActivationDistance" in the Class91 Cab .proxyxml file was set to 2 metres! So you would never hear it if outside the cab.

I changed this to 50.0 metres and , as if by magic, the DSD alarm can now be heard externally ( as long as you are within 50 metres of the cab) You can also hear the AWS alarm outside the cab , but only just, as the volume , even within the cab is quite low. I will try to increase this volume.

The MK 4 DVT cab also has these external sounds when driving, but you need to shut the last cab down fully before swapping cabs to avoid the external alarms sounding continually in the cab you left.

I haven't tried the rear "Flat" cab on the class 91 yet.

Since a 225 set is about 250 metres long, I may increase the Activation distance to 300 metres and try it. Also I have been unable yet to test the issue of possibly hearing external alarms from passing AI trains mentioned in the linked topic.

I find it much more fun to drive the 225 set in outside view when you can hear the DSD alarms. You don't have to keep pressing Q all the time and you can avoid unexpected Emergency Braking. You don't really need the external AWS sound as you have the visual alerter on the HUD and can anticipate signals/speed reductions etc.If you don't want the external AWS alarms you can just mod the DSD "INSIDE" sections of the .proxyxml file.

If you are going to try this, make sure you back up everything before you start. It hasn't broken my sim so far and if you don't like it you can revert to the original by using the backed up .proxyxml and .proxybin files.

Re: File hacking: .xml vs.bin?

Posted: Wed Aug 31, 2016 9:50 pm
by ttjph
Thanks gptech - slightly more complicated than my first assessment, but still entirely viable for favourite locos.

Interesting comment about "... not bothering with the .proxybin file and only modifying the .proxyxml file" - although I tried both for the 20 with no better luck.

Volume is my immediate interest, though.

Cheers!

Re: File hacking: .xml vs.bin?

Posted: Wed Aug 31, 2016 10:27 pm
by mikesimpson
ttjph wrote:Thanks gptech - slightly more complicated than my first assessment, but still entirely viable for favourite locos.

Interesting comment about "... not bothering with the .proxybin file and only modifying the .proxyxml file" - although I tried both for the 20 with no better luck.

Volume is my immediate interest, though.

Cheers!
Unfortunately, you asked which was used, .xml or .bin to which your were given the correct response, the .bin file. Whereas what you really wanted to know was which was used the .proxybin or .proxyxml file - For some strange reason, the .proxybin files are ignored and only the .proxyxml file is used.

Mike

Re: File hacking: .xml vs.bin?

Posted: Thu Sep 01, 2016 11:33 am
by ttjph
Thanks for the clarification, Mike!

Yes, I naively assumed that .proxyxml and .proxybin would behave in the same way as .xml and .bin... :o