January 13, 200719 yr I FINALLY have my first XML gauge working. It was a MAJOR headache. (Don't laugh!) I consider myself reasonably intelligent (though I don't have a masters degree in CS), but this stuff is kicking my butt. :-) I've read hundreds of posts on this forum about XML and read the guides and SDK, but some very basic things are obviously escaping me.This is a very basic gauge that uses dsd_xml_sound3 to play an overspeed alarm.1. Why does ....(A:Overspeed warning, bool) 1 ==if{ 2 (>L:Overspeed, number) } els{ 0 (>L:Overspeed, number) }work, but ...(A:Overspeed Warning,bool)0 (>L:Overspeed, number)2 (>L:Overspeed, number)NOT work???2. Can someone explain to me how spaces and/or line spacing effects if/els statements. I tried a zillion (ok, maybe half a zillion) combinations and couldn't figure out what is correct and what isn't. All the SDK says is don't put a space between the 'if' and the '{'.3. Is there a better way to be doing this? I'm assuming that the overspeed alarm on the default aircraft is built into a .gau file somewhere.4. Beside the fs2x.com and the guide in the library (xmlgau01.zip), what other resources are there for XML newbies like myself.Thanks.
January 13, 200719 yr Hello I think case only works with Bitmaps and text display use the top one Paul EGLD
January 13, 200719 yr >I FINALLY have my first XML gauge working. It was a MAJOR>headache. (Don't laugh!) I consider myself reasonably>intelligent (though I don't have a masters degree in CS), but>this stuff is kicking my butt. :-) I've read hundreds of posts>on this forum about XML and read the guides and SDK, but some>very basic things are obviously escaping me.>>-SNIP->4. Beside the fs2x.com and the guide in the library>(xmlgau01.zip), what other resources are there for XML newbies>like myself.>>Thanks.When I started XML gauge programming/modification, I looked atlots of code in the gauges that already existed.Take some of the CAB files and extract them to folders andhave a look at gauges that may be similar to the one(s) youare trying to create. A complex gauge like a GPS gauge willhave lots of "examples" to guide you.I do have a programming background, mostly low level code...assemblylanguage and such, so that helped me get a handle on XML.I prefer the FS9 format to the FSX format, which I find unnecessarilycomplicated and difficult to read.When I write XML code using notepad I will save the code and thendouble-click the saved version to insure that there are no glaringformat errors when it appears in my browser window.Then I place it in the panel folder of my FS(/FSX aircraft andtest it. Be sure you have a keystroke sequence defined for"reload user aircraft" ( it may be named differently in FSX )so that you can edit your gauge and reload the panel.cfg withouthaving to exit the sim. This saves alot of time when debugging. Paul
January 14, 200719 yr Hi,<<1. Why does .... >> structure can be used only to display a bitmap when the value condition is met; it does not have a stack component hence stack operation are not supported there (like the assignment "0 (>L:Overspeed, number)" in your example).<<2. Can someone explain to me how spaces and/or line spacing effects if/els statements. I tried a zillion (ok, maybe half a zillion) combinations and couldn't figure out what is correct and what isn't. All the SDK says is don't put a space between the 'if' and the '{'.>>I've explained FS XML stack's basic and advanced operation in quite a number of threads on this forum. You might search for "taguilo" in Author's field; even there is one I recall that explains in detail how spaces are treated by the XML parser.<<3. Is there a better way to be doing this? I'm assuming that the overspeed alarm on the default aircraft is built into a .gau file somewhere.>>Doug's dsd_xml_sound3 gauge is indeed a great resource, I think it has no replacement in the world of sounds within XML.<<4. Beside the fs2x.com and the guide in the library (xmlgau01.zip), what other resources are there for XML newbies like myself.>>The ULTIMATE resource: MSFS Aircraft and Panel Design Forum :-)About every aspect of FS XML has been treated here already. Tom
January 14, 200719 yr Author Thanks tons for your help.>I've explained FS XML stack's basic and advanced operation in>quite a number of threads on this forum. You might search for>"taguilo" in Author's field; even there is one I recall that>explains in detail how spaces are treated by the XML parser.Yes, but sorting through the less helpful posts is difficult. I've started using Google to search just this site and that helps because the search engine here only sorts by date, not by relevance.I think I understand the stacking relatively well, it's all of the rules about spacing, syntax, when FS recognizes change, and where stacking structure is processed, etc. that is more difficult.>what other resources are there for XML newbies>like myself.>>The ULTIMATE resource: MSFS Aircraft and Panel Design Forum>:-)>About every aspect of FS XML has been treated here already. I'm finding that, but the tutorials and most definitely the SDK could better address some of these more basic principles. Thanks again!
Create an account or sign in to comment