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

FS9 XML; use ToolTips? or HelpID's?

Messages
10,088
Country
us-arizona
Hey guys,

Yesterday, while starting out on my autopilot gauge, and putting in the first buttons, I had written them with TooltipID's. However, in testing it in the sim, the names were totally different from what I had entered. Almost hilarious what some of them were.

So, my question is this.. What 'should' I normally be using, and why didnt the names show properly in the buttons 'mouse overs'?

It was my understanding that you can write what you wish in Tooltip ID's..



Bill
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
Yes you can write custom Tooltips in FS9 and in FSX SP2/Acceleration.
Maybe you could post an example of your code so we can give a better help :)

Tom
 
Messages
10,088
Country
us-arizona
This should be the heading selectors, left and right dial directions (inc and dec). But the tooltips read;
* Prop Pitch Lever
* Engine Radiator Temp (-480*)

...lol..

Here is the code for them.


Code:
      <Area Left="424" Right="474" Top="68" Bottom="120">
       <Tooltip ID="TOOLTIPTEXT_SET_HEADING_LEFT"/>
         <Cursor Type="DownArrow"/>
         <Click Event="HEADING_BUG_DEC" Repeat="Yes"/>
      </Area>
      <Area Left="475" Right="530" Top="68" Bottom="120">
       <Tooltip ID="TOOLTIPTEXT_SET_HEADING_RIGHT"/>
         <Cursor Type="UpArrow"/>
         <Click Event="HEADING_BUG_INC" Repeat="Yes"/>
      </Area>


Kind of odd..


Bill
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Bill all of the "Tooltip ID" entries are pre-set by ACES. You need to refer to the list in the SDK if you wish to use them...

...you can NOT simply make up your own names for them... :eek:

However, you CAN use the following style:

<Tooltip>View Chart 5</Tooltip>

Just put what you want the tip to say between the two tags.
 
Messages
10,088
Country
us-arizona
Ahhhhh....

Dommo Arrigatto, gozi-mashtah!


Thank you for that. I was wondering what was going on. I had this happen on some basic steam gauges in my Junkers and couldnt figure out why that happened.

Thanks again,

Bill
LHC
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
However, you CAN use the following style:

<Tooltip>View Chart 5</Tooltip>

Just put what you want the tip to say between the two tags.

Adding to Bill's example, you can also use values from variables in your tooltips.

For example:
<Tooltip>View Chart %((L:Chart,number))%!d!</Tooltip>


Tom
 
Messages
10,088
Country
us-arizona
Oh man... So much you can do to these.. Gauges can really be tweaked out. I never knew any of this could be done, lol....


Bill
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
It's important to keep in mind that like most symbols in XML, the %( is used in pairs...

...thus the prototype for this operator is

%((condition to evaluate))

Note that the same applies to the "%!" symbol wrapping around the format instruction: %!d!
 
Last edited:

taguilo

Resource contributor
Messages
1,585
Country
argentina
It's important to keep in mind that like most symbols in XML, the %( is used in pairs...

...thus the prototype for this operator is

%((condition to evaluate))%

Note that the same applies to the "!" symbol wrapping around the format instruction: !d!


In these cases, the %( sign actually indicates that following characters are part of a script, which is going to end where the last ) char is found. There is no need for a % after that ).

The same happens with %!, which means a formatting condition is expected and will end after the next !.

That's the reason we always see constructions like this:

%((L:MyVar,enum))%!d!

where the last % is in fact a part of the following ! and not the previous ).

So for example, this kind of script would be valid:

<ToolTip>Engine 1 %((L:MyEng1,rpm)) total RPM = %!3.2f!<Tooltip>

giving Engine 1 total RPM = 95.3

A trivial clarification for an common misunderstood behavior of the scripting system in XML gauges :)

Tom
 
Messages
10,088
Country
us-arizona
Thanks Tom and Fr. Bill,

That tutorial is priceless. I had noticed that !4d! was used for say 4 digits in a readout. Great information.

Tom, when you say XML scripts, I thought that only FSX uses scripts, that FS9 doesnt. I must have heard wrong.

Thanks again for the tutorial. I am copying these to Notepad files for backup and learning.



Bill
LHC
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Last edited:
Messages
10,088
Country
us-arizona
Bill, I suspect that Tom -like myself- simply refuses to promote XML to the "exhalted dignity" of being called "code...."

N4gix


LOL... Roger that.

Before I got into all of this, it was 'jibberish'.. Then code. Now scripts. I am adapting.


I guess it paid off being a code freak (secret codes) when I was growing up. Helping me to comprehend/read these...


Bill
LHC
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
LOL... Roger that.

Before I got into all of this, it was 'jibberish'.. Then code. Now scripts. I am adapting.

LHC

Actually XML files are not "real" code like we are used to speak of when talking about structured languages -C/C++/VB,etc.- but rather a template of organized tokens and scripts that facilitates the "inner" actions to be made by executable code that interpretes them.

Almost all XML command/structures support a scripting area (ie within <Value>) whose exclusive function is to process expressions and return an unique value to the current token.

These lose low level C functions that interprete the scrips are embedded in FS executables/main libraries, and are probably such simple and fast thanks to the RPN style of using math/string/trig operators.

Just a basic explanation of FS's XML wonder :D

Tom
 
Top