• 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.

my DC-8 Project

Would you like me too...


  • Total voters
    21
You are correct, in FS9 c_wheel is a "default animation" that's tied to the ailerons.

Using (A:Altitude above ground, feet) 10 < should not be a problem at all, since it's always based on the AGL immediately below the aircraft. So, if the runway elevation is -25' then the condition will be triggered at -15'... ;)

Ah you are correct, never thought of that!

Anyways, I just got the animating the extension/retraction animation and suspension as well, all works good.

I renamed the steering parts to nose_gear_steering_axle as anything with a c_gear tag is animated when the gear extends/retracts.

I also just implemented your code n4gix and it compiled with no problems, now to test and see what is going to happen...I see how that syntax works tho, like you say all completely backwards...I wonder if the guy who designed XML was dyslexic or something.
 
I'll be damned it works just like you intended n4gix, lol! This is awesome!! It would have taken me weeks to figure that out...thank you so much n4gix, from this little snippet of code, you've opened up a new world to me, I will continue to study the syntax and make some tweaks as needed!

I am now linking c_gear_lower_shaft to the steering axle to re-test, hopefully everything doesn't go wacko.

UPDATE!

IT WORKS!!

I'll have a video on my youtube channel next Saturday hopefully. I have to re-adjust the contact points and set the gear compression data into aircraft.cfg so that it all works properly.

Thanks to everyone who helped out during this process...with the nose gears soon completed, I will start cosmetic fixes around the aircraft before I do any more modeling work on NEW parts!
 
Last edited:
I was just curious, is the following possible?

Original
<part>
<name>nose_gear_left_steer_cylinder</name>
<copy>nose_gear_steering_axle</copy>​
</part>

<part>
<name>nose_gear_left_rod_connector</name>
<copy>nose_gear_steering_axle</copy>​
</part>

<part>
<name>nose_gear_right_steer_cylinder</name>
<copy>nose_gear_steering_axle</copy>​
</part>

<part>
<name>nose_gear_right_rod_connector</name>
<copy>nose_gear_steering_axle</copy>​
</part>

Can it be setup like this?


<part>
<name>nose_gear_left_steer_cylinder</name>
<copy>nose_gear_steering_axle</copy>
<name>nose_gear_left_rod_connector</name>
<copy>nose_gear_steering_axle</copy>
<name>nose_gear_right_steer_cylinder</name>
<copy>nose_gear_steering_axle</copy>
<name>nose_gear_right_rod_connector</name>
<copy>nose_gear_steering_axle</copy>
</part>

OR...

<part>
<name>nose_gear_steering_axle</name>
<name>nose_gear_left_steer_cylinder</name>
<name>nose_gear_left_rod_connector</name>
<name>nose_gear_right_steer_cylinder</name>
<name>nose_gear_right_rod_connector</name>
<animation>
<parameter>
<code>
(A:Airspeed select indicated or true, knots) 100 &lt;
(A:Altitude above ground, feet) 1 &lt;
and
if{ (A:RUDDER PEDAL POSITION, part) 50 * 50 + }
els{ 50 }​
</code>​
</parameter>​
</animation>​
</part>

Was just curious, I'm off to work now, later guys.
 
Last edited:
Yeah, the first method will work, but unless you're going to change something in the new named version, it's rather pointless!

You can use the same "partname" animation as many times as you wish by simply adding an _nn suffix to the partname...

Code:
nose_gear_steering_axle
nose_gear_steering_axle_01
nose_gear_steering_axle_03
nose_gear_steering_axle_04
nose_gear_steering_axle_05
et cetera

I'm not horribly surprised that the nose gear steering script I posted here works since I had just written and tested it for one of my own projects... :rotfl:
 
Yeah, the first method will work, but unless you're going to change something in the new named version, it's rather pointless!

You can use the same "partname" animation as many times as you wish by simply adding an _nn suffix to the partname...

Code:
nose_gear_steering_axle
nose_gear_steering_axle_01
nose_gear_steering_axle_03
nose_gear_steering_axle_04
nose_gear_steering_axle_05
et cetera

I'm not horribly surprised that the nose gear steering script I posted here works since I had just written and tested it for one of my own projects... :rotfl:

