18,700
edits
m (→Just Frame combos: wording) |
m (header fixes) |
||
Line 3: | Line 3: | ||
{{TOCfloat|side=right}} | {{TOCfloat|side=right}} | ||
==General information== | |||
TRAM files — animation data for characters — are basically made of three chunks: | TRAM files — animation data for characters — are basically made of three chunks: | ||
* Metadata or "header": animation type, state, flags, particle, sounds, etc. | * Metadata or "header": animation type, state, flags, particle, sounds, etc. | ||
Line 10: | Line 11: | ||
The term '''animation''' is often shortened to '''anim''' by modders, following the naming of commands in BSL: chr_wait_animstate, chr_wait_animtype, env_anim, etc. | The term '''animation''' is often shortened to '''anim''' by modders, following the naming of commands in BSL: chr_wait_animstate, chr_wait_animtype, env_anim, etc. | ||
TRAMS used in Oni follow a naming pattern. A list of all combat TRAMS in-game and their naming can be found [[Combat moves|here.]] | |||
==Decision path of animation lookup== | |||
* First the game builds a pool of anims a character can use. They are loaded from the TRAC file registered in [[ONCC]], including parent TRACs. | * First the game builds a pool of anims a character can use. They are loaded from the TRAC file registered in [[ONCC]], including parent TRACs. | ||
* Anims from a child TRAC override those of the parent if their combination of state, type and variant is exactly the same. | * Anims from a child TRAC override those of the parent if their combination of state, type and variant is exactly the same. | ||
Line 29: | Line 32: | ||
Confused by how Weights work? Apparently, the Weight value is only one part of the equation — otherwise NINCOMtaunt2 would never execute. If there is only one anim to choose from, it will always play no matter what its Weight, even if it is zero. When it comes to multiple anims being a valid choice, the calculation seems to be: weight / sum of all weights. For NINCOMtaunt2, this means 5 / 105 = 0.047 (4.7%). | Confused by how Weights work? Apparently, the Weight value is only one part of the equation — otherwise NINCOMtaunt2 would never execute. If there is only one anim to choose from, it will always play no matter what its Weight, even if it is zero. When it comes to multiple anims being a valid choice, the calculation seems to be: weight / sum of all weights. For NINCOMtaunt2, this means 5 / 105 = 0.047 (4.7%). | ||
==List of tags, types, and flags== | |||
Use the search function in your browser to quickly find a tag. | Use the search function in your browser to quickly find a tag. | ||
Line 667: | Line 670: | ||
|} | |} | ||
==Export== | |||
TRAM files can be extracted '''A) as pure XML''' files or '''B) as a pair of XML and DAE''' files. For editing the actual animation, you will want to use method B. While exporting an ONCC, you might see errors such as: | TRAM files can be extracted '''A) as pure XML''' files or '''B) as a pair of XML and DAE''' files. For editing the actual animation, you will want to use method B. While exporting an ONCC, you might see errors such as: | ||
Line 679: | Line 682: | ||
Ignore them, as those files doesn't exist. (Someday we should remove them from the TRACs.) | Ignore them, as those files doesn't exist. (Someday we should remove them from the TRACs.) | ||
===Via command line=== | |||
To export a single TRAM: | To export a single TRAM: | ||
onisplit -extract:xml output_path -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname.oni | onisplit -extract:xml output_path -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname.oni | ||
Line 686: | Line 689: | ||
onisplit -extract:xml output_path '''-anim-merge''' -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname1.oni path_to\TRAMnameN.oni | onisplit -extract:xml output_path '''-anim-merge''' -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname1.oni path_to\TRAMnameN.oni | ||
===Via Vago=== | |||
[[Image:Vago_xml_plus_dae_extraction.png|thumb|200px|right|Combined extraction of DAE and XML.]] | [[Image:Vago_xml_plus_dae_extraction.png|thumb|200px|right|Combined extraction of DAE and XML.]] | ||
Line 701: | Line 704: | ||
'''Step 5:''' Click "Convert". | '''Step 5:''' Click "Convert". | ||
===Via Simple OniSplit GUI=== | |||
There was a long-standing problem with combined ONCC/TRAM files where the textures would be missing.<!--[Iritscen: I don't understand this sentence; is it important to keep this historical note?] With an older method you couldn't export non-native TRAM which meant to the TRAM had to be registered in the TRAC the ONCC is using.--> | There was a long-standing problem with combined ONCC/TRAM files where the textures would be missing.<!--[Iritscen: I don't understand this sentence; is it important to keep this historical note?] With an older method you couldn't export non-native TRAM which meant to the TRAM had to be registered in the TRAC the ONCC is using.--> | ||
Line 710: | Line 713: | ||
'''Step 2:''' Hit "Convert". | '''Step 2:''' Hit "Convert". | ||
==Editing 3D data== | |||
===XSI=== | |||
You can load the DAE file into a compatible editor. So far, the community's favorite is {{ModTool}}. | You can load the DAE file into a compatible editor. So far, the community's favorite is {{ModTool}}. | ||
* For the correct Mod Tool settings, see [[Mod Tool#Animating|HERE]]. | * For the correct Mod Tool settings, see [[Mod Tool#Animating|HERE]]. | ||
Line 724: | Line 727: | ||
Also see our [http://oni.bungie.org/forum/viewtopic.php?id=1433 OCF thread]. | Also see our [http://oni.bungie.org/forum/viewtopic.php?id=1433 OCF thread]. | ||
===Blender=== | |||
Theoretically possible. Very difficult in practice and we don't have a tutorial on this one. | Theoretically possible. Very difficult in practice and we don't have a tutorial on this one. | ||
==Import== | |||
onisplit -create output_path path_to\TRAMname.xml | onisplit -create output_path path_to\TRAMname.xml | ||
==Speeding up existing animations== | |||
s10k has created an XmlTools script that allows the speed-up of any existing TRAM by removing frames. More information and download link [http://mods.oni2.net/node/354 here.] | s10k has created an XmlTools script that allows the speed-up of any existing TRAM by removing frames. More information and download link [http://mods.oni2.net/node/354 here.] | ||
==Attacks== | |||
===Extents and XML=== | |||
Ever wondered how the AI can recognize incoming attacks and block or dodge them? Extents (found by geyser and fully uncovered by Neo) are the key. Imagine the character looked at from above, and visualize a circle with this character being at the center of the circle. Now divide this circle into 10° segments, and those are the 36 units of horizontal extents (that is, the lateral reach of the attack). The 0° point is directly in front of the character and 180° is behind the character. The segments run clockwise around the character. So the first Extent tag is the horizontal reach on the 0° line, the second tag is for the line 10° clockwise, and so on. Note that a frontal attack like a simple kick could hit a target not only if he's standing at 0° (directly in front), but also at 10° or 20° to the right, and also at 340° and 350° (a bit to the left). When setting these manually, you should guess the inner and outer ranges of the reach of the attacker's bones that have damage attached to them. Test these values with an AI that blocks often. If you did it right, your attack will often be blocked, but if the extent length is too high, the AIs will react when too far from you, which does not look good. | Ever wondered how the AI can recognize incoming attacks and block or dodge them? Extents (found by geyser and fully uncovered by Neo) are the key. Imagine the character looked at from above, and visualize a circle with this character being at the center of the circle. Now divide this circle into 10° segments, and those are the 36 units of horizontal extents (that is, the lateral reach of the attack). The 0° point is directly in front of the character and 180° is behind the character. The segments run clockwise around the character. So the first Extent tag is the horizontal reach on the 0° line, the second tag is for the line 10° clockwise, and so on. Note that a frontal attack like a simple kick could hit a target not only if he's standing at 0° (directly in front), but also at 10° or 20° to the right, and also at 340° and 350° (a bit to the left). When setting these manually, you should guess the inner and outer ranges of the reach of the attacker's bones that have damage attached to them. Test these values with an AI that blocks often. If you did it right, your attack will often be blocked, but if the extent length is too high, the AIs will react when too far from you, which does not look good. | ||
Line 755: | Line 754: | ||
::36 fields (exactly 36, otherwise it won't compile back into a .oni file), which correspond to areas in 10° intervals around the character as described above. | ::36 fields (exactly 36, otherwise it won't compile back into a .oni file), which correspond to areas in 10° intervals around the character as described above. | ||
===Adding extents to an existing animation=== | |||
Let's say that you want to convert a non-attack animation to a damage-dealing animation. Non-attack TRAMs do not have extents information used to notify the AIs about incoming attacks, so how do you generate this information from the animation? | Let's say that you want to convert a non-attack animation to a damage-dealing animation. Non-attack TRAMs do not have extents information used to notify the AIs about incoming attacks, so how do you generate this information from the animation? | ||
:1. Export the animation to XML with a body attached. If you extract using just "-extract:xml dest_folder TRAMsomething.oni", you'll get the 3D animation data inside the XML (namely, the tags Heights, Velocities, Rotations, PositionOffset, and Positions; for an attack animation, you'll also get Attacks and AttackRing, and inside Attacks' elements, each Attack element will have Extents at the end of it). | :1. Export the animation to XML with a body attached. If you extract using just "-extract:xml dest_folder TRAMsomething.oni", you'll get the 3D animation data inside the XML (namely, the tags Heights, Velocities, Rotations, PositionOffset, and Positions; for an attack animation, you'll also get Attacks and AttackRing, and inside Attacks' elements, each Attack element will have Extents at the end of it). | ||
Line 779: | Line 778: | ||
:5. If you need this information for a patch mod, run "-extract:xml" on the TRAMsomething.oni you've created <u>without</u> using "-anim-body". Now you can copy the Extents and AttackRing data to your XML patch. For an example of how the patch should look, see the [http://mods.oni2.net/node/311 Domino Knockdowns] mod. | :5. If you need this information for a patch mod, run "-extract:xml" on the TRAMsomething.oni you've created <u>without</u> using "-anim-body". Now you can copy the Extents and AttackRing data to your XML patch. For an example of how the patch should look, see the [http://mods.oni2.net/node/311 Domino Knockdowns] mod. | ||
==Combos== | |||
The type and order of player input for triggering a given animation type (such as PPK) is hardcoded, and new animation types cannot be created. To assign an animation type to a specific combo attack, you set a corresponding value in <Lookup><Type>. | The type and order of player input for triggering a given animation type (such as PPK) is hardcoded, and new animation types cannot be created. To assign an animation type to a specific combo attack, you set a corresponding value in <Lookup><Type>. | ||
Line 802: | Line 801: | ||
** key strokes: w, p | ** key strokes: w, p | ||
==Throws== | |||
Throw target animations are registered in the TRAC of the throw initiator (AKA the throw source). Target animations are forced onto the other character, removing the need to have that animation in the target's TRAC. Throw target (TRAM*tgt) animations can only cover up to 256 frames (0-255). | Throw target animations are registered in the TRAC of the throw initiator (AKA the throw source). Target animations are forced onto the other character, removing the need to have that animation in the target's TRAC. Throw target (TRAM*tgt) animations can only cover up to 256 frames (0-255). | ||
===Forward throws=== | |||
Scenario: You load two characters into Mod Tool and rotate (+/-180°) the throw target character because you need them to stand face to face as you work on an animation. When you are done animating, the target animation would need to be reversed again. This means multiplying the velocities by -1; the rotation also needs correcting. So it looks like you need *(-1) for the x rotation and -/+180° (depending on your initial change) for the Y rotation. | Scenario: You load two characters into Mod Tool and rotate (+/-180°) the throw target character because you need them to stand face to face as you work on an animation. When you are done animating, the target animation would need to be reversed again. This means multiplying the velocities by -1; the rotation also needs correcting. So it looks like you need *(-1) for the x rotation and -/+180° (depending on your initial change) for the Y rotation. | ||
====Blender | ====Blender script==== | ||
This is a Blender script for rotating -/+180° and adding PositionOffset to a forward throw Target animation. This was made by a hero from the Blender Discord named Danta. The add_object_offset_about_cursor_Z() function was written by Delano762. | This is a Blender script for rotating -/+180° and adding PositionOffset to a forward throw Target animation. This was made by a hero from the Blender Discord named Danta. The add_object_offset_about_cursor_Z() function was written by Delano762. | ||
Line 894: | Line 893: | ||
</pre> | </pre> | ||
===Excel macro=== | |||
Needs update. | Needs update. | ||
Line 904: | Line 903: | ||
* If you are not afraid of VBA code, you can enter the dev environment by hitting Alt+F11. If you want to extend the attack library with more screenshots and settings, search for "LibraryThrows", " LibraryAttack", "Picture", and "CBAttackHelp.AddItem". | * If you are not afraid of VBA code, you can enter the dev environment by hitting Alt+F11. If you want to extend the attack library with more screenshots and settings, search for "LibraryThrows", " LibraryAttack", "Picture", and "CBAttackHelp.AddItem". | ||
==Run animations== | |||
Here's a breakdown of the Striker's run animations, meant as an illustration for what would be needed to make new run TRAMs. | Here's a breakdown of the Striker's run animations, meant as an illustration for what would be needed to make new run TRAMs. | ||
Line 931: | Line 930: | ||
</gallery> | </gallery> | ||
==List of unused animations== | |||
Here are all the known unused animations. These could be recycled in a new mod. | Here are all the known unused animations. These could be recycled in a new mod. | ||
Line 956: | Line 955: | ||
** female_stun--dae.zip | ** female_stun--dae.zip | ||
==Special effects== | |||
If the scene is overloaded by too many particles (including motion blur), these effects will cease being rendered. So don't overuse effects. | If the scene is overloaded by too many particles (including motion blur), these effects will cease being rendered. So don't overuse effects. | ||
===Color trails=== | |||
Open the XML-accompanied TRAM, search for the "Particles" tag, and insert your markup. | Open the XML-accompanied TRAM, search for the "Particles" tag, and insert your markup. | ||
Line 1,009: | Line 1,008: | ||
</ONCPParticle> | </ONCPParticle> | ||
===Motion blur=== | |||
[[Image:XML_TRAM_willow_kick_with_motion_blur.jpg|thumb|200px]] | [[Image:XML_TRAM_willow_kick_with_motion_blur.jpg|thumb|200px]] | ||
===Impact effect=== | |||
[[Image:XML_TRAM_KONCOMkick_fw_with_ninflash1.jpg|thumb|200px]] | [[Image:XML_TRAM_KONCOMkick_fw_with_ninflash1.jpg|thumb|200px]] | ||