OniSplit: Difference between revisions
m (→OniSplit commands: Fixed format) |
(somewhat tighter now) |
||
Line 1: | Line 1: | ||
[[Category:Modding tools]] | |||
'''OniSplit''', written by Neo, is an integral part of the [[Anniversary Edition]] and an essential modding tool on its own. It does the work of splitting and recombining Oni's data files. But it also does much more, such as extracting and creating textures, 3D and .xml files. | '''OniSplit''', written by Neo, is an integral part of the [[Anniversary Edition]] and an essential modding tool on its own. It does the work of splitting and recombining Oni's data files. But it also does much more, such as extracting and creating textures, 3D and .xml files. | ||
== | ==Getting it== | ||
===Download links=== | ===Download links=== | ||
* [http://edt.oni2.net/OS/OniSplit_v0.9.14.zip | * Latest version of OniSplit: [http://edt.oni2.net/OS/OniSplit_v0.9.14.zip v0.9.14]<br> | ||
===Requirements=== | ===Requirements=== | ||
OniSplit requires .NET for | OniSplit requires .NET 2.0 for Windows and the Mono framework for Mac OS X. | ||
* [http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en .NET] | * [http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8edd-aab15c5e04f5&displaylang=en .NET 2.0] | ||
* [ftp://www.go-mono.com/archive/1.2.6/macos-10-universal/6/MonoFramework-1.2.6_6.macos10.novell.universal.dmg Latest version of mono (requires OS X 10.4+)] | * [ftp://www.go-mono.com/archive/1.2.6/macos-10-universal/6/MonoFramework-1.2.6_6.macos10.novell.universal.dmg Latest version of mono (requires OS X 10.4+)] | ||
* [http://edt.oni2.net/AE/MonoFramework10.3.dmg Mono for OS X 10.3] | * [http://edt.oni2.net/AE/MonoFramework10.3.dmg Mono for OS X 10.3] | ||
[[ | |||
---- | |||
==Using it== | |||
The following actions are listed when calling OniSplit with the <tt>-help</tt> option (another informative option is <tt>-version</tt>) | |||
:The command line must be preceded by either <tt>OniSplit.exe</tt> (Windows) or <tt>mono OniSplit.exe</tt> (Mac OS) | |||
::If OniSplit.exe is not in the current folder, you can provide the full/relative path to it or set the path variable. | |||
:::On the Mac, be sure to use / rather than \ in paths. The following instructions are for Windows by default. | |||
====Conversion between .dat and .oni==== | |||
{| | |||
|<tt>-export <target directory> <source file></tt>||Exports source file (.dat) to target directory | |||
|- | |||
|<tt>-import <source directory> <target file></tt>||Imports target file (.dat) from source directory; tries to get target file format from source SNDD | |||
|- | |||
|<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:nosep <source directory> <target file></tt>||Imports target file (.dat) from source directory; uses .dat+.raw format (PC retail) | |||
|} | |||
====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. | |||
{| | |||
|<tt>-deps <filenames></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>-move <target directory> <filenames></tt>||Moves an .oni file and its dependencies to target; 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:delete <target directory> <filenames></tt>||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 [[AE:ModTXMP|HERE]] for a detailed sorta tutorial. | |||
{| | |||
|<tt>-extract:dds <target directory> <filenames></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file in DDS format | |||
|- | |||
|<tt>-extract:tga <target directory> <filenames></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file in TGA format | |||
|- | |||
|<tt>-extract:png <target directory> <filenames></tt>||Extracts all textures (TXMP) from a Oni .dat/.oni file in PNG format | |||
|- | |||
|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> | |||
|valign=top|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 TXMP from a .dat file. | |||
=====Models===== | |||
[[M3GM]]s, [[ONWC]]s, [[ONCC]]s can be exported to the Wavefront .obj and COLLADA .dae formats. For details see [[AE:Importing character models|HERE]] and [[AE:Importing weapon models|HERE]] | |||
{| | |||
|<tt>-extract:obj <target directory> <filenames></tt>||Extracts all M3GM, ONWC and ONCC instances to Wavefront OBJ files | |||
|- | |||
|<tt>-extract:dae <target directory> <filenames></tt>||Extracts all M3GM, ONWC and ONCC instances to Collada files | |||
|- | |||
|<tt>-create:m3gm <target directory> [-tex:texture_name] <filename></tt>||Creates a TRBS .oni in target directory from an .obj file | |||
|- | |||
|<tt>-create:trbs <target directory> [-cel] [-normals] <filename></tt>||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 [[AE:Importing character models|HERE]] for details. | |||
::Imported geometry must only contain triangles. See [[AE:Importing character models|HERE]] for additional options (e.g., cel-shading) | |||
=====Misc===== | |||
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 .aif into target folder from source .dat or .oni | |||
|- | |||
|<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 | |||
|} | |||
=====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 [[ONCC]], [[TRAC]] and [[TRMA]]. | |||
:::For detailed examples and tutorials, see [[AE:XML|HERE]] | |||
{| | |||
|<tt>-extract:xml <target directory> <filenames></tt>||Extracts all instances to XML files | |||
|- | |||
|<tt>-create <target directory> <filename></tt>||Creates an .oni file in the target directory from an XML file | |||
|} |
Revision as of 18:03, 30 May 2008
OniSplit, written by Neo, is an integral part of the Anniversary Edition and an essential modding tool on its own. It does the work of splitting and recombining Oni's data files. But it also does much more, such as extracting and creating textures, 3D and .xml files.
Getting it
Download links
- Latest version of OniSplit: v0.9.14
Requirements
OniSplit requires .NET 2.0 for Windows and the Mono framework for Mac OS X.
Using it
The following actions are listed when calling OniSplit with the -help option (another informative option is -version)
- The command line must be preceded by either OniSplit.exe (Windows) or mono OniSplit.exe (Mac OS)
- If OniSplit.exe is not in the current folder, you can provide the full/relative path to it or set the path variable.
- On the Mac, be sure to use / rather than \ in paths. The following instructions are for Windows by default.
- If OniSplit.exe is not in the current folder, you can provide the full/relative path to it or set the path variable.
Conversion between .dat and .oni
-export <target directory> <source file> | Exports 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) |
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 sorta 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 TXMP 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 TRBS .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)
Misc
Some more import/export functions, e.g., to rip sounds or rip/replace subtitles.
-extract:wav <target directory> <filenames> | Rips all SNDD as .aif 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.
-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 |