The following set of pages describes the process for creating an addon package for use with OpenBVE.
The Package Manager:
Packages may be created and installed from within the main OpenBVE program, using the Package Management tab.
When opening this tab, you will first be presented with a list of the currently installed packages, switchable between Routes , Trains and Other .
The three buttons at the bottom of the page will allow you to install a package, create a new package, or uninstall an existing package respectively.
Creating a Package:
In this example, I’ll assume you’re packaging the OS_ATS Test Route - You’ll need to adjust the directories for whichever route or train you wish to package.
After clicking on the Create Package button, you will be presented with the following screen:
Select the Package Type as ‘route’, and that we are creating a new package. A GUID (Globally Unique Identifier) will be automatically assigned to the package.
Next, using the add items button, add the following folders:
Finally, use the Save As… button to select a filename for the newly created package.
Clicking Proceed will move you on to the following screen:
Here, you can add metadata to your package, such as the author, version etc.
The image for the package may be changed by clicking on the large image.
Similarly, the website for the package may be changed by clicking on the blue link.
The final step in package creation is adding dependancies and reccomendations- For example, you could set this route to depend on the OS_ATS Test Trains , and these will be prompted for on install if they are not already present.
To do this, simply select a package from the list, and press the Add Dependancy or Add Reccomendation buttons.
A dialog will then popup, allowing you to select the minimum and maximum versions that are required- If these are not met upon install, the user will be prompted to either continute anyway, or abort.
The Package Format:
OpenBVE Packages have been designed as a simple, and easily extensible in future format.
They consist of an archive (Currently only ZIP is supported), containing two metadata files- package.xml and package.png
A manually created package.xml file should conform to the following basic structure:
Dependancies may be added using the following structure:
Reccomendations also follow the same format:
It is reccomended that the package.png file be a square image of a minimum of 200px X 200px