Jump to content

How do you edit a gauge XML file??


JSMR

Recommended Posts

You can unzip to a folder with the same name as the cab-file (with WinZip or similar).

When a folder exists, FSX will give priority to reading the folder in stead of the cab, so no need for compression while in development phase. Simply modify the XML in the folder until completely tested.

 

You can create a cab from the modified folder afterwards, but DON'T use winZip or similar. The CABDIR program (from the SDK) must be used in stead.

 

Wim

b727fcaptain.jpgx701captain5.jpg
Link to comment
Share on other sites

Once you've extracted the .xml file from the .cab, I personally prefer to use NotePad++. It's freeware, readily available, and I like it better than just NotePad. IMO, for what it's worth, it has more capabilities than Windows NotePad. It also displays .xml files in a format that, for me, is easier to edit. It also permits saving a file in a different format. Like a .txt file can be saved off as a .xml, or .HTM, or whatever.

It does NOT add in formatting symbols or characters, like a word processor will, however. Very handy for editing .cfg files, or .xml, or whatever, or even just looking at them. Reading a panel.cfg, or a gauge's .xml, or what have you, for example.

Also easily permits searching through such files for particular information, with the Find Next functions. Pretty handy for finding particular words or phrases in large .xml files.

 

Just my 2 cents worth...

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

Are you saving the files to any sub-folder of C:\Program Files or C:\Program Files (X86), by any chance, after you've made the edits? Especially if you have Win10?

Windows in general, and Win10 in particular, have severe personal problems allowing changes/overwrites of files in either of those two folders. Even with UAC turned down or off.

If you are, I would definately move whatever folders you're trying to save to out. ANYwhere but those two folders.

If not, can you tell exactly what files you're trying to edit, and just where they come from, and where you're trying to save them to once they're edited? Are you changing the name of the original file somehow, before you save the edited file over it?

I'm just trying to think of reasons why the edits aren't taking effect.

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

I made a copy of the particular gauge folder, then made the edit directly inside the folder (which I unzipped) which is in the FS9/gauges folder.

 

 

The Aeroworx King Ait ITT gauge rises by 10 degrees C per 100 ft/lb of torque increase.

 

I'm not saying this isn't realistic, but I was simply trying to see if I could change it so the ITT would rise around 20-30 degrees per 100 ft/lb of torque.

 

So I'm guessing there is some mathematical formula inside the gauge somewhere. Being that its written in a code which I don't understand, I tried to mess around and see what changed what but without luck.

 

Perhaps its more complex then first thought.

 

 

I use W7 with UAC off.

Link to comment
Share on other sites

The folder you extract to needs to have exactly the same name, and needs to be in the same location as the original cab.

Otherwise the calls in panel.cfg won't work anymore.

 

To test, you can always move the original cab to a backup location, or rename it, and see if the gauges still appear on your panel. If not, you made some mistake while extracting.

 

Wim

b727fcaptain.jpgx701captain5.jpg
Link to comment
Share on other sites

There is a value in the .air file that controls ITT features - item 1526, so I would guess you do not need to mess about with the .xml.

Good luck

Keith

 

 

Yeah ive done plenty of work - successfully - using Air File Manger regarding the Torque and ITT for it (Lines 1526 and 1548). Simulating new or worn out engines etc.

 

The 1526 line has a ITT 'rate of change' but I'm not sure what it does. Maybe experiment.

 

The problem is of course that MSFS has the ITT backwards. Decreasing with altitude rather then increasing due to the thinner air despite being cooler. So some clever gauge work was done.

 

It may be just a visual gauge trick using the x,y thingy in the xml file.

 

 

Nothing more then a experimenting exercise so maybe I'll keep trying. :)

Link to comment
Share on other sites

Yep, those formulas are written in a complicated way.

Variable names referring to things like ITT may be hard to recognise.

The formula's are written in Polish Notation. (Sort of back to front).

Too early for me to even try to explain. (Not enough coffee and sugar in my bloodstream yet.)

 

Just a brief note. Be aware that some gauges may be proprietary software (licence agreements). So don't be too quick to share your "creations" with others.

 

 

In a panel.cfg lines you see lines like (random example):

 

gauge05=Peanutbutter!Chocolate, 120, 145, 60, 20,

 

I'll 'explain' that line.

gauge05 --number of the gauge in the panel.

= sign--separator sign.

Peantbutter -- Name of the gauge folder, or .Cab, .dll file, or .gau file, that the gauge is in.

