Need Help Troubleshooting Basic issue with XML updating

For topics related to the creation of simulation objects (SimObjects). This includes development of aircraft, ground, and maritime vehicles.
Post Reply
SunSetter
Posts: 3
Joined: Mon Apr 28, 2014 10:01 am

Need Help Troubleshooting Basic issue with XML updating

Post by SunSetter »

Hi folks, this is ~5 min read. I'm having what are very consistent issues with making simple edits to aircraft 2D XML gauges in Prepar3D, particularly with freeware aircraft that otherwise work just fine in P3D and have FS9/FSX era XML gauges that are also working fine in P3D. My issues are that I'll make a copy of a gauge to make a new gauge (essentially to just update artwork with larger sizes for HD display), will make a few edits, and then not have part of the gauge show up. This has mainly been an artwork issue (some layer of the art not appearing) rather than a functional issue and in each case I've always triple or quadruple-checked my code. My code entries are always fine. And this issue isn't happening all the time but has been happening just enough that I'm totally at a loss for what the problem is as it seems related to the artwork and potentially the naming schema I use. Regardless, because I've successfully made a lot of gauges in the past I keep feeling like it's something with Prepar3D. I've done this stuff off and on for almost 20 years and have never had issues like what I'm experiencing now.

To be more clear, I've been massaging a few older aircraft that work in Prepar3D v5 but are cleaning up some of their older 2D XML gauges, which when expanded are horribly pixellated due to their age. So knowing that they still work in P3D, I'm updating them with new art and in turn have to re-edit all the positioning data in the gauge code. I always first verify the aircraft and gauges work, especially the ones I want to edit / remodel, and then for example will make a copy of a gauge, perform a few simple edits, and then on occasion one of the bitmaps doesn't appear even though I can guarantee everything I've done is accurate as far as editing the xml file to reference the new art, it's new size, etc.

Most of the time I have no issues but this has been happening consistently enough and in such random fashion that I cannot easily pinpoint the issue. If I'm just switching out old art for new and not really modifying a lot of the code it shouldn't be an issue.. And again, most of the time things are fine. I'll swap in newer / larger artwork and adjust the size values, axis positions as necessary, etc, but sometimes the new art just won't appear or maybe one piece of art out of 5 in the gauge will not appear. It's very random and odd.

It's been pretty hit or miss but is happening enough even with very simple edits that I truly feel this has something to do with Prepar3D, possibly some sort of security feature that is causing these headaches?? I'm really at my wits end and after many exhaustive web searches as well reading through the SDK I am simply no closer to finding any solid answers about this. It's become extremely frustrating so any help here is greatly appreciated. I've listed some key questions below. Thanks for taking the time to help me!!


NOTE: I'll also preface by saying YES I do know I have to edit the Panel.cfg as necessary and make sure gauge names listed in each window of the .cfg must match each gauge file name in exact detail. I'm very experienced in this area and have successfully modified hundreds if not thousands of gauges in what has been 20 years of my flight sim experience starting with FS2002. So if a gauge does not show up at all, the Panel.cfg is of course the very first thing I check. My issue is not that, it's is that I'm having random parts of gauges not showing up even with very simple edits of the code when inserting new art.


Given what I've said, my main questions are: (and please answer all of these)

1 - In order to make changes to gauges in aircraft (either C+ or XML) i.e., to both the code files and artwork,.. does both the aircraft and its gauges need to be located fully outside of Prepar3D? -like in the next county over or on a different hard drive lol?- I do recall in earlier versions of Prepar3D that this was necessary, either in full or to some extent, but I thought that was no longer the case and because I've already been successfully making a lot of edits without issue while the aircraft and gauges are nested inside P3D I didn't think this was the case. If the issue was every time I made an edit then this would have been my assumption (that all edits must occur outside P3D).

Is this the case still ??? I cannot find any support threads about this.

2 - Can I edit an aircraft's gauges with Prepar3D up and running and just switch/load into any other aircraft first, make the needed changes to a gauge file, save it, make artwork changes, save it, and then switch back into the test aircraft? This is how it had been in previous versions of FS and so far it's been fine with most of my gauge/art edits in P3D v5 so far, but again it's on the hit list of possible answers to my issues. If this is problematic for gauges reloading properly is there any other better way? Having to fully shut down the sim each time would be terrible for workflow. This stuff is time-consuming enough as it is.


