Knowledgebase Article 93


Defining Packages

Since version 2.3.76.2 ASC supports the formal definition of Packages.

The package is defined in an .asctxt file.

Example:

package {
   Name = MyPackage
   Description = This is the package containing the MyCoolUnitset. Website: www.MyCool.stuff

Version = 1.3

DependencyCount = 2 Dependency0 { package = ASC version = 2.3.75.2 } Dependency0 Dependency1 { package = MyPackage version = 1.3 } Dependency1

} package

A package has a version number, description and dependencies. This information is embedded in savegames and .ascpbm files and is checked when such a file is loaded.

If a package is missing on the computer where a .ascpbm file is opened, the package description will be displayed. That's why it is recommended to have an URL in the package description where to obtain the package.

The self-dependency (MyPackage depending on MyPackage) serves to ensure that the users opening an .ascpbm have a well defined version of the package. In this example, if a users tries to open an .ascpbm file but he has only MyPackage version 1.2 installed, he will be presented a message telling him to obtain version 1.3 of MyPackage.

ASC automatically detects which packages are used by a given map and only embedd them into files.

In order to detect which package the artifacts of a map belong to, it is essential that the package file is located in the same .ascdat file as the artifacts. Unlike other .asctxt files, it is not possible to have the package description in the asc directory as an independant file. It must be packaged into an .ascdat file!

ASC offers a menu entry Debug/show packages used by map with which you can check from which packages the artifacts on a map are from. This is the information that will be embedded in file when they are saved.

Last change: Sun, 2009-11-01 13:08


search knowledgebase
browse knowledgebase