8,452
edits
m (corrected my corrupted rephrasing of Loser's note on ThrowAdjustment) |
Paradox-01 (talk | contribs) m (phone view compatible) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{XML_File_Header | prev=TRAC | type=TRAM | next=TRAS | name=Totoro Animation}} | {{XML_File_Header | prev=TRAC | type=TRAM | next=TRAS | name=Totoro Animation}} | ||
{{update|This article contains links to the now defunct Oni Central Forum. Sections: List of Tags near <Attack>, Editing 3D Data}} | |||
{{TOCfloat|side=right}} | |||
==General information== | ==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: | ||
Line 42: | Line 43: | ||
===Elaboration=== | ===Elaboration=== | ||
Animations never stop – they flow from one to another. (See the concept of [[wp: | Animations never stop – they flow from one to another. (See the concept of [[wp:Finite-state machine|state machines]] in gaming.) The default case is a character getting spawned and then just standing there: he idles forever. This brings us to the core attributes of every animation: '''type, state, variant'''. | ||
Now then, the idle animation does not link to a specific follow-up animation – it rather links to a follow-up ''state''. | Now then, the idle animation does not link to a specific follow-up animation – it rather links to a follow-up ''state''. | ||
: Ironically all anims have a <FromState> and a <ToState> field, but no obvious <CurrentState> which can cause confusion on what the current anim's state actually is. This gives us two options of how to think about the situation: either consider <FromState> as usually being the <CurrentState>, or states exist only ''between'' anims and serve as ''transition rules''. | : Ironically all anims have a <FromState> and a <ToState> field, but no obvious <CurrentState> which can cause confusion on what the current anim's state actually is. This gives us two options of how to think about the situation: either consider <FromState> as usually being the <CurrentState>, or states exist only ''between'' anims and serve as ''transition rules''. | ||
Linking to a follow-up state allows for multiple choices of what specific anim comes next. An anim is picked up randomly from a pool of valid anims. Their probability or <Weight> is determined by the anim listing in the TRAC – the anim collection (see | Linking to a follow-up state allows for multiple choices of what specific anim comes next. An anim is picked up randomly from a pool of valid anims. Their probability or <Weight> is determined by the anim listing in the TRAC – the anim collection (see {{SectionLink||Weights}} for an explanation of exactly how <Weight> is handled). | ||
Anyway, to let an character flow from one anim state to another, the <ToState> is used. Let's say an SBG grenade hits Konoko. The particle's '''damage type''' is '''blownup'''; this and the direction of the incoming damage force an anim of type '''Blownup''' or '''BlownupBehind''' to play, such as TRAMKONOKOblownup1. | Anyway, to let an character flow from one anim state to another, the <ToState> is used. Let's say an SBG grenade hits Konoko. The particle's '''damage type''' is '''blownup'''; this and the direction of the incoming damage force an anim of type '''Blownup''' or '''BlownupBehind''' to play, such as TRAMKONOKOblownup1. | ||
Line 67: | Line 68: | ||
==Weights== | ==Weights== | ||
Let's say that we're playing as a Ninja, we are in the state Standing, and we hit the action key to perform a taunt. The engine recognizes the context (no console to interact with), places the character in combat mode, and looks up anims of type Taunt. Since we are in combat mode, the next anim must be of variant Combat if possible. These lookups boil down to two valid possible anims: NINCOMtaunt1 (a spin) and NINCOMtaunt2 (the [[wp: | Let's say that we're playing as a Ninja, we are in the state Standing, and we hit the action key to perform a taunt. The engine recognizes the context (no console to interact with), places the character in combat mode, and looks up anims of type Taunt. Since we are in combat mode, the next anim must be of variant Combat if possible. These lookups boil down to two valid possible anims: NINCOMtaunt1 (a spin) and NINCOMtaunt2 (the [[wp:Moonwalk (dance)|moon walk]] Easter egg). The engine picks one of them randomly. | ||
However, NINCOMtaunt1 has a TRAC Weight (probability) of 100 while NINCOMtaunt2 has a TRAC Weight value of just 5. So the chances are quite high that we will not see the moon walk taunt. | However, NINCOMtaunt1 has a TRAC Weight (probability) of 100 while NINCOMtaunt2 has a TRAC Weight value of just 5. So the chances are quite high that we will not see the moon walk taunt. | ||
Line 240: | Line 241: | ||
::Unused by the engine. | ::Unused by the engine. | ||
:DisableShield | :DisableShield | ||
::If the player has an active [[supershield]], this disables it (the flag is placed on four Mutant Muro attacks: his two supers, the claw-stuck-into-ground move and the sliding | ::If the player has an active [[supershield]], this disables it (the flag is placed on four Mutant Muro attacks: his two supers, the claw-stuck-into-ground move and the sliding "[[wikt:kancho|kancho]]" maneuver; it is also hardcoded to be removed when the Zeus Thunderbolt attack is used). | ||
:NoAIPickup | :NoAIPickup | ||
::AIs are not permitted to pick up items with this animation. | ::AIs are not permitted to pick up items with this animation. | ||
Line 660: | Line 661: | ||
|valign="top"| <Attack> | |valign="top"| <Attack> | ||
|valign="top"| parent tag | |valign="top"| parent tag | ||
| Only 2 attack parts per file are allowed. Normally the target gets only one hit. But if the attack frame ranges of both attack parts are overlapping, then the target can be | | Only 2 attack parts per file are allowed. Normally the target gets only one hit. But if the attack frame ranges of both attack parts are <span style="font-weight: bold; color: red;">overlapping</span>, then the target can be hit by both of them. | ||
Total frames: ============================== | |||
Attack 1: ---#########<span style="font-weight: bold; color: red;">#####</span>------------- | |||
Attack 2: ------------<span style="font-weight: bold; color: red;">#####</span>#########---- | |||
|- | |- | ||
| <Start> | | <Start> | ||
Line 812: | Line 818: | ||
===Attacks=== | ===Attacks=== | ||
====Extents and XML==== | ====Extents and XML==== | ||
'''As a regular modder you don't need to know how the attack ring and the extents get calculated.''' If you just want to create an attack animation then add an appropriate <Attacks> code block to your XML as seen | '''As a regular modder you don't need to know how the attack ring and the extents get calculated.''' If you just want to create an attack animation then add an appropriate <Attacks> code block to your XML as seen under {{SectionLink||Using OniSplit to calculate extents}}. | ||
'''How attack ring (horizontal extents) and extents get calculated''' | '''How attack ring (horizontal extents) and extents get calculated''' | ||
Line 1,272: | Line 1,278: | ||
==List of unused animations== | ==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, with links to videos of them where applicable. These could be recycled in a new mod. | ||
'''From the original game''' | '''From the original game''' | ||
* KONOKOconsole_punch: What the name says (the engine can use that animation depending on the console's configuration, see [[OBD:BINA/OBJC/CONS|CONS]]) . | * KONOKOconsole_punch: What the name says (the engine can use that animation depending on the console's configuration, see [[OBD:BINA/OBJC/CONS|CONS]]) . | ||
* KONOKOlev3_intro: Looks like she's placing something (bomb?) and then running away. | * KONOKOlev3_intro: Looks like she's placing something (bomb?) and then running away. | ||
* KONOKOlev4_undress: From an aborted clothes-changing cutscene. | * [https://www.youtube.com/watch?v=dszw2vmlmzw KONOKOlev4_undress]: From an aborted clothes-changing cutscene. | ||
* KONOKOlev16_bomb: Planting a bomb. | * KONOKOlev16_bomb: Planting a bomb. | ||
* KONCOMsuper_kick: Now used in [[OTA]] as a spawn event, and by the fan-made character [[Shinatama Evolved]]. | * KONCOMsuper_kick: Now used in [[OTA]] as a spawn event, and by the fan-made character [[Shinatama Evolved]]. | ||
* KONCOMsuper_punch: KONCOMpunch_heavy but without the shouted attack name, has HalfDamage flag, and does 10 less damage in its first attack part. | * KONCOMsuper_punch: KONCOMpunch_heavy but without the shouted attack name, has HalfDamage flag, and does 10 less damage in its first attack part. | ||
* COMPISidle_special1: Comguy checking environment and his gun; meant for a feature that would visually depict an elevation in the AI's level of alertness after, say, hearing a noise. | * [https://www.youtube.com/watch?v=CRuZq_uYOQk COMPISidle_special1]: Comguy checking environment and his gun; meant for a feature that would visually depict an elevation in the AI's level of alertness after, say, hearing a noise. | ||
* STRPISidle_special1: Striker checking his his gun and communicating with an ally (another unused alertness-elevation animation). | * STRPISidle_special1 (see above link): Striker checking his his gun and communicating with an ally (another unused alertness-elevation animation). | ||
* THUGlev1_direct: Thug probably directing a truck driver. | * THUGlev1_direct: Thug probably directing a truck driver. | ||
edits