PDA

View Full Version : Effect Question



Mick
April 30th, 2014, 14:30
Is there a way to place a red light on a static building object, or on a point in space that would correspond to the object's locus?

This is what I want to do. I placed a large factory to represent an actual one in my home town. It's close to my imaginary private airfield, so I want to put red warning lights on top of the smokestacks.

The building is a single static object with no textures, so I can't put the lights in the night texture files, since there aren't any texture files.

I can't add an effect like I would to an aircraft, because static objects don't have a cfg file like aircraft do.

Is there a way that I haven't thought of? Or must I just make sure I don't fly near that factory at night?

Tom Clayton
April 30th, 2014, 18:54
If I'm not mistaken, the effects SDK describes how to do that. The download addresses are still on file at MS:

http://support.microsoft.com/kb/555857

Edit: I just checked my copy, and there is a separate document that gives detailed instructions and an XML template to use with BGLcomp (also required) to place an effect in the Sim.

Motormouse
May 1st, 2014, 01:17
Easily done, but you need to be a bit of a dab hand with 'slew' mode to get the lat/long and altitude you want the effect placed at, here's a very quick how-to:

1) Download and install the effects SDK from Tom's link to start

2) Here's the basic effect code to place a red light at night (using the aircraft red nav light effect),copy and save it as a text (XXX.txt) file (name it something memorable for you) then use slew mode 'in sim' to get the numbers you require to put in where I've put the letter 'X' (note when reading the lat/long you don't put the * symbol in!) and you may need to put letter F with the altitude for 'feet' or 'M' for meters like so
alt="100F" , leave pitch, bank and heading as '0'



Basic effect code ---->






<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">

<SceneryObject lat="NXX XX.XX" lon="WXX XX.XX" alt="X" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<Effect effectName="fx_navred.fx"
effectParams="DAY=0;NIGHT=1" />
</SceneryObject>

</FSData>




3) Once you've filled in the numbers (notepad for text files editing) rename the file to XXX.xml

4) In the effects SDK folder find the folder called 'effects placement' ; within that folder is the bgl compiler, BGLC.exe, then the tricky bit, you have to drag the XXX.xml to the BGLC.exe (or you can right click the .xml and use 'open with' option then browse to BGLC.exe). All being well BGLC will then create a file XXX.bgl

5) Cut/paste (or copy/paste) your newly created XXX.BGL to your add-on scenery 'scenery' folder, start sim, select 'night' and enjoy.



To place more than one effect with only one bgl add another scenery object line like this ---->





<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd">

<SceneryObject lat="NXX XX.XX" lon="WXX XX.XX" alt="X" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<Effect effectName="fx_navred.fx"
effectParams="DAY=0;NIGHT=1" />
</SceneryObject>

<SceneryObject lat="NXX XX.XX" lon="WXX XX.XX" alt="X" pitch="0" bank="0" heading="0" altitudeIsAgl="TRUE" imageComplexity="NORMAL">
<Effect effectName="fx_navred.fx"
effectParams="DAY=0;NIGHT=1" />

</SceneryObject>

</FSData>





If you want a different light effect (there are many in fs9/effects folder to choose from); simply change the name of the effect in this section


Effect effectName="fx_navred.fx"

to, for example
Effect effectName="fx_strobe.fx"



Hope this helps, have fun
more detailed info in FSDeveloper forums --> http://www.fsdeveloper.com/forum/threads/fs2004-effect-wont-show-up-i-have-no-excludes-there.357180/#post-558850

ttfn

Pete

Sascha66
May 1st, 2014, 02:14
Hi all,

I have a similar problem, but I want to place a yellow light on a new autogen object. Have tried this, we can make the object and place it in the sim but when we add the light as an effect we get a CTD in the sim. Can someone point me in the right direction? This is the first thread which I understand on effect placement:applause::applause::applause: . I want to replace the Evo lights with a simpler object for those who have fps loss with the full version.

Cheers,
Sascha

Motormouse
May 1st, 2014, 03:03
Hi all,

I have a similar problem, but I want to place a yellow light on a new autogen object. Have tried this, we can make the object and place it in the sim but when we add the light as an effect we get a CTD in the sim. Can someone point me in the right direction? This is the first thread which I understand on effect placement:applause::applause::applause: . I want to replace the Evo lights with a simpler object for those who have fps loss with the full version.

Cheers,
Sascha

Pop over to FSDeveloper forums; there's a lot of info there; something I read recently fs9 is limited in the number of calls for effects
when the effect is built into the object, has to be written in a certain way, in this thread ----> http://www.fsdeveloper.com/forum/threads/fs2004-effect-wont-show-up-i-have-no-excludes-there.357180/

ttfn

Pete

Sascha66
May 1st, 2014, 05:53
Pop over to FSDeveloper forums; there's a lot of info there; something I read recently fs9 is limited in the number of calls for effects
when the effect is built into the object, has to be written in a certain way, in this thread ----> http://www.fsdeveloper.com/forum/threads/fs2004-effect-wont-show-up-i-have-no-excludes-there.357180/

ttfn

Pete

Thanks Pete, the threads you pointed me to seem to cover a similar problem. I'll try the recommended processes.

Cheers,
Sascha

Mick
May 1st, 2014, 06:48
Thank you !!! :ernaehrung004:

I will get on the job the next chance I get.

Tom Clayton
May 1st, 2014, 20:14
Have a read through the effects SDK document too. There's good information on how effect files are coded, which will let you modify existing effects - such as taking a simple white light and editing the color entries to make it yellow, or whatever color you like. That's the document that taught me how to "repaint" the default smoke effects nearly a decade ago.

Mick
May 2nd, 2014, 06:52
Have a read through the effects SDK document too. There's good information on how effect files are coded, which will let you modify existing effects - such as taking a simple white light and editing the color entries to make it yellow, or whatever color you like. That's the document that taught me how to "repaint" the default smoke effects nearly a decade ago.

Thanks Tom,

I was just considering having some smoke coming from those stacks.

Tom Clayton
May 2nd, 2014, 16:04
That effect is already in the stock set, two in fact - fx_SmokeStack.fx and fx_SmokeStack2.fx.