OniSplit: Difference between revisions

From OniGalore
Jump to navigation Jump to search
(explaining syntax a bit better, more changes coming; updating links for .NET and Mono downloads)
(lots more tips for beginners, general touch-up of command listing to make syntax clearer)
Line 1: Line 1:
{{TOCfloat}}
'''OniSplit''', written by [[User_talk:Neo|Neo]], is an integral part of the [[Anniversary Edition]] and an essential modding tool on its own. It is able to import and export almost all kinds of Oni game data, including textures, sound, 3D models, level geometry and combat animations. Its name comes from its first feature, which was breaking Oni's level data files into individual resources. OniSplit incorporates the latest knowledge about Oni's game data, and it is currently the community's main modding tool.
'''OniSplit''', written by [[User_talk:Neo|Neo]], is an integral part of the [[Anniversary Edition]] and an essential modding tool on its own. It is able to import and export almost all kinds of Oni game data, including textures, sound, 3D models, level geometry and combat animations. Its name comes from its first feature, which was breaking Oni's level data files into individual resources. OniSplit incorporates the latest knowledge about Oni's game data, and it is currently the community's main modding tool.


Line 4: Line 5:
===Download links===
===Download links===
* Latest release of OniSplit: [http://mods.oni2.net/node/38 v0.9.86.0]
* Latest release of OniSplit: [http://mods.oni2.net/node/38 v0.9.86.0]
* The current GUI for OniSplit is [[Vago (tool)|Vago]].
* The current GUI for OniSplit is [[Vago (tool)|Vago]]. '''You should try the GUI to see if it does what you need before working on the command line.'''


===Requirements===
===Requirements===
Line 11: Line 12:
* [http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe .NET 2.0 (x86)]; [http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe .NET 2.0 (x64)]
* [http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x86.exe .NET 2.0 (x86)]; [http://download.microsoft.com/download/c/6/e/c6e88215-0178-4c6c-b5f3-158ff77b1f38/NetFx20SP2_x64.exe .NET 2.0 (x64)]
* [http://www.go-mono.com/mono-downloads/download.html Latest version of mono (requires OS X 10.5+)]
* [http://www.go-mono.com/mono-downloads/download.html Latest version of mono (requires OS X 10.5+)]
<br clear="all" />


==Using it==
==Workflow==
OniSplit is used in up to four different stages when modding:
OniSplit is used in up to four different stages when modding:
# Exporting - using the -export command, a [[Dat|level data file]] is broken into its component resources, .oni files.
# Exporting - using the -export command, a [[Dat|level data file]] is broken into its component resources, .oni files.
Line 18: Line 20:
# Creating - using the -create commands, standard-format files are converted into .oni files.
# Creating - using the -create commands, standard-format files are converted into .oni files.
# Importing - using the -import command, a folder of .oni files is combined into a level data file.
# Importing - using the -import command, a folder of .oni files is combined into a level data file.
Note that "extracting" refers to a conversion from one format to another, but "exporting" only refers to the creation of .oni files from a .dat file. When exporting, no conversion or re-formatting is taking place; the data is simply being copied out of a .dat (any connected binary data in .raw/.sep files will be concatenated to the data from the .dat when making the .oni).
==Beginner's tips==
{{Divhide|For users new to the command line or to OniSplit}}
In Windows, you want to find the Command Prompt. The fastest way to get there is to bring up the Run... dialog with Windows+R, then type "cmd" and hit Enter.  On Macs, the command-line is found in the Terminal app (/Applications/Utilities) (press Command-Spacebar and type "Terminal" to get there faster).


The basic syntax is:
The basic syntax is:
{|
{|
|-
|-
|'''Windows'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">OniSplit.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-create</span> <span style="background:rgb(255,156,156); border-radius:0.33em;">C:\Games\Oni\SomeFolder</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-genmipmaps</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">C:\Games\Oni\GameDataFolder\level1_Final.dat</span></tt>
|'''Windows'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">OniSplit.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-create:trbs</span> <span style="background:rgb(255,156,156); border-radius:0.33em;">C:\Games\Oni\SomeFolder</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-normals</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">C:\Games\Oni\Modding\TRBSMyNewChar.dae</span></tt>
|-
|-
|'''Mac'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">mono OniSplit.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-create</span> <span style="background:rgb(255,156,156); border-radius:0.33em;">/Games/Oni/SomeFolder</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-genmipmaps</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">/Games/Oni/GameDataFolder/level1_Final.dat</span></tt>
|'''Mac'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em;">mono OniSplit.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-create:trbs</span> <span style="background:rgb(255,156,156); border-radius:0.33em;">/Games/Oni/SomeFolder</span> <span style="background:rgb(175,175,255); border-radius:0.33em;">-normals</span> <span style="background:rgb(156,255,156); border-radius:0.33em;">/Games/Oni/Modding/TRBSMyNewChar.dae</span></tt>
|}
|}


Line 35: Line 43:
|<span style="background:rgb(175,175,255); border-radius:0.33em;">'''Option'''</span>||The command.
|<span style="background:rgb(175,175,255); border-radius:0.33em;">'''Option'''</span>||The command.
|-
|-
|<span style="background:rgb(255,156,156); border-radius:0.33em;">'''Full path to folder'''</span>||Whether destination or source, the folder path comes first.
|<span style="background:rgb(255,156,156); border-radius:0.33em;">'''Path to folder'''</span>||Whether destination or source, the folder path comes first. <u>Use the full path to the folder (starting from C:\, or "/" on Macs).</u> For most commands, OniSplit wants a destination folder name, not a file name; the files that OniSplit creates will be named automatically when they are placed in the destination folder. A rare exception is the -import command, where you need to supply the name of the level files to be created.
|-
|-
|<span style="background:rgb(175,175,255); border-radius:0.33em;">'''Option flags'''</span>||The flags that can optionally go with this command.
|<span style="background:rgb(175,175,255); border-radius:0.33em;">'''Option flags'''</span>||The flags that can optionally go with this command, separated by spaces.
|-
|-
|<span style="background:rgb(156,255,156); border-radius:0.33em;">'''Full path to file'''</span>||Whether destination or source, the file path comes second.
|<span style="background:rgb(156,255,156); border-radius:0.33em;">'''Path to file/folder'''</span>||Whether destination or source, the file path comes second. Sometimes the second parameter is also a folder, as with '''-create'''. <u>Use the full path to the folder (starting from C:\, or "/" on Macs).</u>
|}
|}


===CLI tips===
Command-line interfaces (CLI) usually supply an auto-complete feature to save on typing. If you've typed enough of a file/folder name to identify it, press the Tab key and the rest should fill in. In Windows, you may not get the right path name autocompleted on the first try if there are multiple possible autocompletions based on the names in that directory, so keep pressing Tab to cycle through all possibilities. On Macs, if you have not typed enough of the name to narrow it down to a single autocompletion, you will hear an error sound.  Double-tap Tab to see a list of possible autocompletions, then keep typing until you have narrowed it down to one of those and then hit Tab to fill in the rest of its name.
Wildcards can be used to supply patterns to CLI programs. The wildcard is simply the '*' character. For instance:
OniSplit.exe -export:TRAM* <destination> <source .dat>
will export all the TRAMs in the source .dat into the destination folder. Using "TRAMKON*" would export all of Konoko's animations.
===Spaces in paths===
Command-line interfaces (CLI) do not recognize spaces as a possible part of a path name because spaces are what separate terms in your commands. The best course of action is to not use paths with spaces in their names! But if you must, you can use quotes to tell the CLI that a certain string is a single path:
C:\Games\Oni\>OniSplit.exe -list "My Mod Folder\level5_Final.dat"
This works in the Mac Terminal too, but you can also use the escape character, '\'. Also, other characters like '(' need to be escaped as well if you do not use quotes:
iMac:Oni you$ mono OniSplit.exe -list My\ Mods\ \(In\ Progress\)/level5_Final.dat
But as mentioned, the best practice is to not use any characters besides the alphabet and numbers. It makes your life simpler, and if you ask for help on the forum with a command, no one wants to have to read your long path with lots of spaces or escaped characters in it ;-)
===Reading the commands below===
The following commands should be complete, but the current list can be obtained by calling OniSplit with the <tt>-help</tt> option (you should also use <tt>-version</tt> to make sure you're using the same version that's documented here).
The following commands should be complete, but the current list can be obtained by calling OniSplit with the <tt>-help</tt> option (you should also use <tt>-version</tt> to make sure you're using the same version that's documented here).


====Conversion between .dat and .oni====
Occasional sample usages are given after certain commands. These are in DOS style, so simply flip the '\'s to '/'s for Macs and make "C:\" into a leading "/" to indicate "root-level".
 
Optional flags are listed in square brackets simply to indicate that they're optional; don't enter the brackets when typing a command.
 
Note that only the .dat file from a level's data files is mentioned. The .raw and .sep files will be accessed by OniSplit as necessary when working with the .dat file you supply the name of.
{{Divhide|end}}
==Commands==
===Conversion between .dat and .oni===
{|
{|
|<tt>-export <target directory> <source file></tt>||Exports source file (.dat) to target directory
|<tt>-list <file name></tt>||Lists the named resources contained in a .dat (see [[OBD:File_types/Named|HERE]] for info on unnamed resources)
|-
|-
|<tt>-export:pattern <target directory> <source file></tt>||Exports named resource (wildcards also allowed) from source file (.dat) to target directory
|<tt>-export <destination directory> <dat file></tt>||Breaks .dat file into .oni files
|-
|-
|<tt>-import <source directory> <target file></tt>||Imports target file (.dat) from source directory; tries to get target file format from source SNDD
|<tt>-export:<pattern> <destination directory> <dat file></tt>||Exports named resource (wildcards also allowed) from .dat file
|-
|-
|<tt>-import:sep <source directory> <target file></tt>||Imports target file (.dat) from source directory; uses .dat+.raw+.sep format (Mac and PC Demo)
|<tt>-import <source directory> <new dat file></tt>||Compiles level files from source directory using the name you supply for the .dat file; tries to get target file format from source SNDD, but it's better to use the :sep or :nosep variants below
|-
|-
|<tt>-import:nosep <source directory> <target file></tt>||Imports target file (.dat) from source directory; uses .dat+.raw format (PC retail)
|colspan="2"|<span style="padding-left:20px">To create level5_Final.dat/.raw[/.sep] from the files in MyNewLevel\: <code>OniSplit.exe -import C:\Oni\MyNewLevel\ C:\Oni\GameDataFolder\level5_Final.dat</code><span>
|-
|<tt>-import:sep <source directory> <new dat file></tt>||Imports target file (.dat) from source directory; uses .dat/.raw/.sep format (Mac and PC Demo)
|-
|<tt>-import:nosep <source directory> <new dat file></tt>||Imports target file (.dat) from source directory; uses .dat/.raw format (PC retail)
|}
|}
:Note that -import will search subdirectories too. If you find having hundreds or thousand of files .oni in one directory to be unmanageable you can always group them in subdirectories anyway you like. The only exception is that a subdirectory named "noimport" or "_noimport" is always ignored.
:Note that -import will search subdirectories too. If you find having hundreds or thousand of files .oni in one directory to be unmanageable you can always group them in subdirectories any way you like. The only exception is that a subdirectory named "noimport" or "_noimport" is always ignored.


====Management of .oni files====
===Management of .oni files===
Unless mentioned otherwise, the filename field supports wildcards ("*").
Sometimes you want to move some .oni files out of a larger folder of .onis. You could do this manually, but OniSpit knows which files depend on others. It will also look for those dependencies in subfolders beneath the level of the file you supply the name of. The filename field supports wildcards ("*"). This is mostly used by the [[AE]] Installer rather than modders themselves.
:OniSplit consistently detects and manages "dependencies" of .oni files.
::The dependencies of a file are looked up in its folder and subfolders.
{|
{|
|<tt>-deps <filenames></tt>||Displays a list of .oni files that the specified .oni file depends on
|<tt>-deps <oni file></tt>||Displays a list of .oni files that the specified .oni file depends on
|-
|-
|<tt>-copy <target directory> <filenames></tt>||Copies .oni file and its dependencies to target; skips file if it already exists at destination
|<tt>-copy <destination directory> <oni file></tt>||Copies .oni file and its dependencies; skips file if it already exists at destination
|-
|-
|<tt>-move <target directory> <filenames></tt>||Moves an .oni file and its dependencies to target; skips file if it already exists at destination
|<tt>-move <destination directory> <oni file></tt>||Moves an .oni file and its dependencies; skips file if it already exists at destination
|-
|-
|<tt>-move:overwrite <target directory> <filenames></tt>||Moves an .oni file and its dependencies to target; overwrites any existing .oni files
|<tt>-move:overwrite <destination directory> <oni file></tt>||Moves an .oni file and its dependencies; overwrites any existing .oni files
|-
|-
|<tt>-move:delete <target directory> <filenames></tt>||Moves an .oni file and its dependencies to target; doesn't overwrite; deletes source files
|<tt>-move:delete <destination directory> <oni file></tt>||Moves an .oni file and its dependencies; doesn't overwrite; deletes source files
|}
|}
====Conversion between .oni/.dat and 3rd party formats====
 
=====Textures=====
===Conversion between .oni/.dat and 3rd party formats===
Unless mentioned otherwise, source filenames support wildcards. See [[AE:Modifying textures|HERE]] for a detailed tutorial.
====Textures====
Unless mentioned otherwise, source filenames support wildcards. See [[AE:Modifying textures|HERE]] for a detailed tutorial. The -extract commands can work with .oni files (a single file or several files if you use the '*' wildcard), or rip all the TXMPs from a .dat file.
{|
{|
|<tt>-extract:dds <target directory> <filenames></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file in DDS format
|<tt>-extract:dds <destination directory> <dat/oni file></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file into DDS files
|-
|-
|<tt>-extract:tga <target directory> <filenames></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file in TGA format
|<tt>-extract:tga <destination directory> <dat/oni file></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file into TGA files
|-
|-
|<tt>-extract:png <target directory> <filenames></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file in PNG format
|<tt>-extract:png <destination directory> <dat/oni file></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file into PNG files
|-
|-
|align=right|<tt>-create:txmp <targer directory> [-genmipmaps] [-nouwrap] [-novwrap]<br><nowiki>[-format:bgr32|bgra32|bgr555|bgra5551|bgra4444|dxt1]</nowiki><br>[-envmap:texture_name] <filename></tt>
|<tt>-create:txmp <destination directory><br>[-genmipmaps] [-nouwrap] [-novwrap]<br><nowiki>[-format:bgr32|bgra32|bgr555|bgra5551|bgra4444|dxt1]</nowiki><br>[-envmap:texture_name] <image file></tt>
|valign=top|Creates .oni file in target directory from source image
|valign=top|Creates .oni file from image file (PNG, TGA, or DDS)
|}
|}
The -extract commands can work with .oni files (a single file or several files, wildcards possible) or rip all the TXMPs from a .dat file.


=====Models=====
====Models====
[[M3GM]]s, [[ONWC]]s, [[ONCC]]s can be exported to the Wavefront .obj and COLLADA .dae formats. For details see [[Importing character models|HERE]] and [[Importing weapon models|HERE]]
[[M3GM]]s, [[ONWC]]s, [[ONCC]]s can be exported to the Wavefront .obj and COLLADA .dae formats. For details see [[Importing character models]] and [[Importing weapon models]]. The generic -extract commands can work with .oni files (a single file, or several files if you use the '*' wildcard), or rip all the TXMP from a .dat file. TRBS and ONCC support additional -noanim and -anim options for -extract:dae; see [[Importing character models]] for details. Imported geometry must only contain triangles.
{|
{|
|<tt>-extract:obj <target directory> <filenames></tt>||Extracts all M3GM, ONWC and ONCC instances to Wavefront OBJ files
|<tt>-extract:obj <destination directory> <dat/oni file></tt>||Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Wavefront OBJ files
|-
|-
|<tt>-extract:dae <target directory> <filenames></tt>||Extracts all M3GM, ONWC and ONCC instances to Collada files
|<tt>-extract:dae <destination directory> <dat/oni file></tt>||Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Collada DAE files
|-
|-
|<tt>-create:m3gm <target directory> [-tex:texture_name] <filename></tt>||Creates a M3GM .oni in target directory from an .obj file
|<tt>-create:m3gm <destination directory> [-tex:texture_name] <OBJ file></tt>||Creates a M3GM .oni from an .obj file
|-
|-
|<tt>-create:trbs <target directory> [-cel] [-normals] <filename></tt>||Creates a TRBS .oni in target directory from a .dae file
|<tt>-create:trbs <destination directory> [-cel] [-normals] <DAE file></tt>||Creates a TRBS .oni from a .dae file
|}
|}
The generic -extract commands can work with .oni files (a single file or several files, wildcards possible) or rip all the TXMP from a .dat file.
:TRBS and ONCC support additional -noanim and -anim options for -extract:dae, see [[Importing character models|HERE]] for details.
::Imported geometry must only contain triangles. See [[Importing character models|HERE]] for additional options (e.g., cel-shading)


====Levels====
====Levels====
OniSplit can convert AKEV files (level geometry) and the associated file types to and from DAE format:
OniSplit can convert AKEV files (level geometry) and the associated file types to and from DAE format:
{|
|<tt>-extract:dae <destination directory> <AKEV.oni file></tt>||Extracts 3D data in AKEV and related resources from dependencies into Collada file
|}


<tt>-extract:dae <target directory> <name of AKEV.oni source file></tt>  Extracts all AKEV and related instances to Collada files


The next two steps are used on a folder in which you have placed the DAE and XML-formatted instances of the required files, as well as textures in TGA format.  
The next two steps are used on a folder in which you have placed the DAE and XML-formatted instances of the required files, as well as textures in TGA format. See [http://oni.bungie.org/community/forum/viewtopic.php?id=1515 HERE] for details.
{|
|<tt>-create <destination directory><br>[-genmipmaps] [-format:dxt1]<br><source directory></tt>||Converts all AKEV and related instances to .oni files
|-
|<tt>-import:nosep <source directory><br><target file name>.dat</tt>||The standard command for creating .dat/.raw files from .oni files (remember to use the import:sep option on Mac!)
|}


<tt>-create <target directory> -genmipmaps -format:dxt1 <source directory/>*.xml</tt>   Converts all AKEV and related instances to .oni files
====Sounds====
 
The sounds in Windows Oni are stored in WAV format, and on Macs are stored in AIFF format. This also means creating each of your SNDD files in both formats in order to work on both platforms.
<tt>-import:nosep <source directory> <target file name>.dat</tt>   The standard command for creating .dat/.raw files from .oni files (remember to use the import:sep option on Mac!)
{|
|<tt>-extract:wav <destination directory> <dat/oni file></tt>||Rips sound data from an SNDD .oni file (or all SNDDs from a .dat) as .wav files
|-
|<tt>-extract:aif <destination directory> <dat/oni file></tt>||Rips sound data from an SNDD .oni file (or all SNDDs from a .dat) as .aif files
|}


=====Misc=====
====Text====
Some more import/export functions, e.g., to rip sounds or rip/replace subtitles.
{|
{|
|<tt>-extract:wav <target directory> <filenames></tt>||Rips all SNDD as .wav into target folder from source .dat or .oni
|<tt>-extract:txt <destination directory> <dat/oni file></tt>||Rips text data from a SUBT .oni file (or all SUBTs from a .dat) as .txt files
|-
|<tt>-extract:aif <target directory> <filenames></tt>||Rips all SNDD as .aif into target folder from source .dat or .oni
|-
|<tt>-extract:txt <target directory> <filenames></tt>||Rips all SUBT as .txt into target folder from source .dat or .oni
|-
|-
|<tt>-create:subt <target directory> <filename></tt>||Creates a SUBT .oni file in target folder from a .txt file
|<tt>-create:subt <destination directory> <TXT file></tt>||Creates a SUBT .oni file from a .txt file
|}
|}


=====XML=====
====XML====
One of the latest features is conversion of an .oni file (binary) into an XML metafile and back. XML files are more explicit and more readily editable.
One of the latest features is conversion of .oni files to and from an XML file, or an XML metafile and related 3rd-party format files. XML files are easier to read and edit.
::Currently xml export/import is limited to files that do not have raw/sep parts. 2-way conversion is known to work for [[BINA]], [[CONS]], [[DOOR]], [[DPge]], [[FILM]], [[HPge]], [[IGHH]], [[IPge]], [[M3GM]], [[OBAN]], [[ONCC]], [[ONCV]], [[ONLD]], [[ONLV]], [[ONGS]], [[ONSK]], [[ONVL]], [[ONWC]], [[OPge]], [[OSBD]], [[PSpc]], [[PSpL]], [[PSUI]], [[TRAC]], [[TRAM]], [[TRIG]], [[TRGE]], [[TRMA]], [[TRSC]], [[TXMB]], [[TXMP]], [[WMCL]], [[WMDD]], [[WMM_]], [[WPge]].
::Currently XML export/import is limited to files that do not have raw/sep parts. 2-way conversion is known to work for [[BINA]], [[CONS]], [[DOOR]], [[DPge]], [[FILM]], [[HPge]], [[IGHH]], [[IPge]], [[M3GM]], [[OBAN]], [[ONCC]], [[ONCV]], [[ONLD]], [[ONLV]], [[ONGS]], [[ONSK]], [[ONVL]], [[ONWC]], [[OPge]], [[OSBD]], [[PSpc]], [[PSpL]], [[PSUI]], [[TRAC]], [[TRAM]], [[TRIG]], [[TRGE]], [[TRMA]], [[TRSC]], [[TXMB]], [[TXMP]], [[WMCL]], [[WMDD]], [[WMM_]], [[WPge]].
:::For detailed examples and tutorials, see [[XML|HERE]]
:::For detailed examples and tutorials, see [[XML|HERE]]
{|
{|
|<tt>-extract:xml <target directory> <filenames></tt>||Extracts all instances to XML files
|<tt>-extract:xml <destination directory> <oni file></tt>||Extracts .oni file and all related resources to XML files and 3rd-party formats
|-
|-
|<tt>-create <target directory> <filename></tt>||Creates an .oni file in the target directory from an XML file
|<tt>-create <destination directory> <XML file></tt>||Creates an .oni file from an XML file
|}
|}


[[Category:Completed modding tools]][[Category:Bi-platform modding tools]]
[[Category:Completed modding tools]][[Category:Bi-platform modding tools]]

Revision as of 14:41, 26 May 2013

OniSplit, written by Neo, is an integral part of the Anniversary Edition and an essential modding tool on its own. It is able to import and export almost all kinds of Oni game data, including textures, sound, 3D models, level geometry and combat animations. Its name comes from its first feature, which was breaking Oni's level data files into individual resources. OniSplit incorporates the latest knowledge about Oni's game data, and it is currently the community's main modding tool.

Getting it

Download links

  • Latest release of OniSplit: v0.9.86.0
  • The current GUI for OniSplit is Vago. You should try the GUI to see if it does what you need before working on the command line.

Requirements

OniSplit requires .NET 2.0 for Windows and the Mono framework for Mac OS X.


Workflow

OniSplit is used in up to four different stages when modding:

  1. Exporting - using the -export command, a level data file is broken into its component resources, .oni files.
  2. Extracting - using the -extract commands, .oni files are converted to standard-format files that can be edited in various third-party programs.
  3. Creating - using the -create commands, standard-format files are converted into .oni files.
  4. Importing - using the -import command, a folder of .oni files is combined into a level data file.

Note that "extracting" refers to a conversion from one format to another, but "exporting" only refers to the creation of .oni files from a .dat file. When exporting, no conversion or re-formatting is taking place; the data is simply being copied out of a .dat (any connected binary data in .raw/.sep files will be concatenated to the data from the .dat when making the .oni).

Beginner's tips

Commands

Conversion between .dat and .oni

-list <file name> Lists the named resources contained in a .dat (see HERE for info on unnamed resources)
-export <destination directory> <dat file> Breaks .dat file into .oni files
-export:<pattern> <destination directory> <dat file> Exports named resource (wildcards also allowed) from .dat file
-import <source directory> <new dat file> Compiles level files from source directory using the name you supply for the .dat file; tries to get target file format from source SNDD, but it's better to use the :sep or :nosep variants below
To create level5_Final.dat/.raw[/.sep] from the files in MyNewLevel\: OniSplit.exe -import C:\Oni\MyNewLevel\ C:\Oni\GameDataFolder\level5_Final.dat
-import:sep <source directory> <new dat file> Imports target file (.dat) from source directory; uses .dat/.raw/.sep format (Mac and PC Demo)
-import:nosep <source directory> <new dat file> Imports target file (.dat) from source directory; uses .dat/.raw format (PC retail)
Note that -import will search subdirectories too. If you find having hundreds or thousand of files .oni in one directory to be unmanageable you can always group them in subdirectories any way you like. The only exception is that a subdirectory named "noimport" or "_noimport" is always ignored.

Management of .oni files

Sometimes you want to move some .oni files out of a larger folder of .onis. You could do this manually, but OniSpit knows which files depend on others. It will also look for those dependencies in subfolders beneath the level of the file you supply the name of. The filename field supports wildcards ("*"). This is mostly used by the AE Installer rather than modders themselves.

-deps <oni file> Displays a list of .oni files that the specified .oni file depends on
-copy <destination directory> <oni file> Copies .oni file and its dependencies; skips file if it already exists at destination
-move <destination directory> <oni file> Moves an .oni file and its dependencies; skips file if it already exists at destination
-move:overwrite <destination directory> <oni file> Moves an .oni file and its dependencies; overwrites any existing .oni files
-move:delete <destination directory> <oni file> Moves an .oni file and its dependencies; doesn't overwrite; deletes source files

Conversion between .oni/.dat and 3rd party formats

Textures

Unless mentioned otherwise, source filenames support wildcards. See HERE for a detailed tutorial. The -extract commands can work with .oni files (a single file or several files if you use the '*' wildcard), or rip all the TXMPs from a .dat file.

-extract:dds <destination directory> <dat/oni file> Extracts all textures (TXMP) from a Oni .dat/.oni file into DDS files
-extract:tga <destination directory> <dat/oni file> Extracts all textures (TXMP) from a Oni .dat/.oni file into TGA files
-extract:png <destination directory> <dat/oni file> Extracts all textures (TXMP) from a Oni .dat/.oni file into PNG files
-create:txmp <destination directory>
[-genmipmaps] [-nouwrap] [-novwrap]
[-format:bgr32|bgra32|bgr555|bgra5551|bgra4444|dxt1]
[-envmap:texture_name] <image file>
Creates .oni file from image file (PNG, TGA, or DDS)

Models

M3GMs, ONWCs, ONCCs can be exported to the Wavefront .obj and COLLADA .dae formats. For details see Importing character models and Importing weapon models. The generic -extract commands can work with .oni files (a single file, or several files if you use the '*' wildcard), or rip all the TXMP from a .dat file. TRBS and ONCC support additional -noanim and -anim options for -extract:dae; see Importing character models for details. Imported geometry must only contain triangles.

-extract:obj <destination directory> <dat/oni file> Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Wavefront OBJ files
-extract:dae <destination directory> <dat/oni file> Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Collada DAE files
-create:m3gm <destination directory> [-tex:texture_name] <OBJ file> Creates a M3GM .oni from an .obj file
-create:trbs <destination directory> [-cel] [-normals] <DAE file> Creates a TRBS .oni from a .dae file

Levels

OniSplit can convert AKEV files (level geometry) and the associated file types to and from DAE format:

-extract:dae <destination directory> <AKEV.oni file> Extracts 3D data in AKEV and related resources from dependencies into Collada file


The next two steps are used on a folder in which you have placed the DAE and XML-formatted instances of the required files, as well as textures in TGA format. See HERE for details.

-create <destination directory>
[-genmipmaps] [-format:dxt1]
<source directory>
Converts all AKEV and related instances to .oni files
-import:nosep <source directory>
<target file name>.dat
The standard command for creating .dat/.raw files from .oni files (remember to use the import:sep option on Mac!)

Sounds

The sounds in Windows Oni are stored in WAV format, and on Macs are stored in AIFF format. This also means creating each of your SNDD files in both formats in order to work on both platforms.

-extract:wav <destination directory> <dat/oni file> Rips sound data from an SNDD .oni file (or all SNDDs from a .dat) as .wav files
-extract:aif <destination directory> <dat/oni file> Rips sound data from an SNDD .oni file (or all SNDDs from a .dat) as .aif files

Text

-extract:txt <destination directory> <dat/oni file> Rips text data from a SUBT .oni file (or all SUBTs from a .dat) as .txt files
-create:subt <destination directory> <TXT file> Creates a SUBT .oni file from a .txt file

XML

One of the latest features is conversion of .oni files to and from an XML file, or an XML metafile and related 3rd-party format files. XML files are easier to read and edit.

Currently XML export/import is limited to files that do not have raw/sep parts. 2-way conversion is known to work for BINA, CONS, DOOR, DPge, FILM, HPge, IGHH, IPge, M3GM, OBAN, ONCC, ONCV, ONLD, ONLV, ONGS, ONSK, ONVL, ONWC, OPge, OSBD, PSpc, PSpL, PSUI, TRAC, TRAM, TRIG, TRGE, TRMA, TRSC, TXMB, TXMP, WMCL, WMDD, WMM_, WPge.
For detailed examples and tutorials, see HERE
-extract:xml <destination directory> <oni file> Extracts .oni file and all related resources to XML files and 3rd-party formats
-create <destination directory> <XML file> Creates an .oni file from an XML file