OBD talk:TRAM

From OniGalore
Revision as of 14:55, 10 October 2012 by Paradox-01 (talk | contribs)
Jump to navigation Jump to search

HEX area

more detailed explanations

Hello all ONI fans, This is not guide how to edit TRAM, it is only TRAM explained in more detail in order to help those who would like to modify it. I see it all the time that you discover already discovered and it is MY FAULT because I didn't share my knowledge X_X. Shame on me. --Loser 19:50, 20 August 2008 (CEST)

runloser.jpg

P.S.: And I am comguy (smart@$$ and coward), not striker ^_^

GENERAL:

  • We need hexeditor or OUP and some decimal to hex (Windows calculator) and decimal to float (see HERE) converters.
  • normal number are written as usual, when I want to write HEx number, I use prefix 0x. so 0x10 means 16.
  • Next here comes explanation of storage types (that is "type" column in table). Storage type is how this value is saved and how can be read by Oni. Types in TRAM which interests us are:
  • Offset: tells us that value points to the exact location in raw file where is something stored. Offset is a bit tricky. It is written in Little endian. So when in offset field is written A0|B4|80|00 , then something starts in raw at position 00|80|B4|A0 . See? Order of bytes is reversed. Keep this in mind. This can be helpful if we need to add some part to the TRAM which is originally not present for this TRAM (usually particles). You add this part (in correct form of course!) to the end of raw file, extending it (HEXeditor needed! Cannot do this with OUP!) and then you note where it begins (offset is usually written on the side) and write it into correct offset field in correct form for Oni(reverse bytes). A few examples of tricky offsets:
  • C5|A6|70|00 means 00|70|A6|C5, so something in raw starts at line 00|70|A6|C0 on the byte 05 (so it is 6th byte from the right, 0 is counted as well!!!).
  • 40|89|14|01 means 01|14|89|40, so something in raw starts at that line. Tricky part is the LAST byte when it is YOU who tries to reverse bytes in order to write them into TRAM ^_~.
  • Link: it tells us (and engine) that we should find some other file to use for something. Link contains internal number of the file we should search for,its res_ID. Usually first 4 bytes of file are this number.
  • Bitset: this is field of some optional possibilites. Each one has its own (hardcoded) number. Numbers are powers of 2 : 0,1,2,4,8,16 (0x10 in hex),32 (0x20 in hex),64 (0x40 in hex),128 (0x80 in hex)
  • Int: integer, it is some value written in hex (not generally, just for this purpose. Generally integer is defined as numeric value which can contain only whole numbers). Beware, again little endian. So if you want to change some "short" field, then type value you want into calculator, convert to hexadecimal. Then fill it in in reverse order (Little endian).
  • Float: field which can contain real number value. Beware, again Little endian. In order to decipher float, use some "float to decimal" converter (maybe the one I have suggested above? ^_^)
  • Char: some word, usually it is name of something. Howgh



Tram all.gif


Offset Type Raw Hex Value Description
0x000 res_id 01 49 07 00 1532 01865-KONCOMpunch_heavy.TRAM
0x004 lev_id 01 00 00 00 0 level 0
0x008 int32 00 00 00 00 0 unknown; always zero
0x00C offset A0 B4 80 00 00 80 B4 A0 at this position starts the "Y-positions of the pelvis" in the raw file.It looks like this:

Tram r01.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 float 67 64 9B 40 4.856006 y-position of the pelvis in 0th frame of TRAM

This part contains Y-axis position (height) of pelvis in EACH frame of animation. If we need to "lower" or "elevate" character (we adopted some TRAM from other character and while performing, our char is "sinking" or "floating") this is place where we go. Beware: wrong values cause Oni to hang.

0x010 offset E0 B5 80 00 00 80 B5 E0 at this position starts the "X/Z - velocities of the pelvis" in the raw file. It looks like this:

Tram r02.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 float EE D0 10 BE -0.141422 x-velocity of the pelvis
0x04 float 00 96 8F 3D 0.070110 z-velocity of the pelvis

Z+ is forward, Z- is back, X+ is left, X- is right

