Content Management before 0.7.0
- Note: the information contained in this page pertains to the 0.3 and 0.4 versions of The Ur-Quan Masters. The content system will be revised in the future.
The game uses a virtual file system to access the content. Directories from various locations are combined ("mounted") to form one big file system, where files from a mounted directory are hidden if files with the same name exist on a directory mounted "on top" of it. A directory to be mounted may exist as an actual directory on the operating system's file system, or as a directory within a .zip or .uqm file. And .uqm file is a .zip file but with another name so that people won't accidentally unpack them.
If a file exists in a directory which is mounted read-only, but not in a directory mounted read-write on top of it, then writing to the file will produce a copy in the latter directory.
The following list shows which directories are mounted in the game. The later mentioned ones are mounted on top of the earlier mentioned ones.
|default packages, in alphabetic order||/||read-only|
|add-on packages, in alphabetic order||/||read-only|
|content base directory||/||read-only|
|user data directory||/||read-write|
You can see from this table that unzipped files always override zipped files. This means that using add-on packages to override a zipped base content won't work. This is one of the issues that will be addressed in a next release.
Content base directory
This is the base directory where the content files are stored.
It needs to contain a file named
version with the UQM version number to be accepted by the game.
In it, you'll usually find a directory
packages, which contains the default packages, and indirectly the add-on packages (optionally). The add-on packages are kept in a directory
addons within the
On Windows Systems the content base directory is located in the installation root directory, which can be specified by the user at installation time. Using the installation default
C:\Program Files\The Ur-Quan Masters\, that would place the content directory in
C:\Program Files\The Ur-Quan Masters\content\. The game tries the directory where it is started and the directory "content" within that dir as the content base directory.
On Unix systems, the content directory may vary per packager. If you're building from source, you can specify the installation directory yourself. Per default, the content is stored in
lib/uqm/content/ in the specified installation prefix, which is
/usr/local/ per default.
A wrapper script supplies the content dir location to the game.
To override the default content directory, pass something like
--content-dir /path/to/content to the game.
Default packages are .uqm files located in the directory
packages/ in the content directory. They are mounted automatically, in alphabetic order, with the later ones overriding the earlier ones.
Add-on packages are .uqm or .zip files located in subdirectories of
packages/addons/ in the content directory. If the
--addon argument is passed to the game, the game will use the succeeding argument as the name of a subdirectory in
packages/addons/ from which additional packages will be loaded. The game will mount all the .zip/.uqm files in such a directory in alphabetic order, with the later ones overriding the earlier ones.
--addon argument can be supplied multiple times to include multiple add-on directories. They will be mounted in the order they are supplied, with the later ones overriding the earlier ones.
Files in add-on packages will override files from the default packages.
User data directory
In the user data directory the user's key config, melee config, melee teams, and saved games are stored.
On Unix systems (including Darwin/MacOS X) the user data directory is
On Windows systems, the user data directory is the directory
uqm in the
Application Data directory for the current user. The
Application Data directory is usually in one of the following locations, and may be hidden:
- Windows 95, 98, SE without separate users
- Windows 95/98/SE with separate users
- Windows NT/2k/XP
C:\Documents and Settings\YourName\Application Data\
A temporary directory is used to store some data during the game. This was necessary in older versions of Star-Control, but on modern systems the memory involved is not worth it. It will be removed in a future version.
The temporary directory for the game is a directory created in the operating system's default temporary directory. If an environment variable
TEMP is set, that will be where the temporary directory for the game will be created, otherwise a directory
/tmp/ will be used if that exist. If that directory doesn't exist either, a directory is created in the current working directory.
A typical layout
A typical The Ur-Quan Masters installation on Windows looks like this:
C:\Program Files\The Ur-Quan Masters\uqm.exe C:\Program Files\The Ur-Quan Masters\content\packages\uqm-0.4.0-content.uqm C:\Program Files\The Ur-Quan Masters\content\packages\uqm-0.4.0-3domusic.uqm C:\Program Files\The Ur-Quan Masters\content\packages\uqm-0.4.0-voice.uqm C:\Program Files\The Ur-Quan Masters\content\packages\addons\remix\uqm-remix-pack1.zip C:\Program Files\The Ur-Quan Masters\content\packages\addons\remix\uqm-remix-pack2.zip C:\Program Files\The Ur-Quan Masters\content\packages\addons\remix\uqm-remix-pack3.zip C:\Program Files\The Ur-Quan Masters\content\version
A typical The Ur-Quan Masters installation on Linux looks like this:
/usr/local/bin/uqm (wrapper script) /usr/local/lib/uqm/uqm (the actual executable) /usr/local/share/uqm/content/packages/uqm-0.4.0-content.uqm /usr/local/share/uqm/content/packages/uqm-0.4.0-3domusic.uqm /usr/local/share/uqm/content/packages/uqm-0.4.0-voice.uqm /usr/local/share/uqm/content/addons/remix/uqm-remix-pack1.zip /usr/local/share/uqm/content/addons/remix/uqm-remix-pack2.zip /usr/local/share/uqm/content/addons/remix/uqm-remix-pack3.zip /usr/local/share/uqm/content/version