XML:TRAM: Difference between revisions

481 bytes added ,  26 December 2025
m
replaced Oni Central Forum link with archive.org snapshot URL
m (wording)
m (replaced Oni Central Forum link with archive.org snapshot URL)
 
(8 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}}
{{integrate|See {{SectionLink||XSI}}.}}


{{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 47: Line 47:
: 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 "Weights" section for an explanation of exactly how <Weight> is handled).
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 660: Line 660:
|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 [http://oni.bungie.org/forum/viewtopic.php?pid=39787#p39787 hit by both of them].
| 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 696: Line 701:
| <HitLength>
| <HitLength>
| int16
| int16
| Number of frames that the target should remain in his hit animation state when he gets hit. If 20, Oni automatically upgrades the character to a stagger animation.
| Number of frames that the target should remain in his hit animation state when he gets hit. If > 20, Oni automatically upgrades the character to a stagger animation, the length of which is the greater of 30 or <HitLength>.
|-
|-
| <StunLength>
| <StunLength>
| int16
| int16
| Number of frames that the target should remain in his blocking animation state when he blocks the attack. If ≥ 15, Oni automatically upgrades the character to a block stun.
| Number of frames that the target should remain in his blocking animation state when he blocks the attack.
|-
|-
| <StaggerLength>
| <StaggerLength>
Line 798: Line 803:
* When setting keyframes, each body part should have moved. This rule of thumb will give a more natural-looking animation.
* When setting keyframes, each body part should have moved. This rule of thumb will give a more natural-looking animation.
* The first body part to be animated is always the pelvis.
* The first body part to be animated is always the pelvis.
* Watch out for pelvis rotations so that the XYZ rotations don't overlap too much, otherwise you will get into a [[wp:Gimbal_lock|gimbal lock]].
* Watch out for pelvis rotations so that the XYZ rotations don't overlap too much, otherwise you will get into a [[wp:Gimbal lock|gimbal lock]].


Also see our [http://oni.bungie.org/forum/viewtopic.php?id=1433 OCF thread].
Also see our OCF thread [http://web.archive.org/web/20220524164331/http://oni.bungie.org/forum/viewtopic.php?id=1433 "Creating new animations (TRAMS) for Oni"].


==Import==
==Import==
Line 812: Line 817:
===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 in the [[#Using OniSplit to calculate extents|section below]].
'''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,277:


==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.


2,191

edits