XML:TRAM: Difference between revisions
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) m (-anim-merge) |
||
Line 9: | Line 9: | ||
For editing the actual animation you will want to use method B. | For editing the actual animation you will want to use method B. | ||
While doing the export you might see errors such as | While doing the export with ONCC you might see errors such as | ||
Cannot find instance 'TRAMKONCOMthrow_rev' | Cannot find instance 'TRAMKONCOMthrow_rev' | ||
Line 24: | Line 24: | ||
====via command line==== | ====via command line==== | ||
onisplit -extract:xml | for single file export | ||
onisplit -extract:xml output_path -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname.oni | |||
for merged file export | |||
onisplit -extract:xml output_path '''-anim-merge''' -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname1.oni path_to\TRAMnameN.oni | |||
Revision as of 12:40, 6 June 2013
TRAM : Totoro Animation | ||
---|---|---|
XML
TRAC << Other file types >> TRAS |
export
TRAM files can be extracted A) as pure xml files or combined B) as xml and dae files.
For editing the actual animation you will want to use method B.
While doing the export with ONCC you might see errors such as
Cannot find instance 'TRAMKONCOMthrow_rev' Cannot find instance 'TRAMKONCOMthrow_rev' Cannot find instance 'TRAMKONRIFturn_right' Cannot find instance 'TRAMKONOKOlev18_ZomStand' Cannot find instance 'TRAMKONOKOcorner_hide' Cannot find instance 'TRAMKONPIScorner_hide'
Ignore them, those files doesn't exist.
(Someday we should remove them from TRAC.)
via command line
for single file export
onisplit -extract:xml output_path -anim-body:path_to\TRBS_or_ONCCname.oni path_to\TRAMname.oni
for merged file export
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
When you start Vago the "General" tab should be open by default. If not click on it. Then follow the five easy steps.
Step 1: Select "ONI" as ("From") input format.
Step 2: Select "XML" as ("To") output format.
Step 3: Check "Another TRAM" to chose a character animation file.
Step 4: Click on "Add" button to chose an ONCC file.
Step 5: Click on "Convert".
editing the actual animation
You can load the dae file into an compatible editor. So far the community's favorite is Mod Tool.
- For correct Mod Tool settings look HERE
- Tutorial: basics of Oni animation editing (todo)
import
revisited animations
Coming soon.
total new animations
Coming soon.
file structure
TRAM | +-- header: animation type, state, flags, particle, sounds, etc. +-- actual animation: heights, velocities, rotations +-- additional data: positions, throw adjustments, selfdamage, attack parts, extents
list of tags, types, and flags
Use the search function of your web browser to quickly find a tag.
(work in progress)
tag | type | description |
<Lookup> | parent tag | |
<Type> | flag | Look them up over HERE. |
<AimingType> | flag | Look them up over HERE. |
<FromState> | flag | Look them up over HERE.
|
<ToState> | flag | Look them up over HERE. |
<Varient> | flag | "<Varient />" if unused. E.g. that's the case for non-combat animations.
|
<FirstLevel> | int16 | |
<Shortcuts> | parent tag | |
<Shortcut> | parent tag | |
<FromState> | flag | |
<Length> | int16 | |
<ReplaceAtomic> | flag |
|
<Flags> | flag |
|
<Atomic> | parent tag | |
<Start> | int16 | |
<End> | int16 | |
<Invulnerable> | parent tag | |
<Start> | int16 | |
<End> | int16 | |
<Overlay> | parent tag | |
<UsedBones> | flag | "<UsedBones />" if unsued.
|
<ReplacedBones> | flag | "<ReplacedBones />" if unused.
|
<DirectAnimations> | ||
<Link> | link | First slot. "<Link />" if unused. |
<Link> | link | Second slot. "<Link />" if unused. |
<Pause> | ||
<Hard> | int16 | |
<Soft> | int16 | |
<Interpolation> | ||
<End> | int16 | |
<Max> | int16 | |
<FinalRotation> | float | final rotation in degrees |
<Direction> |
| |
<Vocalization> | ||
<ActionFrame> | ||
<Impact> | link | "<Impact />" if unsued. |
<Particles> | parent tag | |
<Particle> | parent tag | |
<Start> | ||
<End> | ||
<Bone> | flag | |
<Name> | link | |
<MotionBlur> | parent tag | |
<MotionBlur> | parent tag | sequence element |
<Bones> | flag |
|
<Start> | int16 | |
<End> | int16 | |
<Lifetime> | int8 | |
<Alpha> | int8 | |
<Interval> | int8 | |
<Footsteps> | parent tag | |
<Footstep> | parent tag | |
<Frame> | int16 | |
<Type> | flag |
|
<Sounds> | parent tag | "<Sounds />" if unused. |
<Sound> | parent tag | |
<Name> | char[32] | OSBDfile.imp.oni (don't use file prefix/suffix) |
<Start> | int16 | the frame when the sound starts to play |
<Heights> | ||
<Height> | float | |
<Velocities> | parent tag | |
<Velocity> | 2 x float | |
<Rotations> | parent tag | |
<Bone> | parent tag | There are 19 bone tags. One for each body part. |
<EKey> | int8 + 3 * float | for normal animations |
<QKey> | int8 + 4 * float | for overlay animations used by TRAS
onisplit v0.9.54.0 produces <QKeys> (quaternions) instead of (euler rotations) <EKey> for normal animations |
<PositionOffset> | parent tag | <PositionOffset> and <Positions> belong together. In the binaries they are written in the place. |
<X> | int16 | |
<Z> | int16 | |
<Positions> | parent tag | |
<Position> | parent tag | |
<Height> | float | vertical extent |
<YOffset> | float | y offset of the vertical extent from character location |
<ThrowSource> | parent tag | "<ThrowSource />" if unused. |
<TargetAdjustment> | parent tag | |
<Position> | 3 * float | |
<Angle> | float | |
<Distance> | float | |
<TargetType> | flag | The flags are part of the animation type list.
(static throws)
(running throws)
(tackle throw = catching)
(pistol disarms)
(rifle disarm)
About the naming:
|
<SelfDamage> | parent tag | "<SelfDamage />" if unused. |
<Damage> | parent tag | sequence element |
<Points> | int16 | damage taken by character |
<Frame> | int16 | frame of the animation, when damage is dealt |
<Attacks> | parent tag | |
<Attack> | parent tag | Only 2 attack parts per file are allowed. Normally the target gets only one hit. But if the attack frames of both attack parts are overlapping then the target can be hit by both of them. |
<Start> | int16 | First frame where damage can be inflicted to an opponent. |
<End> | int16 | Last frame where damage can be inflicted to an opponent. |
<Bones> | flag | Set here the bones that can inflict damage. |
<Flags> | flag |
|
<Knockback> | float | Target gets knockbacked by this amount. |
<HitPoints> | int16 | damage points |
<HitType> | flag | Animation type for opponent's animation when attack isn't blocked. |
<HitLength> | int16 | Number of frames for how long should blocking char remain in hit anim when he gots hit. |
<StunLength> | int16 | Number in frames for how long should blocking char remain in blocking animation. |
<StaggerLength> | int16 | Number of frames for how long should blocking char perform stagger anim after sucessful block. |
<Extents> | parent tag | Nowadays that data becomes calculated from onisplit automatically. |
<Extent> | parent tag | One tag per frame. In numbers: attack end - attack start + 1. (E.g. start=5; end=6; it makes 2 involved frames.) |
<Angle> | float | In degree. |
<Length> | float | |
<MinY> | float | |
<MaxY> | float | |
<AttackRing> | parent tag | Contains always 36 <Length> tags, no more, no less. Gets calculated by onisplit. (The AttackRing was formerly know as horizontal extents.) |
<Length> | float | Horizontal extents in 10° intervals. They make a zone of danger so the AI knows that the animation is harmful there. (It give them the chance to dogde an attack.) |
extents and XML
Ever wondered how comes Artificial Intelligence can recognize incoming attack and block or dodge? Extents ( found out by Geyser and fully uncovered by Neo ) are the key.
There are two types of extents -
- <Extents>, its packages store this info:
- <Angle> at which is this extent radiated from character. 0° is in front of character, 180° is in the back
- <Length> of this extent,
- <MinY> minimal height of this extent
- <MaxY> maximal height of this extent
- Length, MinY and MaxY serve for creating invisible area in space which is "dangerous to be in". If AI collides and notices it (refer to notice field in MELE), it will attempt to block or dodge according to its modifiers in given MELE profile. Again, see fields in MELE.
- Number of <Extent> is equal to attack frames: <End> minus <Start> plus one (because start frame counts too).
- (e.g. TRAMKONCOMkick_low1: <End>30</End> minus <Start>22</Start> plus one = nine <Extent>.)
- Number of <Extent> is equal to attack frames: <End> minus <Start> plus one (because start frame counts too).
- These extents are pretty impossible to guess, so leave them until Neo comes up with extent computation ( probably from attack bones and bonetrack rotations ).
- BUT
- Always add at least one package, because its Length, MinY and MaxY will be taken as the longest extent, the most maximal Y and the most minimal Y vales. Those are needed, otherwise character won't react to this attack.
- <HorizontalExtents>, its packages store this info:
- 36 fields (exactly 36, no more, no less, otherwise it won't compile back into .oni file), which correspond to areas in 10° intervals around character ( so overall 360°, full horizontal circle around character).
- Imagine character. Look at it from above. Make a circle with this character being center of this circle. Now divide this circle with lines after each 10°; and those are horizontal extent lines used by packages ^_^.
- Once more 0° is in front of the character, 180° is behind character. Intervals go clockwise. So first package is horizontal extent for 0° line, second package is for horizontal line which is 10° clockwise and so on.
- These extents can be guessed up to some degree. Use common sense, look at Your custom attack and tip which lines are probably intersected by attacking limbs of Your move.
- Watch out - if attack is frontal ( direct kick forward ), you should worry not only about 0° (directly front), but also about 10°, 20° (a bit to the right) and also about 340°, 350° (a bit to the left).
- Next guess the length (you will get used to the sense of distance soon), write it in, test it with some AI which blocks a lot. If you did it right, Your attack will be often blocked.
- Don't overdo it with horizontal extent length - too long will cause AIs to react too far from you, does not look pretty.
Have extended fun, --Loser 19:12, 13 July 2010 (UTC)
adding colorful trails
Open the xml formated TRAM and search for the "Particles" tag and insert your code.
First example: TRAMSTRCOMcomb_p_p.xml
<Particles> <Particle> <StartFrame>0</StartFrame> <EndFrame>12</EndFrame> <Bone>LeftFist</Bone> <Name>contrail</Name> </Particle> </Particles>
"contrail" is looked up by the used character class (ONCC) which lunch the actual particle, here it is "h2h_strtrail_e01".
Second example is about two different contrails in one TRAM at same time. The animation is "TRAMSTRCOMpunch_heavy.xml".
<Particles> <Particle> <Start>0</Start> <End>54</End> <Bone>RightWrist</Bone> <Name>contrail</Name> </Particle> <Particle> <Start>0</Start> <End>54</End> <Bone>LeftWrist</Bone> <Name>contrail_2</Name> </Particle> </Particles>
Note that you need to register the second contrail in the used ONCC as well. Using your own contrail particle is also possible, just insert it's name between the <Type> tags.
<ONCPParticle> <Name>contrail</Name> <Type>h2h_strtrail_e01</Type> <BodyPart>-1</BodyPart> </ONCPParticle> <ONCPParticle> <Name>contrail_2</Name> <Type>h2h_murtrail_e01</Type> <BodyPart>-1</BodyPart> </ONCPParticle>
fw throws
Situation: you load two chars into Mod Tools and rotate (+/-180°) the throw target char because you want them to stand face to face. When you are done animating, the target animation would need to be reversed again: multiplying the velocities with -1, also the rotation needs a tweak. So far it looks like you need *(-1) for the x rotation and -/+180° (depending on your initial change) for the y rotation.
Excel macro to tweak fw throws
- put your files into the "input_and_output" folder
- disable macro security if you don't want to click every time on the macro option button
- close other worksheets first before you run the macro
- if you are not afraid of VBA code you can enter the developer environment by hitting [alt]+[F11], e.g. for extending the attack library with more screenshots and settings
- in that case search for: "LibraryThrows", " LibraryAttack", "Picture", "CBAttackHelp.AddItem"
a look on run move complex
Example on Striker's moves, meant as illustration for "what would be needed for new run trams".
Run cancel:
- STRIKEidle1 / another idle animation
- STRIKErun1stepa
- STRIKErun1stepb
- STRIKEidle1 / another idle animation
Run - a minimal cycle:
- STRIKEidle1 / another idle animation
- STRIKErun1stepa
- STRIKErunstart
- STRIKErun_rt
- (STRIKErun_lt)
- STRIKErunstop
- STRIKEidle1 / another idle animation
list of (known) unused animations
Those could be reintegrated/recycled/watever ...
from the original game
- KONOKOconsole_punch what the name says
- KONOKOlev3_intro looks like she was placing something (bomb?) and then running away
- KONOKOlev4_undress from an official aborted cutscene
- KONOKOlev16_bomb planting a bomb
- KONCOMsuper_kick now used in OTA scripts (mod) as spawn event
- KONCOMsuper_punch KONCOMpunch_heavy but without attack name shout, HalfDamage, and makes 10 less damage in first attack part
- COMPISidle_special1 comguy checking environment and his gun
- STRPISidle_special1 striker showing off his gun, whatever
- THUGlev1_direct thug probably directing a truck driver
from modders
Following files are available in DAE (and maybe ONI format).
charA and charB performing stun animations |
- Fury double flip (.dae)
- note: -
- Konoko enters prone mode (.dae + .oni)
- note: prone mode artefact
- Konoko leaves prone mode (.dae)
- note: prone mode artefact
- female stun (throw pair) (.dae)
- note: needs to be slowed down (-> more frames)