Archived

This topic is now archived and is closed to further replies.

Heffron

Need some help with DSD XML Sound3

Recommended Posts

Hi guys,

 

have been busy for 5 hours now with searching the Forums, Internet and so on.

What I am trying to do is to assign the sound of the Autodeployment of Armed Spoilers (in Boeing Aircraft that is) when the main gear touches the ground through the dsd_xml_gauge3 by Doug Dawson. I am trying to implement this in the CLS 747-200.

 

I created a folder called "Spoiler" in the FS9/Aircraft/CLS_B747-200F_PW/Panel folder which contains the dsd_xml_sound3.gau file, sound.ini, spoilersound.xml and autospoiler.wav.

 

the sound.ini looks as follows:

[Config]MaxSounds=11
LvarStop=dsd_stop_sounds
VolumeVar=dsd_xml_sound_volume
[LVars]Lvar00=spoilersound
[sounds]Sound00=./Aircraft/CLS_B747-200F_PW/Panel/spoiler/autospoiler.wav, 100

 

the spoilersound.xml looks as follows:

<Gauge Name="spoilersound" Version="1.0">
<Element>
<Select>
<Value>
(A:SIM ON GROUND,BOOL)
>andif{ (A:SPOILERS HANDLE POSITION,percent) 40 >  andif{ (A:SPOILERS ARMED,Bool) }
>if{ 1 (>L:spoilersound, number) }
>else{ 0 (>L:spoilersound, number) }
></Value>
></Select>
></Gauge>

 

and in the panel.cfg i added these entries in Window00 and in VirtualCockpit00:

 

gauge72=spoiler!spoilersound, 1,1,2,2
gauge73=dsd_xml_sound3!dsd_xml_sound3, 2,2,5,5,./Aircraft/CLS_B747200F_PW/Panel/spoiler/sound.ini

 

What I am trying to accomplish is that the sound is played whenever the Aircraft touches the tarmac, the spoilers were armed before touchdown. If you guys want to know what sound i mean, it can be heard in this clip at 0:14 : [media=]http://www.youtube.com/watch?v=EwCp68i7nRw[/media]

 

Thanks in advance,

 

Harm

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Normally, all gauges must either be in the sim's ..\Gauges folder, or the aircraft's ..\panel folder. Otherwise, the sim won't know where they are!

 

You can try adding the sub-folder path to the gauge entries like this:

 

gauge72=spoiler\spoiler!spoilersound, 1,1,2,2
gauge73=spoiler\dsd_xml_sound3!dsd_xml_sound3, 2,2,5,5,./Aircraft/CLS_B747200F_PW/Panel/spoiler/sound.ini

Share this post


Link to post
Share on other sites

Hi Bill,

 

i had some entries from an old post here on the forums. Seems that some of the slashes disappeared. I will try this out. How about the XML? Does it look alright? It's my first time working with XML.

 

Thanks!

Share this post


Link to post
Share on other sites

Adding the "spoiler\" to my gauge entries didn't work. Can it be the XML-code?

Share this post


Link to post
Share on other sites

Adding the "spoiler\" to my gauge entries didn't work. Can it be the XML-code?

 

The xml code is completely whacked. The forum software seems to have lost a number of carriage return characters.

Jan's code, in the other thread, looks quite reasonable to me:

 

(A:sim on ground,bool)  (A:Spoilers handle position,percent) 40 > and
if{ 
(L:spoiler,number) 0 ==
if{ 
1 (>L:spoiler,number) 1 (>L:spoiler sound,number) 
} 
}
els{ 
0 (>L:spoiler,number) 
}

Share this post


Link to post
Share on other sites

And I place this on the periods in the code?

<Gauge Name="spoilersound" Version="1.0"><Element><Select><Value>  .....     </Element></Select></Value>

 

What about the "spoiler sound" and "spoiler" parts, they need to be replaced by the WAV's name I want to be played? So that would be

(>L:autospoiler,number)

 

I will try this!

 

Thanks

Share this post


Link to post
Share on other sites

The xml code is completely whacked. The forum software seems to have lost a number of carriage return characters.

 

Doug, I've noticed that the new forum software's editor really isn't "XML or C code friendly" at all. It seems to work best if you copy the script, then click on the <> icon, then paste the script into the popup box...

 

...otherwise it will translate color information into raw BB Code, which totally fubars the end result.

 

And I place this on the periods in the code?

 

Noooo!

 

Try this:

<Gauge Name="spoilersound" Version="1.0">
 <Element>
<Select>
  <Value>
	(A:sim on ground,bool)  (A:Spoilers handle position,percent) 40 > and
	if{ (L:spoiler,number) 0 ==
	  if{ 1 (>L:spoiler,number) 1 (>L:spoiler sound,number)
	  }
	}
	els{ 0 (>L:spoiler,number) }
  </Value>
</Select>
 </Element>
</Gauge>

Share this post


Link to post
Share on other sites

So it should look like this? (The desired .wav-file is called "autospoiler.wav")

 

<Gauge Name="spoilersound" Version="1.0">
 <Element>
    <Select>
	  <Value>
		    (A:sim on ground,bool)  (A:Spoilers handle position,percent) 40 > and
		    if{ (L:spoiler,number) 0 ==
			  if{ 1 (>L:autospoiler,number) 1 (>L:autospoiler,number)
			  }
		    }
		    els{ 0 (>L:autospoiler,number) }
	  </Value>
    </Select>
 </Element>
</Gauge>

Share this post


Link to post
Share on other sites

The name of the wav file has nothing to do with the XML code - the file name is specified in the ini file. Change it back...

Share this post


Link to post
Share on other sites

So it should look like this? (The desired .wav-file is called "autospoiler.wav")

 

<Gauge Name="spoilersound" Version="1.0">
 <Element>
	<Select>
	  <Value>
			(A:sim on ground,bool)  (A:Spoilers handle position,percent) 40 > and
			if{ (L:spoiler,number) 0 ==
			  if{ 1 (>L:autospoiler,number) 1 (>L:autospoiler,number)
			  }
			}
			els{ 0 (>L:autospoiler,number) }
	  </Value>
	</Select>
 </Element>
</Gauge>

 

Ah ok, wow. Where did i read that then :P Thanks Tom, will give it a shot ;)

 