0x014 offset 60 B8 80 00 00 80 B8 60 at this position starts attack part in the raw file:

Tram r03.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 bitset32 00 60 06 00 0, 96, 6, 0 damage-dealing bones; these are "dangerous ones";the following bits are possible:
0x01000000 - pelvis
0x02000000 - left thigh
0x04000000 - left calf
0x08000000 - left foot
0x10000000 - right thigh
0x20000000 - right calf
0x40000000 - right foot
0x80000000 - mid
0x00010000 - chest
0x00020000 - neck
0x00040000 - head
0x00080000 - left shoulder
0x00100000 - left arm
0x00200000 - left wrist
0x00400000 - left fist
0x00800000 - right shoulder
0x00000100 - right arm
0x00000200 - right wrist
0x00000400 - right fist
0x04 float 00 00 00 41 8.000000 knockback aka "how much is enemy pushed back by attack", only works if attack sucesfully damaged enemy
0x08 bitset32 08 00 00 00 8, 0, 0, 0 raw attack part bitset; the following bits are possible:
0 - nothing special, attack can be blocked by any stance of defender (crouch, stand) and deals no damage when blocked
1 - attack is unblockable
2 - attack is high; can be blocked only if defender plays an animation which have "BlockHigh" bit (see 0x3C TRAM bitset), otherwise hits
4 - attack is low; can be blocked only if defender plays an animation which have "BlockLow" bit (see 0x3C TRAM bitset), otherwise hits
8 - attack deals 1/2 damage when blocked + while blocking, it does not use blue "blocked" impact effect but hit impact effect
0x0C int16 14 00 20 hit points; how much it steals from enemy's HP if sucessfully hits
0x0E int16 05 00 5 start frame of attack part; 0 is start of TRAM
0x10 int16 0F 00 15 stop frame of attack part 0 is start of TRAM
0x12 int16 50 00 80 anim_type ID for opponent's animation if attack is sucessful (80 = hit_foot), see THIS file for Anim types, beware, you have to subtract 1 as list starts with 1 but should start with 0
0x14 int16 0A 00 10 number of frames for how long should victim remain in hit anim when he gets hit, if value exceeds about 25 frames, it automatically makes victim play stagger animation instead of its proper one written above
0x16 int16 0A 00 10 number in frames for how long should defender remain in "block" animation, if you set it a bit higher (about 0x10), then AI2 considers that technique with this move causes "blockstun"
0x18 int16 00 00 0 number of frames for how long should defender play stagger animation if defender blocked sucessfully; when set, then AI2 considers that technique with this move causes "block stagger"
0x1A int16 00 00 0 apparently garbage
0x1C int32 00 00 00 00 0 apparently garbage
0x018 offset 00 00 00 00 unused at this position starts the damage part in the raw file; only tgt (target) animations use it, BEWARE, without ThrowTarget bit (see 0x3C TRAM) it causes Loser's bug No.1 (Oni crashes). Raw:

Tram r04.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 int16 14 00 20 damage taken by character
0x02 int16 29 00 41 frame of the animation, when damage is dealt
0x1C offset A0 B8 80 00 00 80 B8 A0 at this position starts the motion blur in the raw file, nothing intersting here for us, it is just eye candy
0x20 offset C0 B8 80 00 00 80 B8 C0 at this position starts the shortcut part in the raw file:

