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

FSX XML: Glass gauges fading in

Is it possible to include a <Update> in modeldef.xml file? If so, at what point exactly?
No, it is not.

Or if not, can we include a "loop using a Goto" in modeldef.xml file? If so, where and how?

Yes, a loop can be included in any XML script, regardless of the parent key. However, it should be used with care, because all the content within a loop is executed on every frame. Going to the essential from both of your questions, you can't replace an <Update> with a loop, what you can do is put the same code you would put in <Update> inside a valid modeldef key, for example <Code>, <Visibility>,etc. But if you don't really need to hide XML scripts from user inspection, the best option would be to use an invisible gauge in VC, as suggested by Roman.

Tom
 
No, it is not.
How odd... I've been doing "sort of that" for several years now...

...and it seems to work quite well, thank you! Okay, it's not really an <Update> section, but it does serve the same purpose... :laughing:

  1. Create a tiny polygon in Max, GMax, whatever modeling program
  2. Attach a <Visibility> script to the polygon.
  3. In your modeldef.xml file, have a <Visibility> <PartInfo> section set up:
Code:
  <PartInfo>
    <Name>Update_Routine</Name>
    <Visibility>
      <Parameter>
        <Code>
          <!-- INITIALIZATION ROUTINE(S) -->
             (L:Init,bool) 0 ==
             if{
                 (* PLACE ANY ONCE ONLY SCRIPTS HERE *)
             1 (>L:Init,bool)
             }
          <!-- END INITIALIZATION ROUTINE(S) -->
       
          (* PLACE ANY "<Update>" SCRIPTS HERE *)
 
        </Code>
      </Parameter>
    </Visibility>
  </PartInfo>
Because any object with a <Visibility> tag will always be evaluated every cycle, stuff you put here will act just like a gauge's <Update> section.
 
I've been doing "sort of that" for several years now...

I know Bill, I know...that's the reason I posted this:

"what you can do is put the same code you would put in <Update> inside a valid modeldef key, for example <Code>, <Visibility>, etc."

in my previous message, and left the details to you ;)

Tom
 
Your answers will fill me with joy ...! I'm having a lot of fun to test all this ...

A huge thank you to XML Gurus!
 
Sorry for reopening this old thread, but i would be very grateful if someone can help me.
From what i see, in my project, a gauge can contain only bitmaps with ONE alpha channel. On or off.
How it works the "layer system" you are talking about, if there is only one alpha bit?

wait maybe i got it, it involves 3d planes in the 3d model right?
 
Hi,

DXT1 images only contain one alpha channel bit. DXT3, DXT5, and 888 32 bit images can have a grayscale alpha channel (I think that's 256 shades of gray?).
 
true. but in designing gauges this don't count.
can you confirm? the gauges do not read dxt3/5.
actually they dont read not even dxt1.
just bmp with 1 alpha.
am i correct?
 
Thanks for confirmation.
Wich is nonsense, couse outside gauges actually there is transparency, well, kind of. See effects textures (additive greyscale transparency).
Misteries of ESP1.0
 
Back
Top