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

Coding temporary parts

Messages
158
Country
unitedkingdom
My learning with Gmax aircraft design (I'm designing for AI in the main) is coming on very well. In my current model, I want to try and add parts that are only visible, or not visible, when enigines start. So for example, a pilot would be visible only when the aircraft is hot and things like, intake covers, "remove before flight" ribbons and GPUs/fire extinguishers on the ground would only appear with the aircraft cold. I'd like to understand the process for tagging or coding the parts for both FS9 and FSX if there is any difference.

The answer may already be on the forum but I was finding it difficult to find some search terms to be able to check that. Could anyone please explain the steps in the process, or point me in the direction of some reading material that would show me how please?

Thanks in anticipation,

John
 
Hey John,

We need to know what sim you are making these for.

If FS2004, then you name parts you want to show up with the engine turning, then name them, or their Hierarchy; 'engine0_turning' and if when the engine stops, then; 'engine0_stopped'.

Now, with FSX, you would give the parts, or their Hierarchy and Attachpoint / Visibility of the same names; engine0_turning or engine0_stopped and that too should get them to operate visually as you want.

What kind of AI are you producing, if I may ask?


Bill
 
Bill, thank you for your response. I'm building for FS9 and FSX, as stated.

"engine0_turning" and "engine0_stopped" are not available in the FSX Tools Animation Manager or in the Attachpoint drop down for Visibility. For FS9, I don't think they are stock part names either. Does that mean that applied manually somehow? Could the same thing also be done immediately prior to pushback, ie before engines are started, for an AI aircraft?

I've been building some historic AI aircraft and have just finished a Lancaster plus Spitfire and Hurricane of The Battle of Brittain Memorial Flight here in the UK. I'm currently working on a Royal Air Force Beechcraft King Air 200 for an AI flightline at RAF Cranwell. Both are for FSX but I'll also produce FS9 versions as well.
 
Hey John,

Sorry that I missed that on the FS9 and FSX.

If you 'wanted too', you could just make these FS9 models and for the FSX versions, make DDS textures instead of Bitmaps, since they will not have VC's and all.

But, if you are going to do FSX models, then note that in FSX, the 'visibility' attach point tag is called eng1_stopped (My FSX has it). If you cant find it, let me know.

Bill
 
Or use Engine 1 or 2 RPM values to set the range for visibility of certain parts instead of "Eng1_Stopped".

Take a look at the "Simulation Variables" Part in the FSX SDK documentation to get an overview of default variables you can use.
 
Bill, thank you for your response. I'm building for FS9 and FSX, as stated.

"engine0_turning" and "engine0_stopped" are not available in the FSX Tools Animation Manager or in the Attachpoint drop down for Visibility. For FS9, I don't think they are stock part names either.

For FS9, both of those are defined in the MakeMDL.parts.xml file. All you need to do is use them as "partnames" and it will work automatically!

For FSX, both of them are defined in the default Modeldef.xml file. They need to be assigned to your parts via the Attachpoint Tool.
 
Still having a problem locating the tools I need. I have FSX patched to SP2. A Windows search reveals no MakeMDL.exe file. Where should the file be located please? Also the two tags mentioned are definitely not available in my Attachpoint Visibility drop down menu within the FStools menu.
 
Ahhh... So, you cannot yet export a model, nor find the Animation Manager codes then in FSX Gmax?

I just ran a search at FFDS ( www.freeflightdesign.org ) in the forums Tips and Tutorials looking for the ole 'how to set up FSX Gmax' and couldnt find it. Maybe someone will chime in where it is, or if it was taken down.

I also found this;
http://www.aerodynamika.com/cgi-bin/yabb2/YaBB.pl?num=1158860541

Setting up FSX Gmax is going to take you a while, but you will get there. It really is possible. :D
 
Still having a problem locating the tools I need. I have FSX patched to SP2. A Windows search reveals no MakeMDL.exe file. Where should the file be located please? Also the two tags mentioned are definitely not available in my Attachpoint Visibility drop down menu within the FStools menu.

For GMax/FS9:
C:\gmax\gamepacks\fs2004\plugins

For GMax/FSX:
C:\gmax\gamepacks\FSX_GmaxGamePack\Plugins
 
Aha, found the Makemdl.parts.xml file for FS9, but not the Modeldef.xml file for FSX. The latter is perhaps a little strange because I have been able to export aircraft over the past 4 months. Looks like I need to re-install the FSX game pack and SP1/SP2 patches and hope that the file turns up.

Thanks for your help everyone.
 
Yep, just found it in the Modelling SDK\bin . Don't know why Windows search didn't find it the first time I tried. Sorry about that.

The object drop down menu in the Attachpoint\Visibility tool, doesn't contain the engine0_turning or stopped tags. Is it a case of just typing the entry into the name field please?
 
Yep, just found it in the Modelling SDK\bin . Don't know why Windows search didn't find it the first time I tried. Sorry about that.

The object drop down menu in the Attachpoint\Visibility tool, doesn't contain the engine0_turning or stopped tags. Is it a case of just typing the entry into the name field please?

The two entries in the default modeldef.xml file are:

Code:
    <PartInfo>
        <Name>engine0_turning</Name>
        <VisibleInRange>
            <Parameter>
                <Sim>
                    <Variable>GENERAL ENG RPM:1</Variable>
                    <Units>rpm</Units>
                </Sim>
            </Parameter>
            <MinValue>1</MinValue>
        </VisibleInRange>
    </PartInfo>
    <PartInfo>
        <Name>engine0_stopped</Name>
        <VisibleInRange>
            <Parameter>
                <Sim>
                    <Variable>GENERAL ENG RPM:1</Variable>
                    <Units>rpm</Units>
                </Sim>
            </Parameter>
            <MaxValue>1</MaxValue>
        </VisibleInRange>
    </PartInfo>

However, I see that ACES used the <VisibleInRange> tags for these entries. Unfortunately that tag is BROKEN in the FSX XML parsing engine! :yikes:

Worse still, the AttachPoint Tool is only scripted to look for <Visibility> tags!

Replace both entries with these, and then you will be able to use them:

Code:
    <PartInfo>
      <Name>engine0_turning</Name>
      <Visibility>
        <Parameter>
          <Code>
            (A:GENERAL ENG RPM:1,rpm) 0.1 &gt; if{ 1 } els{ 0 }
          </Code>
        </Parameter>
      </Visibility>
    </PartInfo>
  
    <PartInfo>
      <Name>engine0_stopped</Name>
      <Visibility>
        <Parameter>
          <Code>
            (A:GENERAL ENG RPM:1,rpm) 0.1 &lt; if{ 1 } els{ 0 }
          </Code>
        </Parameter>
      </Visibility>
    </PartInfo>
 
Brilliant. Thank you Bill, that's just what I was after.

John

No problem, John. I had never noticed the borked entries before, since I've never had need of them. I script my own XML for the most part.

By the way, if there were a need to detect engine number two (or three or four), it's simply a matter of copy/pasting those two entries, and increasing the count by 1...

<Name>engine1_turning</Name>
...
(A:GENERAL ENG RPM:2,rpm) 0.1 &gt; if{ 1 } els{ 0 }
 
Bill, just taking this a bit further, tagging the visibility to whether the engine is running or not will work for some objects, but on an AI aircraft, the engines are not started until after the pushback. That would mean an object like a generator or fire extinguisher would be dragged backwards with the aircraft before disappearing. Is there another pair of parameters I could use to reflect a cold/non-cold aircraft, but without engines running please?
 
Bill, just taking this a bit further, tagging the visibility to whether the engine is running or not will work for some objects, but on an AI aircraft, the engines are not started until after the pushback. That would mean an object like a generator or fire extinguisher would be dragged backwards with the aircraft before disappearing. Is there another pair of parameters I could use to reflect a cold/non-cold aircraft, but without engines running please?

All AI a/c switch on their nav lights prior to pushback. So, perhaps you could use "light_nav_vis" viat the AttachPoint "Visibility" option.
 
Or take the A: variable for the engine starter and make the GPU only visible while the starter is engaged.

Granted, it doesn't make the GPU show up as long as in real life, but FSX isn't real anyways.

Or you'll use the starter activation to start a running clock which runs until startup is completed (= a treshhold value is reached) and then makes the GPU disappear.

Or you trigger the GPU with starter activation and make it disappear when the aircraft starts moving.


N+1 possibilities...
 
Back
Top