Tram r06.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 int16 2F 00 47 from state; (see Molten's PDF for anim states) this tells us from which anim states can this animation be called and vice versa
0x02 int16 06 00 6 shortcut length in frames
0x04 int32 00 00 00 00 0 replace an atomic animation (0 - no, 1 - yes), see TRAM flags at 0x3C

This is important part. thanks to this we can perform specials as well as other movements (run, sprint). If you are messing around with TRAM and it does NOT want to be performed while all other things see OK, try to think if it has correct shortcut or if another animation related to this one has correct shortcut.

0x24 offset 00 00 00 00 unused at this position starts throw part in the raw file:

Tram r07.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 float 8A 39 2C BF -0.672752 X axis adjustment; when throw is sucessful, used to move "teleport" victim left/right in order to set some distance between participants so throw looks good. If victim cannot move, throw is performed "as is".

X+ is left, X- is right

0x04 float 10 39 B4 3F 0.793839 Y axis adjustment; when throw is sucessful, victim is moved "teleported" up/down by this in order to set some distance between participants so throw looks good.

Curious is that if you "lift" enemy (you set it high Y+) enemy is lifted as if je jumped, bounding box is lifted! Usually when executing TRAMs, Y+ just stretches bounding box of character, that is why you cannot throw them over fences. But this one lifts character completely. Weird, isn't it? Y+ is up, Y- is down

0x08 float 44 2D 1C 41 9.761051 Z axis adjustment; same as X axis, only it is forward/backward

Z+ is forward, Z- is backward

0x0C float DB 0F 49 40 3.141592 angle adjustment; when throw is sucessful, victim is turned around his axis for this angle in order to make throw look good. (3.141 = pi)

P.S.: If you mess it, you can get that victim is performing correct thrown animation, but he turns around and is facing wrong way. Looks goofy :)

0x10 float 00 00 40 41 12.000000 throw distance, beware, if TRAM belong to TRAC which is inheriting some moves from parent TRAC, throw distance MUST be same or longer than throw distance of the same throw in parent TRAC. Otherwise, you will see Loser's bug No.2 ^_^.
0x14 int16 60 00 96 type / aming type; that's the ID (Anim type, se Molten's PDF) for the animation of the target, if you mess this, Oni will play wrong animation or crash.

Loser's bug No.2: Wrong throw animation is ocasionally performed. That is caused by fact that parent throw is IN distance for throw but our TRAC's throw is not. So engine iniciates throw and plays parent's TRAC throw animation and our TRAC thrown animation. Mess ^_^

0x28 offset E0 B8 80 00 00 80 B8 E0 at this position starts the footstep part in the raw file. Nothing to add.
0x2C offset 00 B9 80 00 00 80 B9 00 at this position starts the particle part in the raw file:

Tram r09.gif

Offset Type Raw Hex Value Description
First element (black outline)
0x00 int16 00 00 0 start frame of this particle
0x02 int16 30 00 48 stop frame of this particle
0x04 int32 0D 00 00 00 13 bodypart number; the particle is fixed to this bodypart; look to the TRIA file for a bodypart number
0x08 char[16] contrail ONCP particle name; the first 00 is the stop-byte; reference to 01017-.ONCP, otherwise it plays nothing and put up warning into dev console

Beware of the fact that ONCP particle name is NOT general name of the particle. "Kontrail" is ONCP particle name. "h2h_strtrail_e01" is general name of the particle.