! sign -- separator sign

Chocolate -- name of the gauge file (xml)

, sign -- separator again

120, horizontal position of gauge, counting from left side of panel.

145, vertical position of gauge, counting from top of panel downward.

60, width that gauge shows as in panel,

20, height that gauge shows as.

 

 

If you have in your panel folder:

Peanutbutter.Cab file, but also Peanutbutter folder, the xml gauge will be used that is in the Peanutbutter folder. Folder goes before .Cab

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

The formula's are written in Polish Notation. (Sort of back to front).

Too early for me to even try to explain. (Not enough coffee and sugar in my bloodstream yet.)

My first real electronic calculator waaaaay back when, a TI-55, used RPN (Reverse Polish Notation), so I got to be pretty good at it. My very very first was a slide-rule, but that's a whole different story.

Basically, instead of the usual A+B= notation we all learned in 1st grade, ie: first number, operand, second number, equals, it goes A B + . First number, second number, operand (what you want to do to the two numbers). Once the computer gets all the information it needs, the two numbers and the operand, it just goes ahead and does what you want to the two numbers.

It's a good way for computers to work. It puts the two numbers into memory spots, the performs the operation on them, displaying the result in a third memory spot.

 

Best I can explain RPN. Not popular with most humans, since we learn regular notation, but real good for computers. That's why XML files use RPN, like il mentioned.

 

Sorry, not enough coffee here yet either, but I hope it helps a little...

Pat☺

[sIGPIC][/sIGPIC]

Had a thought...then there was the smell of something burning, and sparks, and then a big fire, and then the lights went out! I guess I better not do that again!

Sgt, USMC, 10 years proud service, Inactive reserve now :D

Link to comment
Share on other sites

It is also critical that before you "test" any changes you have made in an XML script, that you reload the user aircraft...

 

...this forces the sim to re-read and compile the XML script so you can see the results.

 

I assign the key-combo "Ctrl+Shift+R" to the Option "Reload User Aircraft".

Bill Leaming http://smileys.sur-la-toile.com/repository/Combat/0054.gif

Gauge Programming - 3d Modeling Military Visualizations

Flightsim.com Panels & Gauges Forum Moderator

Flightsim Rig: Intel Core i7-2600K - 8GB DDR3 1333 - EVGA GTX770 4GB - Win7 64bit Home Premium

Development Rig1: Intel Core i7-3770k - 16GB DDR3 - Dual Radeon HD7770 SLI 1GB - Win7 64bit Professional

Development Rig2: Intel Core i7-860 - 8GB DDR3 Corsair - GeForce GTS240 1GB - Win7 64bit Home Premium

NOTE: Unless explicitly stated in the post, everything written by my hand is MY opinion. I do NOT speak for any company, real or imagined...

Link to comment
Share on other sites

some great docs that got me started:

 

Gauges tutorials:

http://www.fs2x.com/Tutorials.htm

especially for reverse polish notation, and equations/formulas:

XML Gauge Programming for FS2004. Chapter 1. Main Body Sections V2_0.pdf

(and chapter 2 3, and 4)

And the documents:

TutGG_P1.pdf

(and P2, P3, and P4)

for artwork.

 

 

File by: Arne Bartels -- ‘xmlgau01.zip’ on flightSim.com.

(xml operators and polish notation, lists of variables of various types, and more.)

 

 

Perhaps helpful: List of FS2004 Controls 3_75.pdf

(In FSUIPC folder after unzipping.)

 

 

There is of course also a lot of info in the FSX-SDK documentation.

Here is how to install the SDK.

http://www.fsdeveloper.com/wiki/index.php?title=SDK_Installation_(FSX)

(don't install it in program files)

 

If you don't have the SDK yet, you can read most of the info here. ESP SDK is 99% the same thing.

https://msdn.microsoft.com/en-us/library/cc526948.aspx

For example: ESP SDK Variables List:

Microsoft ESP 1.0 -- SimObject Creation Kit -- Panels and Gauges SDK -- Token Variables

https://msdn.microsoft.com/en-us/library/aa306210.aspx

 

 

Some of these are for FS2004, but most (if not all) of these commands and XML operators also work in FSX. (I think alll work in fsx, but not 100% sure right now.)

Some variable lists above are for fsx, and then some variables are for fsx only. Meaning that if you inuse them and try to use that gauge in FS2004, it won't work.

The FSX SDK variables list indicates when a variable is fsx-only.

[sIGPIC][/sIGPIC]
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...