December 21, 200322 yr Hi all.This code will place a steam effect on top of the roof of the airport building at Lake Lawn, Wisconsin ( C59 ).==============================<?xml version="1.0"?>==============================the effect is AGL plus the 3.0 meters specified in the alt=Note that the syntax in the SDK is wrong, again. The effect must end with '/>', not with ''.Here's some code that will exclude that building. If this BGL and the effect BGL are in the same "scenery" folder, the effect is not excluded... the exclusion pertains to the objects, effects, etc... of lower priority in the Scenery Library.==============================<?xml version="1.0"?>==============================Dick
December 21, 200322 yr Here's a file I call C59allPlacement:==============================<?xml version="1.0"?>================================Note the exclusion is last on the list, and destroys the objects that exist previous to this Scenery Library level.I'm placing a fueling shack, some steam, a refuel area, and excluding the original building.Dick
December 21, 200322 yr ...and here's the pics:http://forums.avsim.net/user_files/53794.jpghttp://forums.avsim.net/user_files/53795.jpgDick
December 21, 200322 yr Author its starting to come together.I was just thinking, I'll bet folks like Derek Leung are coding like crazy right now! :-))Bob
December 21, 200322 yr Hi all.Generic building code also is a bit different than the SDK:===========================<?xml version="1.0"?>===========================Note again the ending is '/>', not . For a little fun, you can play with the scale.Dick
December 21, 200322 yr Sorry, I needed to repost with plain text:===========================<?xml version="1.0"?>===========================Dick
December 21, 200322 yr Hi all.I'm attaching some code that's a bit long for a post as a zip.It uses the alteration of 'bglcomp.xsd' as Bob Bernstein posted that allows BiasXYZ. ( That is attached as well, as a zip file... just save the code, rename your old .XSD file as .OLD, unzip and rename the attachment as 'bglcomp.xsd' ).The BiasXYZ does work, but not quite as I expected. I use a common Lat-Long refpoint, but each object must exist as a separate SceneryObject... with it's own new Lat-Long stated. That seems a bit silly, but it will save some time computing new placement points, as Buildings can be biased apart by meters.Generic Buildings in the new code are ground-huggers. They cannot be placed at a relative altitude like effects, nor can the AGL be set to FALSE ( and an altitude stated ), nor can they be biased upwards ( or downwards ) on the biasY axis.biasX is East-West Axis( biasY would have been Up-Down Axis )biasZ is North-South AxisDick
December 21, 200322 yr Thanks Dick.Something to read in my learning curve whilst i study XML :0)rgds Jeff
December 21, 200322 yr Hi Jeff.Actually we don't need to know XML, as the code is only used because somebody at MS seems to be in love with that syntax!We're not writing XML, we are just writing pseudocode that uses the MXL syntax. They could just as easily have used BGLC by adding extensions to that compiler! Or invented an entirely different syntax or naming convention. They might have been better off using LOGO or pascal as a basis... or C++.A SCASM update might come to the rescue and give us some code that makes more sense.Just as always, the scenery engine looks at bits, bytes and words. If they had given us the BGLC extension, we would have been able to do much more with the code... as it stands, they have pretty much just given us a new BGLPlacer that has an XML syntatic interface, rather than a GUI front-end.I guess that's the point of this thread... we need to discover what actually works. The SDK writer obviously doesn't know, and MS doesn't seem to want us to know the inner workings of the scenery engine.Dick
December 21, 200322 yr I noticed one think.You are saying that for some tags this doesn't work:a]orand this worksb]I took a closer look and found out that this works too:c]What is the difference between a] and c]??? It is simple. a] contains text betweens starting and ending tag and that is the think that is not allowed. Even just spaces, tags and enters are not allowed. So you can use both b] and c], but you can not use a].
December 21, 200322 yr Hi Marky.What I follow is right from the SDK:Some scenery elements are not allowed to contain other sub-elements. The form of the XML is used to distinguish between these types of elements. Elements allowed to have sub-elements take this form:
December 21, 200322 yr Hi DickThis appears to be an error in the SDK. From my reading of the schema, Beacon is allowed only as a sub-element of AttachedObject.Also, it appears from the schema that an AttachedObject should actually be at the same level as the LibraryObject it is attached to, and probably immediately following it, not contained within the LibraryObject as a sub-element as the SDK shows.You are certainly right about there being a few errors in the SDK and the examples it contains. It seems that Santa's quality control went to pot in his eagerness to get his goodies out to us wee little scenery designers ... :-)CheersGerrish
December 21, 200322 yr Dick, quite a lot of the stuff I have figured out already and made BGLC macros for (over the last months). However, there is no real point using BGLC anymore. I can't come up with even one example where it would be an advantage to have access to the binary code rather than using xml and bglcomp. It looks like bglcomp is complete, not like in previous years where BGLC macros (like for generating airspace) where missing. At the moment, I'm suspecting MS was using the same version of bglcomp to generate the default scenery. Quite a step ahead...I'm sticking with BGLC for decompilation for now, mainly because once FS2006 comes out, it may come in handy (for new, undocumented commands). But for generating scenery, I'll make a switch to xml. The BGLC macros are more complicated...As far as xml is concerned, well, seems to be the fashion of most recent times. You just got to go xml nowadays, or your not hip...Cheers, Christian
December 21, 200322 yr Hi all.an example of Airport code that makes a simple airport ( viewable in Map and in the Go To Airport menu:================================<?xml version="1.0"?>================================It still needs a flatten, so I made one in SCASM:================================Header( 1 42.6322955804054 42.6322955804054 -88.5947021345747 -88.5947021345747 )LatRange( 42.6322955804054 42.6322955804054 ); FLATTEN Area16NElevation ( 299.00 ; elevation in meters42.640758091844 -88.595214002538442.640758091844 -88.593982424679642.6253333999386 -88.593982424679642.6253333999386 -88.5952140025384)End16================================It's name is 'Rhumba Regional' and is found in the heart of Rhumbaflappy, in the state of Mind, city of Delavan. Call Sign is 'RHMB';)Dick
Create an account or sign in to comment