0x30 offset 60 B9 80 00 00 80 B9 60 at this position starts the position part in the raw file. Don't mess with it.
0x34 offset 00 BD 80 00 00 80 BD 00 at this position starts the bodyparts animation part in the raw file. Read its section if you want. Until we can export/import animations and edit them in some program, I encourage you to leave this part alone. I know that sometnig CAN be done by hand work, but it is too time consuming.
0x38 offset 00 00 00 00 unused at this position starts the sound part in the raw file. Howgh
0x3C bitset32 90 00 08 00 144, 0, 8, 0 TRAM bitset collection; the following bits are possible /values in hex):
0x01000000 - private1 (this bit is not animation related, it is used at runtime to mark that the animation was loaded)
0x02000000 - invulnerable, while playing this animation user is invulnerable to melee damage AND cannot be thrown, PAR3/height still hurts him
0x04000000 - blockHigh, if set then while playing this animation user can block high or undefined attacks within some arc which is before him, so if you set this to some animation where user spins, then he can still be legaly kicked to the @$$ and he can be thrown
0x08000000 - blockLow, same as before only it can block low or undefined attacks
0x10000000 - attack, animations with attack part have it, unknown what it does, IMO it turns on soft lock (characters turns with animation a bit in order to hit nearby enemy), but didn't checked
0x20000000 - dropWeapon, if user is armed, he drops weapon when he plays this animation
0x40000000 - inAir, something with jumps, didn't checked
0x80000000 - atomic, whole animation must be played, user cannot interrupt it once it starts
0x00010000 - noTurn, cannot turn by mouse while performing this animation
0x00020000 - attackForward,unknown, looks like this is rough info for AI2 about where attack aims from user's point of view
0x00040000 - attackLeft, same as above
0x00080000 - attackRight, same as above
0x00100000 - attackBackward, same as above
0x00200000 - overlay, these are not standalone animatios, they just overwrite part of already playing one, for example holstering weapon is such an animation
0x00400000 - dontInterpolateVelocity, unknown, but maybe it has something to do with X,Y,Z velocities and fact that for example directional jumps take info about direction vector from X-Z velocity part of TRAM (Y vector is in ONCC)
0x00800000 - throwSource, unknown, throws use it
0x00000100 - throwTarget, if set, then animation can hurt anybody, with its attack part, including teammates. User of TRAM can even hurt himself with "damage part" (user cannot hurt himself with own attack parts). It also allows two (try more, get crash ^_^) attack parts to be executed instead of only one (maybe bug?).
-If you set first attack part to be able to deal damage from 1st to 100th frame of TRAM, and second attack part to deal damage within that limit (e.g. from 25th to 41st frame, it can be again from 1 to 100), than first attack part an hurt from 1st to 100th (as usual), but even if it hits, that second one attack part (25th to 41st) can hurt enemy as well during "its lifetime". So two attack parts are allowed to execute. Note that second attack part MUST be executed while first attack part has active "window", otherwise it won't work.
0x00000200 - realWorld, something with Y-velocities part
0x00000400 - doAim, forces aim animation (PIS/RIF) if user has weapon
0x00000800 - dontAim, forces not to aim
0x00001000 - canPickup, can pickup items in this animations, not like it plays pickup one, but like it "takes" the item if you have this animation on and you collide with item.
0x00002000 - aim360, dunno
0x00004000 - disableShield, if user had active supershield (chr_super "name" 1), this forces him to disable it (chr_super "name" 0)
0x00008000 - noAIPickup, AI2 are not permitted to pick up items with this animations


0x040 link 00 00 00 00 unused direct animation 0 (link to another TRAM file)
0x044 link 00 00 00 00 unused direct animation 1 (link to another TRAM file), these two do NOT ensure that this animation can link, they only allow you to write two animations which can follow immediately, without applying soft pause, see below for more.
0x048 bitset32 00 00 00 00 0 used parts; Aiming screen TRAMs "use" several bones here. Other overlay TRAMs use only "chest". Non-overlay TRAMs use none. So we can ignore this part.
0x04C bitset32 00 00 00 00 0 replaced parts; same legend as above; only overlay TRAMs other than aiming-screen ones "replace" parts.
0x050 float 00 00 00 00 0.000000 final rotation in radians (for anims that make you turn), note that if you are hurt and this animation stopped, you are immediately forced back into your original direction. So if you make Konoko's running punch throw that thrown victim can be hurt and then you punch him, he reverses back to original rotation, "slides on his spin". Looks awful.
0x054 int16 01 00 1 move direction; the following directions are possible:
0 - nothing
1 - forward
2 - backward
3 - left
4 - right
I don't know why it is here, but it is good idea to set it correctly
0x056 int16 06 00 6 attack sound ("Rising fury!"); the number belongs to the sound slot in the ONCC file
0x058 float 8D 87 CF 41 25.941187 max horizontal extent of the attack

-extents are for AI2s. Thanks to these AI2 knows reach of technique (general and then in represented ranges around body) and can attack with it or guard it correctly. You can adjust it a bit if you feel it really needs to, but I don't recommend it as you cannot directly see what changed and if it is for good or for bad.

