XML:TRAM: Difference between revisions
Paradox-01 (talk | contribs) (Created page with "__TOC__ {{Template:XMLModdingHints}} ===how convert dae to xml / oni ...=== ====... using batch files==== '''[http://mods.oni2.net/system/files/dae_xml_oni_help.zip Downloa...") |
Paradox-01 (talk | contribs) (+ temp + cat) |
||
Line 1: | Line 1: | ||
{{XML_File_Header | type=TRAM | prev=TRAC | next=TRAS | name=Totoro Animation }} | |||
__TOC__ | __TOC__ | ||
Line 700: | Line 700: | ||
First example: TRAMSTRCOMcomb_p_p.xml | First example: TRAMSTRCOMcomb_p_p.xml | ||
{| border=0 cellspacing=20 cellpadding=0 | {| border=0 cellspacing=20 cellpadding=0 style="float:right" | ||
| [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/colorful_contrail_added.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/colorful_contrail_added_preview.png] | | [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/colorful_contrail_added.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/colorful_contrail_added_preview.png] | ||
|} | |} | ||
Line 718: | Line 718: | ||
Second example is about two different contrails in one TRAM at same time. The animation is "TRAMSTRCOMpunch_heavy.xml". | Second example is about two different contrails in one TRAM at same time. The animation is "TRAMSTRCOMpunch_heavy.xml". | ||
{| border=0 cellspacing=20 cellpadding=0 | {| border=0 cellspacing=20 cellpadding=0 style="float:right" | ||
| [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/different_contrails_in_attack.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/different_contrails_in_attack_previ.png] | | [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/different_contrails_in_attack.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/TRAM/different_contrails_in_attack_previ.png] | ||
|} | |} | ||
Line 764: | Line 764: | ||
* [http://dl.dropbox.com/u/139715/OniGalore/TRAM_macro.zip the macro] (for all TRAM except overlay-TRAM), [http://youtu.be/wxzJ8ahjP8k demo vid] | * [http://dl.dropbox.com/u/139715/OniGalore/TRAM_macro.zip the macro] (for all TRAM except overlay-TRAM), [http://youtu.be/wxzJ8ahjP8k demo vid] | ||
{| width=100% border=0 cellspacing=20 cellpadding=0 | {| width=100% border=0 cellspacing=20 cellpadding=0 | ||
| [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/VBA/v4.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/VBA/v4_TN.png] | | [http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/VBA/v4.png http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/VBA/v4_TN.png] | ||
|} | |} | ||
Line 806: | Line 806: | ||
===from modders=== | ===from modders=== | ||
Following files are available in DAE (and maybe ONI format). | Following files are available in DAE (and maybe ONI format). | ||
{| border=0 cellspacing=20 cellpadding=0 | {| border=0 cellspacing=20 cellpadding=0 style="float:right" | ||
|width="200px"|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/female_stun.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/female_stun_TN.jpg] | |width="200px"|[http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/female_stun.jpg http://i305.photobucket.com/albums/nn207/unknownfuture/Oni_Galore_Images/XSI_modding/female_stun_TN.jpg] | ||
charA and charB performing stun animations | charA and charB performing stun animations | ||
Line 818: | Line 818: | ||
* [http://dl.dropbox.com/u/139715/TRAM/female_stun--dae.zip female stun (throw pair)] (.dae) | * [http://dl.dropbox.com/u/139715/TRAM/female_stun--dae.zip female stun (throw pair)] (.dae) | ||
** note: needs to be slowed down (-> more frames) | ** note: needs to be slowed down (-> more frames) | ||
{{XML}} |
Revision as of 12:38, 11 November 2012
TRAM : Totoro Animation | ||
---|---|---|
XML
TRAC << Other file types >> TRAS |
how convert dae to xml / oni ...
... using batch files
Download this modding environment so you know that the following lines are about.
Before you can run those files you need to put your source files into the "input_folder".
"dae + xml(not 41) to oni.bat" will generate files with QKeys.
"dae to xml(41).bat" will generate files with EKeys.
... using the Windows address bar
The batch file code and the code used for the address bar are identical.
Look at this image and you will understand.
If you use the windows address bar you should have onisplit alway alongside your essential modding folders to have short commands like
- onisplit41 -create:tram output_folder input_folder/*.dae
We want to type as less as necessary, don't we? =)
... using onisplit GUI
Keep in mind that the GUI is only a mask for onisplit. New onisplit versions - v0.52.9.0 or newer don't have the command -create:tram.
normal animations
You can convert such animation by choosing one of the two methods. (normal = no overlay anims)
- - To create QKeyed-animation you need a helper xml file to be placed alongside the dae animation file.
- - EKeyed-animations don't need a helper xml file but edits afterwards the creation.
In any case the amount of needed hand work is quite the same for both methods.
QKeyed-animation refuse to become edited. There's somehow a bug like Samer pointed out on the forums. (Is this still the case? - 5th Dec 2011) But that's not so tragic. You can edit the dae or the xml helper file and then merge them into an oni file again.
Like EdT said an advantage of the xml helper method is that you can breakdown a single dae file into smaller pieces. It's a comfortable way to create multiple animations from one source. E.g. you make combo animations in one dae - let's say punch (p), kick (pk), punch (pkp) - then you make 3 xml helpers. First file goes from frame 0 to 40, second file from 41 to 86, and third file from 77 to 140. The dae file has 120 frames but not the 3 oni files that will be created.
Some lines for the hypothetical second combo animation:
<DaeImport> <Path>TRAM######combo.dae</Path> <Start>41</Start> <End>78</End> </DaeImport> <Lookup> <Type>PK</Type> <AimingType>PK</AimingType> <FromState>Standing</FromState> <ToState>Standing</ToState> <Varient>Combat</Varient> <FirstLevel>0</FirstLevel> <Shortcuts /> </Lookup> <Flags>Attack</Flags>
Don't forget to add types, variants, particle etc. to your xml file before you convert it to the oni format.
testing the created files
Either put them into an AE package or create a plugin.
There's a batch file available that create level0 plugins. Put the created plugin files in your GameDataFolder and run the game.
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)