OniSplit: Difference between revisions

m
improved wording on command line apps
m (intro wording)
m (improved wording on command line apps)
 
(25 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{update|This article contains links to the now defunct Oni Central Forum. Sections: Commands -> Levels}}
{{TOCfloat|side=right}}
{{TOCfloat|side=right}}
:''Before reading this page, it's a good idea to be familiar with basic Oni [[game data terminology]].''
{{Hatnote|Before reading this page, it's a good idea to be familiar with basic Oni [[game data terminology]].}}
'''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 a command line tool which can 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 original purpose, which was breaking Oni's level data files into individual resources. Later, the ability to convert those resources' data between Oni's format and standard file formats was added. OniSplit incorporates the latest [[OBD|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 a command line tool which can 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 original purpose, which was breaking Oni's level data files into individual resources. Later, the ability to convert those resources' data between Oni's format and standard file formats was added. OniSplit incorporates the latest [[OBD|knowledge about Oni's game data]], and it is currently the community's main modding tool.
:''Subpages:'' [[/Change_log|Change log]] (past versions), [[/WIP|WIP notes]] (upcoming versions)


==Getting it==
==Getting it==
===Download links===
===Download links===
* Latest release of OniSplit: [http://mods.oni2.net/node/38 v0.9.99.0]
* Latest release of OniSplit: [http://mods.oni2.net/node/38 v0.9.99.2] ([https://websvn.illy.bz/browse/Oni2/OniSplit/ source code])
* The current GUI for OniSplit is [[Vago (tool)|Vago]]. '''You should try the GUI to see if it does what you need before working with OniSplit on the command line.'''
* The current GUI for OniSplit is [[Vago (tool)|Vago]]. '''You should try the GUI to see if it does what you need before working with OniSplit on the command line.'''


===Requirements===
===Requirements===
OniSplit requires .NET 2.0 in Windows and the Mono framework in macOS.
*Windows: [https://dotnet.microsoft.com/en-us/download/dotnet-framework .NET framework]
 
*macOS: [https://www.mono-project.com/download/stable/ Mono framework]
* [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]


==Workflow==
==Workflow==
Line 33: Line 33:
==Beginner's tips==
==Beginner's tips==
{{Divhide|show=yes|For users new to the command line or to OniSplit}}
{{Divhide|show=yes|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.
In Windows, there are several options through which you can use OniSplit - out of which it is recommended to get Vago and CMDer:
* [[Vago (tool)|Vago]] is a GUI for OniSplit which allows you to handle all general conversions, save your sessions as project files, input manual commands if needed, and more. The two downsides of it is that it doesn't support Blender yet, forcing the users input commands manually, which in turn are not stored upon ending the session.
* Command Prompt (cmd.exe). Windows' default command line interpreter; it's a very simple application that does not preserve a history of your commands from session to session.
* [https://cmder.app/ CMDer] is an excellent alternative to cmd.exe. It adds a context menu option to open the command line with the current directory set to the folder you right-click in, and it also stores your recently used commands after ending the session.


On Macs, the command line is found in the Terminal app (/Applications/Utilities) (press Command-Spacebar and type "Terminal" to get there faster).
On Macs, the command line is accessed through /Applications/Utilities/Terminal.app (press Command-Space and type "terminal" to get there faster).


===OniSplit syntax===
===OniSplit syntax===
Line 41: Line 44:
{|
{|
|-
|-
|'''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>
|'''Windows'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em; padding:0.15em">OniSplit.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em; padding:0.15em">-create:trbs</span> <span style="background:rgb(255,156,156); border-radius:0.33em; padding:0.15em">C:\Games\Oni\SomeFolder</span> <span style="background:rgb(175,175,255); border-radius:0.33em; padding:0.15em">-normals</span> <span style="background:rgb(156,255,156); border-radius:0.33em; padding:0.15em">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: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>
|'''Mac'''||<tt><span style="background:rgb(235,235,235); border-radius:0.33em; padding:0.15em">mono OniSplit.exe</span> <span style="background:rgb(175,175,255); border-radius:0.33em; padding:0.15em">-create:trbs</span> <span style="background:rgb(255,156,156); border-radius:0.33em; padding:0.15em">/Games/Oni/SomeFolder</span> <span style="background:rgb(175,175,255); border-radius:0.33em; padding:0.15em">-normals</span> <span style="background:rgb(156,255,156); border-radius:0.33em; padding:0.15em">/Games/Oni/Modding/TRBSMyNewChar.dae</span></tt>
|}
|}


Line 50: Line 53:
! style="width:130px"|
! style="width:130px"|
|- valign="top"
|- valign="top"
|<span style="background:rgb(235,235,235); border-radius:0.33em;">'''Invocation'''</span>
|<span style="background:rgb(235,235,235); border-radius:0.33em; padding:0.15em">'''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 Command Prompt/Terminal's current directory, you must provide the full path to it or set the path variable.
|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 Command Prompt/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(175,175,255); border-radius:0.33em; padding:0.15em">'''Option'''</span>||The command.
|- valign="top"
|- valign="top"
|<span style="background:rgb(255,156,156); border-radius:0.33em;">'''Path to folder'''</span>||Whether destination or source, the path which is a folder comes first. <u>Use the full path to the folder (starting from "C:\", or "/" on Macs).</u>
|<span style="background:rgb(255,156,156); border-radius:0.33em; padding:0.15em">'''Path to folder'''</span>||Whether destination or source, the path which is a folder comes first. <u>Use the full path to the folder (starting from "C:\", or "/" on Macs).</u>
|-
|-
|<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(175,175,255); border-radius:0.33em; padding:0.15em">'''Option flags'''</span>||The flags that can optionally go with this command, separated by spaces.
|- valign="top"
|- valign="top"
|<span style="background:rgb(156,255,156); border-radius:0.33em;">'''Path to file'''</span>||Whether destination or source, the path of the file comes second. <u>Use the full path to the file (starting from "C:\", or "/" on Macs).</u> One exception to this parameter being a file is when using <tt>-create</tt> to make a level, in which case this is where you supply the source folder.
|<span style="background:rgb(156,255,156); border-radius:0.33em; padding:0.15em">'''Path to file'''</span>||Whether destination or source, the path of the file comes second. <u>Use the full path to the file (starting from "C:\", or "/" on Macs).</u> One exception to this parameter being a file is when using <tt>-create</tt> to make a level, in which case this is where you supply the source folder.
|}
|}


Line 79: Line 82:
This works in the Mac Terminal too, but you can also use the escape character, <tt>\</tt>. Also, other characters like <tt>(</tt> need to be escaped as well if you do not use quotes:
This works in the Mac Terminal too, but you can also use the escape character, <tt>\</tt>. Also, other characters like <tt>(</tt> need to be escaped as well if you do not use quotes:


  '''MyMac:Oni username$''' mono OniSplit.exe -list My\ Mods\ \(In\ Progress\)/level5_Final.dat
  '''MyMac%''' 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 ;-)
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 ;-)
Line 98: Line 101:
! style="width:430px"|
! style="width:430px"|
|-
|-
|<code>-list <file name></code>||Lists the named resources contained in a .dat (see [[OBD:File_types/Named|HERE]] for info on unnamed resources)
|<code>-list <file name></code>||Lists the named resources contained in a .dat (see [[OBD:File types/Naming|HERE]] for info on unnamed resources)
|-
|-
|<code>-export <destination directory> <dat file></code>||Breaks .dat file into .oni files
|<code>-export <destination directory> <dat file></code>||Breaks .dat file into .oni files
Line 130: Line 133:
===Conversion between .oni/.dat and 3rd party formats===
===Conversion between .oni/.dat and 3rd party formats===
====Textures====
====Textures====
Unless mentioned otherwise, source filenames support wildcards. See [[AE:Modifying textures|HERE]] for a detailed tutorial. The <tt>-extract</tt> 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.
Unless mentioned otherwise, source filenames support wildcards. See [[Modifying textures|HERE]] for a detailed tutorial. The <tt>-extract</tt> 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.
{|
{|
|<code>-extract:dds <destination directory> <dat/oni file></code>||Extracts all textures (TXMP) from a Oni .dat/.oni file into DDS files
|<code>-extract:dds <destination directory> <dat/oni file></code>||Extracts all textures (TXMP) from a Oni .dat/.oni file into DDS files
Line 149: Line 152:
|<code>-extract:obj <destination directory> <dat/oni file></code>||Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Wavefront OBJ files
|<code>-extract:obj <destination directory> <dat/oni file></code>||Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Wavefront OBJ files
|- valign="top"
|- valign="top"
|<code>-extract:dae <destination directory> <dat/oni file></code>||Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Collada DAE files
|<code>-extract:dae <destination directory> [-noanim] <dat/oni file></code>||Extracts 3D data in .oni file (or all M3GM, ONWC and ONCC instances in a .dat) into Collada DAE files
|-
|-
|<code>-create:m3gm <destination directory> [-tex:texture_name] <OBJ file></code>||Creates a M3GM .oni from an .obj file
|<code>-create:m3gm <destination directory> [-tex:texture_name] <OBJ file></code>||Creates a M3GM .oni from an .obj file
Line 155: Line 158:
|<code>-create:trbs <destination directory> [-cel] [-normals] <DAE file></code>||Creates a TRBS .oni from a .dae file
|<code>-create:trbs <destination directory> [-cel] [-normals] <DAE file></code>||Creates a TRBS .oni from a .dae file
|}
|}
Note on -noanim parameter: Normally OniSplit exports the character with an idle animation. If you use -noanim the character is exported in "I" pose, also the pelvis has the coordinates x=0, y=0, z=0.


====Levels====
====Levels====
Line 163: Line 168:




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.
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 [https://web.archive.org/web/20201127180431/http://oni.bungie.org/forum/viewtopic.php?id=1515 HERE] for details.
{|
{|
|- valign="top"
|- valign="top"
Line 195: Line 200:
|<code>-create <destination directory> <XML file></code>||Creates an .oni file from an XML file
|<code>-create <destination directory> <XML file></code>||Creates an .oni file from an XML file
|}
|}
====Blender support====
[[Blender]] by default has a number of issues with most of Oni's assets, however, OniSplit allows exporting them to Blender-readable files with the <tt>-blender</tt> flag.
For more detailed information on how to use the <tt>-blender</tt> flag, please check [[Importing_character_models#Blender-specific_OniSplit_information|Blender specific OniSplit information]].


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