0x05C float DE E9 1A 40 2.420524 min Y of the attack
0x060 float 95 34 D3 41 26.400675 max Y of the attack
0x064 float 8D 87 CF 41 25.941187 max horizontal extent at 0° (front)
... ... ... ... ...
0x088 float DF 37 87 40 4.225570 max horizontal extent at 90° (left)
... ... ... ... ...
0x0AC float 5A D8 6D 40 3.716330 max horizontal extent at 180° (back)
... ... ... ... ...
0x0D0 float 98 95 E3 40 7.112011 max horizontal extent at 270° (right)
... ... ... ... ...
0x0F0 float 8D 87 CF 41 25.941187 max horizontal extent at 350°
0x0F4 int16 05 00 5 unknown; indicator for the seven floats below; always -1 if the attack part doesn't exist
0x0F6 int8 00 0 unknown; always zero
0x0F7 int8 00 0 unknown; always zero
0x0F8 float 00 00 00 BF -0.500000 unknown; always zero if the indicator is -1
0x0FC float 1E 85 6B BF -0.920000 unknown; always zero if the indicator is -1
0x100 float 19 47 0C 41 8.767358 unknown; always zero if the indicator is -1
0x104 float EB 51 F0 40 7.510000 unknown; always zero if the indicator is -1
0x108 float D7 A3 14 41 9.290000 unknown; always zero if the indicator is -1
0x10C float 0A D7 3B 41 11.740000 unknown; always zero if the indicator is -1
0x110 float 5E 93 BF 40 5.986739 unknown; always zero if the indicator is -1
0x114 int16 2F 00 47 unknown; indicator for the two bytes and seven floats below; always -1 if the attack part doesn't exist or the attack part exists and it's a tgt animation (tgt = target)
0x116 int8 01 1 unknown
0x117 int8 16 22 unknown
0x118 float 85 EB 51 BF -1.850000 unknown; always zero if the indicator is -1
0x11C float E1 7A 7C C1 -3.900000 unknown; always zero if the indicator is -1
0x120 float 69 61 BF 40 16.874636 unknown; always zero if the indicator is -1
0x124 float 70 3D 22 41 10.510000 unknown; always zero if the indicator is -1
0x128 float 47 E1 3A 40 8.860000 unknown; always zero if the indicator is -1
0x12C float 33 33 DB 40 18.460000 unknown; always zero if the indicator is -1
0x130 float F7 C0 2E 3E 0.055320 unknown; always zero if the indicator is -1
0x134 int32 00 00 00 00 0 unknown; always zero
0x138 int32 18 00 00 00 24 amount of elements of the extent part; only used if the attack part exists
0x13C offset E0 BB 80 00 00 80 BB E0 at this position starts the extent part in the raw file; only used if the attack part exists.
-Extent part stores the finest description of attack's path. Thus when you do an attack, AI2 can for example read that it starts going up, goes left a bit, then goes right and down again. How it is stored is still mystery for me.
0x140 char[16] konflash1 impact particle name (reference to 01018-.ONIA, which is called up in the ONCC file)
0x150 int16 00 00 0 hard pause in 1/60 seconds
0x152 int16 12 00 18 soft pause in 1/60 seconds, this pause is forced after animation ends. You simply stand, cannot do a thing. Only if this animaton links to some other one (links means it has correct ID Anim Type so it CAN be followed) this pause is ignored
0x154 int32 00 00 00 00 0 amount of packages of the sound part
0x158 int32 00 00 00 00 0 runtime: pointer to the sound for this animation (initialised from SABD)
0x15C int16 00 00 0 runtime: sound start frame (initialised from SABD)
0x15E int16 3C 00 60 frames per second
0x160 int16 06 00 6 compression size
0x162 int16 16 00 22 animation type from anim_types. See Molten's PDF. This number determines which keypress combination is required to call this animation, if animation can link to other one and many more
0x164 int16 16 00 6 aiming animation type from anim_types.StNA
0x166 int16 00 00 0 from state, this tells engine from which state this animation can be called. Thanks to this you can perform kick, getup kick and crouch kick. All done by same action, only animation state differs.
0x168 int16 07 00 7 to state, this is state in which animation ends. Should correspond so next animation transits smoothly. ^_^
0x16A int16 13 00 19 bodyparts
0x16C int16 50 00 80 frames, you cannot extend frames (Oni will hang) but you can shorten animation if you need. Only be aware that there are some parts of TRAM which can be harmed by shorting TRAM below their end frame.
0x16E int16 50 00 80 duration in in 1/60 seconds, the same as above
0x170 bitset16 00 02 0, 2 varient, the following bits are possible:
0x0001 - SPRint animation
0x0002 - COMbat animation
0x0008 - PIStol animation
0x0010 - NINja PIStol animation (left-handed)
0x0020 - RIFle animation
0x0040 - NINja RIFle animation (left-handed)
0x0080 - PANic or SCRamble animation
Beware, looks like PAN/SCR varient is somewhat messed up. Crashes happen sometimes.
0x172 char[2] AD DE dead varient end; unused
0x174 int16 00 00 0 atomic start, you can set only part of the TRAM to be atomic (cannot be affected by user)
0x176 int16 FF FF -1 atomic end, same
0x178 int16 00 00 0 end interpolation, in frames, beware, too big interpolation looks bad.
0x17A int16 FF FF -1 maximal interpolation
0x17C int16 FF FF -1 action frame, frame where action happens. Action is weapon theft in disarm animations, action is when Mukade actually teleports(changes place), and many other things
0x17E int16 0A 00 10 first level
0x180 uint8 01 1 first "invulnerable" frame, you can set only part of the TRAM to be invulnerable
0x181 uint8 1C 28 last "invulnerable" frame, same
0x182 uint8 02 2 amount of elements in the attack part
0x183 uint8 00 0 amount of elements in the take damage part
0x184 uint8 01 1 amount of elements in the motion blur part
0x185 uint8 01 1 amount of elements in the shortcut part
0x186 uint8 02 2 amount of elements in the footstep part
0x187 uint8 04 4 amount of elements in the particle part
0x188 char[24] AD DE dead unused

