Skip to content
LX862 edited this page Jan 23, 2024 · 2 revisions

Package Management

OpenBVE now supports the creation and installation of packages

These allow developers to conveniently package a route or train into a package, which contains all necessary files for your content to work, and for users to be able to install these packages easily.

A package also supports the use of dependencies and recommendations.

Please see the Package Management tab in OpenBVE for more details.

Technical Details

A package consists of an archive, containing the following two informational files:

package.xml
package.png

The package.xml file

First, a sample package.xml file:

<?xml version="1.0" encoding="utf-8"?>
<openBVE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Package>
    <Name>BR Class 52 'Western' - D1015 Western Champion</Name>
    <Author>Christopher Lees</Author>
    <Website>http://www.bvecornwall.co.uk</Website>
    <GUID>ec40c19c-a844-47a7-bd24-4c409a581e96</GUID>
    <PackageType>Train</PackageType>
    <Description>This locomotive runs on the latest version of the BVEC_ATS\r\ntrain systems plugin, and represents what I feel to be a\r\nvery reasonable portrayal of the prototype!\r\n\r\nFeature Include:\r\n* Single and twin engine operation.\r\n* Prototypical startup sequence.\r\n* Working turbocharger.\r\n* Working AWS.\r\n* Full external view.\r\n* Fully functional bogies.\r\n\r\nAs with all of my recent products, this locomotive has been designed to work on any platform that OpenBVE supports.\r\n\r\nThis release has been configured with a full set of 8 MK1  coaches on the drawhook (280 tons!)\r\n\r\nThe driver's guide may be found here:\r\nhttp://www.bvecornwall.co.uk/wordpress/br-class-52-western-drivers-guide/</Description>
    <PackageVersion>1.0.0.0</PackageVersion>
    <MinimumVersion />
    <MaximumVersion />
  </Package>
</openBVE>

The xml file must use the openBVE namespace. It must then contain a root node of Package , followed by a series of metadata nodes.

The following metadata nodes are supported:

Name - A string containing the package name.
Author - A string containing the package author
Website - A string containing a link to be launched when the package website button is clicked
GUID - The packages GUID
PackageType - Route , Train or Other
Description - A string containing the package description.
PackageVersion - A string parsable into a System.Version

A package node may also contain the root nodes Dependencies and Recommendations

These must contain a list of packages (As per above), however in this case, the PackageVersion node must be replaced with the following two nodes:

MinimumVersion - A string parsable into a System.Version describing the minimum required version of this package, or blank for any version.
MaximumVersion - A string parsable into a System.Version describing the maximum supported version of this package, or blank for any version.