Thanks bud, I think I'll leave it as is ... I may however, rename nose_gear_steering_axle to simply ngs and then call the rest of the parts ngs_left_steering_rod, ngs_right_steering_rod, etc. I believe this is a better route, since it prevents addition of uneeded data into the xml and since all animations on the steering are based off 1 object, it would make sense to do it this way.

EDIT :: Oh wait you said _nn I guess that means only numbers and not actual names, I'll leave as is then.
 
Last edited:
FTR:

C_Wheel Key 100 = 0 Degrees, Key 200 = 360 Degrees Clockwise

Source: FS9 SDK MakeMdl.doc.
 
FTR:

C_Wheel Key 100 = 0 Degrees, Key 200 = 360 Degrees Clockwise

Source: FS9 SDK MakeMdl.doc.

Ah, I already know this. Thanks anyway :-]

The only issue I am having at the moment is implementing the animation on the following object.

2i58d3.png


This is the assembly that mounts on top of the upper strut that swivels as the gear compresses, etc.

I implemented the animation as I did with the other objects, left and right. However, where it gets confusing is having an object that follows the steering animation but also reacts to the suspension...the upper strut that swivels has a c_gear tag and is linked to nose_gear_steering_axle but this particular parts are not tagged by c_gear and thus the compression animation is not there which creates a visual error in the sim...I have the option to either throw it away or keep it and try to make it work but the gears are going to loose their visual appearance to an extent.

I could probably implement it by creating a dummy cube with a c_gear tag and linking the part to the cube for the compression animation ... everything is a mess at the moment, hopefully I can get this part animating properly and I can add the the last details.

Just so everyone knows i'm not going crazy with xml animations ... probably the nose gear is the only assembly that will make use of any xml complexity at all, the rest may just be super simple stuff. I can't say this for the VC tho...the VC will be a pool of xml code and the way the votes look, he he, your choice guys :-]

Later.
 
Last edited:
EDIT :: Oh wait you said _nn I guess that means only numbers and not actual names, I'll leave as is then.

Yes, the _nn suffix is hard-coded in the sim engine to differentiate multiple parts that all use the same animation tag.

So:
Code:
ngs
ngs_01
ngs_02
ngs_03
ngs_04
will allow FIVE parts to use the "ngs" animation, yet not be flagged as "duplicates" by Max/GMax when exporting the model.
 
Yes, the _nn suffix is hard-coded in the sim engine to differentiate multiple parts that all use the same animation tag.

So:
Code:
ngs
ngs_01
ngs_02
ngs_03
ngs_04
will allow FIVE parts to use the "ngs" animation, yet not be flagged as "duplicates" by Max/GMax when exporting the model.

I just figured out how I'm going to animate the assembly I just pointed out...how did I not see this before! I also just finally understood how your code works n4gix, now I've got that out of my system, it looks complicated but when you see how it works and how its going on, it makes sense......it was also the (simvar, units) scale * bias + that seemed confusing and then it made sense.....

Conditions come first the THEN if and the stuff inside the IF executes if the conditions are true.....its a twisted idea for me to understand because I'm trained myself to understand the following...

bool a = true; if (a) {cout << "a is " << a;} else{cout<<"nothing.";}

c++ its if (this condition is true) do this...

but XML

condition if { (do this) }els{do this}

Talk about going cross-eyed :eek:
 
but XML

condition if { (do this) }els{do this}

