• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

P3D v4 Too stupid to get this to work: Different SODE commands for an object...

Messages
916
Country
germany
Hi to all experts here,

now I do fiddle around for several hours but can't get my entries to work. Have to say, I can create reasonable groundpolys, nice buildings and have enough imagination to build a halfway proper air base, but technically I am a real dimwit.
SODE hates me.

Although I have success with several SODE objects (animations, windsocks), SODE is refusing to accept my commands in the following issue.

What I would like to see:

I did build a detuner scene. This scene should consist of three parts which shows the detuner area in three different stages:

1. Detuner simply appears without any GSE or Tornado during dusk, dawn and night.
2. Detuner steady including GSE and Tornado ready for afterburner testing at only within a specified time limt.
3. Detuner action controlled by "show/hide" command - only in this action section the "show/hide" command should be able.

I did test all other entries inside the sim objects folder and sim.cfg and there the entries are okay - but the command lines inside the xml SODE laughs about it...
Here are my lines of the xml-file taken out of my animations-xml to all who want to laugh as well:

<SODE>

<!-- Data Probe serving its clients -->

<SimObject Name="RAF_BRUGGEN_X">

<Placement Lat="51.200012000" Lon="6.133529500" Alt="73.456" Hdg="0.0"/>

<Model SimTitle="12bPilot_SODE_Environmental_Data_Probe">

<EnvironmentalDataProbe ClientList="ETUR_DETUNER;ETUR_SL_Arrester_09;ETUR_SL_Arrester_27;BJP_Sock_EAST;BJP_Sock_WEST;ETUR_MOBILE_TOWER_09;ETUR_MOBILE_TOWER_27"/>

</Model>

</SimObject>

<SimObject Name="ETUR_DETUNER">
<Placement Lat="51.1956611" Lon="6.11321298" Alt="0#AGL" Hdg="164.6"/>
<Model SimTitle="ETUR_DETUNER">
<ConditionalVisibility LogicExpression="A|B">
<Condition ID="A" Variable="TimeOfDay" Value="DUSK;DAWN;NIGHT"/>
<Condition ID="B" Variable="DayOfWeek" Value="MON-SUN"/>
</ConditionalVisibility>
</Model>
<Model SimTitle="ETUR_DETUNER_STEADY">
<ConditionalVisibility LogicExpression="(A$B)|C">
<Condition ID="A" Variable="TimeOfDay" Value="DAY"/>
<Condition ID="B" Variable="DayOfWeek" Value="MON;WED;FRI"/>
<Condition ID="C" Variable="Time" Value="0900-0930;1300-1330LT"/>
</ConditionalVisibility>
</Model>
<Model SimTitle="ETUR_DETUNER_ACTION">
<Condition ID="A" Variable="TimeOfDay" Value="DAY"/>
<Condition ID="B" Variable="DayOfWeek" Value="MON;WED;FRI"/>
<Condition ID="C" Variable="Time" Value="0931-0959;1331-1359LT"/>
<TriggerableVisibility Input="TextMenu" Action="Show,Hide" VisibleOnLoad="NO"/>
</TriggerableAnimation>
</ConditionalVisibility>
</Model>
</SimObject>
</SODE>

I appreciate each help to get this scene to work!
 
Okay, in the meantime I got it to work finally.

But there is one ongoing issue:

The animation loop is too short. What I did so far:

1. Changing the modeldef.xml entries to get a longer animation loop as follows:

On top entries I added:
<Animation name="SODE_Trigger_1_50SEC" guid="0e586c0a-1e20-4a01-a077-25f74198b653" length="100" type="Sim" typeParam2="SODE_Trigger_1_50SEC" typeParam="AutoPlay"/>

Below "AnimationGroup name...." I pasted
<AnimationRef guid="0e586c0a-1e20-4a01-a077-25f74198b653"/>
(which is my ongoing SODE Trigger entry...)

...and finally as last "PartInfo"-entry