Thanks!

Share this post


Link to post
Share on other sites

Hi guys,

 

still no succes.

 

This is how things are now:

 

I have a folder called "spoiler" in FS9/Aircraft/CLS_B747_200F_PW/Panel/

The folder contains: autospoiler.wav, sound.ini, spoilersound.xml and dsd_xml_sound3.gau

 

sound.ini:

[Config]
MaxSounds=11
ErrorFlag=0
LvarStop=SoundStop
[sounds]
Sound00=./Aircraft/CLS_B747_200F_PW/Panel/spoiler/autospoiler.wav
[LVars]Lvar00=spoiler sound

 

spoilersound.xml:

<Gauge Name="spoilersound" Version="1.0">
 <Element>
    <Select>
	  <Value>
		    (A:sim on ground,bool)  (A:Spoilers handle position,percent) 40 > and
		    if{ (L:spoiler,number) 0 ==
			  if{ 1 (>L:spoiler,number) 1 (>L:spoiler sound,number)
			  }
		    }
		    els{ 0 (>L:spoiler,number) }
	  </Value>
    </Select>
 </Element>
</Gauge>

 

panel.cfg entries:

 

gauge72=spoiler!spoilersound, 0,0
gauge73=dsd_xml_sound3!dsd_xml_sound3, 2,2,5,5,./Aircraft/CLS_B747_200F_PW/Panel/Spoiler/sound.ini

 

Still, when on approach, Autobrake set, spoilers armed, the spoilers autodeploy on touchdown but no sound is played.

Could it be the CLS addon? As far as i know it pretty much still uses default FS parameters for spoilers and such.

 

Thanks in advance.

Share this post


Link to post
Share on other sites

Hey guys,

 

i'm out of town for a few days. Maybe you can look at my previous post and let me know what could be wrong. I will read it when i'm back.

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Sound.cfg looks wrong to me.

L:var=spoiler sound and .wav=autospoiler.

Rename autospoiler.wav to spoiler sound.wav and see if it works now.

For me it does.

 

Share this post


Link to post
Share on other sites