Difference between revisions of "Content Management before 0.7.0"
(Updated for 0.4.0) |
(0.7.0 is released) |
||
(26 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
− | :''Note: the information contained in this page pertains to the | + | :''Note: the information contained in this page pertains to the [[The Ur-Quan Masters]] versions 0.3 through 0.6.0. For the content system in 0.7.0 (and later), see [[Content Management]]. |
− | |||
− | |||
− | |||
+ | {{safe}} | ||
==Introduction== | ==Introduction== | ||
− | |||
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. | 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. | + | 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. | 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. | ||
==Content directories== | ==Content directories== | ||
− | |||
The following list shows which directories are mounted in the game. The later mentioned ones are mounted on top of the earlier mentioned ones. | The following list shows which directories are mounted in the game. The later mentioned ones are mounted on top of the earlier mentioned ones. | ||
− | + | {|border=1 | |
− | + | !Directory!!Mounted on!!flags | |
− | + | |- | |
− | + | |[[#Default packages|default packages]], in alphabetic order||/ ||read-only | |
− | + | |- | |
− | + | |[[#Add-on packages|add-on packages]], in alphabetic order ||/ ||read-only | |
− | + | |- | |
− | + | |[[#Content base directory|content base directory]] ||/ ||read-only | |
− | + | |- | |
− | + | |[[#User data directory|user data directory]] ||/ ||read-write | |
+ | |- | ||
+ | |[[#Temporary directory|temporary directory]] ||/tmp||read-write | ||
+ | |} | ||
+ | You can see from this table that unzipped files always override zipped files. This means that using add-on packages to override unzipped base content won't work. This is one of the issues that will be addressed in a next release. | ||
==Detailed description== | ==Detailed description== | ||
Line 41: | Line 42: | ||
To override the default content directory, pass something like <code>--content-dir /path/to/content</code> to the game. | To override the default content directory, pass something like <code>--content-dir /path/to/content</code> to the game. | ||
− | |||
===Default packages=== | ===Default packages=== | ||
Default packages are .uqm files located in the directory <code>packages/</code> in the content directory. They are mounted automatically, in alphabetic order, with the later ones overriding the earlier ones. | Default packages are .uqm files located in the directory <code>packages/</code> in the content directory. They are mounted automatically, in alphabetic order, with the later ones overriding the earlier ones. | ||
− | |||
===Add-on packages=== | ===Add-on packages=== | ||
Line 53: | Line 52: | ||
Files in add-on packages will override files from the default packages. | 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=== | ===User data directory=== | ||
Line 59: | Line 59: | ||
On Unix systems (including Darwin/MacOS X) the user data directory is <code>~/.uqm/</code>. | On Unix systems (including Darwin/MacOS X) the user data directory is <code>~/.uqm/</code>. | ||
− | On Windows systems, the user data directory is the directory <code>uqm</code> in the <code>Application Data</code> directory for the current user. The <code>Application Data</code> directory is usually in one of the following locations, and may be hidden: | + | On English Windows systems, the user data directory is the directory <code>uqm</code> in the <code>Application Data</code> directory for the current user. The <code>Application Data</code> directory is usually in one of the following locations, and may be hidden: |
; Windows 95, 98, SE without separate users : <code>C:\Windows\Application Data\</code> | ; Windows 95, 98, SE without separate users : <code>C:\Windows\Application Data\</code> | ||
; Windows 95/98/SE with separate users : <code>C:\Windows\Profiles\YourName\Application Data\</code> | ; Windows 95/98/SE with separate users : <code>C:\Windows\Profiles\YourName\Application Data\</code> | ||
; Windows NT/2k/XP : <code>C:\Documents and Settings\YourName\Application Data\</code> | ; Windows NT/2k/XP : <code>C:\Documents and Settings\YourName\Application Data\</code> | ||
+ | On localized versions of Windows, these locations may differ. For instance, in the German version it would be "Anwendungsdaten", not "Application Data". | ||
===Temporary directory=== | ===Temporary directory=== | ||
Line 70: | Line 71: | ||
The temporary directory for the game is a directory created in the operating system's default temporary directory. If an environment variable <code>TMP</code> or <code>TEMP</code> is set, that will be where the temporary directory for the game will be created, otherwise a directory <code>/tmp/</code> will be used if that exist. If that directory doesn't exist either, a directory is created in the current working directory. | The temporary directory for the game is a directory created in the operating system's default temporary directory. If an environment variable <code>TMP</code> or <code>TEMP</code> is set, that will be where the temporary directory for the game will be created, otherwise a directory <code>/tmp/</code> 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 | + | ===On Mac OS X=== |
+ | A typical The Ur-Quan Masters installation on Mac OS X looks like this: | ||
+ | <code> | ||
+ | /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-pack2.zip | ||
+ | /Applications/The Ur-Quan Masters/Contents/Resources/content/packages/addons/remix/uqm-remix-pack3.zip | ||
+ | </code> | ||
===On Windows=== | ===On Windows=== | ||
− | |||
A typical The Ur-Quan Masters installation on Windows looks like this: | A typical The Ur-Quan Masters installation on Windows looks like this: | ||
<code> | <code> | ||
C:\Program Files\The Ur-Quan Masters\uqm.exe | C:\Program Files\The Ur-Quan Masters\uqm.exe | ||
− | C:\Program Files\The Ur-Quan Masters\content\packages\uqm-0. | + | 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. | + | 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. | + | 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-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-pack2.zip | ||
Line 86: | Line 104: | ||
C:\Program Files\The Ur-Quan Masters\content\version | C:\Program Files\The Ur-Quan Masters\content\version | ||
</code> | </code> | ||
− | |||
===On Linux=== | ===On Linux=== | ||
− | |||
A typical The Ur-Quan Masters installation on Linux looks like this: | A typical The Ur-Quan Masters installation on Linux looks like this: | ||
<code> | <code> | ||
/usr/local/bin/uqm (wrapper script) | /usr/local/bin/uqm (wrapper script) | ||
/usr/local/lib/uqm/uqm (the actual executable) | /usr/local/lib/uqm/uqm (the actual executable) | ||
− | /usr/local/share/uqm/content/packages/uqm-0. | + | /usr/local/share/uqm/content/packages/uqm-0.6.0-content.uqm |
− | /usr/local/share/uqm/content/packages/uqm-0. | + | /usr/local/share/uqm/content/packages/uqm-0.6.0-3domusic.uqm |
− | /usr/local/share/uqm/content/packages/uqm-0. | + | /usr/local/share/uqm/content/packages/uqm-0.6.0-voice.uqm |
− | /usr/local/share/uqm/content/addons/remix/uqm-remix-pack1.zip | + | /usr/local/share/uqm/content/packages/addons/remix/uqm-remix-pack1.zip |
− | /usr/local/share/uqm/content/addons/remix/uqm-remix-pack2.zip | + | /usr/local/share/uqm/content/packages/addons/remix/uqm-remix-pack2.zip |
− | /usr/local/share/uqm/content/addons/remix/uqm-remix-pack3.zip | + | /usr/local/share/uqm/content/packages/addons/remix/uqm-remix-pack3.zip |
/usr/local/share/uqm/content/version | /usr/local/share/uqm/content/version | ||
</code> | </code> | ||
+ | |||
+ | [[Category:About the Star Control series]] |
Latest revision as of 21:33, 4 July 2011
- Note: the information contained in this page pertains to the The Ur-Quan Masters versions 0.3 through 0.6.0. For the content system in 0.7.0 (and later), see Content Management.
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. |
Introduction[edit]
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.
Content directories[edit]
The following list shows which directories are mounted in the game. The later mentioned ones are mounted on top of the earlier mentioned ones.
Directory | Mounted on | flags |
---|---|---|
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 |
temporary directory | /tmp | read-write |
You can see from this table that unzipped files always override zipped files. This means that using add-on packages to override unzipped base content won't work. This is one of the issues that will be addressed in a next release.
Detailed description[edit]
Content base directory[edit]
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 packages
directory.
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[edit]
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[edit]
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.
The --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[edit]
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 ~/.uqm/
.
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
C:\Windows\Application Data\
- Windows 95/98/SE with separate users
C:\Windows\Profiles\YourName\Application Data\
- 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".
Temporary directory[edit]
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 TMP
or 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[edit]
On Mac OS X[edit]
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-pack2.zip
/Applications/The Ur-Quan Masters/Contents/Resources/content/packages/addons/remix/uqm-remix-pack3.zip
On Windows[edit]
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
On Linux[edit]
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