Jump to content

WED 1.2 break out objects from AGPs


tkyler

Recommended Posts

What I do not understand is if they want us the users to populate there airports why make so darn difficult and lacking of documentation. Sorry for the rant but this part of XP 10 is very disappointing.

Sparker over at the org asked this question and since my posting rights are revoke over there, I'll answer it here.

First, I could not agree with the statement more Bill....we need documentation and training and it is not an oversight, but simply waiting it's turn to be handled. We have a great idea for getting this underway, but as with anything it takes some time. We are currently working on the aircraft fleet, trying to get it consisent and cleaned up. The big thing we are waiting on for wanting users to make scenery is our automatic submission process through WED. If folks run off and make scenery that is a combination of their own work and the default library stuff, that can't be submitted and we would have quite a mess on our hands.Keep in mind that x-plane is still officially in beta and we are trying to get past that point. So once we get this feature into WED, we will make a very concerted effort to train folks in best practices.

SOOOO, that being said, I will give you a "unapproved", "not sanctioned", and a "DO NOT DISTRIBUTE YOUR SCENERY OR IT WONT WORK" disclaimer. What I am about to explain for "extracting" objects from the AGPs is ONLY suitable for your own scenery. The reason it is so is because you must make a modification to a huge text file, "library.txt" and this is a file that is updated whenever you run the x-plane updater. This means that if you use this method, then run the updater, your changes will be lost and your scenery won't work...but there is a way around that also. We'll make a text file and put the entries in that file...and then copy it over to the library.txt file.

Now here's the thing. WED purposely excludes objects that begin with a "com_" prefix. It was not always this way, this was added when were mid-way through the process of building objects for V10 and we had created and named lots of stuff. The problem was that I had LOTS of objects that were "components" using the 'com_' prefix that could NOT stand alone...and these iterms were cluttering the WED interface horribly. By excluding these objects from the list, a few objects like hangars that should be their own object got swept up in the cleanup pass.

Now the good news, is that what I am about to suggest CAN be integrated into the official 'library.txt' file by us....but it will be a while as I really need to keep my head about me when I dive into those 3D files..and now I'm on planes. Now, refer to the picture of the folder structure. We are looking inside the folder XPlane > Resources > defaults_scenery > airport_scenery and here's what you can do for now.

1.) Open a fresh, empty plain text file...with nothing in it.

2.) In the empty text file, and for every "com_" OBJ that is part of an agp that you want to use by itself, you will create a line in your text file like this:

EXPORT lib/My_OneOff_OBJs/my_category/my_object.obj Real/Path/to/object.obj

Let's go over this line. First you have the directive "EXPORT" followed by a space. Next is the path you want to appear in WED followed by a space. It does not have to follow any naming standard...the only thing is that a slash equates to a "tree triangle" that you turn down in WED and is used for organizational purposes. Finally, after entering what we call the "virtual path", you then enter the real path to the object beginning with the folders listed in "airport scenery" folder.

post-5-0-11153200-1343258127_thumb.jpg

So lets see a real example. If I want a Small Gray Hangar only....and it is part of the AGP...I will write the following in my text file....note that neither the virual path nor the real path have any spaces in them..there are only two 'breaks' in the entire line. One after the word, "EXPORT" and one after the virtual path.

EXPORT TomKyler/MyHangars/gray_hangar.obj Common_Elements/Hangars/objects/com_SmGrayHangar.obj

THEN, I will save that text file and copy that one line to the BOTTOM of the text file called, "library.txt" shown in the image above. There are lots of files called "library.txt" in the x-plane folder, but we are concerned only with the one in this folder. This file is at the top of the "airport_scenery" folder. We copy it to the bottom simply because you are hand editing this file and it is wise to keep all your "non-official" stuff away from official stuff. Now the reason we write this line into a separate file instead of the library.txt file directly...is because IF we write something like 20 lines to build our own little WED library category...then the next time you update, that library.txt file will be wiped clean. By putting your entries into a text file separate from library.txt, it's nice and safe and when you update the next time, you can just copy and paste your entries to the bottom of the new library.txt file after the update. So here's what the library.txt file looks like for our example...(note the last line)

post-5-0-88150300-1343258128_thumb.jpg

..and with that one line in there....launching WED brings up the following:

post-5-0-21200900-1343258130_thumb.jpg

So to recap. We are putting an entry in the library.txt file that maps a virtual path you see in WED, to a real path to an object in the airport scenery folder. The important thing to know is that your virtual path (after the word, EXPORT) can be anything BUT....BUT this virtual path must end with the suffix, ".obj", otherwise you won't see the entry in WED. Then you must type in the real path to the object where the first item in the path is a folder in the airport_scenery folder. Here's another example.

EXPORT BillsCustomStuff/Towers/ModernTower.obj Modern_Airports/Control_Towers/objects/com_ModTwr2.obj

Putting that line in the library.txt file will cause the category, "BillsCustomStuff" to appear in WED. You can verify it works when you see the preview of the object.

OK, so this is a workaround and NOT officially sanctioned by Laminar. If you put something in WED and X-Plane can't find that object in the library.txt file....it can crash the sim on many occasions.

Now say you make a nice scenery package and you want to distribute it eventually. Then what will happen in this case, is when we finally get around to separating these objects from the AGPs and making 'official' library.txt entries for them, you will have to go into your WED scenery and there is a text field there where you can change the name of the virutal path from your custom one that you make in this workaround to the "official" one we come up with in the future....so there is a recourse. Now if you decide to make an object with a component that doesn't stand alone very well...like an airconditioner unit with no building that it's attached to...well, your prospects for getting Laminar to support that is pretty low :)

Hope this helps..use with caution!

P.S. Bill, if you want to take the message back to the org, then Laminar will most definiitely get training out as soon as we can...we certainly won't ignore it and know how important it is.

Edited by tkyler
Link to comment
Share on other sites

Tom,

I want to say thanks and Wow. It will take me a couple of readings to fully understand what you have posted but I have been in the library.txt and did change it to display a couple of objects in WED but was going at it very blindly.

I will PM you about the P.S

Thanks Bill

Link to comment
Share on other sites

Your technique has worked well but I have a issue with the resulting MedGrayHangar.obj. I added the following.


EXPORT BillsCustomStuff/Towers/ModernTower.obj Modern_Airports/Control_Towers/objects/com_ModTwr2.obj
EXPORT BillsCustomStuff/Hangars/MedGrayHangar.obj Common_Elements/Hangars/objects/com_MedGrayHangar.obj

There is some leftover stuff from the agp file that seems to be part of the object. I have included a screen shot but the exclude does not seem to remove it.

Thanks Bill

post-8276-0-66965800-1343355547_thumb.jp

Link to comment
Share on other sites

On some occasions Bill, there will be objects that LOOK like they're a collection of separate objects, when in reality, they are all one objects. As I recall, that hangar comes with some other pieces that just come with it..and is, unfortunately, the best we can offer at the moment. Are you referring particularly to the parking stuff?

Edited by tkyler
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...