Monday, September 18, 2006

Stupid Library Tricks

Here's something a little bit surprising about the library: the EXPORT command in a library.txt file cannot replace another file in the same package.

For X-Plane 850 we added cars driving on the left side of the road for New Zealand, the UK, Japan, and other countries that drive on the wrong side of the road. Unfortunately what I did was export two files from the same package - one with a region restriction (to these few countries) and a later one with none.

Consider the sum of these two statements...the result is that in New Zealand, the UK, etc. the sim will use either of the two files, picking randomly.

850 will address this with a new library command. Whereas the "export" command normally provides one of multiple alternatives within a package (but replaces any lower ranked packages), the new "export_exclude" command will replace alternatives both within the same package and within lower ranked packages. Commands are treated sequentially, so an export_exclude should usually be at the top of the library.txt file.

No comments: