The Python script
CSL2XSB can do the following to your CSL models:
convert packages to work with LiveTraffic, tested with X-CSL, which is often used with X-IvAp
enable features like rotating props and rotors, rolling wheels, opening reversers, tested on the Bluebell package
If you know how to work a command line and call a Python script then you'd probably better off with the description here.
The following tries to describe the necessary steps for beginners, i.e. it describes the one way I think is the most simplest:
Install Python, a modern scripting language:
On Python's download page, click on "Latest Python 3 release", scroll all the way to the end, and download "Windows x86-64 web-based installer" and run it.
Important: Check (select) the option "Add Python 3.x to PATH" at the bottom of the "Install Python" window.
Click on "Install Now". Python will install.
When done, click "Close" in the "Setup was successfull" screen.
MacOS: Download the latest "macOS 64-bit installer" from Python's download page and install it by double-clicking the downloaded
.pkg file and following instructions.
Linux: For Ubuntu and similar:
sudo apt-get install python3
Download the CSL package you want.
X-CSL packages can be downloaded here. If you don't already have the package (e.g. because you use X-IvAp) then download and start the installer. The installer will not identify LiveTraffic as a supported plugin. Instead, from the menu select
File > Select Custom Path and specify a path where the CSL packages are to be downloaded to and where they later can be updated.
Download other packages as you like...
Do not let
CSL2XSB.py run on this original download. Always make a copy of the entire folder into a folder LiveTraffic can reach later, e.g. to
CSL2XSB.py script into the same folder, i.e. into the base path of what you want to convert.
With LiveTraffic v1.20 the script is included in the
LiveTraffic/Resources folder, under which usually all CSL packages are located. That is a good place.
CSL2XSB.py in interactive mode:
CSL2XSB.py in the Windows explorer to start the script.
Open a terminal window by starting
In the terminal, change to the directory where CSL2XSB.py is located, e.g. by entering:
cd '/Applications/X-Plane 11/Resources/plugins/LiveTraffic/Resources'
if your X-Plane installation is in
(You don't need to type all the folder names, enter 3-4 characters and hit [Tab] to extend to the full folder name.)
Start the script by entering the command
Open a terminal window
In the terminal, change to the directory where
CSL2XSB.py is located, e.g. by entering:
Start the script by entering the command
will ask you "Do you want to run CSL2XSB on the current directory "..."?". Enter "Y" and hit Enter.
You will see messages about the folders being processed. You might see some warnings about not found texture files, which are problems in the underlying CSL package to be solved by their developers.
When done the script waits for you to hit [Enter] so you have a chance to scroll through the messages.
Start X-Plane/LiveTraffic, go to CSL Settings,
enter the just converted path as a new CSL path next to the already existing ones,
and click the save button to save the path and load the models.
if you want to load that package automatically next time, verify there's a check mark in front next to Auto Load.
The script runs over all subdirectories and changes
*.obj files it finds along the way, i.e. it changes your CSL packages. You can run it directly from
LiveTraffic/Resources, then it will walk over all your CSL package under that folder.
CSL2XSB tries to keep the original copies of each file with additional extension
.orig. When run again and again, it even runs based on these original files, so you can just run the script over and over again, e.g. to make use of new feature added to the script. Still, you want to keep a backup of your original files.
The main task here is to resolve an additional parameter to the
OBJ8 command in
xsb_aircraft.txt, introduced in other forks of the multiplayer library. These parameters allow CSL package creators to ship just one
.obj file with the plane model (say A320), but several textures for different liveries (say BAW, DLH, AAL...). The additional parameters define the necessary livery texture files. This saves a lot of space as only one
.obj file is necessary.
This design approach is disputed and LiveTraffic doesn't support it. Instead, CSL2XSB
reads these additional parameters from
creates the required additional
.obj files pointing to the various texture files, then
xsb_aircraft.txt to point to the newly created
So it would create
A320_AAL.obj, which are essentially just copies of the original
A320.obj, with just two lines changed: those defining the texture. This eats a lot more space (an additional 1.2 GB for the full X-CSL package), but stays consistent with the original format.
Along the way, the script cleans up some common errors in the
xsb_aircraft.txt file. For even more details see the README.md on GitHub.
The Bluebell package contains many models, which have originally been created for WorldTraffic. The models contain already features like rotating rotors, rolling wheels or opening reversers. Before LiveTraffic v1.20 there were simply no dataRefs available to control these animations. So Bluebell just left dataRefs alone, which couldn't be mapped to an original libxplanemp dataRef, so props or wheels didn't turn.
LiveTraffic now offers a few more animation control dataRefs. The script, technically quite simplistic, includes a replacement table to replace a WorldTraffic dataRef with the matching LiveTraffic dataRef, so that LiveTraffic now can control these animations.