OniSplit: Difference between revisions
m (link fixes) |
(explaining syntax a bit better, more changes coming; updating links for .NET and Mono downloads) |
||
Line 9: | Line 9: | ||
OniSplit requires .NET 2.0 for Windows and the Mono framework for Mac OS X. | OniSplit requires .NET 2.0 for Windows and the Mono framework for Mac OS X. | ||
* [http:// | * [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. | * [http://www.go-mono.com/mono-downloads/download.html Latest version of mono (requires OS X 10.5+)] | ||
==Using it== | |||
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. | |||
# Extracting - using the -extract commands, .oni files are converted to standard-format files that can be edited in various third-party programs. | |||
# 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. | |||
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> | |||
|- | |||
|'''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> | |||
|} | |||
Here's how it breaks down: | |||
{| | |||
! style="width:130px"| | |||
|- | |||
|<span style="background:rgb(235,235,235); border-radius:0.33em;">'''Invocation'''</span>||Windows can refer to the program directly, but Macs use Mono to run the .NET app; note also that if OniSplit.exe is not in the Console/Terminal's current directory, you must provide the full path to it or set the path variable. | |||
|- | |||
|<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(175,175,255); border-radius:0.33em;">'''Option flags'''</span>||The flags that can optionally go with this command. | |||
|- | |||
|<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. | |||
|} | |||
-- | 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==== | ====Conversion between .dat and .oni==== | ||
{| | {| |
Revision as of 00:44, 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
Requirements
OniSplit requires .NET 2.0 for Windows and the Mono framework for Mac OS X.
Using it
OniSplit is used in up to four different stages when modding:
- Exporting - using the -export command, a level data file is broken into its component resources, .oni files.
- Extracting - using the -extract commands, .oni files are converted to standard-format files that can be edited in various third-party programs.
- 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.
The basic syntax is:
Windows | OniSplit.exe -create C:\Games\Oni\SomeFolder -genmipmaps C:\Games\Oni\GameDataFolder\level1_Final.dat |
Mac | mono OniSplit.exe -create /Games/Oni/SomeFolder -genmipmaps /Games/Oni/GameDataFolder/level1_Final.dat |
Here's how it breaks down:
Invocation | Windows can refer to the program directly, but Macs use Mono to run the .NET app; note also that if OniSplit.exe is not in the Console/Terminal's current directory, you must provide the full path to it or set the path variable. |
Option | The command. |
Full path to folder | Whether destination or source, the folder path comes first. |
Option flags | The flags that can optionally go with this command. |
Full path to file | Whether destination or source, the file path comes second. |
The following commands should be complete, but the current list can be obtained by calling OniSplit with the -help option (you should also use -version to make sure you're using the same version that's documented here).
Conversion between .dat and .oni
-export <target directory> <source file> | Exports source file (.dat) to target directory |
-export:pattern <target directory> <source file> | Exports named resource (wildcards also allowed) from source file (.dat) to target directory |
-import <source directory> <target file> | Imports target file (.dat) from source directory; tries to get target file format from source SNDD |
-import:sep <source directory> <target file> | Imports target file (.dat) from source directory; uses .dat+.raw+.sep format (Mac and PC Demo) |
-import:nosep <source directory> <target 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 anyway you like. The only exception is that a subdirectory named "noimport" or "_noimport" is always ignored.
Management of .oni files
Unless mentioned otherwise, the filename field supports wildcards ("*").
- OniSplit consistently detects and manages "dependencies" of .oni files.
- The dependencies of a file are looked up in its folder and subfolders.
-deps <filenames> | Displays a list of .oni files that the specified .oni file depends on |
-copy <target directory> <filenames> | Copies .oni file and its dependencies to target; skips file if it already exists at destination |
-move <target directory> <filenames> | Moves an .oni file and its dependencies to target; skips file if it already exists at destination |
-move:overwrite <target directory> <filenames> | Moves an .oni file and its dependencies to target; overwrites any existing .oni files |
-move:delete <target directory> <filenames> | Moves an .oni file and its dependencies to target; 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.
-extract:dds <target directory> <filenames> | Extracts all textures (TXMP) from a Oni .dat/.oni file in DDS format |
-extract:tga <target directory> <filenames> | Extracts all textures (TXMP) from a Oni .dat/.oni file in TGA format |
-extract:png <target directory> <filenames> | Extracts all textures (TXMP) from a Oni .dat/.oni file in PNG format |
-create:txmp <targer directory> [-genmipmaps] [-nouwrap] [-novwrap] [-format:bgr32|bgra32|bgr555|bgra5551|bgra4444|dxt1] [-envmap:texture_name] <filename> |
Creates .oni file in target directory from source image |
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
M3GMs, ONWCs, ONCCs can be exported to the Wavefront .obj and COLLADA .dae formats. For details see HERE and HERE
-extract:obj <target directory> <filenames> | Extracts all M3GM, ONWC and ONCC instances to Wavefront OBJ files |
-extract:dae <target directory> <filenames> | Extracts all M3GM, ONWC and ONCC instances to Collada files |
-create:m3gm <target directory> [-tex:texture_name] <filename> | Creates a M3GM .oni in target directory from an .obj file |
-create:trbs <target directory> [-cel] [-normals] <filename> | Creates a TRBS .oni in target directory 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 HERE for details.
- Imported geometry must only contain triangles. See HERE for additional options (e.g., cel-shading)
Levels
OniSplit can convert AKEV files (level geometry) and the associated file types to and from DAE format:
-extract:dae <target directory> <name of AKEV.oni source file> 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.
-create <target directory> -genmipmaps -format:dxt1 <source directory/>*.xml 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!)
Misc
Some more import/export functions, e.g., to rip sounds or rip/replace subtitles.
-extract:wav <target directory> <filenames> | Rips all SNDD as .wav into target folder from source .dat or .oni |
-extract:aif <target directory> <filenames> | Rips all SNDD as .aif into target folder from source .dat or .oni |
-extract:txt <target directory> <filenames> | Rips all SUBT as .txt into target folder from source .dat or .oni |
-create:subt <target directory> <filename> | Creates a SUBT .oni file in target folder from a .txt file |
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.
- 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
- 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.
-extract:xml <target directory> <filenames> | Extracts all instances to XML files |
-create <target directory> <filename> | Creates an .oni file in the target directory from an XML file |