Sign in to follow this  
Guest artmartin

Discovery about Default.xml

Recommended Posts

I've been being prodded to add more functionality to my autogen editing program in the area of GUI objects and have been told that one can add custom classes with a single object into the Default.xml file in the Autogen directory of FS9. Well, experimentation has proven that true but I found out an interesting fact. (please ignore me if this is old news) Seems one doesn't have to mess with the Default.xml after all but instead the user can simply create another .xml file in that same directory and add their custom classes into that file or a single class in as many files as they wish. FS and the annotator program read any .xml file in that directory to create their lists. I stumbled across that by mistake when I had my program create a temp file prior to copying it over the default.xml file so I could see if the edits went in right. When there were problems I restored the original default.xml and went into Annotator to ensure the errors had cleared. My new class showed up in there. Ran a test in FS and the object appeared right where I'd placed it. My program now will instead simply create a new file instead of messing with the default.xml. That makes me much more at ease. Rows of light and telephone poles are coming next. Woohoo.Art Martin

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Art.Intresting to see you got this to work, i tried ( must have done it wrong ) and didnt get it to work.FYI, i found by editting the terrain.cfg file, i was able to add objects ( poles and such ) to roads and rail tracks but there appears to be a limit of 1 km due to the Clipping of the Lod !This would be great to place custom Gas stations for example along roads if the 1km clipping could be overcome !rgds jeff

Share this post


Link to post
Share on other sites

Well I got fooled actually. After I posted this discovery, I made another one. FS does not refresh its own internal list of what's in the Default.xml or in .agn files just because you stop and restart the program. Apparently, FS does not reread the Default.xml file every time it starts, only if it thinks there's been a change to scenery. It was still holding onto the changes I had made to the default.xml from a previous try. I found that out by deleting some vegetation from the test .agn file I was using and reentering FS and found the trees to still be there. I ended the flight, went into the scenery setup page, moved the area priority, and only then did FS read the now reset default.xml and stop displaying the new object class I had added to an new .xml file in the Autogen directory. Why Annotator would pick up extra classes is beyond me unless it is somehow magically linked to how FS loads its scenery and object info. I wouldn't have thought Annotator to be that sophisticated. Good news is I still have my code intact to add lines into the Default.xml and will go back to that method.Art Martin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this