5,389
edits
(important limitation to particles in TRAMs) |
(basic documentation of frame counts that are stored as bytes, and the limitations that it entails; should probably be duplicated in some form on XML:TRAM) |
||
Line 164: | Line 164: | ||
{{OBDtr| 0x188 | char[24] |CACAFF| AD DE | dead | unused }} | {{OBDtr| 0x188 | char[24] |CACAFF| AD DE | dead | unused }} | ||
|} | |} | ||
;Direct links | ;Direct links | ||
Line 176: | Line 175: | ||
:That means that if a p_p_p or p_p_k animation follows after a p_p animation there will be no pause between them but for animations other than p_p_p and p_p_k there may be a pause of 'soft pause' frames between them. | :That means that if a p_p_p or p_p_k animation follows after a p_p animation there will be no pause between them but for animations other than p_p_p and p_p_k there may be a pause of 'soft pause' frames between them. | ||
;Extent info | ;Extent info | ||
:The extent information is used by the AI to figure out if an attack can reach the enemy. This information is only present/used if the animation contains attacks. Many of the fields in the extent information can be computed from other available information like the attack/position/extent parts. The only "unique" information here is the "max horizontal extent 0° ... 360°" array and the extent part count/offset fields. The alternate move direction does not appear to be ever used. | :The extent information is used by the AI to figure out if an attack can reach the enemy. This information is only present/used if the animation contains attacks. Many of the fields in the extent information can be computed from other available information like the attack/position/extent parts. The only "unique" information here is the "max horizontal extent 0° ... 360°" array and the extent part count/offset fields. The alternate move direction does not appear to be ever used. | ||
;From state, to state, animation type, varient, shortcuts | ;From state, to state, animation type, varient, shortcuts | ||
:These are used to find specific animations. Each character has a current animation state and a current varient. When the engine searches for an animation with a specific type it considers those that have a matching "from state" and "varient". For example both "comb_k_k" and "jump_fw_kick" animations have the type "kick" but one can be executed when the character is in the "standing" state and the other can be executed when the character is in "falling back" or "falling forward" states. | :These are used to find specific animations. Each character has a current animation state and a current varient. When the engine searches for an animation with a specific type it considers those that have a matching "from state" and "varient". For example both "comb_k_k" and "jump_fw_kick" animations have the type "kick" but one can be executed when the character is in the "standing" state and the other can be executed when the character is in "falling back" or "falling forward" states. | ||
;Aiming Type | ;Aiming Type | ||
Line 192: | Line 188: | ||
:While Oni can store a number as large as 255 in 0x187, Oni only allocates memory for 16 particles per TRAM, and it does not check to make sure that the actual number of particles is ≤ 16. Thus you can easily crash Oni by initiating a move which has 17 particles attached. | :While Oni can store a number as large as 255 in 0x187, Oni only allocates memory for 16 particles per TRAM, and it does not check to make sure that the actual number of particles is ≤ 16. Thus you can easily crash Oni by initiating a move which has 17 particles attached. | ||
;Eight-bit frame counts and limiting consequences thereof | |||
:Frame counts in Oni's TRAM are either absolute frame counts since the beginning of the animation, or intervals between events of keyframes. Mostly they are 16-bit integer fields (allowing for a range of either 65535 frames = 1092.25 seconds, or 32767 frames = 546.1333... seconds, depending on whether it's interpreted as signed or unsigned by the engine). In some contexts, though, 8-bit integers (bytes) are used instead, which reduce the range to 255 frames = 4.25 seconds (or 127 frames = 2.11666... seconds if the engine reads the byte as signed). | |||
:The following contexts involve 8-bit frame counts: | |||
*[[OBD:TRAM/raw0x1C|Motion blur]]: | |||
**the "Lifetime" parameter is an 8-bit frame count, meaning a "ghost" cannot last more than 4.25 frames before disappearing completely; (LIMITATION SEVERITY: MINOR) | |||
**the "Interval" is an 8-bit frame interval, meaning that successive "ghosts" can be spawned no more than 4.25 seconds apart; (LIMITATION SEVERITY: MINOR) | |||
**the undocumented final field also looks like it could be an 8-bit count or interval (hypothesis so far is "trailing in frames"). | |||
*[[OBD:TRAM/raw0x34|Rotation data]]: | |||
**Intervals between a bone's keyframes are 8-bit fields, meaning that keyframes cannot be more than 4.25 seconds apart. (LIMITATION SEVERITY: MINOR) | |||
*"Extent info" (main TRAM file, see above): | |||
**The "attack frame offset from the attack with index 0" is an 8-bit frame interval, meaning that attacks belonging to a same TRAM cannot be more than 4.25 seconds apart, or their extent may not be taken into account properly by the AI. (LIMITATION SEVERITY: Can be an issue for very long special moves or throws, where damage is dealt both at the beginning and at the end of the animation.) | |||
*"Invulnerable" range (main TRAM file, see above): | |||
**The invulnerability range is a pair of 8-bit frame indices, meaning that the invulnerability range cannot extend past 4.25 seconds. (LIMITATION SEVERITY: Can be an issue for very long crowd-clearing moves, like a much longer "Whirling Dervish" (ELICOMpunch_heavy) or long versions of Muro's "Breakdancer" or "Helicopter" moves) | |||
:The above information assumes 60fps as the animation's frame rate. If the framerate can be reduced, the limiting time amounts will increase accordingly. | |||
{{OBD_File_Footer | type=TRAM | prev=TRAC | next=TRAS | name=Totoro Animation Sequence | family=Character}} | {{OBD_File_Footer | type=TRAM | prev=TRAC | next=TRAS | name=Totoro Animation Sequence | family=Character}} | ||
{{OBD}} | {{OBD}} |