Content Management before 0.7.0
- Note: the information contained in this page pertains to the The Ur-Quan Masters versions 0.3 through 0.6.0. The content system is currently under revision: See Content Management in 0.7.0 for details.
This page is guaranteed to be spoiler free. It is safe for you to read this page even if you have not completed playing The Ur-Quan Masters. Links you follow from this page do not share this guarantee unless they also include this text.
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. An .uqm file is internally a .zip file but with another name given, 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.
Whether file name matching is case-sensitive or not depends on the file system of each layer. Files in .zip files are always matched case-sensitively, while files outside of .zip files are matched as normal for the operating system UQM is run on.
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.
When creating add-on packages, make sure that the use of capitals in the file names matches what is expected. This is even important if a package is for use on Windows only; the matching of file names inside content files does not go through the operating system, and is case sensitive.
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 English 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\
On localized versions of Windows, these locations may differ. For instance, in the German version it would be "Anwendungsdaten", not "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
On Mac OS X
A typical The Ur-Quan Masters installation on Mac OS X looks like this:
/Applications/The Ur-Quan Masters/Contents/PkgInfo /Applications/The Ur-Quan Masters/Contents/Info.plist /Applications/The Ur-Quan Masters/Contents/Frameworks/Ogg.framework /Applications/The Ur-Quan Masters/Contents/Frameworks/SDL_image.framework /Applications/The Ur-Quan Masters/Contents/Frameworks/SDL.framework /Applications/The Ur-Quan Masters/Contents/Frameworks/Vorbis.framework /Applications/The Ur-Quan Masters/Contents/MacOS/The Ur-Quan Masters /Applications/The Ur-Quan Masters/Contents/Resources/The Ur-Quan Masters.icns /Applications/The Ur-Quan Masters/Contents/Resources/content/version /Applications/The Ur-Quan Masters/Contents/Resources/content/packages/uqm-0.6.0-content.uqm /Applications/The Ur-Quan Masters/Contents/Resources/content/packages/uqm-0.6.0-voice.uqm /Applications/The Ur-Quan Masters/Contents/Resources/content/packages/addons/remix/uqm-remix-pack1.zip /Applications/The Ur-Quan Masters/Contents/Resources/content/packages/addons/remix/uqm-remix-pack1.zip /Applications/The Ur-Quan Masters/Contents/Resources/content/packages/addons/remix/uqm-remix-pack1.zip
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.6.0-content.uqm C:\Program Files\The Ur-Quan Masters\content\packages\uqm-0.6.0-3domusic.uqm C:\Program Files\The Ur-Quan Masters\content\packages\uqm-0.6.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.6.0-content.uqm /usr/local/share/uqm/content/packages/uqm-0.6.0-3domusic.uqm /usr/local/share/uqm/content/packages/uqm-0.6.0-voice.uqm /usr/local/share/uqm/content/packages/addons/remix/uqm-remix-pack1.zip /usr/local/share/uqm/content/packages/addons/remix/uqm-remix-pack2.zip /usr/local/share/uqm/content/packages/addons/remix/uqm-remix-pack3.zip /usr/local/share/uqm/content/version