5,389
edits
(brain dump on timelines, the last tick more specifically; rewrote other stuff a bit, too) |
|||
Line 10: | Line 10: | ||
{{OBDtr| 0x004 | lev_id |FFFF00| 01 00 00 00 | 0 | level 0 }} | {{OBDtr| 0x004 | lev_id |FFFF00| 01 00 00 00 | 0 | level 0 }} | ||
{{OBDtr| 0x008 | int32 |FFC8C8| 00 00 00 00 | 0 | runtime only; pointer to animation name }} | {{OBDtr| 0x008 | int32 |FFC8C8| 00 00 00 00 | 0 | runtime only; pointer to animation name }} | ||
{{OBDtr| 0x00C | offset |FFFFC8| A0 B4 80 00 | | {{OBDtr| 0x00C | offset |FFFFC8| A0 B4 80 00 | 0x0080B4A0 | .raw-address of the [[OBD:TRAM/raw0x0C|height]] track (Y-position of the pelvis above the root) }} | ||
{{OBDtr| 0x010 | offset |FFFFC8| E0 B5 80 00 | | {{OBDtr| 0x010 | offset |FFFFC8| E0 B5 80 00 | 0x0080B5E0 | .raw-address of the [[OBD:TRAM/raw0x10|horizontal velocities]] of the character root }} | ||
{{OBDtr| 0x014 | offset |FFFFC8| 60 B8 80 00 | | {{OBDtr| 0x014 | offset |FFFFC8| 60 B8 80 00 | 0x0080B860 | .raw-address of the [[OBD:TRAM/raw0x14|attack part]] }} | ||
{{OBDtr| 0x018 | offset |FFFFC8| 00 00 00 00 | unused | | {{OBDtr| 0x018 | offset |FFFFC8| 00 00 00 00 | unused | .raw-address of the [[OBD:TRAM/raw0x18|damage part]] (used only by "_tgt" animations (throw targets/victims) }} | ||
{{OBDtr| | {{OBDtr| 0x01C | offset |FFFFC8| A0 B8 80 00 | 0x0080B8A0 | ||
{{OBDtr| | | .raw-address of the [[OBD:TRAM/raw0x1C|motion blur part]] }} | ||
{{OBDtr| | {{OBDtr| 0x020 | offset |FFFFC8| C0 B8 80 00 | 0x0080B8C0 | .raw-address of the [[OBD:TRAM/raw0x20|shortcut data]] }} | ||
{{OBDtr| | {{OBDtr| 0x024 | offset |FFFFC8| 00 00 00 00 | unused | .raw-address of the [[OBD:TRAM/raw0x24|throw data]] }} | ||
{{OBDtr| | {{OBDtr| 0x028 | offset |FFFFC8| E0 B8 80 00 | 0x0080B8E0 | .raw-address of the [[OBD:TRAM/raw0x28|footstep data]] }} | ||
{{OBDtr| | {{OBDtr| 0x02C | offset |FFFFC8| 00 B9 80 00 | 0x0080B900 | .raw-address of the [[OBD:TRAM/raw0x2C|particle data]] (trails, dust, etc.) }} | ||
{{OBDtr| | {{OBDtr| 0x030 | offset |FFFFC8| 60 B9 80 00 | 0x0080B960 | .raw-address of the [[OBD:TRAM/raw0x30|position data]] (for basic prediction) )}} | ||
{{OBDtr| | {{OBDtr| 0x034 | offset |FFFFC8| 00 BD 80 00 | 0x0080BD00 | .raw-address of the [[OBD:TRAM/raw0x34|rotations]] (of all body parts) }} | ||
{{OBDtr| | {{OBDtr| 0x038 | offset |FFFFC8| 00 00 00 00 | unused | .raw-address of the [[OBD:TRAM/raw0x38|sound data]] }} | ||
:0x'''01''' 00 00 00 - private1 ( | {{OBDtr| 0x03C | bitset32 |C8FFC8| 90 00 08 00 | attack, atomic, dontAim| flags; same as listed in [[OBD:StNA|StNA]]anim_flags; the bits are as follows: | ||
:0x'''01''' 00 00 00 - private1 (used at runtime only; marks that the animation was loaded) | |||
:0x'''02''' 00 00 00 - invulnerable | :0x'''02''' 00 00 00 - invulnerable | ||
:0x'''04''' 00 00 00 - blockHigh | :0x'''04''' 00 00 00 - blockHigh | ||
Line 50: | Line 51: | ||
{{OBDtr| 0x040 | link |C8FFFF| 00 00 00 00 | unused | direct animation 0 (link to another TRAM file) }} | {{OBDtr| 0x040 | link |C8FFFF| 00 00 00 00 | unused | direct animation 0 (link to another TRAM file) }} | ||
{{OBDtr| 0x044 | link |C8FFFF| 00 00 00 00 | unused | direct animation 1 (link to another TRAM file) }} | {{OBDtr| 0x044 | link |C8FFFF| 00 00 00 00 | unused | direct animation 1 (link to another TRAM file) }} | ||
{{OBDtr| 0x048 | bitset32 |FFC8FF| 00 00 00 00 | 0 | used parts; | {{OBDtr| 0x048 | bitset32 |FFC8FF| 00 00 00 00 | 0 | used body parts; for original 19-bone hierarchy the bit layout is as follows: | ||
: | :0x000000'''01''' - pelvis | ||
: | :0x000000'''02''' - left thigh | ||
: | :0x000000'''04''' - left calf | ||
: | :0x000000'''08''' - left foot | ||
: | :0x000000'''10''' - right thigh | ||
: | :0x000000'''20''' - right calf | ||
: | :0x000000'''40''' - right foot | ||
: | :0x000000'''80''' - mid | ||
: | :0x0000'''01'''00 - chest | ||
: | :0x0000'''02'''00 - neck | ||
: | :0x0000'''04'''00 - head | ||
: | :0x0000'''08'''00 - left shoulder | ||
: | :0x0000'''10'''00 - left arm | ||
: | :0x0000'''20'''00 - left wrist | ||
: | :0x0000'''40'''00 - left fist | ||
: | :0x0000'''80'''00 - right shoulder | ||
:0x00 | :0x00'''01'''0000 - right arm | ||
:0x00 | :0x00'''02'''0000 - right wrist | ||
:0x00 | :0x00'''04'''0000 - right fist | ||
Aiming screen TRAMs "use" several bones here. Other overlay TRAMs use only "chest". Non-overlay TRAMs use none. | Aiming screen TRAMs "use" several bones here. Other overlay TRAMs use only "chest". Non-overlay TRAMs use none. | ||
}} | }} | ||
{{OBDtr| 0x04C | bitset32 |FFC8FF| 00 00 00 00 | 0 | replaced parts; same | {{OBDtr| 0x04C | bitset32 |FFC8FF| 00 00 00 00 | 0 | replaced parts; same bitset layout as above; only overlay TRAMs other than aiming-screen ones "replace" parts. }} | ||
{{OBDtr| 0x050 | float |FFC800| 00 00 00 00 | 0.000000 | final rotation in radians (for anims that make you turn) }} | {{OBDtr| 0x050 | float |FFC800| 00 00 00 00 | 0.000000 | final rotation in radians (for anims that make you turn) }} | ||
{{OBDtr| 0x054 | int16 |C800C8| 01 00 | 1 | main attack direction; the following directions are possible: | {{OBDtr| 0x054 | int16 |C800C8| 01 00 | 1 | main attack direction; the following directions are possible: | ||
Line 82: | Line 82: | ||
:4 - right | :4 - right | ||
}} | }} | ||
{{OBDtr| 0x056 | uint16 |C87C64| 06 00 | {{OBDtr| 0x056 | uint16 |C87C64| 06 00 | 6 <nowiki>=</nowiki> superpunch | vocalization type (-1 if unused); references one of the 10 vocalization slots in [[OBD:ONCC|ONCC]] | ||
:0 - taunt | |||
:1 - alert | |||
:2 - startle | |||
:3 - checkbody | |||
:4 - pursue | |||
:5 - cower | |||
:6 - superpunch | |||
:7 - superkick | |||
:8 - super3 | |||
:9 - super4 | |||
In this case the value 6 triggers Konoko's "superpunch" vocalization, "Rising fury!" }} | |||
{{OBDtrBK|Extent info}} | {{OBDtrBK|Extent info}} | ||
{{OBDtr| 0x058 | float |B0C3D4| 8D 87 CF 41 | 25.941187 | max horizontal extent of the attack }} | {{OBDtr| 0x058 | float |B0C3D4| 8D 87 CF 41 | 25.941187 | max horizontal extent of the attack }} | ||
Line 108: | Line 119: | ||
{{OBDtr| 0x110 | float |64AAAA| 5E 93 BF 40 | 5.986739 | extent angle (in radians) }} | {{OBDtr| 0x110 | float |64AAAA| 5E 93 BF 40 | 5.986739 | extent angle (in radians) }} | ||
{{OBDtrBK|Farthest extent info - information about the farthest reaching extent in the extent part }} | {{OBDtrBK|Farthest extent info - information about the farthest reaching extent in the extent part }} | ||
{{OBDtr| 0x114 | int16 |EBEBEB| 2F 00 | 47 | frame; -1 if | {{OBDtr| 0x114 | int16 |EBEBEB| 2F 00 | 47 | frame; -1 if there is no attack part of if the animation is for a throw target/victim ("_tgt") }} | ||
{{OBDtr| 0x116 | int8 |8C8CCC| 01 | 1 | attack index to which the max extent belongs }} | {{OBDtr| 0x116 | int8 |8C8CCC| 01 | 1 | attack index to which the max extent belongs }} | ||
{{OBDtr| 0x117 | int8 |FF00C8| 16 | 22 | attack frame offset from the attack with index 0 }} | {{OBDtr| 0x117 | int8 |FF00C8| 16 | 22 | attack frame offset from the attack with index 0 }} | ||
Line 124: | Line 135: | ||
{{OBDtrBK|End extent info}} | {{OBDtrBK|End extent info}} | ||
{{OBDtr2|0x140 | char[16] |FFCD96| konflash1 | impact particle name (reference to 01018-.[[OBD:ONIA|ONIA]], which is called up in the [[OBD:ONCC|ONCC]] file) }} | {{OBDtr2|0x140 | char[16] |FFCD96| konflash1 | impact particle name (reference to 01018-.[[OBD:ONIA|ONIA]], which is called up in the [[OBD:ONCC|ONCC]] file) }} | ||
{{OBDtr| 0x150 | uint16 |C8C864| 00 00 | 0 | hard pause in 1/60 seconds }} | {{OBDtr| 0x150 | uint16 |C8C864| 00 00 | 0 | hard pause in game ticks (1/60 seconds) }} | ||
{{OBDtr| 0x152 | uint16 |C8C864| 12 00 | 18 | soft pause in 1/60 seconds }} | {{OBDtr| 0x152 | uint16 |C8C864| 12 00 | 18 | soft pause in game ticks (1/60 seconds) }} | ||
{{OBDtr| 0x154 | int32 |0096C8| 00 00 00 00 | 0 | number of elements in the sound part }} | {{OBDtr| 0x154 | int32 |0096C8| 00 00 00 00 | 0 | number of elements in the sound part }} | ||
{{OBDtr| 0x158 | int32 |FF80C0| 00 00 00 00 | 0 | runtime only; pointer to the sound for this animation (initialised from [[OBD:BINA/SABD|SABD]])}} | {{OBDtr| 0x158 | int32 |FF80C0| 00 00 00 00 | 0 | runtime only; pointer to the sound for this animation (initialised from [[OBD:BINA/SABD|SABD]])}} | ||
{{OBDtr| 0x15C | int16 |D0C0AF| 00 00 | 0 | runtime only; sound start frame (initialised from SABD) }} | {{OBDtr| 0x15C | int16 |D0C0AF| 00 00 | 0 | runtime only; sound start frame (initialised from SABD) }} | ||
{{OBDtr| 0x15E | int16 |D0C0AF| 3C 00 | 60 | frames per second }} | {{OBDtr| 0x15E | int16 |D0C0AF| 3C 00 | 60 | animation frame rate (typically 60 frames per second) }} | ||
{{OBDtr| 0x160 | int16 |EEDDFF| 06 00 | 6 | compression size }} | {{OBDtr| 0x160 | int16 |EEDDFF| 06 00 | 6 | compression size }} | ||
{{OBDtr| 0x162 | int16 |EEDDFF| 16 00 | 22 | animation type (from anim_types.[[OBD:StNA|StNA]]) }} | {{OBDtr| 0x162 | int16 |EEDDFF| 16 00 | 22 | animation type (from anim_types.[[OBD:StNA|StNA]]) }} | ||
Line 136: | Line 147: | ||
{{OBDtr| 0x168 | int16 |C0C0C0| 07 00 | 7 | to state }} | {{OBDtr| 0x168 | int16 |C0C0C0| 07 00 | 7 | to state }} | ||
{{OBDtr| 0x16A | int16 |C0C0C0| 13 00 | 19 | number of bodyparts }} | {{OBDtr| 0x16A | int16 |C0C0C0| 13 00 | 19 | number of bodyparts }} | ||
{{OBDtr| 0x16C | int16 |FF0080| 50 00 | 80 | number of frames }} | {{OBDtr| 0x16C | int16 |FF0080| 50 00 | 80 | number of frames (at possibly custom frame rate) }} | ||
{{OBDtr| 0x16E | int16 |FF0080| 50 00 | 80 | duration in | {{OBDtr| 0x16E | int16 |FF0080| 50 00 | 80 | duration in game ticks (1/60 seconds) }} | ||
{{OBDtr| 0x170 | bitset16 |FFFFA6| 00 02 | | {{OBDtr| 0x170 | bitset16 |FFFFA6| 00 02 | 0x0200 <nowiki>=</nowiki> COM| variant, the following bits are possible (values in hex): | ||
: | :0x'''01'''00 - "sprint" ('''SPR'''int animation) | ||
: | :0x'''02'''00 - "fight" ('''COM'''bat animation) | ||
: | :0x'''04'''00 - "shoulder" (not used by the engine; possibly for rocket launchers) | ||
: | :0x'''08'''00 - "righty pistol" ('''PIS'''tol animation) | ||
: | :0x'''10'''00 - "lefty pistol" ('''NIN'''ja '''PIS'''tol animation) | ||
: | :0x'''20'''00 - "righty rifle" ('''RIF'''le animation) | ||
: | :0x'''40'''00 - "lefty rifle" ('''NIN'''ja '''RIF'''le animation) | ||
:0x'''80'''00 - "panic" ('''PAN'''ic or '''SCR'''amble animation) | |||
}} | }} | ||
{{OBDtr| 0x172 | char[2] |FFFFA6| AD DE | dead | "varient end"; ignored }} | {{OBDtr| 0x172 | char[2] |FFFFA6| AD DE | dead | "varient end"; ignored by the engine }} | ||
{{OBDtr| 0x174 | uint16 |71FFB8| 00 00 | 0 | atomic start }} | {{OBDtr| 0x174 | uint16 |71FFB8| 00 00 | 0 | atomic start }} | ||
{{OBDtr| 0x176 | uint16 |71FFB8| FF FF | 65535 | atomic end }} | {{OBDtr| 0x176 | uint16 |71FFB8| FF FF | 65535 | atomic end }} | ||
Line 164: | Line 176: | ||
{{OBDtr| 0x188 | char[24] |CACAFF| AD DE | dead | unused }} | {{OBDtr| 0x188 | char[24] |CACAFF| AD DE | dead | unused }} | ||
|} | |} | ||
==Animation timeline== | |||
:'''NOTE:''' The following assumes animation data sampled at 60 frames per second (i.e., in sync with game ticks). Different frame rates have not been studied, and OniSplit only works with 60 fps TRAMs. | |||
The duration of an animation in game ticks is equal to the number of frames covered by the main animation data, i.e., it extends one tick past the last keyframe of the height track or rotation tracks. Over this last tick, the pelvis height and bone rotations are interpolated to the values supplied by the first frame of the ''following'' animation, whereas the horizontal position is advanced using the last velocity entry of the current animation. | |||
Thus an important note about looping animations is that the poses at the start and end of an animation (a combination of height, bone rotation and the accumulated horizontal velocity) are generally ''not'' identical, but rather one tick apart. The same applies to animation pairs (locomotion loops) or any matching animation sequences (e.g., combos). | |||
For the current example (KONCOMpunch_heavy), the duration is 80 ticks, and the main animation tracks are as follows: | |||
*The [[/raw0x0C|height]] track has 80 entries that are used to place the character vertically at every tick, starting at tick 0 and ending at tick 79. At tick 80, i.e., at the end of the current animation's duration, the height is supplied by the next animation. Between ticks 79 and 80, the height is interpolated between the last height entry of KONCOMpunch_heavy and the first height entry of the next animation. | |||
*The [[/raw0x10|velocity]] tracks (horizontal motion of the root) also have 80 entries. However, unlike the height values, the velocities correspond not to ticks but to intervals between ticks, and thus span the whole range of the animation, from tick 0 to tick 80. Starting at tick 80, the first velocity entry of the following animation applies. | |||
*The [[/raw0x34|rotation]] tracks are keyed at ticks (like the height track), but (unlike the height track) are typically not keyed at ''every'' tick: there are intervals (gaps) of variable size between the keys, over which the rotation of each bone is interpolated. Even so, the total duration of the intervals is the same as the time span of the height track, i.e., one tick shorter than the "duration" of the animation. In this example, the first rotation pose corresponds to tick 0 and the last pose corresponds to tick 79. At tick 80, the pose will be read from the following animation, and between ticks 79 and 80, the pose will be interpolated between the last pose of KONCOMpunch_heavy and the first pose of the next animation. | |||
'''NOTE:''' The above description of how heights and rotations are interpolated during the last tick on an animation's duration does not only apply for most of Oni's transitions, which typically involve overlapping timelines and interpolation between two animations playing simultaneously. Nonetheless, the description is useful to understand why the time span of rotation and height data is one tick shorter than the supposed duration of the animation, and also what happens for loops, pairs or combo sequences. | |||
==Direct links== | ==Direct links== |