Using Asset Packager Version 1.1
From Multiverse
| Asset Management |
|
Overview and Setup • Download an Asset Repository • Using Asset Importer • Using Asset Packager • Team Development |
| Reference |
|
Anatomy of a Repository • Asset Definition Files • Asset List Files |
Asset Packager is the Multiverse tool for working with asset repositories. This article describes Asset Packager specifically. For additional information on asset repositories in general and other related tools, see Setting Up an Asset Repository.
Contents |
Running Asset Packager
To run Asset Packager, double-click on the desktop icon. The Asset Packager looks like this:
Asset Packager's primary purpose is to create an asset repository containing all the media assets required by a world. Asset Packager will read the .worldassets file created by World Editor to determine exactly what assets are required, and then copy all the asset files to a designated asset repository. Additionally, you can create .assetlist files to specify additional assets to include in the asset repository.
Running from the command line
In addition to using the GUI, you can also run Asset Packager from the command line. The C:\Program Files\Multiverse Tools\AssetTools directory must be your working directory or on your PATH.
The syntax is:
AssetPackager --new_asset_repository directory
{--set_default_repository directory | [option [argument] ... ]]}
The required --new_asset_repository option specifies the directory to which to copy the asset repository. All the others are optional.
See Command Line Syntax for a general description of command-line syntax notation.
Options are:
| Option | Description | Arguments, if any |
|---|---|---|
| --assetlist_file | Specifies an asset list file, containing the names of assets to include. If not used, you must use --worldassets_file option. Can specify multiple times. | Name of asset list file |
| --dont_copy_asset_defs | If specified, does not copy asset definition files (.asset files) or the asset list files (.assetlist files). | None |
| --new_asset_repository | Specifies the directory to which the Asset Packager will copy asset files. This option is required. | Directory where the Asset Packager will copy the media files. |
| --set_default_repository | If specified, must be the only command-line argument. Sets the default asset repository to the folder given by the argument, and exits immediately.
Use this option multiple times to specify more than one default asset repository directory. | Asset repository root directory |
| --source_repository | specify the asset repository from which assets will be copied. Using the command-line argument eliminates the requirement to designate the the asset repository, which is useful when dealing with more than one asset repository. | Source asset repository root directory |
| --worldassets_file | If not used, you must use --assetlist_file option. | Name of .worldassets file generated by the World Editor |
Designating asset repositories
Before doing anything with Asset Packager, you must designate at least one asset repository: Click Designate Source Asset Repository and choose one or more directories. If you have designated asset repositories with other Multiverse tools, Asset Packager will use those asset repositories.
Asset Packager will display the list of designated asset repositories in the lower left of the window.
Creating an asset repository for a world file
With World Editor, you add static assets to a world, such as buildings, trees, and so on. World Editor enumerates all assets in a world file in the corresponding world assets file (with .worldassets filename extension).
To create an asset repository that contains all the assets used by a world file, follow these steps:
- Click "Browse..." to the right of the World Assets File text field to select a world assets (
.worldassets) file created by World Editor. - Select any asset list files to add additional assets required by the world. See the following section for more information. Asset Packager will show any asset list files in the designated asset repository. Select from this list, or click "Browse..." to browse for asset list files elsewhere.
- Click "Browse..." to the right of the Target Asset Repository text field to select a directory to create the new asset repository.
- In development, leave the "Copy Asset Definition Files" Checkbox checked. Otherwise, uncheck it to omit asset definition files and asset list files from the asset repository.
- Click "Copy Assets to Asset Repository" to create a new asset repository in the specified directory.
Adding additional assets to a repository
In general, the Multiverse Client may require additional assets that are not referenced by the world file, for example:
- Client UI XML files and Python scripts (in the
Interface/FrameXMLdirectory ). - Sound files.
- Mob and player character assets that are dynamically added to a world at runtime.
To include these assets in an asset repository:
- Create one or more asset list files as described below.
- Select the asset list files to include with Asset Packager: if the file is in the asset repository directory, it will be shown in the Asset List Files list; simply check the checkbox. Otherwise, click "..." to browse to the asset list file and then select it.
- When you click "Copy Assets To Asset Repository", Asset Packager will include all the assets in the asset list files, in addition to those in the world assets file.
Creating an asset list file
An asset list file is simply a text file (with filename extension .assetlist) that specifies additional assets to include in a repository. Each line of the file lists one asset file or asset definition (.asset) file. All the prebuilt asset repositories include examples of asset list files.
For assets that require multiple files, you only need to include the "top level" asset definition file, and Asset Packager will include all the files referenced directly or indirectly. For example, for a 3D model, just list the mesh asset definition file, which references the required material files and perhaps other files.
NOTE: It's OK if an asset is listed in both the world assets file and in an asset list file. Asset Packager will only copy it once into the repository.
For example, here is the ClientUIAssets.assetlist file:
# Assets needed for _any_ world AlphaSplatTerrain_Material.asset DetailVeg_Material.asset directional_marker_Mesh.asset HMETerrain_Material.asset MVSMTerrain_Material.asset Ocean_Material.asset Terrain_Material.asset Trees_Material.asset Water_Material.asset # Assets used by the UI AdditionalUIAssets AxiomIcon_Icon Library_PythonScript MarsPlayer_FrameXML MarsTarget_FrameXML MarsUnit_FrameXML MvActionBar_FrameXML MvActionButton_FrameXML MvCharacter_FrameXML MvChat_FrameXML MvContainer_FrameXML MvDialog_FrameXML MvFonts_FrameXML MvFrame_FrameXML MvItemButton_FrameXML MvStatus_FrameXML MvTooltip_FrameXML tiny_cube_Mesh
Additional tasks
You can also use Asset Packager to:
- Merge two repositories
- Create a subset of a repository
- Backup a respository
Merging two repositories
To merge two asset repositories:
- Click Designate Source Asset Repository.
- Browse to the first asset repository, and click OK.
- Click New Asset Repository.
- Browse to the directory to contain the merged asset repository, and click OK.
- Create an asset list file containing the assets in the second asset repository.
- Click Copy Assets To Asset Repository to create the merged asset repository.
Creating a subset of a repository
To create a subset of an asset repository
- Create an asset list file containing the names of the asset definitions in the subset you wish to create.
- Click Asset List Files.
- Browse to the asset list file, and click OK.
- Click Copy Assets To Asset Repository, without selecting a world assets file.
Backing up a repository
To backup the designated asset repository:
- Click Designate Source Asset Repository.
- Browse to the asset repository you want to backup, and click OK.
- Click New Asset Repository Directory.
- Browse to the directory where you want to create the backup, and click OK.
- Create an asset list file listing all the assets in the repository.
- Click Asset List Files.
- Browse to the asset list file, and click OK.
- Click Copy Assets To Asset Repository to backup the source asset repository in the specified location.