3 - Gauge cache on exit? Is there a way to flush Prepar3D of the gauge cache? (is there one??) This certainly seems like it could be a potential cause for making what should be successful "no brainer" type of edits only to have parts of a gauge missing when you reload the aircraft. I notice that when switching aircraft to make gauge/panel.cfg edits or art edits, and then switch back to the test aircraft it always remembers where you last were, ..for example in the virtual cockpit or a 3D cockpit.., so that also led me to think it could be a potential cache/memory issue. Does P3D store the gauges you've used in memory until after you completely close down and restart? I have of course tried this (shutting down and reload) but am still experiencing the issue. However, I thought this could maybe be related.


4 - Lastly, is there any particular rules to follow for gauge file naming and or with bitmap artwork naming in using spaces or underscores and capital letters? Such as a gauge being named "caution_switch.xml" vs being renamed "Caution-Switch.xml" vs "CAUTION-SWITCH.xml" and similarly the same for bitmaps used in XML gauge code such as "toggle_up" versus using caps and hyphens like "Toggle-Up" or even "TOGGLE-UP"?? In short, does any use of all lower case, or UPPER CASE as well inclusions / exclusions of underscores or hyphens matter?

To be clear I haven't seemed to have an issue regarding this that I'm aware of, but could this be an issue with .xml schema in P3D? And again, I'm well aware whatever is listed in the code has to perfectly match the artwork name at bare minimums. I've checked this stuff forwards and back whenever having issues (and the panel.cfg as needed) my edits are meticulous, but maybe use of Caps and - hyphens are somehow an issue? If so, it's just odd how a lot of my gauge edits to date have them and are fine.

Most often I prefer to use hyphens/dashes between words as well ALL CAPS in my new gauge edits (both for the gauge filename and for artwork instead of using lowercase and underscores) In the past I've used caps and hyphens almost exclusively when re-editing gauges as it often helps to visually remind myself of the gauge I'm currently working on versus an old one which may be using lower case and underscores. Doing the opposite really helps a lot to differentiate things, especially when doing a "stare and compare" of two gauges. Lastly, I always rename the bitmaps differently as this also allows the original gauge to still be used for comparison on the same panel (so you can run both gauges at the same time). Therefore I don't think this matters as I've been using hyphens and caps without issue for years with both gauge file names and bitmap names as well for the bitmap reference entries in the gauge code. But again, I'm just wanting to rule this out in trying to nail down the random issues I keep experiencing.

5 - My process is this; I create vector art, then export as a PNG, then convert to a 24-bit bitmap for the gauge to read, then re-code after making a copy of the gauge. I've also been experiencing this issue when building from scratch too in Notepad++. Regarding art, I recall back in FS 2002 era that we used to have to convert bitmaps to 8-bit colorization but I can't recall if this was exclusive to the older sims. Is this still a thing in some respect for P3D? (I hope not because it kinda looks like crap lol). I do have PLENTY of 24-bit bitmaps working just fine and they look great. But again, am I missing something in the vector art to bitmap conversion process that could be causing some art to not appear?? I would think if it was an issue it would be happening to all of the art I've made and not just happen randomly. But again.. worth asking I suppose.


Anyway that's all I can think of. I'm trying to cover all possible bases here.
mpni
Posts: 1092
Joined: Thu Aug 09, 2018 10:37 am
Contact:

Re: Need Help Troubleshooting Basic issue with XML updating

Post by mpni »

Hi SunSetter
We had updated FS9 xml files to p3Dv4 and v5.
Have a look on RFN Website and download the Chance Vought F4U-7 Corsair P3Dv4 and Alpha Bleu Ciel Grumann F8F-2 Bearcat P3Dv4 here
http://royalefrenchnavy.restauravia.fr/ ... ns.htm#Avi
In each panel folder you will find a lot of FS9 xml file working now with P3D v4 and v5.
It seems that can help you.
Regards
Michel
Post Reply