That would fail! There must be NO SPACE between the "if" and the "{" at all, and there must BE a space before the els{...

and, there must be a space after the { and before the } symbols. Them's the rules pal, I didn't make 'em up, honest! :rotfl:

Code:
(condition) if{ (do this) } els{ (do that) }

By the way, since you're familiar with C, you might like to look closely at the Infix2Postfix.exe tool in the FSX SDK. It will "translate" from infix to postfix and vice-versa.

For example, if you entered this in C# notation:

Code:
if ( (L:value,units) > 10 )
{ 
	if ( (L:value2,units) < 5) 
		{ return 20 } 
		else 
		{ return 30 }
} 
else 
{ 
	return 40 
}

the tool will return this when you click on "Translate":

Code:
(L:value,units,units) 10 > if{ (L:value2,units) 5 < if{ 20 } els{ 30 } } els{ 40 }

Even after many years of hand-editing in "XML Script" I still find occasion to use this handy tool for complex evaluations... :cool:

In the opposite direction, I also use the tool to help me parse complex XML script examples into a more familiar C type expression! :teacher:

NOTA BENE: This tool is useless for translating for <String> evaluations, since an entirely different set of "XML Rules" apply...
 
Last edited:
That would fail! There must be NO SPACE between the "if" and the "{" at all, and there must BE a space before the els{...

and, there must be a space after the { and before the } symbols. Them's the rules pal, I didn't make 'em up, honest! :rotfl:

Code:
(condition) if{ (do this) } els{ (do that) }

By the way, since you're familiar with C, you might like to look closely at the Infix2Postfix.exe tool in the FSX SDK. It will "translate" from infix to postfix and vice-versa.

For example, if you entered this in C# notation:

Code:
if ( (L:value,units) > 10 )
{ 
	if ( (L:value2,units) < 5) 
		{ return 20 } 
		else 
		{ return 30 }
} 
else 
{ 
	return 40 
}

the tool will return this when you click on "Translate":

Code:
(L:value,units,units) 10 > if{ (L:value2,units) 5 < if{ 20 } els{ 30 } } els{ 40 }

Even after many years of hand-editing in "XML Script" I still find occasion to use this handy tool for complex evaluations... :cool:

In the opposite direction, I also use the tool to help me parse complex XML script examples into a more familiar C type expression! :teacher:

NOTA BENE: This tool is useless for translating for <String> evaluations, since an entirely different set of "XML Rules" apply...

So I could write my steering code like this...?

if ((A:Airspeed selected indicated or true, knots) < 20 && (A:Altitute above ground, feet) < 10)
return (A:RUDDER PEDAL POSITION, part) + 50 * 50;​
else
return 50;​

That for me looks less confusing than the XML way.
 
That for me looks less confusing than the XML way.

Well, your C# example omitted the required { } symbols for the if and else clauses, but yes it will return mostly correct XML script for that example.

Code:
(A:Airspeed selected indicated or true , knots) 20 (A:Altitute above ground , feet) 10 < && < 

if{ (A:RUDDER PEDAL POSITION , part) 50 50 * + } els{ 50 }

The placement of the comparison operators are a bit confusing, but mostly accurate. The sole exception being that the "<" symbol is illegal. We must use the &lt; escaped format instead, likewise "&&" must be replaced with either &amp;&amp; or simply 'and'...

I'd personally reformat the script this way to be less confusing:

Code:
(A:Airspeed selected indicated or true , knots) 20 &lt;
(A:Altitute above ground , feet) 10 &lt;
and

if{ (A:RUDDER PEDAL POSITION , part) 50 50 * + } els{ 50 }
 
Well, your C# example omitted the required { } symbols for the if and else clauses, but yes it will return mostly correct XML script for that example.

Code:
(A:Airspeed selected indicated or true , knots) 20 (A:Altitute above ground , feet) 10 < && < 

if{ (A:RUDDER PEDAL POSITION , part) 50 50 * + } els{ 50 }

The placement of the comparison operators are a bit confusing, but mostly accurate. The sole exception being that the "<" symbol is illegal. We must use the &lt; escaped format instead, likewise "&&" must be replaced with either &amp;&amp; or simply 'and'...

I'd personally reformat the script this way to be less confusing:

Code:
(A:Airspeed selected indicated or true , knots) 20 &lt;
(A:Altitute above ground , feet) 10 &lt;
and

if{ (A:RUDDER PEDAL POSITION , part) 50 50 * + } els{ 50 }

That was written in C++ in C++ the {} are only required if you have more than 1 statement in a line. I've never written anything in C# so I can't comment on its syntax.
 
Well, your C# example omitted the required { } symbols for the if and else clauses, but yes it will return mostly correct XML script for that example.

Code:
(A:Airspeed selected indicated or true , knots) 20 (A:Altitute above ground , feet) 10 < && < 

if{ (A:RUDDER PEDAL POSITION , part) 50 50 * + } els{ 50 }

The placement of the comparison operators are a bit confusing, but mostly accurate. The sole exception being that the "<" symbol is illegal. We must use the &lt; escaped format instead, likewise "&&" must be replaced with either &amp;&amp; or simply 'and'...

I'd personally reformat the script this way to be less confusing:

Code:
(A:Airspeed selected indicated or true , knots) 20 &lt;
(A:Altitute above ground , feet) 10 &lt;
and

if{ (A:RUDDER PEDAL POSITION , part) 50 50 * + } els{ 50 }

That was written in C++ in C++ the {} are only required if you have more than 1 statement in a line. I've never written anything in C# so I can't comment on its syntax.

Here is some code from one of my apps that makes use of that...

Code:
while(!FileIn.eof())
{   // While not end of file, loop.
    FileIn.getline(BufferStr,1024); // Read line from file.
    pView->Text.push_back(BufferStr); // Store this line.
    pView->FileLength++; // Increment with every line read.

    // This will ultimately set the scroll width.
    if(pView->FileWidth<strlen(BufferStr))
          pView->FileWidth=strlen(BufferStr);
    else
          pView->FileWidth=NULL;
}
 
That was written in C++ in C++ the {} are only required if you have more than 1 statement in a line. I've never written anything in C# so I can't comment on its syntax.

Strictly speaking, they aren't required in C or C# either, but if you wish the tool to generate XML script that will actually work "out of the box," they need to be included...

...otherwise you'll be banging your head against the wall wondering why the bloody script doesn't work! :banghead:

In the spirit of this forum though this discussion should be taking place elsewhere I suppose...

"No discussions about design techniques here please." :o
 
Strictly speaking, they aren't required in C or C# either, but if you wish the tool to generate XML script that will actually work "out of the box," they need to be included...

...otherwise you'll be banging your head against the wall wondering why the bloody script doesn't work! :banghead:

In the spirit of this forum though this discussion should be taking place elsewhere I suppose...

"No discussions about design techniques here please." :o

I was going to point that out ... yes, on with the regular DC8 updates. :greenflag
 
Mandatory Friday has been called off!! No work for me today, woohoo!!

Hey, has anyone ever had a problem with gmax rotating your parts 360 degrees every time you animate something? This is a really annoying problem. I'm trying to animate a part but every time I move the slider and move to the new position, gmax spins the part 360 degrees to the new location, lol! I'm laughing but this is rather annoying....maybe its because I'm animating on the local axis!?

ARgghgh, well DC8 development resumes today...if all goes well, through today, Friday & Saturday I should get plenty of work done on the landing gears...yes I said landing gears, a good look at the makemDL log revealed a I have much work to do on the landing gears to optimize and get rid of uneeded polygons ... LOTS of not needed polys...this will pave the way for addition of the hydraulic wires and besides.... I sort of RUSHED into the development of the landing gears...I never invested the dedication and time like I have on the nose gears ... all part of the fun.

Keep tuned for updates as usual, I hope to start development of the external model cockpit with pilots by Saturday or Sunday, we will see. Always exciting to add a new part.
 
Hey, has anyone ever had a problem with gmax rotating your parts 360 degrees every time you animate something?

Yep, usually after editing an existing animation. Delete the keys on the offending part and start again.
 
Yep, usually after editing an existing animation. Delete the keys on the offending part and start again.

That is what I Had to do, got it working =) Working on another part now, hopefully the results will be as intended after all this.
 
Update!

Well I'm done working on the nose gear, the animation works beautifully and everything looks good and works as intended. I'm going to leave it alone for now, it still needs a couple more details but I can add these later when I'm up to it. I have to do some clean up work on the 3d model now before I do any more work.

Here are some pictures...

2k546p.png

Landing gears all out.

t6795l.png

Landing gears all up.

r1adsm.png

Just sitting on the runway, the DC8 profile looks good.

Here is how the XML code turned out for the nose wheel steering, I may
tweak this some more in the future...credit goes to n4gix for his great help!

2mmbcbp.png


A video will be posted later, the link to it will be bellow this paragraph. Keep tuned, the video just demonstrates the nose wheel steering and the overall DC8 model in general if anyone is interested in watching it.

Video link >>> Coming soon...
 
Back
Top