plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

SFSimsDev avatar image
SFSimsDev asked SFSimsDev commented

Reuse of existing (new MSFS style) FX

Hi,

Is there a way to re-use the existing default wake effects such as ASOBO_LANDING_FX on a SimObject without needing to create our own effects in the editor? I'm trying to add a generic wake to a boat SimObject.

I've tried:

1. Creating empty c_gear (node 7), l_gear (node 8) and r_gear (node 9) nodes on my model (just in case the visual effects references gears).

2. Adding the following in my model XML

        <Behaviors>
            <Include ModelBehaviorFile="Asobo\Common.xml"/>
            <Include ModelBehaviorFile="Asobo\Exterior.xml"/>
            <Include ModelBehaviorFile="Asobo\Generic\FX.xml"/>
            <Component ID="GEARS">
                <UseTemplate Name="ASOBO_GEAR_Center_Template">
                    <ANIM_NAME>c_gear</ANIM_NAME>
                </UseTemplate>
                <UseTemplate Name="ASOBO_GEAR_Left_Template">
                    <ANIM_NAME>l_gear</ANIM_NAME>
                </UseTemplate>
                <UseTemplate Name="ASOBO_GEAR_Right_Template">
                    <ANIM_NAME>r_gear</ANIM_NAME>
                </UseTemplate>
            </Component>
            <Component ID="LANDING_FX">
                <UseTemplate Name="ASOBO_LANDING_FX"/>
                <UseTemplate Name="ASOBO_WATER_CP_LANDING_FX">
                    <FX_CONTACT_POINT_ID>0</FX_CONTACT_POINT_ID>
                </UseTemplate>
                <UseTemplate Name="ASOBO_WATER_CP_LANDING_FX">
                    <FX_CONTACT_POINT_ID>0</FX_CONTACT_POINT_ID>
                </UseTemplate>
                <UseTemplate Name="ASOBO_WATER_CP_LANDING_FX">
                    <FX_CONTACT_POINT_ID>7</FX_CONTACT_POINT_ID>
                </UseTemplate>
                <UseTemplate Name="ASOBO_WATER_CP_LANDING_FX">
                    <FX_CONTACT_POINT_ID>8</FX_CONTACT_POINT_ID>
                </UseTemplate>
                <UseTemplate Name="ASOBO_WATER_CP_LANDING_FX">
                    <FX_CONTACT_POINT_ID>9</FX_CONTACT_POINT_ID>
                </UseTemplate>
            </Component>
        </Behaviors>

3. Adding the follwing to sim.cfg

[Effects]
wake = fx_wake
water = fx_spray ; (feet) distance from FlightSim Reference position: (1/4 chord, centerline, waterline)
dirt = fx_tchdrt
concrete = fx_sparks
touchdown = fx_tchdwn_s, 1


4. Creating contact points in a flight_model.cfg (even though I'm trying to use it on a boat).

point.0 = 4, -10, 0, -0.6, 900, 0, 0, 0, 0.3, 2.5, 0.39, 0, 0, 4, 0, 0, 1
point.1 = 2, -17, 0, 5, 100, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 1
point.2 = 1, 4, 0, -2.98, 750, 0, 0.523, 15, 0.296, 2.5, 0.794, 3.5, 3.5, 0, 165, 165, 1

Any assistance you can provide would be greatly appreciated.

Thanks!

fx
2 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

SFSimsDev avatar image SFSimsDev commented ·

I have also now tried the following to no avail:

        <Behaviors>
            <Include ModelBehaviorFile="Asobo\Generic\FX.xml"/>
            <Component ID="LANDING_FX" Node="c_gear">
                <UseTemplate Name="ASOBO_WATER_CP_LANDING_FX">
                    <FX_CODE>1 0 gt;</FX_CODE>
                    <FX_GUID>{BA223A84-9E83-4A58-B7D7-0C9CBA4E1627}</FX_GUID>
                </UseTemplate>
            </Component>
        </Behaviors>
0 Likes 0 ·
SFSimsDev avatar image SFSimsDev SFSimsDev commented ·

Should we be using <Behaviors> as per the existing models or <ModelBehaviors> as per the documentation?

0 Likes 0 ·
FlyingRaccoon avatar image
FlyingRaccoon answered WombiiActual edited

Hello
Yes, you can spawn our effects on SimObjects.
There is an example on how to do this at the bottom of this page: Visual Effects Examples (flightsimulator.com)

There is no need to edit the Effects section of the sim.cfg for this.

<Behaviors> is the way to go, the documentation is being updated to match this.

Regards,
Sylvain

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

WombiiActual avatar image WombiiActual commented ·

I may have overlooked something and this may be a silly question, but as far as I can tell from the sample we need to know the GUID of the effect. How can we find the GUID of the included effects?

edit: Seems like the GUIDs are listed in visual effects editor -> templates/instances debugger -> asset packages

0 Likes 0 ·
SFSimsDev avatar image
SFSimsDev answered SFSimsDev commented

@FlyingRaccoon - Thanks for this. Is there a way of adjusting the size of one of your default effects within the component or alternatively is there a way to copy the visual effect source and edit it to create a variation? I'm looking to make a wake larger depending on vehicle size.

1 comment
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

FlyingRaccoon avatar image FlyingRaccoon ♦♦ commented ·
We sometimes provide several variations of the same effect. For instance, landing effects are available in small, medium or large scale.

You can check the list of templates in fs-base-aircraft-common\ModelBehaviorDefs\Asobo\Generic\FX.xml

Alternatively, you can create your own templates and spawn our FX using their GUID.

We will provide a doc about our available effects, their properties, etc... in our next updates

What you can't do is edit the effect itself. If you're not satisfied with it, you'll have to create yours from scratch.

Regards,
Sylvain

0 Likes 0 ·