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

xml units

Messages
13
Hey everyone. I need some help with xml-coding.
I want to show/hide a container depending on the aircraft's weight.

<part>
<name>container</name>
<visible_in_range>
<paramer>
<sim>
<variable>TOTAL WEIGHT</variable>
<units>lbs</units>
</sim>
</paramer>
<minvalue>230000</minvalue>
<maxvalue>300000</maxvalue>
</visible_in_range>
</part>

This code should show the container as soon as the weight is btwn 230k and 300k lbs. For some reason it doesn't work.
I guess it's because of the <units>-section. Is there any list, where to know which units exist? I just invented "lbs" but I don't know if FS can handle that.

Thanks in advance!
 
For FS9, the only units available are:

kilogram
slug
pound
geepound

For FSX, the units have expanded quite a bit:

kilogram, kilograms, kg
slug, slugs, geepound, geepounds
pound, pounds, lbs

However, in no case can you "invent your own..." :D
 
ok I got it...thanks guys!!
Nevertheless it seems not to work for some reason. :-(
I changed the unit to pound. Can you spot anything wrong in the code?

Thanks!
 
ok I got it...thanks guys!!
Nevertheless it seems not to work for some reason. :-(
I changed the unit to pound. Can you spot anything wrong in the code?

Thanks!

<paramer>

Missing letters! parameter

<parameter>
 
I think Fr. Bill was once a spelling / English teacher....

Dont know how many times he's found my mis-spellings...

You know what we need is a spell checker for XML, lol...




Bill
 
Why dont you do that what Mr. Bill Leaming say?

Go to your bathroom, have a look in the Mirror.
Did you see sunglasses of your nose, put them away
and get the Zoomglasses for better looking.
Yeah, yeah. :D :D
3060.gif
 
OT, but...

I'm curious about something. Do advertisers on the fernseher in Germany promote "bad grammar" as many do in the United States?

It's no wonder that the U.S. is raising a nation of illiterates, given that even such icons as the Disney Channel constantly promote "bad grammar" by allowing the writers and actors to use bad grammar... :yikes:
 
LOL! Usually they advertise the correct grammar...or I just got used to it...dunno :D

Got one more question though (sorry guys).
I want to make it more advanced and refer to the station weight. In the SDK it says: "PAYLOAD STATION WEIGHT" and I need to have an index...now where to place that index?? I tried it with :0 at the end and also some other combinations.Nothing worked :-(
<part>
<name>QW_APallet</name>
<visible_in_range>
<parameter>
<sim>
<variable>PAYLOAD STATION WEIGHT:0</variable>
<units>Pound</units>
</sim>
</parameter>
<minvalue>10</minvalue>
<maxvalue>30000</maxvalue>
</visible_in_range>
</part>

Sorry that I have to ask for so much help :-S
 
(A:PAYLOAD STATION WEIGHT:index,pounds) is correct format, just like the SDK states...

...however, you must actually have an entry in the aircraft.cfg for each station you wish to inquire about.

I think that the index is +1 from the aircraft.cfg entries though...
 
Last edited:
I think that the index is +1 from the aircraft.cfg entries though...

That solved it. It's weird though...why not make it same as in the aircraft.cfg?! However...thanks very much.
I'm glad there are some people out there to assist others.
 
This is far from being the only instance where the indexes used aren't consistent...

It's probably because many people have worked on the code for FS over the years. Some programmers prefer indexes to begin at zero and others one... :rolleyes:
 
Back
Top