Finish reworking files and directories section

pull/579/head
Bodillium 10 years ago
parent dd8964da99
commit f70ddb5e98

@ -20,102 +20,97 @@ free to specify as many data paths as you would like. In addition, one particula
newly created content files. newly created content files.
\paragraph{Content files} \paragraph{Content files}
\BS{} \MW{} engine is using two types of files: ESM (master) and ESP (plugin). The distinction between those \BS{} \MW{} engine uses two file types: ESM (master) and ESP (plugin). The distinction between the two is often confusing.
is not clear, and often confusing. You would expect the ESM (master) file is used to specify one master, that is modified by the ESPs plugins, You would expect that the ESM (master) file is used to specify a single master which is modified by the ESP files (plugins), and indeed:
and indeed: this is the basic idea. However, original expansions also were made as ESM files, even though they essentially could be this is the basic idea. However, the original expansions are also ESM files, even though they can be described as a really large plugins.
described as a really large plugins, and therefore rather use ESP files. There were technical reasons behind this decision -- somewhat valid There were technical reasons behind this decision -- somewhat valid in the case of original engine, but a more logical file system is
in the case of original engine, but clearly it's better to create a system that can be used is more sensible way. \OMW{} achieves much preferable. \OMW{} achieves this through the creation of our own types of content file.
this with our own content file types.
We support both ESM and ESP files, but in order to make use of new features of OpenMW one should consider using new file types designed We support both ESM and ESP files, but, in order to make use of \OMW{}'s new features, one should consider using new file types designed
with our engine in mind: game files and addon files together called ``content files``. with our engine in mind: game files and addon files, collectively termed \textbf{content files}.
\subparagraph{OpenMW content files} \subparagraph{OpenMW content files}
Game and Addon files are concept somewhat similar to the old ESM/ESP, only in the way it should be from the very beginning. Nothing easier The distinction between game and addon files is similar to that between ESM and ESP, however their relationship to each other is
to describe. If you want to make new game using \OMW{} as engine (so called ``total conversion'') you should create a game file. strictly defined - the former are always master files, and the latter are always plugins. If you want to make a new game using the \OMW{}
If you want to create a addon for existing game file -- simply create addon file. Nothing else matters: The only distinction you should engine (i.e. a ``total conversion''), you should create a game file. If you want to create an addon for an existing game file, simply
consider is if your project is about changing other game, or creating a new one. Simple as that. create an addon file. Nothing else matters: the only distinction you should consider is whether your project involves changing another game,
or creating a new one. Simple as that.
Other simple thing about content files are extensions. We are using .omwaddon for addon files and .omwgame for game files. Furthermore, our content files extensions are .omwaddon for addon files and .omwgame for game files.
%TODO describe what content files contains. and what not. %TODO describe what content files contains. and what not.
\subparagraph{\MW{} content files} \subparagraph{\MW{} content files}
Using our content files is recommended solution for projects that are intended to used with \OMW{} engine. However some players Using our content files is the recommended solution for projects that employ the \OMW{} engine. However, some players will wish to use
wish to use original \MW{} engine, even with it large flaws and lacking features\footnote{If this is actually wrong, we are very the original \MW{} engine, despite its large flaws and lacking features\footnote{If this is wrong, we are a very successful project. Yay!}.
successful project. Yay!}. Also, since 2002 thousands of ESP/ESM files were created, some with really outstanding content. In addition, since 2002 thousands of ESP/ESM files have been created, some with truly outstanding content. Because of this, \OCS{} is
Because of this \OCS{} simply has no other choice but support ESP/ESM files. However, if you decided to choose ESP/ESM file instead committed to supporting ESP/ESM files. If you do decide to use ESP/ESM files rather than our own content files, you are most likely aiming
using our own content file types you are most likely aim at the original engine compatibility. This subject is covered in the very for original engine compatibility. This subject is covered in the very last section of the manual.
last section of this manual. %not finished TODO add the said section. Most likely when more features are present. %not finished TODO add the said section. Most likely when more features are present.
The actual creation of new files is described in the next chapter. Here we are gonna focus only on details that you need to know The actual creation of new files is described in the next chapter. Here we are going to focus only on the essential information needed
in order to create your first \OCS{} file while full understanding your needs. For now let's jut remember that content files to create your first \OCS{} file. For now, let's jut remember that content files are stored in the user directory, in the \textbf{data} subfolder (the particular data directory mentioned above).
are created inside the user directory, in the the \textbf{data} subfolder (that is the one special data directory mentioned earlier).
\subparagraph{Dependencies} \subparagraph{Dependencies}
Since addon is supposed to change the game it is logical that it also depends on the said game. It simply can not work otherwise. Since addons aim to modify an existing game, it is logical that they also depend on the said game: otherwise they will not function.
Just think about it: your modification is changing prize of the iron sword. But what if there is no iron sword in game? That is right: For example, your modification changes the price of iron swords. But what if there are no iron swords in the game? That is right:
we get nonsense. What you want to do is to tie your addon to the files you are changing. Those can be either game files (expansion island it is nonsense. Therefore, it is necessary to make your addon a dependency of other content files. These can be either game files
for a game) or other addon files (house on the said island). It is a good idea to be dependent only on files that are really changed (e.g. an entirely new island), or other addon files (e.g. a house on the island). It is a good idea for addons to depend only on the
in your addon obviously, but sadly there is no other way to achieve this than knowing what you want to do. Again, please remember that content files they modify, but this is up to the end user to determine.
this section of the manual does not cover creating the content files -- it is only theoretical introduction to the subject. For now just
keep in mind that dependencies exist, and is up to you what to decide if your content file should depend on other content file. Game files do not depend on any other content files, as they act as master files. A player can only use one game file at a time
(although this does not apply to the original and dirty ESP/ESM system).
Game files are not intend to have any dependencies for a very simple reasons: player is using only one game file (excluding original
and dirty {ESP/ESM} system) at the time and therefore no game file can depend on other game file, and since game file makes the base
for addon files -- it can not depend on addon files.
%\subparagraph{Loading order} %TODO %\subparagraph{Loading order} %TODO
\paragraph{Project files} \paragraph{Project files}
Project files act as containers for data not used by the \OMW{} game engine itself, but still useful for OpenCS. The shining example Project files contain data not used by the \OMW{} game engine but which are still needed by OpenCS. Good examples of this data type
of this data category are without doubt record filters (described in the later section of the manual you are reading currently). are the record filters (described below). As a mod author, you probably do not need and/or want to distribute project files at all,
As a mod author you probably do not need and/or want to distribute project files at all, they are meant to be used only by you. as they are meant to be used only by you.
Since project files govern how content files are used in OpenCS, they are always used in conjunction with your specific project.
In fact, each time work commences on a new content file without a corresponding project file, a new project file will be created.
As you would imagine, project file makes sense only in combination with actual content files. In fact, each time you start to work Project file extension is ``.project''. The name of the project file is the whole name of the content file with appended extensions.
on new content file and project file was not found, it will be created. For instance, a content file named swords.omwaddon is associated with the project file swords.omwaddon.project.
Project files extension is, to not surprise ``.project''. The whole name of the project file is the whole name of the content file
with appended extensions. For instance swords.omwaddon file is associated with swords.omwaddon.project file.
%TODO where are they stored. %TODO where are they stored.
Project files are stored inside the user directory, in the \textbf{projects} subfolder. This is the path location for both freshly Project files are stored inside the user directory, in the \textbf{projects} subfolder. This is both the location of newly created
created project files, and a place where \OCS{} looks for already existing files. project files, and the place where \OCS{} looks for already existing files.
\paragraph{Resources files} \paragraph{Resource files}
%textures, sounds, whatever %textures, sounds, whatever
Unless we are talking about the fully text based game, like Zork or Rogue, you are expecting that a video game is using some media files: The vast majority of modern video games use what we shall term \textbf{resource files}: models, textures, icons, sounds and so on.
models with textures, pictures acting as icons, sounds and everything else. Since content files, no matter if it is ESP, ESM or new \OMW{} ESPs, ESMs and \OMW{} content files do not contain these files, merely instructions on how they are used. It follows that the \OMW{}
file type do not contain any of those, it is clear that they have to be deliver with a different file. It is also clear that this, engine must be capable of supporting these resource files in order for them to function. Therefore this section cover ways to add
let's call it ``resources file``, have to be supported by the engine. Without code handling those files, it is nothing more than resource files to your content file, and outlines which formats are supported. Later, you will learn how to make use of these files
a mathematical abstraction -- something, that lacks meaning for human beings\footnote{Unless we call programmers a human beings.}. in your content.
Therefore this section must cover ways to add resources files to your content file, and point out what is supported. We are going
to do just that. Later, you will learn how to make use of those files in your content.
\subparagraph{Audio} \subparagraph{Audio}
OpenMW is using {FFmpeg} for audio playback, and so we support every audio type that is supported by this library. This makes a huge list. OpenMW utilises {FFmpeg} for audio playback, so we support every audio type supported by this library. This is a huge list.
Below is only small portion of supported file types. Below is only a small sample of supported file types.
\begin{description} \begin{description}
\item mp3 ({MPEG}-1 {Part 3 Layer 3}) popular audio file format and \textit{de facto} standard for storing audio. Used by the \MW{} game. \item mp3 ({MPEG}-1 {Part 3 Layer 3}) A popular audio file format and the \textit{de facto} standard for storing audio. Used by
\item ogg open source, multimedia container file using high quality vorbis audio codec. Recommended. the \MW{} game.
\item ogg Open source, multimedia container file which uses the high quality vorbis audio codec. Recommended.
\end{description} \end{description}
\subparagraph{Video} \subparagraph{Video}
As in the case of audio files, we are using {FFmepg} to decode video files. The list of supported files is long, we will cover As in the case of audio files, we use {FFmpeg} to decode video files. The list of supported files is long - only the most
only the most significant. significant will be covered.
\begin{description} \begin{description}
\item bik videos used by original \MW{} game. \item bik Format used by the original \MW{} game.
\item mp4 multimedia container which use more advanced codecs ({MPEG-4 Parts 2,3,10}) with a better audio and video compression rate, \item mp4 Multimedia container which use more advanced codecs ({MPEG-4 Parts 2,3,10}) with a better audio and video compression rate,
but also requiring more {CPU} intensive decoding -- this makes it probably less suited for storing sounds in computer games, but good for videos. but which require more {CPU} intensive decoding -- this probably makes it less suited for storing sounds in computer games, but good for videos.
\item webm is a new, shiny and open source video format with excellent compression. It needs quite a lot of processing power to be decoded, \item webm A new, shiny and open source video format with excellent compression. It needs quite a lot of processing power to be decoded,
but since game logic is not running during cut scenes we can recommend it for use with \OMW. but since game logic is not running during cut scenes we can recommend it for use with \OMW.
\item ogv alternative, open source container using theora codec for video and vorbis for audio. \item ogv An alternative, open source container using theora codec for video and vorbis for audio.
\end{description} \end{description}
\subparagraph{Textures and images} \subparagraph{Textures and images}
Original \MW{} game uses {DDS} and {TGA} files for all kind of two dimensional images and textures alike. In addition, engine supported BMP \MW{} uses {DDS} and {TGA} files for all kinds of two dimensional images and textures. In addition, the original engine supported BMP
files for some reason ({BMP} is a terrible format for a video game). We also support extended set of image files -- including {JPEG} and {PNG}. files (although {BMP} is a terrible format for a video game). We also support an extended set of image files -- including {JPEG} and {PNG}.
JPEG and PNG files can be useful in some cases, for instance JPEG file is a valid option for skybox texture and PNG can useful for masks. JPEG and PNG files can be useful in some cases. For instance, a JPEG file is a valid option for a skybox texture and PNG can useful for masks.
However please, keep in mind that JPEG can grow into large sizes quickly and are not the best option with {DirectX} rendering backend. You probabbly still want However, keep in mind that a JPEG can grow large quickly and so are not the best option with a {DirectX} rendering backend. DDS files
to use {DDS} files for textures. are therefore recommended for textures.
%\subparagraph{Meshes} %TODO once we will support something more than just nifs %\subparagraph{Meshes} %TODO once we will support something more than just nifs
Loading…
Cancel
Save