<PartInfo>
<Name>SODE_Trigger_1_50SEC</Name>
<AnimLength>100</AnimLength>
<Animation>
<Parameter>
<Code> <!-- Masks bit 1 (0x0002) out of the SimVar and checks if set -->
(A:VELOCITY BODY Z, number) near 0x0002 &amp; 0x0002 == if{ 100 } els{ 0 }
</Code>
<Lag>2</Lag> <!-- Defines duration of animation: 100Frames/2 = 50 seconds -->
</Parameter>
</Animation>
</PartInfo>
<!-- End Animation Code -->
<!-- ### END SIMOBJECT DISPLAY ENGINE ### -->


Done this, the SODE Trigger appears fine in Gmax and I can add it to my animation. I exported it into a mdl file, checked the animation inside MCX, exported it and finally, it works in my P3Dv4.5 - but much too short, just around 20 seconds, not 50 seconds like I need.

The appropriate entry inside the SODE "animations.xml" as follows:

<SimObject Name="ETUR_DETUNER">
<Placement Lat="51.195490888" Lon="6.113313786" Alt="0#AGL" Hdg="173.1"/>
<Model SimTitle="ETUR_DETUNER_ACTION">
<ConditionalVisibility LogicExpression="A$B">
<Condition ID="A" Variable="DayOfWeek" Value="MON;WED"/>
<Condition ID="B" Variable="Time" Value="0931-0959;1331-1359LT"/>
</ConditionalVisibility>
<TriggerableVisibility Input="TextMenu" Action="Show,Hide" VisibleOnLoad="Yes"/>
<TriggerableAnimation Input="TextMenu" Action="Open,Close" StartKF="0" EndKF="100" Duration="50">
<Sound FileName="TORNADO_DETUNER_TRIEBWERK.wav" Loop="Yes" MinDistance="20" MaxDistance="800"/>
</TriggerableAnimation>
</Model>
</SimObject>


Is Duration="50" okay? I just used the number 50 because I thought this is the "seconds" entry.
 
Your entry <Condition ID="B" Variable="Time" Value="0931-0959;1331-1359LT"/> is only 28min, so the animation cannot run for 50min.

And I would remove ETUR_DETUNER from EnvironmentalDataProbe ClientList= ....
Only weather-dependent entries (wind/visibility/rain/snow...) belong there.
 
Thank you, Mike.

I will remove ETUR_DETUNER.

50 minutes is much too long - 50 seconds would be long enough ;)
I think there is maybe something wrong inside the modeldef.xml entries and Gmax.

Is this line correct? What is the number "100" for? I think this is the frame count? Or should I have to correct anything here?
<Animation name="SODE_Trigger_1_50SEC" guid="0e586c0a-1e20-4a01-a077-25f74198b653" length="100" type="Sim" typeParam2="SODE_Trigger_1_50SEC" typeParam="AutoPlay"/>

Is the lag entry set correctly?
<Lag>2</Lag> <!-- Defines duration of animation: 100Frames/2 = 50 seconds -->
To my knowledge the total frames divided by the Lag number results in the seconds, innit?

That way, do I have to use "SODE_Trigger_2_50SEC" instead of "SODE_Trigger_1_50SEC"?


Here is how the animation tool shows the added animation, but I think here everything seems to be okay:





I still don't know where to get my 50 seconds...
 
I must have misinterpreted that.

Yes, 100 = frame count (the length of the animation).
Lag entry 2 is correct.

The entry SODE_Trigger_1_50SEC can stay like this.

Very important !!!
The Gide number must only be given once in the modeldef.xml !!!
 
Yes, I copy and pasted the previous Trigger entry and simply changed the last number from 2 to 3.

Hmm - what else can reduce my 50 seconds?
 
Thank you, Mike.

I noticed this difference:

(A:VELOCITY BODY Z, number) near 0x0001 &amp; 0x0001 == if{ 100 } els{ 0 }

Both were a "2" in my entries, so I try this, maybe this extends the time....
 
Back
Top