Beware, setting wrong values in those "amount of elements" fields may make Oni crash/hang.

--Loser 19:50, 20 August 2008 (CEST)


XML area

Template:XMLModdingHints


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

modding_via_Windows_address_bar_tn.png

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.
Somtimes FromState is set to None; in another scenarios one FromState possibility is not enough.
In those cases Shortcuts are used. They extent the number from what state the animation can be played and under what conditions (replace atomic yes/no).
<ToState> flag Look them up over HERE.
<Varient> flag "<Varient />" if unused. E.g. that's the case for non-combat animations.
Combat
LeftPistol
LeftRifle
Panic
RightPistol
RightRifle
Sprint
<FirstLevel> int16
<Shortcuts> parent tag
<Shortcut> parent tag
<FromState> flag
<Length> int16
<ReplaceAtomic> flag
yes
no
<Flags> flag
RuntimeLoaded
(this bit is not animation related, it is used at runtime to mark that the animation was loaded)
Invulnerable
while playing this animation user is invulnerable to melee damage AND cannot be thrown, PAR3/height still hurts him
BlockHigh
if set then while playing this animation user can block high or undefined attacks within some arc which is before him, so if you set this to some animation where user spins, then he can still be legaly kicked to the @$$ and he can be thrown
BlockLow
same as before only it can block low or undefined attacks
Attack
animations with attack part have it, unknown what it does, IMO it turns on soft lock (characters turns with animation a bit in order to hit nearby enemy), but didn't checked
DropWeapon
if user is armed, he drops weapon when he plays this animation
InAir
something with jumps, didn't checked
Atomic
whole animation must be played, user cannot interrupt it once it starts
NoTurn
cannot turn by mouse while performing this animation
AttackForward
unknown, looks like this is rough info for AI2 about where attack aims from user's point of view -Loser
AttackLeft
same as above
AttackRight
same as above
AttackBackward
Overlay
these are not standalone animatios, they just overwrite part of already playing one, for example holstering weapon is such an animation
DontInterpolateVelocity
unknown, but maybe it has something to do with X,Y,Z velocities and fact that for example directional jumps take info about direction vector from X-Z velocity part of TRAM (Y vector is in ONCC)
ThrowSource
unknown, throws use it
ThrowTarget
if set, then animation can hurt anybody, with its attack part, including teammates. User of TRAM can even hurt himself with "damage part" (user cannot hurt himself with own attack parts). It also allows two (try more, get crash ^_^) attack parts to be executed instead of only one (maybe bug?).
-If you set first attack part to be able to deal damage from 1st to 100th frame of TRAM, and second attack part to deal damage within that limit (e.g. from 25th to 41st frame, it can be again from 1 to 100), than first attack part an hurt from 1st to 100th (as usual), but even if it hits, that second one attack part (25th to 41st) can hurt enemy as well during "its lifetime". So two attack parts are allowed to execute. Note that second attack part MUST be executed while first attack part has active "window", otherwise it won't work.
RealWorld
something with Y-velocities part -Loser
DoAim
forces aim animation (PIS/RIF) if user has weapon
(used PIS/RIF animation and prone)
DontAim
forces not to aim
CanPickup
can pickup items in this animations, not like it plays pickup one, but like it "takes" the item if you have this animation on and you collide with item.
Aim360
unknown
DisableShield
if user had active supershield (chr_super "name" 1), this forces him to disable it (chr_super "name" 0) -Loser
NoAIPickup
AI2 are not permitted to pick up items with this animations
<Atomic> parent tag
<Start> int16
<End> int16
<Invulnerable> parent tag
<Start> int16
<End> int16
<Overlay> parent tag
<UsedBones> flag "<UsedBones />" if unsued.
Pelvis
LeftThigh
LeftCalf
LeftFoot
RightThigh
RightCalf
RightFoot
Mid
Chest
Neck
Head
LeftShoulder
LeftArm
LeftWrist
LeftFist
RightShoulder
RightArm
RightFist
<ReplacedBones> flag "<ReplacedBones />" if unused.
Pelvis
LeftThigh
LeftCalf
LeftFoot
RightThigh
RightCalf
RightFoot
Mid
Chest
Neck
Head
LeftShoulder
LeftArm
LeftWrist
LeftFist
RightShoulder
RightArm
RightFist
<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>
None
Forward
Backward
Left
Right
<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
Pelvis
LeftThigh
LeftCalf
LeftFoot
RightThigh
RightCalf
RightFoot
Mid
Chest
Neck
Head
LeftShoulder
LeftArm
LeftWrist
LeftFist
RightShoulder
RightArm
RightFist
<Start> int16
<End> int16
<Lifetime> int8
<Alpha> int8
<Interval> int8
<Footsteps> parent tag
<Footstep> parent tag
<Frame> int16
<Type> flag
Left
Right
<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)

