Object library creation using Library Creator XML: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== How to create a FsX library ==  
{{Infobox-Applicable-FSVersion
| FSXI = false
| FSXA = true
| FSX = true
| FS2004 = true
| FS2002 = false
| FS2000 = false
| FS98 = false
}}


A library is a bgl file which contains one or more mdl (model) files. During placement of a model a reference is made to the model in that library file. Presume you created a windmill and put it in a library. Then you can place this model several times in several area's just by referencing that model.
== How to create an object library ==
 
A library is a bgl file which contains one or more mdl (model) files. During placement of a model a reference is made to the model in that library file. Presume you created a windmill and put it in a library. Then you can place this model several times in several areas just by referencing that model.


=== Use Library Creator XML ===
=== Use Library Creator XML ===
Line 9: Line 19:
* Install Library Creator XML
* Install Library Creator XML
* Configure it:
* Configure it:
** Select Options > FsX BGLComp path
** When using FSX: Select Options > FSX BGLComp path
** Browse to the location of BglComp.exe which can be found in the SDK. In a default installation this will be "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\BGL Compiler SDK".
** Browse to the location of BglComp.exe for FSX which can be found in the SDK. In a default installation this will be "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\BGL Compiler SDK".
** Select Options and check Relative paths
** When using FS2004: Select Options > FS2004 BGLComp path
** Browse to the location of BglComp.exe for FS2004 which can be found in the SDK.
** Select Options and check Relative paths (this is optional, but advised when working in a team and you want to easily share sources with others).


=== Create the library ===
=== Create the library ===
Line 20: Line 32:
* Fill in a file name. In my example I called it my_sample_library.xml
* Fill in a file name. In my example I called it my_sample_library.xml
* Click on Save
* Click on Save
* Select the button "Add MDL objects" in the lower left corner and browse to the location of the mdl files. Notice in the white area that your mdl file has been added. Click the plus sign to see the GUID. <br><br>[[Image:libraryCreatorXML.jpg]]<br><br>
* Select the button "Add MDL objects" in the lower left corner and browse to the location of the mdl files. Notice in the white area that your mdl file has been added. Click the plus sign to see the GUID.
* Click on Save so that you can later open the XML source file again to add more objects to it.
 
[[Image:libraryCreatorXML.jpg]]


=== Compile the library ===
=== Compile the library ===
Line 28: Line 43:
* Fill in the file name
* Fill in the file name
* Click on Save to start the compilation
* Click on Save to start the compilation
* The following content will be shown if the compilation is succesfull: <br><br>[[Image:libraryCreatorXML_compilation_log.jpg]]<br><br>
* The following content will be shown if the compilation is succesfull:
 
[[Image:libraryCreatorXML_compilation_log.jpg]]


<br>
[[category:Scenery Design]]

Latest revision as of 01:35, 5 July 2008

How to create an object library

A library is a bgl file which contains one or more mdl (model) files. During placement of a model a reference is made to the model in that library file. Presume you created a windmill and put it in a library. Then you can place this model several times in several areas just by referencing that model.

Use Library Creator XML

It is possible to create a library bgl by hand, but there are several simple tools which can do that. One of these is "Library Creator XML".

  • Download the latest "Library Creator XML" from http://www.fsdeveloper.com > Downloads > Scenery Design > Tools
  • Install Library Creator XML
  • Configure it:
    • When using FSX: Select Options > FSX BGLComp path
    • Browse to the location of BglComp.exe for FSX which can be found in the SDK. In a default installation this will be "C:\Program Files\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Environment Kit\BGL Compiler SDK".
    • When using FS2004: Select Options > FS2004 BGLComp path
    • Browse to the location of BglComp.exe for FS2004 which can be found in the SDK.
    • Select Options and check Relative paths (this is optional, but advised when working in a team and you want to easily share sources with others).

Create the library

Create a library as follows by making a xml file which will be compiled to a bgl file:

  • Select File > New library...
  • Browse to a location where you want to store the xml file
  • Fill in a file name. In my example I called it my_sample_library.xml
  • Click on Save
  • Select the button "Add MDL objects" in the lower left corner and browse to the location of the mdl files. Notice in the white area that your mdl file has been added. Click the plus sign to see the GUID.
  • Click on Save so that you can later open the XML source file again to add more objects to it.

Compile the library

  • Select "File > Compile library BGL..."
  • Select a location where to store the bgl
  • Fill in the file name
  • Click on Save to start the compilation
  • The following content will be shown if the compilation is succesfull: