Game data terminology: Difference between revisions

added lede, improved some wording, mentioned that .oni files do contain subordinate types of the main instance being exported
m (wording)
(added lede, improved some wording, mentioned that .oni files do contain subordinate types of the main instance being exported)
 
Line 1: Line 1:
{{OBD Home}}
{{OBD Home}}
{{UpdatedForOniX|1.0.0}}
{{UpdatedForOniX|1.0.0}}
A brief introduction to game data-related terms that you will need to know when learning to mod. Also see [[Engine terminology]] to learn more about the engine itself.
;Binary data
;Binary data
A collective term for the game data that Oni runs on. It is mostly distributed into the level data files; though some additional data is found in persist.dat, the term "binary data" tends to refer only to the level data files. Not to be confused with "binary", which refers to a compiled application.
A collective term for all of the game data that Oni runs on. It is mostly distributed among the level data files; though some additional data is found in persist.dat, the term "binary data" tends to refer only to the level data files. Not to be confused with "binary", which refers to a compiled application.


;Level data files
;Level data files
The data for each level is found in a pair of files in Windows retail Oni's [[GameDataFolder]] ending in ".dat" and ".raw". On Macs and in the Windows demo, a file type ending in ".sep" is also used. [[OniX]] also expects .dat/.raw/.sep files, so after the installer converts the user's game data for use with OniX, .sep files will be in use. A set of these two/three files are collectively called level data files.
The data for each level is found in a pair of files in Windows retail Oni's [[GameDataFolder]] ending in ".dat" and ".raw". On Macs and in the Windows demo, a file type ending in ".sep" is also used. [[OniX]] also expects .dat/.raw/.sep files, so the app's installer converts the user's game data to the .dat/.raw/.sep format.


;Instance file
;Instance file
Line 14: Line 16:


;Instance, resource, file
;Instance, resource, file
The use of these terms can be confusing. An instance is often called a file on this wiki, but an instance is not the same as an instance <u>file</u>. An instance is an individual resource, such as a texture. They are sometimes called files because they are distinct pieces of data stored and cataloged in a "file system" composed of a set of .dat/.raw[/.sep] files. In at least some cases they were indeed actual, separate files on the developer's computer before being packed into the level data files.
The use of these terms can be confusing. An instance is often called a file on this wiki, but an instance is not the same as an instance <u>file</u> ending in .dat. An instance is an individual resource such as a texture. They are sometimes called files because they are distinct pieces of data stored and cataloged in a "file system" composed of a set of .dat/.raw[/.sep] files. In at least some cases they were indeed actual, separate files on the developer's computer before being packed into the level data files.


When OniSplit is used to split level data files into individual files for each resource, in effect it is creating thousands of "single-instance instance files", at which point "instance", "file", and "instance file" become basically synonymous.
When OniSplit is used to split level data files into individual files for each resource, in effect it is creating thousands of "single-instance instance files" ending in .oni, at which point "instance", "resource", "file", and "instance file" become basically synonymous.


;Raw file, .raw
;Raw file, .raw
Line 24: Line 26:
Raw files are found in all versions of Oni, whereas separate files, in vanilla Oni installations, only occur in Mac Oni and in the Windows demo. As mentioned earlier, when using OniX, Windows retail installations will also use .sep files because that is the level file format that the engine expects. When separate files are present, raw files are much smaller because several resource types have their data stored in the separate file instead.
Raw files are found in all versions of Oni, whereas separate files, in vanilla Oni installations, only occur in Mac Oni and in the Windows demo. As mentioned earlier, when using OniX, Windows retail installations will also use .sep files because that is the level file format that the engine expects. When separate files are present, raw files are much smaller because several resource types have their data stored in the separate file instead.


Raw and separate files have no file header, since the instance file serves as the table of contents for them. The only structural rules about raw/separate files are that all data parts are stored 32 byte-aligned, and the first 32 bytes of the file are always zero (reserved for runtime pointers). When a level is loaded into memory, the offsets given in the instance file are converted to pointers to the data in the raw/separate files. You can learn the format of raw/separate files [[Raw|HERE]].
Raw and separate files have no file header and are simple blobs of data; this is because the instance file serves as the table of contents for them. The only structural rules about raw/separate files are that (1) all data parts are stored 32 byte-aligned and (2) the first 32 bytes of the file are always zero. When a level is loaded into memory, the offsets given for raw/separate data in various resources are converted to pointers to the actual data in the raw/separate files. You can learn the format of raw/separate files [[Raw|HERE]].


;Template, file type, tag
;Template, file type, tag
A template represents a type of resource, identified by a four-character code (e.g. "SUBT" for subtitle files); this kind of identifier is called a "tag", so modding communities often use the term "tag" to refer to a resource type as a whole. However, just as instances are often called files on this wiki, templates are often called file types. All templates are listed on the [[OBD:File types|File types]] page.
A template represents a type of resource identified by a four-character code (e.g. "SUBT" for subtitle files); this kind of identifier is generically called a "tag", so modding communities often use the term "tag" to refer to a resource type as a whole. However, just as instances are often called files on this wiki, templates are often called file types here. All templates are listed on the [[OBD:File types|File types]] page.


;.oni
;.oni
Generated by [[OniSplit]], these files are Windows-format .dat files which usually contain a single instance extracted from an instance file, with any of the instance's data that might have been contained by the .raw/.sep files appended at the end.
Generated by [[OniSplit]], these files are structurally similar to .dat files except that they only contain a single instance, or one parent instance and various supporting instances if the supporting instances could be considered components of the parent instance; for instance an exported M3GM (a 3D model) will contain all of its 3D data even though this data is held in many small instances of several other templates such as PNTA and VCRA. And unlike how .dat files offload some data to .raw and .sep files, in a .oni file any of the data that might have been contained by the .raw/.sep files is simply appended at the end of the .oni file.


[[Category:Engine docs]]
[[Category:Engine docs]]