Thrown1 = ###COMthrow_fw_p_tgt
Thrown2 = ###COMthrow_fw_k_tgt
Thrown3 = ###COMthrow_bk_p_tgt
Thrown4 = ###COMthrow_bk_k_tgt

(running throws)

Thrown4 = ###COMrun_throw_fw_p_tgt
Thrown6 = ###COMrun_throw_fw_p_tgt
Thrown7 = ###COMrun_throw_bk_k_tgt
Thrown8 = ###COMrun_throw_bk_k_tgt (not tested)

(tackle throw = catching)

Thrown9 = ###COMrun_tkl_fw_p_tgt (not tested)
Thrown10 = ###COMrun_tkl_bk_p_tgt

(pistol disarms)

Thrown11 = ###PISthrow_fw_p_tgt
Thrown12 = ###PISthrow_fw_k_tgt
Thrown13 = ###PISthrow_bk_p_tgt

(rifle disarm)

Thrown14 = ###PISthrow_bk_k_tgt (not tested)
Thrown15 = ###RIFthrow_fw_p_tgt
Thrown16 = ###RIFthrow_bk_p_tgt
Thrown17 = ###RIF? = (not tested)

About the naming:

"fw" = face to face throw
"bk" = thrower is facing victim's back
"throw" inside TRAM names are sometimes shortened with "thr"
"p" can also be missing
<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
Unblockable
Low - blocker needs to crouch
High - blocker needs to stand; if Low and High are set then blocker can block from stand and crouch
HalfDamage - the blocker gets half of the damage
<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>.)
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

colorful_contrail_added_preview.png
       <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".

different_contrails_in_attack_previ.png
       <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"
v4_TN.png


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:


Run - a minimal cycle:


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

female_stun_TN.jpg

charA and charB performing stun animations